Treant Posted December 4, 2016 Share Posted December 4, 2016 Hi, I'm new to babylon JS, sorry for silly questions. I follow this tutorial http://doc.babylonjs.com/tutorials/Parametric_Shapes and when i'm extruding my 2D shape along Z axis it looks just fine: http://www.babylonjs-playground.com/#RF9W9#387 When I do it along Y axis (with changed path) result becomes flat:http://www.babylonjs-playground.com/#RF9W9#389 How do I create correct path? Quote Link to comment Share on other sites More sharing options...
JohnK Posted December 4, 2016 Share Posted December 4, 2016 Hi @Treant and welcome. It mig ht not jump out at you but it is in the documentation that you can only extrude along the z axis Quote you only set these points in the xOy plane, so every z coordinate is zero. ..... Let's now imagine you could stretch this 2D shape along the Z-axis to give it some volume... this is extrusion Well OK you can give a little variation to x and y as you extrude along Z but as set up currently you can only extrude in the general Z direction. For any other direction you need to extrude along z axis and rotate the finished mesh. It is possible to use a ribbon to produce an extrusion in any direction but you have to do a little more work. If you want to play around with extrusions give this a go http://cubees.github.io/factory/extrude/extrude.html you can download the results as a .babylon file. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 4, 2016 Share Posted December 4, 2016 i working on something else, maybe its helpful i leave it here http://www.babylonjs-playground.com/#DMLWQ#2 minimal version: http://www.babylonjs-playground.com/#DMLWQ#3 Quote Link to comment Share on other sites More sharing options...
jerome Posted December 4, 2016 Share Posted December 4, 2016 http://www.babylonjs-playground.com/#RF9W9#390 I think there's is a little misunderstanding here. When using extrusion, you have two steps : - the shape definition what will be used as a model to be extruded along an axis in the space. This shape is to defined in the xOy plane (actually, you can set some z values if you want). Just consider that this plane is the one that will be slided along the axis, orthogonally to it. - the path definition what is the curved axis (or linear) the model is extruded along. It can go to any direction in the space. So # 1 : planar model described in xOy plane whatever the extrusion path then # 2 : extrusion path whatever the chosen planar model There's no constraint nor dependancy between #1 and #2 JohnK 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted December 4, 2016 Share Posted December 4, 2016 @jerome must stop following my expections which were that #1 and #2 were not independent. Now all is clear. jerome 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.