POV-Ray : Newsgroups : povray.animations : Star Trek Praxis Explosion Efffect : Re: Star Trek Praxis Explosion Efffect Server Time
19 Apr 2024 16:45:20 EDT (-0400)
  Re: Star Trek Praxis Explosion Efffect  
From: Kenneth
Date: 21 Jan 2011 02:50:01
Message: <web.4d393a053490857c196b08580@news.povray.org>
Sorry, I'm not familiar with the macro you mentioned; but your question
intrigued me, so I put together something that looks *very similar* to the
effect. It's meant to be animated, so run 100 frames, clock 0-to-1 (or 200
frames, clock 0-to-2 for an extended version.)

This is just a *basic* idea (there are far more subtleties going on in the
'real' CGI.) IMO, the key to what made that effect look the way it did in the
film was that the distortion applied to the colors (our 'turbulence' in POV-Ray)
was made to stay 'stationary' while the colors moved through it. (IIRC, that
is.) I've tried to duplicate that.

Essentially, here are the steps I used:
1) The various gradient y color_maps have a transparent 'bottom half' (and some
of the top as well.) Then turbulence is added. Then the distorted pigments are
scaled smaller in x, which 'squashes together' the distortions and improves the
look.
2) The final textures are applied to a sphere, using warp{spherical}. This is to
make the distortions look like they're all 'pointing toward the center' (or
rather, the North pole of the sphere.) The bottom half of the sphere is now
transparent.
3) The sphere itself is then squashed flat like a pancake.
4) The flat sphere is scaled up during animation, while the turbulence is
translated in the opposite 'direction' (toward the center, so to speak) to make
it appear to remain stationary. More or less... ;-)

I've added a few bells and whistles like a changing ambient value, just for
interest. There are doubtless other (better?) ways to achieve such an effect,
but this example is pretty straightforward.

Ken

---code---

global_settings{assumed_gamma 2.2 max_trace_level 50}
// assumed_gamma 1.0 will change the colors

#include "math.inc" // for 'clip'

camera {
  perspective
  location  <0, 6*1.3, -20*1.3>
  look_at   <0, 0,  0>
  right     x*image_width/image_height
  angle 55
}

#declare first_texture =
texture{ // main colors
 pigment{
  gradient y
  pigment_map{
   [0.45 rgbt<.5,.3,1,1>]
   [0.5 rgb .45*<.5,.3,1>] // dark purple
   [0.68*.95 rgb .5*<1,.5,.8>] // reddish
   [0.73*.95 rgb 1.2*(<.4,.3,1> + <.2,.2,.2>)/1.2]
   [1 - clip(.6*clock,0,1 - .77*.95) rgbt 1]
      }
  translate -.31*clock*y
  scale 30
  warp{turbulence 1 omega .59}
  scale 1/30
                scale 7
  warp{turbulence .3*<0,2,0> omega .59}
  scale 1/7
  translate .31*clock*y

  scale <.2,1,1> // to squash turbulence

  warp{spherical}
        }
 finish{ambient 3 - clip(4*clock,0,2) diffuse 0}
 }

#declare second_texture =
texture{ // light blue edge streaks
 pigment{
  gradient y
  pigment_map{
   [0.44*.95 rgbt <.52,.42,1,1>]
   [0.49*.95 rgb <.52,.42,1>]
   [0.57*.95 rgbt <.52,.42,1,1>]
      }
  translate -.45*clock*y
  scale 30
  warp{turbulence 3 omega .1}
  scale 1/30
  translate .45*clock*y

  scale <.03,1.1,1> // to squash turbulence

  warp{spherical}
  }
 finish{ambient 3 - clip(4*clock,0,2) diffuse 0}
 }

#declare third_texture =
texture{ // blue band just at edge
 pigment{
  gradient y
  pigment_map{
   [0.47 rgbt <.5,.4,1,1>]
   [0.49 rgbt <.5,.4,1,.2>]
   [0.51 rgbt <.5,.4,1,.2>]
   [0.59 rgbt <.5,.4,1,1>]
      }
  warp{spherical}
  }
 finish{ambient 2.3 - clip(2*clock,0,1) diffuse 0}
 }

// final effect...
sphere{0,1
 texture{first_texture}
 texture{second_texture}
 texture{third_texture}

 scale (.3 + 15*clock)*<1,.05,1>
 rotate 17*z
 }


Post a reply to this message

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