Jump to content

Fancy tricks with Vertices: Master Thread


Recommended Posts

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. :D
Here's the project so far:

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! :D

1) Is there a fast way to extrude meshes? I plan on building a doom1-like-editor, so extruding is a big deal :D
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! :D

Link to comment
Share on other sites



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()


Link to comment
Share on other sites

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.





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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...