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 Sun Nov 01, 2026 10:03 pm
All times are UTC + 0
Best Method for Debris on Explosions?
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [7 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
FurryQueen
General


Also Known As: Fen
Joined: 24 Jul 2010

PostPosted: Mon Sep 05, 2011 11:02 am    Post subject:  Best Method for Debris on Explosions? Reply with quote  Mark this post and the followings unread

I don't need to be told how to spawn debris on an explosion. I'm well aware of that. However, when I used it, the debris doesn't spawn too uniformly, nor does it have a nice clean pattern to it. When the explosion hits, I want debris to fly outward from the center of the explosion in all directions in a more even fashion. Been trying for a while and I just can't seem to pin down any decent numbers... or if I'm even on the right track.

For you YR oldbies, I plan on doing something more with this than just spawning debris so using MinDebris/MaxDebris on the warhead is out.

Code:
[SHARDEXP]
Normalized=yes
Translucent=no
Report=Explosion10
UseNormalLight=yes
Crater=yes
Scorch=yes
IsMeteor=yes
Spawns=DSDEBRI
SpawnCount=5
ExpireAnim=TWLT100

[DSDEBRI]
Image=DBRIS2LG
Elasticity=0.0
MinZVel=40.0
MaxXYVel=18.0
ExpireAnim=TWLT070I
Damage=70
DamageRadius=50
Warhead=ShardWH
IsTiberium=true
LoopStart=0
LoopEnd=15
LoopCount=-1
Rate=500
RandomRate=220,500
Bouncer=yes

[TWLT070I]
Image=TWLT070
Normalized=yes
Translucent=no
Report=Explosion09
UseNormalLight=yes
Crater=yes
Scorch=yes


Any suggestions from anyone? Apollo? LKO? Someone else?

_________________
Discord: princess_marisa
Steam

Back to top
View user's profile Send private message
Cranium
Defense Minister


Joined: 05 Dec 2009
Location: USA

PostPosted: Mon Sep 05, 2011 1:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

you mean something like this?


_________________

The enemy shall be injected with toxic poison - Venom

Back to top
View user's profile Send private message Visit poster's website Skype Account
Volgin
Commander


Joined: 07 Mar 2009

PostPosted: Mon Sep 05, 2011 1:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thats too pleasing to watch. ztype you and your awesome animation.

(post it in a bigger size plz)

_________________
Victory!

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Sep 05, 2011 1:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

The problem is that you spawn only 5 debris, but debris chose entirely random values from 1 to the specified MinZVel, MaxXYVel value.
Thus you only achieve a more even distribution by using more debris with each doing less damage.

A better, different approach for an even distribution with less debris, is to use a Cluster weapon, which plays the cluster explosion upon impact (no second stage projectile using airburst).
This creates all the cluster explosions with the same radius around the center explosion and with a high enough Cluster, you get some kind of circle in a 2,5 cell distance around the center explosion.


Another more complicated way, is to use intermediate steps for the debris. Though i'm not 100% sure if this really works that way. Needs to be tested.
1. Let a debris fly straight upwards using MinZVel=100, MaxXYVel=1
and give it only a limited lifetime without any loops with
Start=0
End=20
LoopCount=0

2. Use the Next key to then switch to a different animation. This way you have an animation fixed positioned high in mid-air.

3. Let this animation spawn the debris using TrailerAnim and give the debris MinZVel=1 and MaxXYVel=1. This way the debris can't choose random speeds in any xy direction and thus fly all the same distance.
With the initial debris MinZVel you can then define the height from where the debris are spawned and this way indirect the distance they fly.
e.g.
Code:

;this flies straight upwards
[EVENINIT]
Image=CLRANIM ;this is only an shp with clear frames
ExpireAnim=none ;doesn't works in mid-air and only when debris hit the ground
Elasticity=0.0
MaxXYVel=1.0  ;don't fly much to the side
MinZVel=150.0 ;let it fly fast upwards
Bouncer=yes
Start=0
End=20 ;stop playing the debris in mid-air
LoopCount=0
Rate=300 ;use this to raise/lower the lifetime and thus the height at which it goes to the next animation
Next=EVENSPWN ;create an animation high in air

;this spawns the debris from a high position in mid-air
;Spawns= on EVENINIT doesn't works unfortunately, as it's only spawning debris when a debris hits the ground (at least in TS) but not when the anim/debris ends in mid-air
[EVENSPWN]
Image=CLRANIM
Start=0
End=10 ;amount of debris since every TrailerSeperation's frame one debris is spawned
Rate=900 ;use 25 frames per second measuring so the End key defines the exact amount of spawned debris
TrailerAnim=EVENDEBR
TrailerSeperation=1 ;spawn every frame a debris

[EVENDEBR]
Image=none ;this is only a dummy
ExpireAnim=TWLT100 ;the normal animation that should be played
Elasticity=0.0
MaxXYVel=1.0 ;no random xy speed
MinZVel=1.0
Bouncer=yes

_________________
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
001010011100101110
Commander


Joined: 18 Aug 2009

PostPosted: Mon Sep 05, 2011 5:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Good idea! And since the animation spawns 10 debris, the origin should also spawn 10; minimally 6.

Back to top
View user's profile Send private message
FurryQueen
General


Also Known As: Fen
Joined: 24 Jul 2010

PostPosted: Mon Sep 05, 2011 11:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

Cranium wrote:
you mean something like this?
<image>

Like that but with a lot less.

@ LKO:
Thanks for the idea. I'll give that a try and see if it works in YR.

_________________
Discord: princess_marisa
Steam

Back to top
View user's profile Send private message
Cranium
Defense Minister


Joined: 05 Dec 2009
Location: USA

PostPosted: Tue Sep 06, 2011 12:28 am    Post subject: Reply with quote  Mark this post and the followings unread

I'll get the codes together for ya tomorrow, and you'll only need to change a couple things to tone it down to your liking.

and by looking at LKO codes, I dont see any reason for it not to work. But his way will have a different outcome than mine. Try them both and choose which one you like the best. Or better yet, use them both and make 2 seperate SW's Razz

_________________

The enemy shall be injected with toxic poison - Venom

Back to top
View user's profile Send private message Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 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.1678s ][ Queries: 11 (0.0124s) ][ Debug on ]