scarykitties on 6/2/2012 at 19:33
Quote Posted by Sliptip
Not a problem Larry. I'll do something up tonight when I get home :thumb:
Looking forward to that!
UPDATE:
Just tested it. It looks AMAZING! I have quite a few ideas of how this could be useful. Thank you SO much!
The set-up is actually fairly simple. It's just a matter of hopefully not running out of objects. Every time something is emitted and destroyed, doesn't it still count toward the object limit?
Yandros on 7/2/2012 at 03:47
Quote Posted by scarykitties
Every time something is emitted and destroyed, doesn't it still count toward the object limit?
Well, yeah, until it's destroyed. :D
Sliptip on 7/2/2012 at 04:48
I think I'll just talk about the set up here (I'll add it to the zip later - I'll likely do an updated demo at some point)
Overview: Using emitters to emit flat plane objects to create water/fire and other shapless things. This has been done in the past using particle effects instead of emitters, but I like the emitter approach because you've got more control over the emitted planes. The drawback though is that it can get quite heavy on resource usage.
Set-up: I'll use fire as an example. Create several flat plane objects with fire images on them (I made 3 for the demo).
1.) Create a parent archtype (eg. FireSmall) and set up the tweq's. TweqScale, TweqRotate, TweqDelete. You'll want to set these to individual taste, but the idea is to have them scale up from the start, while spinning and then eventually destroy themselves.
2.) Add the NVPhantomTrap script so you can have them fade out upon creation:
"NVPhantomAlphaMax="1.00"; NVPhantomFadeOff="1500"; NVPhantomTrapOff="BeginScript"
3.) I always set the TweqDelete timing to the same value as the NVPhantomFadeOff
4.) Set the projectile "initial velocity" props and the physics "gravity" setting
5.) Under the parent archetype create 3 (in this case) more objects each with your different plane objects.
6.) Now create an emitter with emit, emit2, emit3 and have each of the emitters emit one of your fire planes at different rates.
7.) If you don't want a flat fire object, set the emitter to spin with TweqRotate.
8.) The tricky part is striking a balance between the emitter rates and the TweqDestroy timing. It's quite easy to get too many objects on the screen at one time.
If you want smoother looking fx then you'll have to increase the emitter rates, which in turn means you'll have to decrease the TweqDestroy timing etc.
I haven't really messed around with it yet but I think using TrigProximity might be a good idea so that you could change the number of active emitters depending on your distance from the emitters. No need to have all of them going if you're far away from the emitter. I tried using SimSmallRadius and SimLargeRadius, but there distances are fixed and not very good for this application.
Hope this helps - please let me know if anything needs clarification!
Eternauta on 7/2/2012 at 09:16
Great! Thank you Sliptip.
LarryG on 7/2/2012 at 09:28
A couple-threefour of questions come to mind:
1. Why planar objects only? Why not something with some dimensionality?
2. What about animated textures on the objects? Could that give the illusion of more motion?
3. "Set the projectile "initial velocity" props and the physics "gravity" setting" to what? I don't understand.
4. "The tricky part is striking a balance between the emitter rates and the TweqDestroy timing. It's quite easy to get too many objects on the screen at one time." Huh? What? Shouldn't they be the same? I mean, if they are out of balance, you'll either get infinitely increasing numbers of objects (the variable is how rapidly they increase) or gaps of time with no objects, won't you? Don't you want to have a constant number at all times? So shouldn't there be a formula to determine the correct emitter rate for any fixed TweqDestroy timing?
Sliptip on 7/2/2012 at 11:41
Quote Posted by LarryG
A couple-threefour of questions come to mind:
1. Why planar objects only? Why not something with some dimensionality? I was initially thinking to keep perfomance smooth by using simple objects - but yeah it doesn't seem to make much difference. My splash objects are more bowl shaped
2. What about animated textures on the objects? Could that give the illusion of more motion? I doubt it, because of the awful fixed animation rate. I thought I might try something with corpse links have the fire "die" and become a smoke object
3.
"Set the projectile "initial velocity" props and the physics "gravity" setting" to what? I don't understand. This is just to control how the effect moves. If it's fire then the gravity should be set to something negative so it moves up or for the waterfall splash it needs to shoot forward so you set the initial velocity accordingly - just depends what you want to do.
4.
"The tricky part is striking a balance between the emitter rates and the TweqDestroy timing. It's quite easy to get too many objects on the screen at one time." Huh? What? Shouldn't they be the same? I mean, if they are out of balance, you'll either get infinitely increasing numbers of objects (the variable is how rapidly they increase) or gaps of time with no objects, won't you? Don't you want to have a constant number at all times? So shouldn't there be a formula to determine the correct emitter rate for any fixed TweqDestroy timing
A formual would be a great idea! You just need to decide how many objects your willing to live with on screen at a time. The destroy timing can and should be longer than the emit timing. If you have 3 active emitters and you think 30 objects on screen is ok then I guess the destroy timing could be 10 times longer than your fastest emit rate.
Or you can do what I did, turn on show_stats and make sure the #objects isn't growing.
LarryG on 7/2/2012 at 14:11
Quote Posted by Sliptip
Or you can do what I did, turn on show_stats and make sure the #objects isn't growing.
lol. That's so simple and practical I never would have thought of it!