POV-Ray : Newsgroups : povray.binaries.images : Invitation: The Gate is Never Locked Server Time
2 Aug 2024 18:10:22 EDT (-0400)
  Invitation: The Gate is Never Locked (Message 16 to 25 of 25)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Kirk Andrews
Subject: Re: Invitation: The Gate is Never Locked
Date: 15 Jun 2007 09:00:01
Message: <web.46728cf1753da728d9b8bbd0@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:
> Looks nice!
> The gate needs hinges though.

Goodness, you're right!  Not only are they unlocked, they don't even have
hinges!  I'll have to fix that.


Post a reply to this message

From: Stefan Viljoen
Subject: Re: Invitation: The Gate is Never Locked
Date: 16 Jun 2007 06:14:40
Message: <4673b810@news.povray.org>
Kirk Andrews wrote:

>> Yikes! How do you "turn a bitmap into a function"? The isosurface part I
>> (think) I've got an idea how to do, as well as adding the bumps. But how
>> do you turn a bitmap into an isosurface function?
> 
> You can turn any pigment into a function, so first declare an image
> pattern pigment, and then declare a function using that pigment.  This is
> my code:

Ooooo! Thanks Kirk - I'd never have thought of that myself. Of course, it
probably is there in the docs, but I'd -never- have figured it out / picked
it up myself.

I've just had an epiphany here - you've opened up so many cool ideas my head
is spinning... thanks for sharing the code. You've just stimulated some
serious creativity - this technique offers so many possibilities (for me at
least.)

Thanks again...

Regards,
-- 
Stefan


Post a reply to this message

From: RusHHouR
Subject: Re: Invitation: The Gate is Never Locked
Date: 16 Jun 2007 09:35:03
Message: <web.4673e5eb753da7247d3ae5e0@news.povray.org>
Great job with the scene, both the architectual and the environmental.
The style appeals to me very, very much!


Post a reply to this message

From: Allan
Subject: Re: Invitation: The Gate is Never Locked
Date: 17 Jun 2007 19:45:01
Message: <web.4675c75f753da72387a47510@news.povray.org>
"Kirk Andrews" <kir### [at] hotmailcom> wrote:

> You can turn any pigment into a function, so first declare an image pattern
> pigment, and then declare a function using that pigment.  This is my code:
>
> #declare PGate =
> pigment {
>   image_pattern {
>     jpeg "Gate/GateStructure4.jpg"   // image file to read
>   }
> }
>
> #declare GateF =
> function {
>   pigment {PGate scale 10000*z}
> }


Kirk,

It appears that I need a little help on your "image as function" code.  If I
try to render the object (see below) POVray tells me this:

{
 function
 {
  GateF(x,y,z)
 }
Parse Error: Expected '.', } found instead

Did I misunderstand your sample?

-Allan



Here is my code...

#declare PGate =
pigment
{
  image_pattern
  {
    jpeg "GateStructure4.jpg"   // image file to read
  }
}

#declare GateF = function {pigment {PGate scale 10000*z}}

isosurface
{
  function
  {
    GateF(x,y,z)
  }
  accuracy 0.01
  threshold 1.0
  contained_by {box {-2,2}}
  max_gradient 35
  uv_mapping
  material
  {
    texture
    {
      pigment {color rgb <0.98, 0.83, 0.58>}
      normal
      {
        brick 0.5 //amount
      }
      finish
      {
        diffuse 0.6
        brilliance 1.0
      }
    }
    interior
    {
      ior 1.3
    }
  }
}


Post a reply to this message

From: Kirk Andrews
Subject: Re: Invitation: The Gate is Never Locked
Date: 17 Jun 2007 20:10:02
Message: <web.4675cbe1753da728d9b8bbd0@news.povray.org>
> Kirk,
>
> It appears that I need a little help on your "image as function" code.  If I
> try to render the object (see below) POVray tells me this:
>
> {
>  function
>  {
>   GateF(x,y,z)
>  }
> Parse Error: Expected '.', } found instead
>
> Did I misunderstand your sample?
>
> -Allan

Pov is looking for "function {GateF(x,y,z).gray}"  It will always require
..gray or .red etc. if you are using a pigment function (including a
bitmap).

Here's my whole code for the gate:


#declare PGate =  //The bitmap pigment
pigment {
  image_pattern {
    jpeg "Gate/GateStructure4.jpg"
  }
}

#declare GateF =  //convert to function
function {
  pigment {PGate scale 10000*z}
}

#declare Gbumps =  //bumps applied
function {
  pigment {
    bumps
    scale .01
    color_map {
      [0 rgb 0]
      [1 rgb 1]
    }
  }
}

#declare GPlaneF =  //the pigment function is infinite in the z direction.
This limits it and allows for some rounding of the edges when combined with
the bumps pigment
function {
  pigment {
    gradient z
    color_map {
      [0.0 rgb 0]
      [0.1 rgb 1]
      [0.9 rgb 1]
      [1.0 rgb 0]
    }
    scale .1*z
  }
}

