Skip to content

unity's world coordinate is left-hand, did you do something on the mesh and shader? #10

Closed Answered by julienkay
WormCoder asked this question in Q&A
Discussion options

You must be logged in to vote

Importing the .obj file is done using Unity's standard Asset Import Pipeline, which handles loading data from .obj in the correct way. So the mesh doesn't need any manual conversion, because Unity does it for you.

In the shader I do perform some coordinate system conversion. This gets a bit messy to explain, because the original code itself flips y-and z, but only for synthetic and unbounded 360° scenes (can be seen here https://github.com/google-research/jax3d/tree/main/jax3d/projects/mobilenerf if you diff the three view_*.html files). They do it inside the evaluateNetwork() function in the fragment shader.

In my Unity viewer, I opted to do that conversion in the vertex shader instead, …

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@WormCoder
Comment options

Answer selected by julienkay
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@WormCoder
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #9 on January 18, 2023 08:57.