POV-Ray : Newsgroups : povray.binaries.images : RSoCP (one more) Server Time
14 Nov 2024 16:27:01 EST (-0500)
  RSoCP (one more) (Message 1 to 10 of 24)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Trevor G Quayle
Subject: RSoCP (one more)
Date: 15 Aug 2006 08:15:00
Message: <web.44e1ba4697f60dcdc150d4c10@news.povray.org>
Was trying out some ground texturing and decided to make a traditional RSoCP
scene.

-tgq


Post a reply to this message


Attachments:
Download 'rsocp.jpg' (265 KB)

Preview of image 'rsocp.jpg'
rsocp.jpg


 

From: Thomas de Groot
Subject: Re: RSoCP (one more)
Date: 15 Aug 2006 08:27:04
Message: <44e1bd98$1@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> schreef in bericht 
news:web.44e1ba4697f60dcdc150d4c10@news.povray.org...
> Was trying out some ground texturing and decided to make a traditional 
> RSoCP
> scene.
>

This is a strange one! HDR I suppose. Looks like a flooded town with the 
water surface changing into the checkered plane. Well done!!

Thomas


Post a reply to this message

From: Orchid XP v3
Subject: Re: RSoCP (one more)
Date: 15 Aug 2006 13:47:21
Message: <44e208a9$1@news.povray.org>
Oh very nice. The floor has a classy finish to it, and I love the golden 
lighting. Bravo!


Post a reply to this message

From: Trevor G Quayle
Subject: Re: RSoCP (one more)
Date: 15 Aug 2006 14:35:00
Message: <web.44e2139771ada471c150d4c10@news.povray.org>
Orchid XP v3 <voi### [at] devnull> wrote:
> Oh very nice. The floor has a classy finish to it, and I love the golden
> lighting. Bravo!

Thanks. The floor is created from heightfields using user-defined functions
which I have been playing with a bit recently. The lightingis based on the
HDR environment map and the golden look comes partially from the colour of
the lighting, but also from photons and radiosity interacting with the
brass coloured sphere.

-tgq


Post a reply to this message

From: Gail Shaw
Subject: Re: RSoCP (one more)
Date: 15 Aug 2006 15:24:30
Message: <44e21f6e@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote in message
news:web.44e2139771ada471c150d4c10@news.povray.org...
>
> Thanks. The floor is created from heightfields using user-defined
functions
> which I have been playing with a bit recently.

They look great, like the stone tiles found on patios.

Could you go into a bit more detail about how you do them?


Post a reply to this message

From: Trevor G Quayle
Subject: Re: RSoCP (one more)
Date: 15 Aug 2006 16:55:01
Message: <web.44e2341471ada471c150d4c10@news.povray.org>
"Gail Shaw" <initialsurname@sentech sa dot com> wrote:
> "Trevor G Quayle" <Tin### [at] hotmailcom> wrote in message
> news:web.44e2139771ada471c150d4c10@news.povray.org...
> >
> > Thanks. The floor is created from heightfields using user-defined
> functions
> > which I have been playing with a bit recently.
>
> They look great, like the stone tiles found on patios.
>
> Could you go into a bit more detail about how you do them?

I pursued developing this out of dissatisfaction with the results I was
getting through CSG and surface normals when making tiles.

Not sure how familiar you are with heightfields.  Typically they use an
external image, however, POVRay allows them to use internal images as well.
 This includes definable pigment patterns as well as functions. The basics
steps are as follows (note that heigtfields evaluate the pattern functions
on the x-y plane from <0,0,0> to <1,1,0> and are created on the x-z plane
from <0,0,0> to <1,0,1>):

Create basic tile pattern.  For this I used the boxed pigment.  The boxed
pattern centers on the origin and is 2 units wide so scale and translate it
so it is 1x1 with its corner at the origin.  Using a pigment_map controls
the size of the flat area, the bevels and the gap of the tiles (I'm using a
power function to correspond with the poly_wave waveform). In my example,
the gap is from 0 to 0.01,the bevel from 0.01 to 0.1 and the flat from 0.1
to 1.0 (from edge to centre of tile).  Using a poly_wave waveform allows
the bevel shape to be adjusted. (poly_wave 1.0 = linear, <1.0 = convex). We
could leave the pigment here and have only one tile per HF, however, when
tiled,each one would be identical. Define how many tiles we want per HF
before repeating (TPU).  Since boxed is not a repeating pattern, we need to
apply 2 repeat warps.  Finally scale the pigment down by TPU so the section
we want is within the <0,0,0>-<1,1,0> region:

#declare TPU=8; //tiles per unit

