Trees bushes etc just where I want

Hi!



I finally made my island terrain and it looks nice, I used FreeWorld3d.



Now that I have loaded my big scene (4096x4096)  I have to place trees and bushes all around, but I also have to load some other models for the enemies camps, crates, barrels etc



The big problem is: where to place them? I can't use a random algorithm because there are different constraints…there can't be trees on the roads and in the enemies camps etc etc



So I think the best choise is to make an xml file witch contains all the entities and their position in the world



What editor can I use to import my heightmap and graphically place trees etc and then export in an xml file witch contains the position of each entity?

You should be able to do that in FreeWorld3D, but you can also import the scene into Blender and add the trees there…  If they're static models then there isn't much reason to read from an XML if the placement is always the same…

sbook said:

You should be able to do that in FreeWorld3D, but you can also import the scene into Blender and add the trees there...  If they're static models then there isn't much reason to read from an XML if the placement is always the same..


Yes the placement is always the same...

In FreeWorld3d I can place models and billloards onto the map but I can't do the same thing in jme because I don't know in witch position I have put each tree in FW3D...and I don't know how to export the FW3D scene in xml or somithing similiar...

Your advise is to create a big single 3d model of the scene in blender or haven't I understood? I think it will be very weighty...I have to load very lot of trees...so I think that loading just one model for each type of tree and then using sharedNode will be better...

My problem is just to know the correct position of each tree...

Ah gotcha, What I would do is make sure you understand where the 0,0,0 point is and make sure you can put something at that point so you're assured the scaling is correct.  From there, I would create grid lines over the scene at specified intervals (maybe with alternating colors?)  to begin to give you an idea of distances in the scene…  It shouldn't be too hard to start "planting" nodes around the map :wink:

how about a own safe format? kinda like

x;z;classname



100,100,de.empirephoenix.models.greentree



the y you could get with a ray for each object, determining the heigh of the terrain at the position.

sbook said:

Ah gotcha, What I would do is make sure you understand where the 0,0,0 point is and make sure you can put something at that point so you're assured the scaling is correct.  From there, I would create grid lines over the scene at specified intervals (maybe with alternating colors?)  to begin to give you an idea of distances in the scene..  It shouldn't be too hard to start "planting" nodes around the map ;)


Yes I know where the 0,0,0 point is...my terrain is centered in 0,0,0 and extends in x and z by 2048 units (I have a 128x128 heightmap and I use a terrainScale of 32)
Creating grid lines over the scene and use them to have an idea of the positions is not bad, but I'd prefer an editor...If I don't find any I will use grid lines...thanks

Quote:
how about a own safe format? kinda like
x;z;classname

100,100,de.empirephoenix.models.greentree

the y you could get with a ray for each object, determining the heigh of the terrain at the position.

my problem is to set x and z values without break my constraint, the y value is not a problem, I just use terrain.getHeight(x,z) to obtain it

Searching all around I found monkeyworld3d, it seems to be a complete scene editor for jme…

but there is no tutorial for the last version, and I really don't know how to use it!



how it export vegetation?

Monkeyworld3d is pretty old, and now unmaintained (It used jME1).



You might be interested in SceneWorker though

sbook said:

Monkeyworld3d is pretty old, and now unmaintained (It used jME1).

You might be interested in SceneWorker though


That's why I can't find no guide for mw3d...thanks for the advise...I'll ceckout SceneWorker, it seems to be what I need...

It's a great little tool and is probably the quickest way to import a model and put it into a .jme binary.  The developer, ncomp, is active around the forums as well, so that's a plus :slight_smile:

sbook said:

It's a great little tool and is probably the quickest way to import a model and put it into a .jme binary.  The developer, ncomp, is active around the forums as well, so that's a plus :)


yes it's actually a great tool...but I can't use it for my purpose...however I found the way to place 3d objects in FW3d and export an xml file with all the infos I need...it's not so good like the vegetation paint tool, but it will work...I just have to manually add thousands of trees :D

thanks anyway for your advises

ps: just a little curiosity...how can I draw a grid over my terrain and render it? I found ray and lines but they are not spatials...
slash17 said:
yes it's actually a great tool...but I can't use it for my purpose...however I found the way to place 3d objects in FW3d and export an xml file with all the infos I need...it's not so good like the vegetation paint tool, but it will work...I just have to manually add thousands of trees :D

thanks anyway for your advises


Glad to help, if you're feeling motivated, a quick wiki entry on how your adventures with FW3D and jME went would be very cool!  That XML bit caught my attention ;)

slash17 said:

ps: just a little curiosity...how can I draw a grid over my terrain and render it? I found ray and lines but they are not spatials...



http://www.jmonkeyengine.com/wiki/doku.php/axis_and_grids
sbook said:

Glad to help, if you're feeling motivated, a quick wiki entry on how your adventures with FW3D and jME went would be very cool!  That XML bit caught my attention ;)

http://www.jmonkeyengine.com/wiki/doku.php/axis_and_grids


thanks for the link...I won't never find it!

now I'm doing the game for an exam...I hope I'll find the way to use the xml of fw3d and the time to write down a little wiki...in any case, my game will be open ;)