Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Mar 29, 2024 1:35 am
All times are UTC + 0
Dynamic Piff effects and casing
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
MirceaOfRivia
Medic


Joined: 16 Apr 2019

PostPosted: 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
Reply with quote  Mark this post and the followings unread

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)

Code:

[CASE]
Elasticity=0.0
MaxXYVel=7.0
MinZVel=20.0
LoopStart=0
LoopEnd=4
LoopCount=-1
RandomRate=300,900
DetailLevel=0
Bouncer=yes
TrailerSeperation=1
Translucency=25
UseNormalLight=yes
Rate=300


Now for the Weapon

Code:

[AssaultCannon]
Damage=6
ROF=8
Range=7
Projectile=Invisible
Speed=100
Warhead=WSA
Report=TSGUN4
Anim=INVGUN


Easy right?

Now for the bullet impact effects (piffpiff)

First, we need an animation as a trigger.

Code:

[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

Code:

[SA]
AnimList=PIFFINFA1,PIFFINFA2,PIFFEXTERN


Piffinfa1 = small arms
Piffinfa2 = cyborg machinegun
Piffextern = Wolverine miniguns
-------------------------------------------------------------------------------------

After

We need 5 animations named Piff_ex1 - 5 (invisible explosion animations)

Code:

[PIFF_EX1]
Start=0
End=2
Rate=900
TrailerAnim=PIFF_DE1
TrailerSeperation=2
Next=PIFF_EX2

[PIFF_EX2]
Start=0
End=2
Rate=900
Next=PIFF_EX3
TrailerAnim=PIFF_DE2
TrailerSeperation=2

[PIFF_EX3]
Start=0
End=2
Rate=900
Next=PIFF_EX4
TrailerAnim=PIFF_DE3
TrailerSeperation=2

[PIFF_EX4]
Start=0
End=2
Rate=900
Next=PIFF_EX5
TrailerAnim=PIFF_DE4
TrailerSeperation=3

[PIFF_EX5]
Start=0
End=2
Rate=900
TrailerAnim=PIFF_DE5
TrailerSeperation=3


and 5 animations named Piff_de1 - 5 (invisible Debris animations)

Code:

[PIFF_DE1]
Elasticity=0.0
MaxXYVel=28.0
MinZVel=6.0
ExpireAnim=PI1
LoopStart=0
LoopEnd=4
LoopCount=-1
DetailLevel=0
Bouncer=yes
Rate=900

[PIFF_DE2]
Elasticity=0.0
MaxXYVel=28.0
MinZVel=6.0
ExpireAnim=PI2
LoopStart=0
LoopEnd=4
LoopCount=-1
DetailLevel=0
Bouncer=yes
Rate=900

[PIFF_DE3]
Elasticity=0.0
MaxXYVel=28.0
MinZVel=6.0
ExpireAnim=PI3
LoopStart=0
LoopEnd=4
LoopCount=-1
DetailLevel=0
Bouncer=yes
Rate=900

[PIFF_DE4]
Elasticity=0.0
MaxXYVel=28.0
MinZVel=6.0
ExpireAnim=PI4
LoopStart=0
LoopEnd=4
LoopCount=-1
DetailLevel=0
Bouncer=yes
Rate=900

[PIFF_DE5]
Elasticity=0.0
MaxXYVel=28.0
MinZVel=6.0
LoopStart=0
LoopEnd=4
LoopCount=-1
DetailLevel=0
Bouncer=yes
Rate=900


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)

Code:

[PI1]
UseNormalLight=yes
Next=BDUSTPIFF1
Rate=450
Translucent=yes
RandomRate=250,450

[PI2]
UseNormalLight=yes
Next=BDUSTPIFF2
Rate=450
Translucent=yes
RandomRate=250,450

[PI3]
UseNormalLight=yes
Next=BDUSTPIFF3
Rate=450
Translucent=yes
RandomRate=250,450

[PI4]
UseNormalLight=yes
Next=BDUSTPIFF4
Rate=450
Translucent=yes
RandomRate=250,450

[PI5]
UseNormalLight=yes
Next=BDUSTPIFF5
Rate=450
Translucent=yes
RandomRate=250,450


