POV-Ray : Newsgroups : povray.binaries.images : Sci-Fi Scene Assets Server Time
1 May 2024 09:32:36 EDT (-0400)
  Sci-Fi Scene Assets (Message 21 to 30 of 97)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Kenneth
Subject: Re: Sci-Fi Scene Assets
Date: 23 Feb 2021 20:00:00
Message: <web.6035a31ca906d8e3d98418910@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> But what you're essentially doing is exactly that.  Because there is no
> "function" - it's a look-up table - reading in the color values for each x,y
> pixel in the image.   It's simply the fact that it's done under the hood, via
> compiled source code, that makes it seem "different".
>
> [aource-code snippet]
>
> "If the x,y position is outside of the image area, return a clear value, else
> return the color of the image at that x,y value."
> No function.   Just an algorithm in a loop.

Fascinating! Thanks; that actually helps me to understand what's going on--
MUCH more than I knew previousy! The Black Magic mystery is slowly starting to
become clear...

>
> Now, what I have wanted, and suggested in the past, is for there to be a
> mechanism by which the compiled source code stores all the color data for an
> image file in an SDL-accessible 2D array.   Which would kinda give you what
> you want without all of the mucking around.

YES, that would be an interesting feature, and I '2nd' the vote.

> And I guess I should point out that _form_ follows _function_.
> What do you want to do with the function once you've got it, that you need to
> have it in function form?

That's a good question. My main answer would be, just to see if could be done.
And to try and better-understand the real power of function use in SDL. I've
used functions for years in POV-ray, but in relatively simplistic ways; I
haven't yet grasped the 'how-to's' of more complex combinations and usages.
(E.g., trying to turn a bunch of eval_pigment colors into a function, *via* pure
SDL equations. Etc.)

[Btw, my apologies to Robert M for going off-topic here]


Post a reply to this message

From: Robert McGregor
Subject: Re: Sci-Fi Scene Assets
Date: 25 Feb 2021 12:30:01
Message: <web.6037dcfaa906d8e387570eab0@news.povray.org>
I started working on this CSG starship asset a few days ago. It's built using
only tori, cones, cylinders, spheres and superellipsoids.

My working scene file for building the ship has multiple instances of the object
rotated and translated in various ways so I can see it from many angles
at once, which makes it much easier to tweak things.

Just for fun I'm planning to make a short animation of the ship coming out of
hyperspace and heading to the alien moon...


Post a reply to this message


Attachments:
Download 'spaceshipmultiview.jpg' (322 KB)

Preview of image 'spaceshipmultiview.jpg'
spaceshipmultiview.jpg


 

From: Thomas de Groot
Subject: Re: Sci-Fi Scene Assets
Date: 26 Feb 2021 02:46:50
Message: <6038a76a@news.povray.org>
Op 25/02/2021 om 18:26 schreef Robert McGregor:
> I started working on this CSG starship asset a few days ago. It's built using
> only tori, cones, cylinders, spheres and superellipsoids.
> 
> My working scene file for building the ship has multiple instances of the object
> rotated and translated in various ways so I can see it from many angles
> at once, which makes it much easier to tweak things.
> 
> Just for fun I'm planning to make a short animation of the ship coming out of
> hyperspace and heading to the alien moon...
> 

Good modelling! This is where a new version of Moray would be welcome...

-- 
Thomas


Post a reply to this message

From: Bald Eagle
Subject: Re: Sci-Fi Scene Assets
Date: 26 Feb 2021 06:50:01
Message: <web.6038e04ca906d8e31f9dae300@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Op 25/02/2021 om 18:26 schreef Robert McGregor:
> > I started working on this CSG starship asset a few days ago. It's built using
> > only tori, cones, cylinders, spheres and superellipsoids.

Well that's some clever usage, because it leaves me puzzling over the main body.


> Good modelling! This is where a new version of Moray would be welcome...

