Posted: Tue Apr 16, 2019 4:57 pm Post subject:
Dynamic Piff effects and casing
Subject description: Changing from a static Piff effect to a dynamic one
Hi Guys,
I'm just posting this here to explain how some of my effects from my mod (Tiberian Sun: WarZone) work. Feel free to use this I don't plan on giving people a hard time about creative rights or anything.
So, the following is a Gif of the Effect in action.
As you can see the effect is random every time, the piff effects interact with terrain elevation, water, and buildings, making it more "realistic".
So, how is this done? ...
Well, its a mix of invisible explosions and invisible debris and some newly drawn piff effects.
The Wolverine uses the assault cannon that has the SA Warhead.
we need the following,
Case.shp -> spent casing
Pi1.shp to Pi5.shp -> ground impact
Dust1.shp to Dust5.shp - ground dust that is caused by impact (optional)
The other animations are invisible
Code:
[INVGUN]
Elasticity=0.0
MaxXYVel=5.0
MinZVel=1.0
ExpireAnim=DBRSMIN ;invisible debri are unique to the wolverine
DamageRadius=50
Warhead=HE
LoopCount=-1
DetailLevel=0
Bouncer=yes
LoopStart=0
LoopEnd=15
Spawns=CASE
SpawnCount=1
Spent casing (basically, debris with no impact or damage)
[PIFFEXTERN] ;invisible animation (no .shp)
Start=0
End=2
TrailerSeperation=4 ;important for imapact scale
TrailerAnim=PIFF_EX1
Rate=900
------------------------------------------- WarHead -------------------------------
TrailerSeperation=4 this determines the number of bullets fired 2= vulcan cannon spitting bullets, 6= pistole with 3 shots
adding multiple animations with different separation values will determine the type of machine-gun fired
Good, now we need the Pi1 - 5.shp animations for the inpact, create 5 shp named PIx.shp (x=1,2,3,4,5)
and optionaly 5x Dust anime (in my case BDUSTPIFFx x=1-5)
1 this won't work for air targeted weapons so don't add it to the jump-trooper or a AA based unite like the Gatling gun from Yuri's revenge see I needed to make 2 weapons for the same unit one with the mod for the ground base and one without the mod for AA see here: https://imgur.com/gallery/jXCYHEa
2 for the light effect used to make it like the gunfire is casting light on the ground I added
Code:
[DBRSMIN] ; invisivle debri
Elasticity=0.0
MaxXYVel=1.0
MinZVel=10.0
DamageRadius=10
Warhead=HE
LoopStart=0
LoopEnd=1
LoopCount=-1
RandomRate=200,200
DetailLevel=0
Bouncer=yes
TrailerSeperation=1; unique to the wolverine, it makes it look like its firing dual cannons
Spawns=CASE; unique to the wolverine, it makes it look like its firing dual cannons
SpawnCount=1; unique to the wolverine, it makes it look like its firing dual cannons
it's a cool optional effect
3 this will make it look like there's a delay from firing to impact, this is caused by the invisible explosion throwing the invisible debris that causes the impact to look like the bullet hits random spots.
4 the water effect H2O_EXP.shp from the SplashList=H2O_EXP (CombatDamage) needs to be edited to a smaller one to get the effect in the gif's. This applies to the Wake in Wake=WAKE (AudioVisual)
...
That's about it, I hope this helps the people that are interested, Let me know if you want me to explain any other effects like my Fireworks effects for the devil's torch or my laser spark effects.
are you editing this topic? because I don't think it's a good idea to post a topic and edit it into a tutorial. _________________ C&C community is rotten. QUICK_EDIT
Nice to see someone utilizing the power of art.ini debris and anims.
Though i fear all the transparent anims could cause some serious lag in online games, when several units fire at the same time.
For INVGUN i wouldn't use a debris but a simple anim.
[INVGUN]
Image=CLRANIM ;an SHP with 10 empty frames
Start=0
End=1
TrailerAnim=CASE
TrailerSeperation=1
this creates a flying off CASE instantly instead of the delay the debris needs to fall and hit the ground.
If you want to keep your code, you could set MinZVel=-10 for an almost instant hit on ground. Your current setting of MinZVel=1.0 would make it first fly up with speed 1 and then slowly accelerate towards ground, which is an unnecessary delay.
I would have done the muzzleflash in rules.ini via a 1 frame lasting Spark particlesystem using OneFrameLight logic (see welding particlesystem). Then the light is emitted not on ground but from the actual FireFLH location.
Though be warned that OneFrameLight can cause lag, though probably less than 2 dummy art.ini anims and an additional warhead Bright=yes effect.
Concerning the other code, you have
Start=0
End=2
Rate=900
but then use TrailerSeperation=2 or higher. With this setting you only get max 1 TrailerAnim spawned. A higher setting can cause no trailer to appear at all.
Because Start=0 End=2 with Rate=900 means, the anim plays for 2 frames only.
TrailerSeperation=2 means, spawn a trailer every 2 frames. So only 1 fits inside the short time window given by the anim.
TrailerSeperation=4 would mean every 4 frames, which only in 50% of times fits inside the 2 frame time window.
To reduce the delay in your anims you can reduce the timings as follows
Start=0
End=1
TrailerSeperation=1
when you want to spawn 1 TrailerAnim only
you can remove Rate=900 as the default is 900, so adding this is redundant. _________________ SHP Artist of Twisted Insurrection: Nod buildings
That looks quite neat. The large radius and the number of piffs might be a bit excessive (in a large fight there's going to be a ton of effects), but I really like the idea and slightly toned down it should work nicely. _________________ CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered
The Wolverine is more special in the way I made the effect, but I'll add the "MinZVel=-10" Tnx for that,
As for the OneFrameLight logic particlesystem I'm a bit lost here If you can show me how it's done I'll experiment with it.
I've added various forms to other units with interesting results, so far, on an SSD with 16GB or ram an 8 GB of Vram the overkill is not noticeable but on a 4 GB device with Win 7 it tends to crash on 8v8 matches that last more than 1:30 hours. So any help with reducing the lag will be appreciated.
One way I made this work on a large scale battle is that I've made the TTK (time to kill) very short and the units cheaper, on the standard TTK the lag would have been something else. Here is a video
https://www.youtube.com/watch?v=koBfpqEBOPQ&t=631s
I got like hundreds of animations running using various forms of this code from blood effects to extra explosions to units spitting out flames and sparks. Somehow it runs
ammo.gif
Description:
Filesize:
10.63 MB
Viewed:
6437 Time(s)
Last edited by MirceaOfRivia on Tue Apr 16, 2019 8:29 pm; edited 1 time in total QUICK_EDIT
on the weapon add
UseSparkParticles=yes
AttachedParticleSystem=MuzzleFlashSys
[MuzzleFlashSys] ;copy of WeldingSys
HoldsWhat=MuzzleSpark
BehavesLike=Spark
ParticleCap=25
SparkSpawnFrames=1 ;spawn sparks for just 1 frame
LightSize=25 ;use this to adjust size of the glow effect (you can find some info here)
OneFrameLight=true
SpawnSparkPercentage=100 ;play with the value, not sure if 100 works good
[MuzzleSpark] ;copy of WeldingSpark reduced to minimum
BehavesLike=Spark
MaxEC=1 ;just a dummy Particle, playing for 1 frame only
XVelocity=0 ;untested if 0 works. might cause a crash
YVelocity=0
MinZVelocity=1
When using a particlesystem, you can also use AlphaLight= instead of OneFrameLight to set your own custom light effects which don't have to be an engine generated circle:
For some inspiration of other effects, you can take a look here.
With lots of art.ini (for debris) and particlesystem (for alphalight effect) tricking, this can be done too
alpha effect is done using NextParticle to switch from one particle with one frame of the alpha effect to the next particle with another alpha frame (done this way, because animated AlphaImage is not possible otherwise, since AlphaImage accepts/uses a single frame only) _________________ SHP Artist of Twisted Insurrection: Nod buildings
Joined: 09 May 2011 Location: Approaching the Great Pyramid
Posted: Tue Apr 16, 2019 11:22 pm Post subject:
I must admit, that this with chem rocket was always my admiration
but for the f*ck of it, i never understood how can you make
from solid object (rocket), and then so precisely scatter those canisters, and again make them land precise like they are part of separate bombs ... _________________
Well there is a cut when the bomb explosdes which makes me think the bomb "fragmenting" is just an SHP animation, and the actual fragments are spawned by the blast. QUICK_EDIT
in short;
-invisible missile explodes in midair (Airburst)
-on that midair location a dummy anim A is spawned which starts the whole additional impact animation logic for flames and chem capsules
-a single Cluster hits the ground below, which uses dummy anims to time and start the missile falling down anim and the Nuke explosion
in midair
-A quickly creates via TrailerAnim a second Dummy B and A uses Next to change into C
-Now B and C are running in midair at the same time
-B is dummy to get the timing for the flame debris done
-C is dummy to get the timing for the splitting capsules done
-when it's time, the anims B and C go with Next into dummies D and E which use TrailerAnim to spawn dummy debris DDF (flame spawner) DDC (capsule spawner)
-DDF and DDC start falling towards the ground and emit the final debris via TrailerAnim (invisible debris for the flames and visible rotating green capsule debris for the chem cluster)
-since DDC is a debris and falling, it this way matches close enough the anim of the falling nuke (It has a limited duration and no Loop, so it spawns only a limited number of green capsules)
-the falling nuke is just an animation which at the right frame has the green capsules vanishing. Timed right, the debris capsules look like they are spawned from the nuke
You can also look at the TI art.ini
There are comments for each (dummy) anim used in the Nuke coding.
The explanation might differ a bit, as i wrote this from memory and it's pretty long ago when i made the TI nuke. _________________ SHP Artist of Twisted Insurrection: Nod buildings
-main damage on the center cell by a single debris that is timed with the falling nuke
-secondary area damage by the debris causing the flames
-tertiary area damage by the chem clusters
It's all art.ini debris damage, thus unusable against water based targets, which TI doesn't have that much.
In DTA a little different approach was necessary (due to ships), by using in addition Webby logic to create a nice area of damage using damaging particles. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Looking at the titan from gif, is there any way to make highly accelerated straight projectile that isn't affected by terrain? Which will keep ability to hit uphill targets (like lasers, titans, etc.)
no, unfortunately not possible with an actual projectile.
Only the instant hit weapons can go "through" a cliff/slope. _________________ SHP Artist of Twisted Insurrection: Nod buildings
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 vote in polls in this forum You cannot attach files in this forum You can download files in this forum