Optionaly for the dust,

Code:

[BDUSTPIFF1]
Translucency=75
Rate=240
UseNormalLight=yes

[BDUSTPIFF2]
Translucency=75
Rate=240
UseNormalLight=yes

[BDUSTPIFF3]
Translucency=75
Rate=240
UseNormalLight=yes

[BDUSTPIFF4]
Translucency=75
Rate=240
UseNormalLight=yes

[BDUSTPIFF5]
Translucency=75
Rate=240
UseNormalLight=yes


Things to keep in mind,

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.

Check out my mod over at- https://www.moddb.com/mods/tiberian-sun-warzone



Wolverine 3.gif
 Description:
 Filesize:  910.4 KB
 Viewed:  5157 Time(s)

Wolverine 3.gif



Wolverine 2.gif
 Description:
 Filesize:  4.57 MB
 Viewed:  5157 Time(s)

Wolverine 2.gif



Wolverine.gif
 Description:
 Filesize:  2.09 MB
 Viewed:  5183 Time(s)

Wolverine.gif



Last edited by MirceaOfRivia on Tue Apr 16, 2019 6:34 pm; edited 2 times in total

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL
KnownUnknown
Vehicle Driver


Joined: 16 Apr 2019

PostPosted: Tue Apr 16, 2019 5:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

"posting this here to explain"
Doesnt explain anything

Back to top
View user's profile Send private message
twistedconversion
Rocket Infantry


Joined: 23 Feb 2019
Location: Egypt

PostPosted: Tue Apr 16, 2019 5:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message ModDB Profile ID
MirceaOfRivia
Medic


Joined: 16 Apr 2019

PostPosted: Tue Apr 16, 2019 6:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

New at the site hit the submit button too early by mistake.

Ups.

----------------------------------------------------------------------------------------

Here's how it works on other units/buildings



test.gif
 Description:
 Filesize:  3.93 MB
 Viewed:  5139 Time(s)

test.gif



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Apr 16, 2019 7:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nice to see someone utilizing the power of art.ini debris and anims. Approved!

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Tue Apr 16, 2019 7:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

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


Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
MirceaOfRivia
Medic


Joined: 16 Apr 2019

PostPosted: Tue Apr 16, 2019 8:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

Noted, thank you for the input.

I am working on a better implementation of this effect.

I already use for my infantry the code,

Code:

[INVIGUN]
Start=0
End=1
TrailerSeperation=1
TrailerAnim=CASE3


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   Laughing



ammo.gif
 Description:
 Filesize:  10.63 MB
 Viewed:  5110 Time(s)

ammo.gif



Last edited by MirceaOfRivia on Tue Apr 16, 2019 8:29 pm; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Apr 16, 2019 8:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

check out WeldingSys

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Exley
Commander


Joined: 09 May 2011
Location: Approaching the Great Pyramid

PostPosted: Tue Apr 16, 2019 11:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

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 ...

_________________
Quote:

how did we end up here ?

this place is horrible ...

smells like balls ...


Back to top
View user's profile Send private message
KnownUnknown
Vehicle Driver


Joined: 16 Apr 2019

PostPosted: Tue Apr 16, 2019 11:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Apr 17, 2019 6:36 am    Post subject: Reply with quote  Mark this post and the followings unread

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Wed Apr 17, 2019 9:00 am    Post subject: Reply with quote  Mark this post and the followings unread

How does the nuke apply damage?
Based on scattering debris or web logic? Or combination of both?

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Apr 17, 2019 10:05 am    Post subject: Reply with quote  Mark this post and the followings unread

-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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Tuc0
Missile Trooper


Joined: 26 Sep 2016
Location: Slovakia

PostPosted: Wed Apr 17, 2019 8:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.)

Or like this one from LKO:
Spoiler (click here to read it):

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Apr 17, 2019 9:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Thu Apr 18, 2019 7:27 am    Post subject: Reply with quote  Mark this post and the followings unread

All cool

_________________

Back to top
View user's profile Send private message Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [16 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.1957s ][ Queries: 18 (0.0142s) ][ Debug on ]