Cage Mesh UV validation expects EXACT floating point values (no epsilon tolerance)

I started getting an error while trying to upload a UGC head that I was working on.
The issue was very opaque… what unexpected UVs was it talking about?

Well, I dove into the UGCValidation code to figure out what was wrong, and discovered the code for validating the cage mesh UVs. There’s a predefined dictionary of UVs called WrapTargetCageUVReferenceValues. I wrote some code to snap my cage mesh UVs to the nearest values in this dictionary, and found that the errors were… quite small. Most of the time a magnitude difference of less than 0.0001.

  correcting UV
	old: 3.69422102, 0.319555014 
	new: 3.69431996, 0.319570988 
	diff: 0.00010022489004768431
  correcting UV
	old: 3.72608304, 0.246077999 
	new: 3.72621012, 0.246140003 
	diff: 0.00014139678387437016
  correcting UV
	old: 3.7301929, 0.312626004 
	new: 3.73042011, 0.31270501 
	diff: 0.00024055695394054055
  correcting UV
	old: 3.79952788, 0.27986601 
	new: 3.79974008, 0.279897988 
	diff: 0.00021458858100231737
  correcting UV
	old: 3.72608304, 0.246077999 
	new: 3.72621012, 0.246140003 
	diff: 0.00014139678387437016
  correcting UV
	old: 3.79952788, 0.27986601 
	new: 3.79974008, 0.279897988 
	diff: 0.00021458858100231737
  correcting UV
	old: 3.7301929, 0.312626004 
	new: 3.73042011, 0.31270501 
	diff: 0.00024055695394054055
  correcting UV
	old: 3.76120996, 0.354229987 
	new: 3.7615099, 0.354404986 
	diff: 0.00034725075238384306
  correcting UV
	old: 3.72608304, 0.246077999 
	new: 3.72621012, 0.246140003 
	diff: 0.00014139678387437016 (x2)
  correcting UV
	old: 3.76120996, 0.354229987 
	new: 3.7615099, 0.354404986 
	diff: 0.00034725075238384306
  correcting UV
	old: 3.77772999, 0.430159986 
	new: 3.77835989, 0.430440992 
	diff: 0.0006897396524436772
    correcting UV
	old: 3.79952788, 0.27986601 
	new: 3.79974008, 0.279897988 
	diff: 0.00021458858100231737 (x2)
  correcting UV
	old: 3.78078198, 0.502425015 
	new: 3.78129005, 0.502544999 
	diff: 0.0005220453022047877
  ...

If they need to be absolute, I feel like some kind of auto-correction could kick-in here. This behavior was cutting off a previous UGC body I uploaded, as well as the new one I was working on. I’m not sure how or when I touched the UVs, but I thought I had them close enough to be a non-issue.

8 Likes

Hello,

Thank you for reaching out and reporting your finding. We are currently investigating and discussing internally on how to fix or improve this experience. We appreciate your patience and support, and will update ASAP

2 Likes

Hi, do you have a repro file for the head before you added the correction?

2 Likes

The check should no longer be occurring. Thanks!

2 Likes

Upon closer inspection of my error checking, there definitely were some problematic UVs in my dataset. The error for some was close to 0.01, which is understandably pushing things.

image

I think the importer should provide auto-correction to the cage UVs when the rig is known to be an avatar rig and the UVs are close enough to where they’re supposed to be that it can be unambiguously resolved.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.