POV-Ray : Newsgroups : povray.binaries.animations : Space Fight 4 (cool explosions) Server Time
19 Jul 2024 17:15:06 EDT (-0400)
  Space Fight 4 (cool explosions) (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: Slime
Subject: Space Fight 4 (cool explosions)
Date: 27 Sep 2002 17:39:52
Message: <3d94d028@news.povray.org>
Not too much new in this one except that the explosions look like explosions
(they even have little pieces/particles of ships flying out of them, but i
dont know if you'll be able to see that in the mpeg), and the AI is slightly
improved, but I'm not sure if you'll notice that.

The camera sort of messed up near the end of this one, so you miss a little
of the action. Green wins, FYI.

Next, I plan to actually follow a ship with the camera.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message


Attachments:
Download 'spacefight5.mpg' (565 KB)

From: Dave Brickell
Subject: Re: Space Fight 4 (cool explosions)
Date: 27 Sep 2002 21:14:06
Message: <3d95025e$1@news.povray.org>
WOW!!!

I love the explosions.

I love the action

I wanna see an unencoded version for the full effect.

Nice work

Dave


Post a reply to this message

From: Timothy R  Cook
Subject: Re: Space Fight 5 (camera follows ship)
Date: 27 Sep 2002 23:45:51
Message: <3d9525ef$1@news.povray.org>
OK, that's insanely cool...how do you do the explosions?

-- 
Tim Cook
http://empyrean.scifi-fantasy.com
mirror: http://personal.lig.bellsouth.net/lig/z/9/z993126

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Slime
Subject: Re: Space Fight 5 (camera follows ship)
Date: 27 Sep 2002 23:54:25
Message: <3d9527f1$1@news.povray.org>
> OK, that's insanely cool...how do you do the explosions?

Heh, thanks, I'm excited to be getting such a great response out of everyone
=)

The explosions are spheres with media inside them. There are multiple media
inside the sphere. Each media has a highly turbulent spherical density.
These spherical medias start at the center of the main sphere, move outwards
in a random direction, and then turn into smoke before fading out. then they
start again at the center. they all do this one after another.

the fire is just emission <1,.7,.3> or so, and the smoke is absorption 1.5
or so.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Timothy R  Cook
Subject: Re: Space Fight 5 (camera follows ship)
Date: 28 Sep 2002 00:02:13
Message: <3d9529c5$1@news.povray.org>
Slime wrote:
> The explosions are spheres with media inside them. There are multiple media
> inside the sphere. Each media has a highly turbulent spherical density.
> These spherical medias start at the center of the main sphere, move outwards
> in a random direction, and then turn into smoke before fading out. then they
> start again at the center. they all do this one after another.

Can I have an .inc file? ;)

-- 
Tim Cook
http://empyrean.scifi-fantasy.com
mirror: http://personal.lig.bellsouth.net/lig/z/9/z993126

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Slime
Subject: Re: Space Fight 5 (camera follows ship)
Date: 28 Sep 2002 00:11:56
Message: <3d952c0c@news.povray.org>
> Can I have an .inc file? ;)

Sure, why not? =)

Just use this code. Sorry if it wraps. Use it like

createexplosion(explosionsize, explosionpos, explosionid)

explosionpos is the place where the explosion is. explosionsize should be a
number from 0 to explosionlength which determines the amount of time that
has passed. explosionid should be a number that stays constant for each call
of the function for the same explosion but is different for different
explosions. (so that they look diffferent). it's really just a random seed
that changes the orientation of the explosion.

Also change numexplosionpartst (defined in the macro itself) to put more
mini-spheres inside the explosion, and change the numbers after the 'scale'
keyword to change the size (you should probably also change the fire and
smoke colors when changing the size).

there may be an error here or there. for instance, you'll have to define
"shiprad" (ship radius) or change the light_source declaration at the end.

And feel free to manipulate it or improve upon it, just give credit where
due, ok? =)

