Jump to content
  • Advertisement
Sign in to follow this  
zny

how to make a 3d world-edit?

This topic is 4603 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i want do make a sample terrain-edit, but i do not know how to do it anyone can give me a sample example? many thanks!

Share this post


Link to post
Share on other sites
Advertisement
You mean like an editor that edits 3d terrain?

It depends on what you're asking. Just to be clear, I don't really know anything about this. Now, with that out of the way:

If you're talking about how to create the whole window and load terrain files, etc, etc, then you'll really have to go through these things step by step and learn how to do them:

  1. Set up a window in your API of choice (OpenGL, DirectX)

  2. Drawing (triangles, meshs, models)

  3. Loading terrain from a file

  4. Picking (clicking on the window and selecting the right object)


I know that's general and a bit short, but I got tired halfway through.

Anyway, to the terrain editing specifics: the way I see it is that you'll need a large mesh that consists of the vertices for the terrain.

Whenever the user clicks, you'll need to use picking to find which vertex was clicked on, or even enable the selection of more than one vertex, either through click-and-drag to create a 2d box on the screen and choose all the vertices inside the box, or you can go with the brush method. Basically the mouse cursor is a brush that has a specific effect (make the terrain higher, lower, etc) and a range, then the user uses the brush, all the terrain within the range of the brush (usually a radius with the mouse cursor position as the center point) has the brush's effect applied to it.

I hope this gave you at least a starting point. Sorry I couldn't be of more help, as I said before, I haven't actually done anything like this.

Good luck.

Share this post


Link to post
Share on other sites
If you're loading your heightmap from a 2d bitmap, any graphical editor will do. If however you want to load your data as a mesh, you might as wel use 3dsmax or any other decent CAD program. You can edit terrain with that better than you ever could with your own coded tools.
I use 3dsmax for the terrain in my engine. It works by drawing the contours as lines and then applying a "terrain" modifier to it. Just try it, if ofcourse you've got MAX.

Jeroen

Share this post


Link to post
Share on other sites
save yourself the trouble and buy a license for Freeworld3D. It's cheap as....www.freeworld3d.org

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!