#declare PTILE =pigment{boxed pigment_map{[pow(0.01,0.2) rgb 0][pow(0.1,0.2)
rgb 1]} scale 1/2 translate <1/2,1/2,0>  warp{repeat x} warp{repeat y} scale
1/TPU poly_wave 0.2}

Next the pigment is simply converted to a function pattern. This makes
combining it with our tile texture pattern easier and more flexible:

#local FTILEA = function {pigment{PTILE}}

Next we define a function pattern for the texture we want the tile to have
(scaled according to the tile size again):

#local FTILEB = function {pigment{granite scale 1/2/TPU*2}}

Next we want to combine the 2 functions to give our final tile pattern (note
that we need to use .gray flag here to convert the rgb vector to a float).
This can require a bit of futzing around to get what you want.  Remember
though that the HF height is equal to the function value from 0 to 1,
beyond 1 it will wrap back to 0 effectively (y MOD 1) so we want to try to
keep the total function values between 0 and 1 to avoid confusion (Using
min/max functions can help clip the values and add effects).  In may
example here, I only want the flat part to be textured so the select
function allows me to grap only the top of the tile (i.e. where FTILEA >
0.99) and subtract the texture pattern (FTILEB) from it.  To maintain some
flat areas, 0.3 is subtracted from FTILEB (leaving ~30% of the tile area
flat after the min function is applied), this value is then adjusted to the
desired depth of the texture (0.15 in this case). The second instance of
FTILEB here is to add some additional rough texture at 1/10 the scale.

#local FTILE = function
{min(FTILEA(x,y,z).gray-select(FTILEA(x,y,z).gray-0.99,0,1)*((FTILEB(x,y,z).gray-0.3)*0.15-FTILEB(x*10,y*10,z*10).gray*
0.01),1)}

This function is then simply applied as a function pattern to a HF.  The HF
isintersected with a box to give a solid tile, and then scaled to give the
desired tile size.  For the HF, the resolution can be changed as needed
(800,800 is used here) and 'smooth' may be added as desired.

#declare THK=0.1;

#declare Tile=
intersection{
  height_field{function 800,800 {pattern{ function{FTILE(x,y,z)} }}}
  box{0 1}
  translate <-1/2,0,-1/2> //centre tile group
  scale <TPU,THK,TPU>  //each tile is 1x1xTHK
}

//END

I hope this was somewhat informative for you.  It seems that not many people
are aware of the full capabilities if HFs.  Of course, the functions used
here were for what I wanted, any other definable function (even multiple
functions) can be used in any type of combination (+,-,x,etc.) as desired.
The important part is to scale the pattern to the <0,0,0><1,1,0> region and
to keep the values between 0 and 1.
If you have any further questions, please post them. And please posts any
nice results you get.


-tgq


Post a reply to this message

From: RusHHouR
Subject: Re: RSoCP (one more)
Date: 16 Aug 2006 07:25:01
Message: <web.44e2ff6a71ada47147d3ae5e0@news.povray.org>
I really respect anyone who is willing to share this kind of skills.
Really nice and usefull. Thanks!


Post a reply to this message

From: Trevor G Quayle
Subject: Re: RSoCP (one more)
Date: 16 Aug 2006 09:05:00
Message: <web.44e317b671ada471c150d4c10@news.povray.org>
"RusHHouR" <gee### [at] mailnu> wrote:
> I really respect anyone who is willing to share this kind of skills.
> Really nice and usefull. Thanks!

Thanks!  That's what I love about the POV community and why I've been a part
of it for the past 12 years or so.  Not only is POV a great program (mind
you, it can be a daunting task to learn), but the community is usually very
helpful and friendly.

-tgq


Post a reply to this message

From: Stefan Viljoen
Subject: Re: RSoCP (one more)
Date: 16 Aug 2006 10:43:08
Message: <44e32efb@news.povray.org>
Trevor G Quayle spake:

> Was trying out some ground texturing and decided to make a traditional
> RSoCP scene.
> 
> -tgq

Whiskey Oscar Wiskey...
-- 
Stefan Viljoen
Software Support Technician / Programmer
Polar Design Solutions


Post a reply to this message

From: Gail Shaw
Subject: Re: RSoCP (one more)
Date: 16 Aug 2006 15:46:29
Message: <44e37615@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote in message
news:web.44e2341471ada471c150d4c10@news.povray.org...
>
> Not sure how familiar you are with heightfields.  Typically they use an
> external image, however, POVRay allows them to use internal images as
well.
>  This includes definable pigment patterns as well as functions. The basics
> steps are as follows (note that heigtfields evaluate the pattern functions
> on the x-y plane from <0,0,0> to <1,1,0> and are created on the x-z plane
> from <0,0,0> to <1,0,1>):
>

Thanks, very much appreciated.

I use height fields often but usually with images. I haven't played much
with the pigment pattern


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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