Jump to content

Recalculate mesh shading


focomoso
 Share

Recommended Posts

But with baking the transform, you have to rebuild the normals anyway, so you're extending the time even more. You also loose the bounding box which won't work in many cases. 

I agree that you shouldn't rebuild the normals every time a mesh is scaled, but there should be a simple method in the babylon core that does this correctly, regardless of the scaling on the mesh.

 

Link to comment
Share on other sites

When you scale a mesh with a non uniform scale (meaning not on all axis at the same time), you change the topology of the mesh. So you NEED to rebuild the normals. The current way to do it is to bake the transform and recalculate the normals. We also need to rebuild the bounding box (with the update function)).

Your idea is not a bad idea at all as it only update the normals. I'm just wondering if it is general enough to be included in the framework :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...