Tell me what you think

Well, I want to know if my idea(s) will work out in the end, so here they are:



One TerrainPage will be the terrain for the the whole area I am building (it will be big) and the terrain will be loaded from a .obj/.jme file.



There will be one main node which and all the other nodes will be children of this node.



Objects such as houses, trees, and or rocks will have there own node.



Players will have their own node.



So, tell me if what I have thought up so far is going to work well.



Thanks!

That is basically how you should go about, yes. Nodes are in fact not just a way to group things spatially but also for rendering purposes etc., so grouping via Nodes definitely makes sense.

Good luck with your game!

normen said:

That is basically how you should go about, yes. Nodes are in fact not just a way to group things spatially but also for rendering purposes etc., so grouping via Nodes definitely makes sense.
Good luck with your game!


Ty :)

But I am mainly for example making a node per tree, so it might be a lot of nodes, and I am not sure if that will be a performance decreaser.

The nodes probably less than the tree meshes. I suggest using SharedNodes for that and using locking

normen said:

The nodes probably less than the tree meshes. I suggest using SharedNodes for that and using locking


Explain more please :)

In JME2 each Trimesh, like a tree, box ect, has a large arraylike structure containing all vertexes,ect. So having 5 trees are 5 times redundant data. Here coes SharedNode,wich allows to have a clone of another node with the same Trimeshes referenced, so only one copy is needed.

Downside, it does not work for animations, cause if you change the orginal vertexes, of course every SharedNode useing it, will change to.

Empire Phoenix said:

In JME2 each Trimesh, like a tree, box ect, has a large arraylike structure containing all vertexes,ect. So having 5 trees are 5 times redundant data. Here coes SharedNode,wich allows to have a clone of another node with the same Trimeshes referenced, so only one copy is needed.
Downside, it does not work for animations, cause if you change the orginal vertexes, of course every SharedNode useing it, will change to.


So I guess sharednode is out of the question :P

So I guess I am just going to have one node per in-game object.

btw, afaik you can't create a terrainpage from an .obj. If you load an obj-file you simply have

a trimesh. If you want to use TerrainPage you have to create a height map via e.g. image.

Look at the jmetest terrain-demos.


manbearpig said:


So I guess sharednode is out of the question :P

So I guess I am just going to have one node per in-game object.


not necessary,, you can use shaders to allow them to have a wind effect. Actually you can change it to sharednodes later anyway


Yeah, forget about skeleton animations on every treeā€¦ Way too much overhead.

ttrocha said:

btw, afaik you can't create a terrainpage from an .obj. If you load an obj-file you simply have
a trimesh. If you want to use TerrainPage you have to create a height map via e.g. image.
Look at the jmetest terrain-demos.




I am now using normens physics library and I think terrain will just be a PhysicsNode.

normen said:

Yeah, forget about skeleton animations on every tree.. Way too much overhead.


Yea, I will have to look into shaders that give a wind effect.