esger.abbink_ Posted May 29, 2015 Share Posted May 29, 2015 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: 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: 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
silent Posted May 29, 2015 Share Posted May 29, 2015 Hi, Could you please provide a small reproduceable sample of this issue (minimal *.world + *.cpp files)? Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
esger.abbink_ Posted June 1, 2015 Author Share Posted June 1, 2015 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
esger.abbink_ Posted June 2, 2015 Author Share Posted June 2, 2015 modified cpp for editor loaded on start asteroids.cpp Link to comment
binstream Posted June 19, 2015 Share Posted June 19, 2015 Solved, the fix will be included in the next SDK update. Link to comment
Recommended Posts