#declare explosionlength = 2;
#declare firecolor = <1,.7,.3>*1.2;
#declare smokecolor = 1.8;
#macro createexplosion(explosionsize, explosionpos, explosionid)
 #declare explosionrnd = seed(explosionid);
 #if (explosionsize < explosionlength)
  #declare overallintensity = 1-pow(explosionsize/explosionlength,7);
  #declare overallsmokeamnt = pow(explosionsize/explosionlength,2);
  #declare explosionsize = pow(explosionsize/explosionlength,.3)*shiprad*6;
  sphere {
   0,1
   pigment {rgbt 1}
   interior {
    #declare animbaseamnt = explosionsize*.1;
    #declare thisanimbase = 0;
    #declare numexplosionpartst = 5;
    #declare explosionpartnumt = 0;
    #while (explosionpartnumt < numexplosionpartst)
     #declare theta = (explosionpartnumt/(numexplosionpartst-1))*pi-pi/2;
     #declare explosionpartnumr = 0;
     #while (explosionpartnumr <= numexplosionpartst*cos(theta))
      #if (floor(numexplosionpartst*cos(theta)) > 0)
       #declare phi = explosionpartnumr/floor(numexplosionpartst*cos(theta))
*2*pi + theta;
      #else
       #declare phi = theta;
      #end
      #declare thisanimbase = thisanimbase + pi/10; // pi is arbitrary
      #declare thisanimbase = thisanimbase-floor(thisanimbase);
      #declare animamnt = thisanimbase + animbaseamnt*3;
      #declare animamnt = animamnt-floor(animamnt);

      #declare smokeamnt = pow(animamnt,3);
      #declare smokeamnt = smokeamnt + (1-smokeamnt)*overallsmokeamnt;
      #declare thisintensity = overallintensity*(1-pow(animamnt,5));

      media {
       emission firecolor*(1-smokeamnt) *thisintensity
       absorption smokecolor*(smokeamnt) *thisintensity

       #declare translatedir =
<cos(phi)*cos(theta),sin(theta),sin(phi)*cos(theta)>;
       density {
        spherical
        color_map {
         [0 rgb <1,0,0>*0]
         [.1 rgb <1,.8,.8>*.3]
         [.25 rgb .7]
         [.5 rgb 1]
        }
        translate -translatedir*animamnt*2
        warp {
         turbulence .3
         octaves 3
         omega .8
         lambda 5
        }
        translate translatedir*animamnt*2
        scale .4 + .2*pow(animamnt,6)
        translate translatedir*(1-pow(1-animamnt,3)) *.5 //
(1-pow(1-animamnt,2))
       }
      }
      #declare explosionpartnumr = explosionpartnumr + 1;
     #end
     #declare explosionpartnumt = explosionpartnumt + 1;
    #end
   }
   hollow
   rotate <rand(explosionrnd),rand(explosionrnd),rand(explosionrnd)>*360 //
orient randomly
   scale explosionsize
   translate explosionpos
   no_shadow
  }
  light_source {
   explosionpos
   rgb firecolor*overallintensity
   fade_power 2
   fade_distance shiprad*20
  }
 #end
#end

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Andrew Coppin
Subject: Re: Space Fight 4 (cool explosions)
Date: 28 Sep 2002 06:29:41
Message: <3d958495@news.povray.org>
This is *very* impressive stuff... The explosions look pretty dam cool. It's
still a little hard to follow the action - if only because of the image size
and MPEG compression... But the concept itself is very nice! As for the
second one (with the camera following the lone craft - which is subsequently
annialated ;-)... This is also hot stuff. There are a few places where the
action seems to stop for a while... This from the bloke who did that lame
bouncing ball! :-|

Andrew.


Post a reply to this message

From: Rick [Kitty5]
Subject: Re: Space Fight 5 (camera follows ship)
Date: 28 Sep 2002 15:39:39
Message: <3d96057b$1@news.povray.org>
Slime wrote:
> Since it seems not many people have read this yet, in the interest of
> not piling up too many posts, I'll put this here.
>
> Apologies for the huge file size.

wow :)

How about giving the weapons a limited range, forcing the craft to get in
close before blasting, also tweak the AI so they 'chase' more' :)



--
Rick

Kitty5 NewMedia http://Kitty5.co.uk
POV-Ray News & Resources http://Povray.co.uk
TEL : +44 (01270) 501101 - FAX : +44 (01270) 251105 - ICQ : 15776037

PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA



---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.391 / Virus Database: 222 - Release Date: 19/09/2002


Post a reply to this message

From: Rune
Subject: Re: Space Fight 5 (camera follows ship)
Date: 28 Sep 2002 18:58:41
Message: <3d963421@news.povray.org>
This is getting very cool. :)

Do the ships simply aim at the current position of the target, or do
they take into account the velocity of the target and try to calculate
where the target will be when the laser has reached it? The latter would
probably be more interesting and force the ships to fly in non-straight
unpredictable curves to avoid being hit. :)

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated Sep 8)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Slime
Subject: Re: Space Fight 5 (camera follows ship)
Date: 28 Sep 2002 19:03:52
Message: <3d963558$1@news.povray.org>
> Do the ships simply aim at the current position of the target, or do
> they take into account the velocity of the target and try to calculate
> where the target will be when the laser has reached it? The latter would
> probably be more interesting and force the ships to fly in non-straight
> unpredictable curves to avoid being hit. :)


That's exactly what's happening. =)

The chaser is always moving towards the place that the victim would be in
the future if a laser were to be shot from the current distance. When the
chaser has sucessfully oriented himself so that that place is in front of
him, he shoots. I purposely made the calculation of this point in space with
a more simple formula than should have been used, but it's accurate most of
the time. This gives the impression of imperfect aim.

The victim, however, is able to tell when he is being targeted, and does his
best to avoid the direction that the chaser is currently facing. This
usually means that the victim is able to get away if he's fast enough, but
if there's too much time, then the chaser usually succeeds.

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.