Jump to content

cylinder mesh : positions, normals or indices ?


jerome
 Share

Recommended Posts

Hi,

 

I noticed the cylinder mesh has got some kind of "edge" on its surface when other "circular" meshes doesn't have this artefact.

 

I rotated the cylinder in the light so this limit is visible :

http://www.babylonjs-playground.com/#AM1YW

 

(please zoom in, you'll see a separation between two colors)

 

Has this something to do with cylinder vertexData positions or indices, or with normals computation ?

 

I have the same artefact when I create a circular ribbon mesh even when specifying to "close" it  (last positions join first ones in indices declaration)

Link to comment
Share on other sites

no, it's not a tesselation problem... definetly not

 

I don't express it well. 

I closed up the cam near by the cylinder here : http://www.babylonjs-playground.com/#AM1YW#1

As you can see, the coloration is not continuous : there are a darker blue left side and a lighter blue right side separated by this kind of surface "edge".

 

As if the final vertices in the rotation weren't shared with the firt ones  in indices array, so the normals would be computed as for non-contiguous faces (don't know, just a thought).

 

This artefact doesn't appear on other meshes computed along a complete rotation like torus or spheres (but I've got it too when I fold over a ribbon, even when explicitly joining indices of "first" and "last" vertices).

Link to comment
Share on other sites

ok

 

I have the same problem with a cylindric closed ribbon despite I really reuse concerned (last and first ones in the rotation) vertices. So I guess it may be in the normals computation... therefore it would happen in other circular meshes then, so I don't really know.

Link to comment
Share on other sites

ok, I gues it's more a problem of vertice reuse.

After the rotation (cos/sin), the last vertex indexes should be declared as the the first ones in the indices array.

 

Not sure I'm very clear :) , but I think you guess what I mean

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