POV-Ray : Newsgroups : povray.binaries.images : Sci-Fi Scene Assets Server Time
1 Nov 2024 07:27:50 EDT (-0400)
  Sci-Fi Scene Assets (Message 28 to 37 of 97)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
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

From: Robert McGregor
Subject: Re: Sci-Fi Scene Assets
Date: 27 Feb 2021 16:30:01
Message: <web.603ab910a906d8e387570eab0@news.povray.org>
"Mr" <nomail@nomail> wrote:
> 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. :-)

Thanks Maurice, I will try it out!


Post a reply to this message

From: Robert McGregor
Subject: Re: Sci-Fi Scene Assets
Date: 27 Feb 2021 16:30:02
Message: <web.603ab95aa906d8e387570eab0@news.povray.org>
"Mr" <nomail@nomail> wrote:

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

Yes, I'm almost finished with initial texturing and want to work it in somehow.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Sci-Fi Scene Assets
Date: 28 Feb 2021 02:19:51
Message: <603b4417@news.povray.org>
Op 27/02/2021 om 11:19 schreef Kenneth:
[snip]
> 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.
> 

I use trace pretty much like you; I don't remember where and if I got an 
example, but I am pretty sure you can use the surface normal generated 
by trace to positioning correctly the greebles an a slanted surface.

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Sci-Fi Scene Assets
Date: 28 Feb 2021 02:23:11
Message: <603b44df$1@news.povray.org>
Op 27/02/2021 om 18:29 schreef Mr:
> "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. :-)
> 

I keep forgetting this because I (still) am not a Blender user myself... :-0

-- 
Thomas


Post a reply to this message

From: Kenneth
Subject: Re: Sci-Fi Scene Assets
Date: 28 Feb 2021 09:00:08
Message: <web.603b9fc8a906d8e3d98418910@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Op 27/02/2021 om 11:19 schreef Kenneth:
> [snip]
> > Btw, I'm using trace's returned surface NORMAL only as a 'switch'...
>
> I use trace pretty much like you; I don't remember where and if I got an
> example, but I am pretty sure you can use the surface normal generated
> by trace to positioning correctly the greebles an a slanted surface.
>

It would seem so-- but there's possibly *some* kind of problem (maybe 'problem'
is not the right word) for how trace creates its normal in the first place. But
I haven't exactly narrowed the problem down to trace itself; it may be in how
the normal is being 'processed' by other POV-ray tools in order to make use of
it.

I've once again been experimenting with two macros in "transforms.inc" that can
take a vector (like trace's NORM) and re-orient it to another vector direction:
Point_At_Trans, and Reorient_Trans. The latter seems to be a better and more
mathematically sophisticated version of the former. But when trace's returned
NORM is derived from particular curved or slanted surfaces, both of those macros
start to produce major changes to the expected 'orientation' of a placed object.
It's an old effect (plainly seen on a sphere, where there are entire 'quadrants'
of objects that switch direction.) This effect *may* even be by design(!), out
of mathematical/logical necessity. But it gets in the way :-( The maths used in
those macros are somewhat over my head, although I've tinkered with them, with
no satisfactory result.

So I rarely use trace's NORM normal anymore; too many unexpected headaches when
trying to actually use it.


Post a reply to this message

From: Bald Eagle
Subject: Re: Sci-Fi Scene Assets
Date: 28 Feb 2021 10:00:08
Message: <web.603bafeaa906d8e31f9dae300@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> It would seem so-- but there's possibly *some* kind of problem (maybe 'problem'
> is not the right word) for how trace creates its normal in the first place. But
> I haven't exactly narrowed the problem down to trace itself; it may be in how
> the normal is being 'processed' by other POV-ray tools in order to make use of
> it.

POV-Ray "measures" the normal of the surface that the ray intersects.
I'm pretty sure that there's no problem there.

Clearly understanding what those other macros actually do is probably where the
problem lies.

http://f-lohmueller.de/pov_tut/trans/trans_470e.htm

I must confess, things like this often become clear to me, and then I lose the
plot again a week later...

So if you have time and energy to do it, I'd copy those macros into scene files.
and then pick them apart, applying the parts step by step (if possible) and
understanding what the component operations actually do.

Pretend like you're explaining it to someone else, and document that in your
code.

A lot of what I've learned is due to digging into these really fundamental
things and writing scenes to illustrate them.  Because it confronts me with what
I don't know, and the consequences of my erroneous assumptions.

So I go from "I think I understand this"
to "I obviously have NO idea WTF I'm doing"
to "Well, that mostly works"
to "Oh - NOW I understand what's going on...."

And sometimes that may take me a day, a weekend, a week, a month, or in some
cases several years.

I'd look into vcross(), vdot(), and the order of rotations on a vector to move
it to properly align it with another vector.


https://www.youtube.com/watch?v=LyGKycYT2v0
https://www.youtube.com/watch?v=eu6i7WJeinw
https://www.youtube.com/watch?v=BaM7OCEm3G0
https://www.youtube.com/watch?v=Ip3X9LOh2dk

Not that I have _ever_ used quaternions before, but it does seem that they get
mentioned and used a lot, so maybe at some point I will muck around with those
for a bit.

https://www.youtube.com/watch?v=zjMuIxRvygQ


Post a reply to this message

From: Thomas de Groot
Subject: Re: Sci-Fi Scene Assets
Date: 1 Mar 2021 03:14:05
Message: <603ca24d$1@news.povray.org>
Op 28/02/2021 om 14:54 schreef Kenneth:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> Op 27/02/2021 om 11:19 schreef Kenneth:
>> [snip]
>>> Btw, I'm using trace's returned surface NORMAL only as a 'switch'...
>>
>> I use trace pretty much like you; I don't remember where and if I got an
>> example, but I am pretty sure you can use the surface normal generated
>> by trace to positioning correctly the greebles an a slanted surface.
>>
> 
> It would seem so-- but there's possibly *some* kind of problem (maybe 'problem'
> is not the right word) for how trace creates its normal in the first place. But
> I haven't exactly narrowed the problem down to trace itself; it may be in how
> the normal is being 'processed' by other POV-ray tools in order to make use of
> it.
> 
> I've once again been experimenting with two macros in "transforms.inc" that can
> take a vector (like trace's NORM) and re-orient it to another vector direction:
> Point_At_Trans, and Reorient_Trans. The latter seems to be a better and more
> mathematically sophisticated version of the former. But when trace's returned
> NORM is derived from particular curved or slanted surfaces, both of those macros
> start to produce major changes to the expected 'orientation' of a placed object.
> It's an old effect (plainly seen on a sphere, where there are entire 'quadrants'
> of objects that switch direction.) This effect *may* even be by design(!), out
> of mathematical/logical necessity. But it gets in the way :-( The maths used in
> those macros are somewhat over my head, although I've tinkered with them, with
> no satisfactory result.
> 
> So I rarely use trace's NORM normal anymore; too many unexpected headaches when
> trying to actually use it.
> 
> 
> 

Reorient_Trans, yes! That one I regularly use indeed. I must search my 
files where I apply it and whether I use the trace normal with it or not...

-- 
Thomas


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.