joshcamas Posted November 14, 2016 Share Posted November 14, 2016 Hia guys! I'm working on a little editor for my project, (Going to release more on that in the coming weeks!) and I'm using @satguru's sexy editControl! Beautiful work that is! However, I do not have too much knowledge on the subject. Therefore, I'm going to start this master thread that will feature both questions as well as my own findings. Here's the project so far:http://i.imgur.com/nFlm9Pq.png As you can see, I've simply attached the wonderful edit control to switch between meshes and vertices (which are just tiny meshes that either set or get the vertices' position) and it works! However, I do have some questions. Here they be! If ya'll have any questions of your own, be sure to ask them as well! This ain't just for me ya know! 1) Is there a fast way to extrude meshes? I plan on building a doom1-like-editor, so extruding is a big deal 2) Can I add a point in between 2 vertices? Like imagine just adding a vertex or whatever. How in the world does that work? That's it for now I think! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 14, 2016 Share Posted November 14, 2016 Hey 1. we already support extrusion for parametric shapes: http://doc.babylonjs.com/tutorials/Parametric_Shapes#extrusion. Basically extrusion is abotu adding more indices and more vertices 2. You must get the vertex data associated with a mesh and add more info in it. You can find an example of vertices manipulation here: http://doc.babylonjs.com/tutorials/How_to_Merge_Meshes You will have to get the vertices Data for your mesh (position,normal and all associated attributes) and add a new value for all of them. Then you will need to add more faces using mesh.getIndices() Quote Link to comment Share on other sites More sharing options...
JohnK Posted November 14, 2016 Share Posted November 14, 2016 Not exactly what you want but each of the following deals with manipulating vertex data in some way so might be worth a read. Although you probably know this anyway. http://babylonjsguide.github.io/snippets/Increasing_Facets http://babylonjsguide.github.io/advanced/Custom http://babylonjsguide.github.io/advanced/Normals http://babylonjsguide.github.io/advanced/Updating_Vertices jerome and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
joshcamas Posted November 15, 2016 Author Share Posted November 15, 2016 Ayee thanks to both of you, these links are awesome! I'll post my findings below as I wade through them 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.