Well, I have a chunk made of a 3d array of int. Each int is a type of scene node, for example, I have 3 blocks scene nodes with type 1, 2, 3, when I go to render so I just render with that 3 scene nodes in different positions, like a 2d tile map.
So, may anyone teach me how to render many objects with one or 3 scene nodes? I try to do but never call the render method of my chunk class, that is a derived from ISceneNode.
Render many object with one scene node
Re: Render many object with one scene node
Helps if you post code what you tried, then it's easier to see what's going on. But usually when render is not called it's either because you did not register the node in OnRegisterSceneNode or it is clipped away because getBoundingBox returns the wrong values. You can avoid the bounding-box test completely if you set your node to setAutomaticCulling(0).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Render many object with one scene node
Here the code: http://pastebin.com/SHdERteRCuteAlien wrote:Helps if you post code what you tried, then it's easier to see what's going on. But usually when render is not called it's either because you did not register the node in OnRegisterSceneNode or it is clipped away because getBoundingBox returns the wrong values. You can avoid the bounding-box test completely if you set your node to setAutomaticCulling(0).
See the render method in last lines.
The problem was because not register the node, but now has another, the chunk isn't shows more than the last block (the last with type == 1). Does is possible to render more than one block with my chunk render method? I don't want to use one scene node by "tile" because takes many memory. Do you know a better method of render many blocks with just one scene node?
Re: Render many object with one scene node
CuteAlien, can you give me a link where shows how to render many objects with just one scene node? If you don't know, so I'll search for another method to render blocks with low memory usage.
Re: Render many object with one scene node
Search for "batching". You're the #14355676756 asking about how to make Minecraft.
Re: Render many object with one scene node
Where I said that I'm making a minecraft like?
Just of block?
I'm making a voxels editor and not a game ¬¬
But thank you, I'll search for batching
Just of block?
I'm making a voxels editor and not a game ¬¬
But thank you, I'll search for batching