Jump to content

[SOLVED] particle system (explosion) problem


photo

Recommended Posts

Hi,

 

we are having a problem with a particle system and are a bit stumped tbh.

 

situation:

 

The particle system is pretty much the explosion1 sample and is set to be emitter based.

 

The camera is attached to a spacecraft flying through space as follows:

 

a 'top_container' is moving through space controlled by tracker.

 

this top_container contains a 'spacecraft' node which is controlled by a subtrack to do relative motion to main track. The camera is a child of this spacecraft node and is also controlled by a subtrack to do some relative rotation to main and spacecraft subtracks.

 

top_container also contains an 'asteroids' container which is controlled by a subtrack to do relative motion.

 

The end result is that the camera moves through the asteroid field at a limited speed, while both camera/craft and asteroid field travel at very high speed towards a distant point in space. (unigine sim version in double mode)

 

 

Along the way players can shoot at the asteroids to eliminate them, hence the explosion. When an asteroid is hit the particle system is cloned, the parent of the clone set to the asteroids container and its transform set to the transform of the asteroid that has been hit. That asteroid is then disabled.

 

When doing the above the particle systems behave weirdly though. The explosion does not play correctly at all. The effect is comparable to very quickly instantiating multiple systems at the same location or a very long lifetime of the explosion_glow system. see screenshots:

 

00033_zpssiskppx3.png

 

00034_zps6gend3xz.png

 

00035_zpsc7aevljp.png

 

00037_zpsllmqmvns.png

 

00042_zpsnb1z8nu1.png

 

 

The same or a similar explosion plays fine when at a later time a planet explodes (planet not moving and craft also more or less stationary).

 

We also found that if we set the clone particle systems parent to be the player and place the explosion 100m in front of the camera (local transform) it plays fine as well:

 

00013_zpspe59yy7u.png

 

00021_zps8yv1gdbe.png

 

00022_zpsigpjt2br.png

 

00029_zpsa0lm57oz.png

 

00030_zpsw6e73vad.png

 

00031_zpsnmo88ikr.png

 

00032_zpsovqw1mdg.png

 

 

As it clearly plays fine in several other situations the particle system itself should be ok. Is there any reason it should not work correctly when both camera and particle system are moving at very high speed but relatively slow compared to each other? (it still works correctly when both are moving at very high speed but are stationary relative to each other)

 

Any ideas or help in finding this would be highly appreciated! (this is a hold-up for a quite important deadline..)

 

 

Link to comment

I have uploaded a severely stripped version which still exhibits the problem.

 

This is using the 7-7-2014 sdk. (command line from bin dir: ./main_x64d -data_path ../ -engine_config ../data/asteroids/unigine.cfg -system_script ../data/asteroids/unigine.cpp -video_app opengl -video_resizable 1 -video_mode 3)

 

Note that the explosions are less directly visible as I had to replace several things to get it working with a clean sdk. Amongst others we added a quaternion parameter type to tracker. I had to remove those tracks which means the movement of the camera doesn't follow the same path as before. Explosions are random as well now so they may happen behind the camera.

 

The difference between is still clearly noticeable though.

 

 

Also, while stripping away I found something which influences the behavior.  In 'asteroids/tracks/Asteroid_Sequence_Movement_new_edit.track' there are two 'node.enabled' tracks for each of the two asteroid containers. If those are removed the explosions play fine. Put them back in, explosions behave weirdly.

 

In the original scene removing these tracks has no effect. But there is another track file which also has node.enabled tracks for these nodes. Removing those as well, also results in explosions playing normally.

asteroids.zip

Link to comment
  • 3 weeks later...
×
×
  • Create New...