Particle emit objects like mesh scene node

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
riveranb
Posts: 28
Joined: Fri Sep 23, 2011 9:37 am

Particle emit objects like mesh scene node

Post by riveranb »

Is there already someone provided a solution of my question?
My question is to emit real objects (not billboards) like mesh scene nodes from the particle system scene node.

What I'm trying is to attach a mesh scene node to dynamically created particles' positions.
But another problem may be if some of the mesh as particles are transparent. ( not always solid ),
then the registerNodeForRendering( ) should become necessary right?
In such situation, I should create a single scene node for each particle?
So a mesh scene node need to be copied many times for all particles?

If this can not be avoided, is there a quick or robust solution like cache mechanism to solve the node copy issue at each frame?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Particle emit objects like mesh scene node

Post by hybrid »

Since this is a completely fresh thread, would you please be so kind and link the original thread where your question was originally stated? For now, the answer is no. Although this idea is already on the list of design changes for one of the next Irrlicht releases. At least a reqwrite of the billboarding is, and this will also affect particle systems. I guess that arbitrary mesh movement will also be possible with the new system. BTW: Do you think more about dynamic creation of the nodes, or movement?
riveranb
Posts: 28
Joined: Fri Sep 23, 2011 9:37 am

Re: Particle emit objects like mesh scene node

Post by riveranb »

Well, I think I did not express very well with my pool English. ^^"
This is exactly my original thread of this question.
And, ....
I am still trying to use ISceneNode::clone() for copy nodes for all dynamically created particles, in CParticleSystemSceneNode::doParticleSystem()
That is the major issue of my current concern.
I am afraid that clone() is not efficient (fast) enough for every frame procedure, doParticleSystem().
But I cannot figure out another way right now.

And Hybrid, I do not understand clearly what you mean about "dynamic creation of nodes or movement"?
Can you explain it with more detail.
Anyway, I do appreciate your opinions.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Particle emit objects like mesh scene node

Post by hybrid »

I think clone has not much more overhead than doing the creation manually. You will always have certain memory allocation, though, which will require some time. So you're probably limited to a few mesh particles in a scene. Or you change the emitter to store the meshes elsewhere, and optimize the handling somehow.
My question regarding creation or movement was where the main problem lies. Is it the movement of several objects in sync? This could be also made by an advanced scene node animator, which controls the movement of several objetcs at once. Or is it the creation and destruction of objects, which is the major task of the emitter. I guess the latter is at least not yet implemented in a way which makes it simple to deal with anything else than point particles.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Particle emit objects like mesh scene node

Post by mongoose7 »

I should think the most efficient way would be to keep a pool of scene nodes. When a particle dies, you return the node to the pool. When you want a new particle you go to the pool.
riveranb
Posts: 28
Joined: Fri Sep 23, 2011 9:37 am

Re: Particle emit objects like mesh scene node

Post by riveranb »

To hybrid, I think the main strategy what I'm trying is more close to the creation and destruction of objects related to particles created by the emitters.
And I agree with mongoose7, the pool for garbage node management is quite a good solution.
Post Reply