Jump to content

Extrude CAP problem


c75
 Share

Recommended Posts

yep

 

The extrude cap process only computes the barycenter of the shape, so it can get some weird results if the shape isn't concave nor symetric what is the case in your  demo.

This a (my) choice of implementation because the extruded shapes can be dynamically morphed and the computation speed really matters to change the geometry on air. In brief, the cap algo must be as simple as possible.

demo : http://www.babylonjs-playground.com/#20IBWW#2

doc : http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#extruded-shape 

 

So if you have a convex model shape and you don't need to morph your extrusion dynamically, I would suggest you not to use the embbeded caps but to generate a triangulated plane polygon instead : http://doc.babylonjs.com/classes/2.2/PolygonMeshBuilder

 

 

Unless someone wants to try to implement a fast cap triangulation process  ;)

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