Horde3D

Next-Generation Graphics Engine
It is currently 14.05.2024, 08:12

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 16.03.2010, 01:12 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Version: community svn trunk, Linux

I want to use the particle system for the exhaust flames of a space ship, but when the FPS is low (30) and the object is moving fast it looks ugly.

Low FPS (limited to 30):
object standing still: looks fine
object moving fast: particles are emitted in "blocks", not evenly spread over time.

High FPS (unlimited, varying between 300 to 400):
object moving fast: looks mostly fine. I'd like to have this behavior also in the low FPS case.

See attached files.

Possible fix with visual result in next post due to file limit.


As a side note: _emissionAccum seems not to be limited and is increased indefinitely, could cause problems after running for a long time.


Attachments:
File comment: moving, high FPS
moving-high_fps.png
moving-high_fps.png [ 199.45 KiB | Viewed 8035 times ]
File comment: moving, low FPS
moving-low_fps.png
moving-low_fps.png [ 173.98 KiB | Viewed 8035 times ]
File comment: standing still, low FPS
not_moving-low_fps.png
not_moving-low_fps.png [ 173 KiB | Viewed 8035 times ]


Last edited by Codepoet on 17.03.2010, 13:53, edited 3 times in total.
Top
 Profile  
Reply with quote  
PostPosted: 16.03.2010, 01:18 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Possible fix and visual result for FPS=30 is attached. If the patch is accepted I'll commit it to the community svn.

The visual result is only good if the FPS is nearly constant. Another solution (but more CPU intensive) would be to move the code from onPostUpdate to advanceEmitterTime and incrementing the time in small steps.


Attachments:
File comment: patch
diff.patch [2.83 KiB]
Downloaded 562 times
File comment: moving fast, low FPS, patched
fixed-moving-low_fps.png
fixed-moving-low_fps.png [ 155.94 KiB | Viewed 8033 times ]
Top
 Profile  
Reply with quote  
PostPosted: 16.03.2010, 03:24 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Thanks for your contribution. The main problem I see at the moment is that it might be a bit too specific to your exact problem with the hard-coded constants.

However, when reading through some of the GDC presentations, I stumbled across this: http://drewskillman.com/GDC2010_VFX.pdf
Check page 76, the idea seems to be similar to what your are doing now but more generalized. This would be nice to have in Horde (and a few of the other particle features as well ;)).


Top
 Profile  
Reply with quote  
PostPosted: 16.03.2010, 20:16 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
I've included your suggestions in the attached patch.
  • Still distributing particles evenly over space
  • Removed magic constant
  • Do not update particles in the time step in which they were created. Particles first show at the origin of the emitter.
  • Added support for configurable drag. If drag is positive, particles are moving in the same direction as the object. Drag assumes, that an object is moved in a smooth fashion without jumps.

Not in Patch: new constant for bindings (old constants still work)


Attachments:
File comment: knight sample with patch applied
knight.png
knight.png [ 164.18 KiB | Viewed 8013 times ]
File comment: Patch v2
diff2.patch [7.35 KiB]
Downloaded 556 times
File comment: moving fast, 30 fps
patch2_low_fps.png
patch2_low_fps.png [ 290.96 KiB | Viewed 8013 times ]
Top
 Profile  
Reply with quote  
PostPosted: 17.03.2010, 01:45 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Great work, thank you very much! :)

Volker will soon integrate a slightly adapted version of your patch. Please let us know if there are any problems with it.


Top
 Profile  
Reply with quote  
PostPosted: 17.03.2010, 02:14 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
It's in, thanks again Codepoet for your great work.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group