Neos-Metaverse / NeosPublic

A public issue/wiki only repository for the NeosVR project
193 stars 9 forks source link

Set Default Values for Vertices' UV0 data in TriangleMesh to Match Positional data #3903

Open Jackalgirl opened 1 year ago

Jackalgirl commented 1 year ago

Is your tweak request related to a problem? Please describe.

By default, a TriangleMesh's UV0 x, y values for each of its vertices is 0, 0. This impacts the application of materials to the triangle (that is: the material looks like a hazy smear since it isn't being mapped properly).

Describe what would you like tweaked

Set up the TriangleMesh so that by default, it contains the same values in each vertex's UV0 x, y fields as are in their x, y positional fields.

I am not sure how copying this info into the UV1-3 x, y fields (and populating the "normal" x, y, and z fields, or providing tangental data) will provide additional support (I haven't experimented with more materials than PBS Metallic yet), but you may also consider filling those fields by default as well. I'm sure they're in there for a reason.

Describe alternatives you've considered

At the time being, the fix is really simple: edit your Mesh and copy the values over. But this might be a big confusing for new users, especially ones (like me) not especially familiar with UV mapping.

Additional context

No response