I'll say.  The placement of all of those little pieces makes me wonder if it was
done by eye and feel, or if there was some analytical geometry involved.
Tapping an arrow key to nudge a shape in a modeler is vastly more attractive for
most projects than calculating the depth of an arc, given a certain span it
needs to nestle into, or any of that stuff....


Post a reply to this message

From: Robert McGregor
Subject: Re: Sci-Fi Scene Assets
Date: 26 Feb 2021 09:35:01
Message: <web.60390624a906d8e387570eab0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Good modelling! This is where a new version of Moray would be welcome...

Thanks Thomas, and I agree, when building complex CSG models it sure would be
nice to be able to use a modeler that works with POV-Ray primitives.


Post a reply to this message

From: Robert McGregor
Subject: Re: Sci-Fi Scene Assets
Date: 26 Feb 2021 09:40:01
Message: <web.6039081da906d8e387570eab0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Well that's some clever usage, because it leaves me puzzling over the main body.

Ah, I forgot to mention that I used planes for differencing also, to carve off
sections of supellipsoids at 45 degree angles, etc.


> The placement of all of those little pieces makes me wonder if it was
> done by eye and feel, or if there was some analytical geometry involved.
> Tapping an arrow key to nudge a shape in a modeler is vastly more attractive for
> most projects than calculating the depth of an arc, given a certain span it
> needs to nestle into, or any of that stuff....

All of this was done by eye and feel. I started with the engine as a couple of
cones and some tori at the origin and just started making little parts that are
unioned into subassemblies and rotated around. Each piece was done the same way,
as working at the origin is pretty straightforward and assemblies can be easily
moved into final position.

Cheers,
Rob


Post a reply to this message

From: Robert McGregor
Subject: Re: Sci-Fi Scene Assets
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


 

From: Kenneth
Subject: Re: Sci-Fi Scene Assets
Date: 27 Feb 2021 05:25:01
Message: <web.603a1a16a906d8e3d98418910@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> 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.