#declare IsoGate =
isosurface {
  function {(GateF(x,y,0).gray -.5 +
Gbumps(x,y,z).gray*.5)*GPlaneF(x,y,z).gray}
  contained_by { box { 0, <1,.999,.05> } }
  accuracy 0.001
  max_gradient 35
  scale 2*y
  translate -1*x
  translate 1*x
}


Post a reply to this message

From: Allan
Subject: Re: Invitation: The Gate is Never Locked
Date: 17 Jun 2007 22:20:01
Message: <web.4675eaff753da72387a47510@news.povray.org>
"Kirk Andrews" <kir### [at] hotmailcom> wrote:

> Pov is looking for "function {GateF(x,y,z).gray}"  It will always require
> ..gray or .red etc. if you are using a pigment function (including a
> bitmap).

DOH!  I re-read the section in the manual for isosurface at least three
times today and still did not get that little item about the function
looking for the .gray color component.  Now it renders perfectly.  Thank
you, Kirk for providing a very useful example!  Examples like this should
be in the manual!

-Allan


Post a reply to this message

From: Thomas de Groot
Subject: Re: Invitation: The Gate is Never Locked
Date: 18 Jun 2007 03:43:57
Message: <467637bd@news.povray.org>
"Allan" <all### [at] WholeCheesecom> schreef in bericht 
news:web.4675eaff753da72387a47510@news.povray.org...
> "Kirk Andrews" <kir### [at] hotmailcom> wrote:
>
>> Pov is looking for "function {GateF(x,y,z).gray}"  It will always require
>> ..gray or .red etc. if you are using a pigment function (including a
>> bitmap).
>
> DOH!  I re-read the section in the manual for isosurface at least three
> times today and still did not get that little item about the function
> looking for the .gray color component.  Now it renders perfectly.  Thank
> you, Kirk for providing a very useful example!  Examples like this should
> be in the manual!
>

If I remember well, somebody once said that, to gain a little bit of parse 
(and render?) time, .red (or .green, or .blue) would be preferable to .gray 
as POV-Ray only considers a grey image anyway.

Thomas


Post a reply to this message

From: Alain
Subject: Re: Invitation: The Gate is Never Locked
Date: 18 Jun 2007 05:56:37
Message: <467656d5$1@news.povray.org>
Thomas de Groot nous apporta ses lumieres en ce 2007/06/18 03:43:
> "Allan" <all### [at] WholeCheesecom> schreef in bericht 
> news:web.4675eaff753da72387a47510@news.povray.org...
>> "Kirk Andrews" <kir### [at] hotmailcom> wrote:
>>
>>> Pov is looking for "function {GateF(x,y,z).gray}"  It will always require
>>> ..gray or .red etc. if you are using a pigment function (including a
>>> bitmap).
>> DOH!  I re-read the section in the manual for isosurface at least three
>> times today and still did not get that little item about the function
>> looking for the .gray color component.  Now it renders perfectly.  Thank
>> you, Kirk for providing a very useful example!  Examples like this should
>> be in the manual!
>>
> 
> If I remember well, somebody once said that, to gain a little bit of parse 
> (and render?) time, .red (or .green, or .blue) would be preferable to .gray 
> as POV-Ray only considers a grey image anyway.
> 
> Thomas
> 
> 
You can use .red, .green, .blue, .x, .y or .z when you have a B/W image or 
pattern. This will save you render time (for an isosurface) as you only evaluate 
1 colour component instead of evaluating all 3 and averaging them.
You must use .gray when you have a colour image or pattern.

-- 
Alain
-------------------------------------------------
I find that the harder I work, the more luck I seem to have.
Thomas Jefferson


Post a reply to this message

From: Thomas de Groot
Subject: Re: Invitation: The Gate is Never Locked
Date: 18 Jun 2007 10:12:08
Message: <467692b8$1@news.povray.org>
"Alain" <ele### [at] netscapenet> schreef in bericht 
news:467656d5$1@news.povray.org...
>>
>>
> You can use .red, .green, .blue, .x, .y or .z when you have a B/W image or 
> pattern. This will save you render time (for an isosurface) as you only 
> evaluate 1 colour component instead of evaluating all 3 and averaging 
> them.
> You must use .gray when you have a colour image or pattern.
>

Yes, of course, that makes sense!  :-)
Thanks Alain.

Thomas


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Invitation: The Gate is Never Locked
Date: 18 Jun 2007 16:10:54
Message: <4676e6ce$1@news.povray.org>
I like it but the contrast could be even higher: Much of the
scenery behind the gate is made of rather dark trees now, so
the intensity is dominated by the sky, and the gate blends
into the background. Maybe make the trees brighter?

And it could be more magical if the sky looked gloomy over the
wall, but blue through the doorway. And how about some emitting
media streaking out of the gate ;)


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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