Jump to content

[SOLVED] - Computing Normals From Verts and Triangles


MackeyK24
 Share

Recommended Posts

Can someone please help me out with computing normals from just the verts and triangles in C# Unity Side. Currently i am using the Unity Mesh object to calculate normals like so: 

Mesh mesh = new Mesh();
mesh.name = "sceneNavigationMesh";
mesh.vertices = triangulatedNavMesh.vertices;
mesh.triangles = triangulatedNavMesh.indices;
mesh.RecalculateNormals();

 But the Mesh object is limited to 65000 verts... So i am going to need to manually calculate normals... But don't know how. What are the Magic Formulas for calculating the normals?

Again... Any help would be awesome :)

 

Link to comment
Share on other sites

I tried the ComputeNormal code (both in babylon javascript and from C# exporter)... The verts are listed in debug layer but does not show up... It looks like it reversed or something... Because the vertex data is coming string from unity raw heights  maybe we have to flip the normals or something like like... Can (AND HOW) would i flip normals (if thats even the problem)

 

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...