That is some really nice work, with lots of CGI details that 'look right' in
their shapes and positions. Very 'organic', like the old saying of "form follows
function." There are too many spaceships in movies that have way too much
oddly-placed clutter-- just to 'look' detailed. (I'm actually thinking of the
robots in the TRANSFORMERS movie franchise-- the robots keep evolving to be more
and more complicated, with doo-dads everywhere, to the point where I don't know
what I'm looking at!)

In your bottom row of images, I see some *great* surface texturing that you're
working on-- like random overlapping plates and such. I assume that it's done
with a single image_map (and accompanying normal_map?)-- wrapped around the
engine using a cylindrical warp, perhaps? In any case, it would be interesting
to know how you actually made the original image. It looks like a sophisticated
precedural tiling technique(?), perfect for spaceship surfaces and quite
beautiful.

> [Bald Eagle]
> ...The placement of all of those little pieces makes me wonder if it
> was done by eye and feel, or if there was some analytical geometry involved.

I usually use the built-in TRACE tool for placing such greebles on an object,
when they need to be in a regular pattern-- especially useful if the bigger
object is a symetrical shape like a cylinder or sphere. It has been awhile since
I used the technique (and I lost my original code), so I just came up with some
example code by going back to 'first principles'. There are probably some
built-in POV-ray functions in "transforms.inc" (or elsewhere) that would be less
complicated to use; but the following trig-based stuff seems to work well.
[Caveat: For a cone-like object such as Robert's engines-- with 'slanted
surfaces', unlike the surface on a straight cylinder-- there needs to be an
additional slight rotation of the greebles at some point, to slant them
appropriately to better-match the surface. I think that would probably have to
be done by eye-- unless there's some kind of simple formula for determining how
a cone's surface 'angle' deviates from a that of a straight cylinder.]

Btw, I'm using trace's returned surface NORMAL only as a 'switch', to make sure
that any *missed* traces don't result in greebles being placed at the <0,0,0>
origin instead. The docs give an example of this. Otherwise, that normal isn't
usually needed. Unfortunately, the only example of the trace command's use in
the documentation concerns using that normal to actually *create* the
greeble-like object. That's rather limiting; in most cases, it's easier and more
logical to make such an object beforehand, IMO.

------ [code] -----
#declare OBJ = // large main object
union{
cylinder{0, 2*x, .4}
sphere{0,.4 scale <3,1,1>}
pigment{srgb <.8,.5,.5>} // red
}

#declare GREEBLE =
union{
box{0,<1,6,1> translate <-.5,0,-.5> }
box{0,<6,1,1> translate <-.5,0,-.5> translate 6*y}
sphere{0,1.3 translate <6.5,6.5,0>}
scale .06
pigment{srgb <.5,1,.5>}
rotate 90*x // Yes, important. The traced surface locations below require
// this object to be oriented into +Z, not the usual +Y; due to the sin
// and cos values.
}

// from "math.inc', for the trig functions that use degrees instead of
// radians. I like to place these functions into the scene itself, instead of
// using #include "math.inc". More efficient!
#declare sind = function (x) {sin(radians(x))}
#declare cosd = function (x) {cos(radians(x))}

#declare NUM_OF_GREEBLES = 12;
#declare NORM = <0,0,0>; // to set this up for TRACE (a requirement)

union{
#for(A,1,NUM_OF_GREEBLES)
#local ANGLE = (A - 1)*360/(NUM_OF_GREEBLES);
#local SIND_RESULT = sind(ANGLE);
#local COSD_RESULT = cosd(ANGLE);
//#debug concat("\n","ANGLE  = ",str(ANGLE,0,3))
//#debug concat("\n","SIN  = ",str(sind(ANGLE),0,3))
//#debug concat("\n","COS  = ",str(cosd(ANGLE),0,3),"\n\n")
#local TRACE_DISTANCE = 1.6;
#local FOUND_POS =
trace(
   OBJ,<1.5,
   TRACE_DISTANCE*SIND_RESULT, TRACE_DISTANCE*COSD_RESULT>,
   <1.5,0,0> - <1.5, TRACE_DISTANCE*SIND_RESULT, TRACE_DISTANCE*COSD_RESULT>
   NORM
   );
#if(vlength(NORM) !=0)
object{GREEBLE
rotate (A - 1)*(-360/NUM_OF_GREEBLES)*x // NEGATIVE rotation to 'match'
// how the SIND and COSD values work
translate FOUND_POS
}
#else
#end
// TEMPORARY objects (thin white cylinders) to see the direction of the
// trace rays from the tracing locations...
cylinder{<1.5,0,0>,
<1.5, TRACE_DISTANCE*SIND_RESULT, TRACE_DISTANCE*COSD_RESULT>,.008
pigment {srgbt <1,1,1,.95>}
finish{ambient 0 emission 1 diffuse 0}
no_shadow
}
#end // of #for loop
object{OBJ}
translate <0,1.2,0> // everything
} // end of union


Post a reply to this message


Attachments:
Download 'greeble_placement_using_trace.png' (108 KB)

Preview of image 'greeble_placement_using_trace.png'
greeble_placement_using_trace.png


 

From: Mr
Subject: Re: Sci-Fi Scene Assets
Date: 27 Feb 2021 12:30:00
Message: <web.603a8187a906d8e36adeaecb0@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
> > Good modelling! This is where a new version of Moray would be welcome...
>
> Thanks Thomas, and I agree, when building complex CSG models it sure would be
> nice to be able to use a modeler that works with POV-Ray primitives.

Blender addon does feature most POV-Ray primitives and its boolean modifier can
be set to use POV-Ray CSG. If they happened to be out of odrer, I would be glad
to at last have any form of feedback some day. :-)


Post a reply to this message

From: Mr
Subject: Re: Sci-Fi Scene Assets
Date: 27 Feb 2021 12:35:00
Message: <web.603a825fa906d8e36adeaecb0@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> 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:
> [...]

Wow ! will this be used in the alien artifact scene? I can't wait to see the
update !


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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