POV-Ray : Newsgroups : povray.binaries.images : Sci-Fi Scene Assets : Re: Sci-Fi Scene Assets Server Time
2 May 2024 05:15:13 EDT (-0400)
  Re: Sci-Fi Scene Assets  
From: Robert McGregor
Date: 26 Feb 2021 17:00:01
Message: <web.60396ee3a906d8e387570eab0@news.povray.org>
I'm pretty happy with the ship model overall. I fine-tuned a few things on the
engine assembly and started texturing the engines with some greebling, etc. I'm
also working on a media glow "exhaust" that's triggered by a boolean switch in
my main scene file to render with engines either on or off:

#declare EngineActive = 1; // On/off to toggle powered-up engines

Here's the source for the engine assembly, without textures. As you can see it's
really not very complicated:

//------------------------------------------------------------------------------
// EngineAssembly.inc
//------------------------------------------------------------------------------

#declare EngineColor = SummerSky+White;
#declare EngineHole = sphere { 0, 0.75 translate y*1 }
#declare EngineTailBase = cone { 1*y,  0.75, -1*y, 1.25 }
#declare Glow = sphere { 0, 1 pigment { rgbt 1 }}  // coming soon

#declare widget1 = union {
   cylinder {  <0, 1, 0><0, -1, 0>, 0.1 }
   sphere { <0,1,0>, 0.1 }
   sphere { <0,-1,0>, 0.1 }
   scale 0.75
   translate -y*0.25
   rotate z*14
   translate x*1
}

#declare widget2 =
superellipsoid { <0.2, 0.2>
   scale <0.1, 0.8, 0.1>
   translate y*0.25
}

#declare widget3 =
superellipsoid { <0.2, 0.2>
   scale <0.15, 0.1, 0.2>
}

#declare widget4 = union {
   object { widget2 }
   object { widget3 translate -y*0.5 }
   object { widget3 translate y*0.5 }
   rotate z*14
   translate x*1
   rotate y*45
}

#declare widget5 = union {
   object { widget2 }
   object { widget3 translate -y*0.5 }
   object { widget3 translate y*0.5 }
   scale y*1.25 translate -y*0.5
}

#declare rot1 = 360/12;
#declare rot2 = 360/6;
#local cnt = 0;

#declare widget1_Assembly =
union {
   #while (cnt < 12)
      object { widget1 rotate y*rot1*cnt }
      #local cnt = cnt + 1;
   #end
}

#declare cnt = 0;
#declare widget4_Assembly =
union {
   #while (cnt < 6)
      object { widget4 rotate y*rot2*cnt }
      #local cnt = cnt + 1;
   #end
   rotate -y*15
}

#declare EngineTail =
union {
   torus { 0.8, 0.05 scale y*3 translate y*1 }
   torus { 1.25, 0.05 scale y*3 translate -y*1 }
   difference {
      union {
         difference {
            object { EngineTailBase }
            object { EngineHole }
         }
         object { widget4_Assembly }
      }
      object { widget1_Assembly }
   }
}

#declare EngineTailTop = cone { 1.65*y,  0.75, -1*y, 1.25
   rotate x*180
   translate -y*2
}

#declare EngineDoodad = object { EngineTail
   scale 0.35
   rotate -x*104
   translate -y*2.25
   translate -z*1
   rotate y*90
}

#declare Engine =
union {
   object { EngineTail }
   #if (EngineActive)
      sphere { 0, 0.5
         pigment { EngineColor*0.7 }
         finish { emission 0.9 ambient 0.9 diffuse 0 }
         translate y*0.7
      }
      object { Glow }
   #end

   object { EngineTailTop }
   object { EngineTail
      scale 0.7
      rotate x*180
      translate -y*4
   }
   object { EngineDoodad rotate y*360/6*1 }
   object { EngineDoodad rotate y*360/6*2 }
   object { EngineDoodad rotate y*360/6*3 }
   object { EngineDoodad rotate y*360/6*4 }
   object { EngineDoodad rotate y*360/6*5 }
   object { EngineDoodad rotate y*360/6*6 }
   rotate x*180
}


Post a reply to this message


Attachments:
Download 'engineassembly.jpg' (547 KB)

Preview of image 'engineassembly.jpg'
engineassembly.jpg


 

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