POV-Ray : Newsgroups : povray.general : My little addition to wishes list for POV 4 Server Time
7 Aug 2024 09:24:25 EDT (-0400)
  My little addition to wishes list for POV 4 (Message 11 to 17 of 17)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Ken
Subject: Re: My little addition to wishes list for POV 4
Date: 20 Nov 2001 22:20:32
Message: <3BFB1DD2.E0B39E63@pacbell.net>
Warp wrote:
> 

> : That's what inspired me - storage of images.
> 
>   And why function { pigment { image_map { ... } } } doesn't do this?

I think what they are getting at is a way to simplify declaring an image
file for universal use in all situations where an image may be used.
There are differnt situations where you may wish to use the same image
in different situations in the same scene but the different situations
require different declarations of the image file.

Consider -

#declare Image = image { png "my_image.png" }

height_field { Image ... }

normal { bump_map { Image } }

pigment { image_map { Image } }

function { pigment { image_map { Image } } }


-- 
Ken Tyler


Post a reply to this message

From: Warp
Subject: Re: My little addition to wishes list for POV 4
Date: 21 Nov 2001 01:55:34
Message: <3bfb4fe6@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
: Consider -

: #declare Image = image { png "my_image.png" }

: height_field { Image ... }

: normal { bump_map { Image } }

: pigment { image_map { Image } }

: function { pigment { image_map { Image } } }

  AFAIK you can currently do all that with a pigment function (which has the
image as an image map).

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From:
Subject: Re: My little addition to wishes list for POV 4
Date: 21 Nov 2001 03:49:31
Message: <hupmvtc7b4uihu1l762441rnoquhk3fjl0@4ax.com>
On 21 Nov 2001 01:55:34 -0500, Warp <war### [at] tagpovrayorg> wrote:
>  AFAIK you can currently do all that with a pigment function (which has the
>image as an image map).

I never played with heigh fields however looking at documentation (6.5.1.5)
only images are allowed. But even if function as source could be possible
then AFAIK using function's engine to evaluate values it could be a little bit
slower.

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From:
Subject: Re: My little addition to wishes list for POV 4
Date: 21 Nov 2001 03:58:14
Message: <itqmvt07hchmba0snkojo95iql1luv134d@4ax.com>
On Tue, 20 Nov 2001 19:21:54 -0800, Ken <tyl### [at] pacbellnet> wrote:
> Consider -
> #declare Image = image { png "my_image.png" }
> height_field { Image ... }
> normal { bump_map { Image } }
> pigment { image_map { Image } }
> function { pigment { image_map { Image } } }

in fact there is something like image_pattern{} in 3.5
but it can't be assigned, can't be used directly within heigh_field and can't be
used as pattern for function{pattern{image_pattern{}}}

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Warp
Subject: Re: My little addition to wishes list for POV 4
Date: 21 Nov 2001 04:18:03
Message: <3bfb714a@news.povray.org>

: I never played with heigh fields however looking at documentation (6.5.1.5)
: only images are allowed.

  Heightfields can be created from functions. This is mentioned somewhere; if
it's not mentioned in the heightfield section, then I think a note should be
added there.

: But even if function as source could be possible
: then AFAIK using function's engine to evaluate values it could be a little bit
: slower.

  I said it's possible. I didn't say it would be as efficient.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From:
Subject: Re: My little addition to wishes list for POV 4
Date: 21 Nov 2001 04:45:08
Message: <77tmvtgkm9i3ngb3fa0o598ljfir26rkqs@4ax.com>
On 21 Nov 2001 04:18:03 -0500, Warp <war### [at] tagpovrayorg> wrote:
> : I never played with heigh fields however looking at documentation (6.5.1.5)
> : only images are allowed.
>
>  Heightfields can be created from functions. This is mentioned somewhere; if
> it's not mentioned in the heightfield section, then I think a note should be
> added there.

I found it within function chapter. I agree it should be mentioned at
heigh_field chapter too. However it creates new instance of images by
reevaluating it. That's way this construction needs dimensions. So we back to
storage system.

height_field {function 200,200 {pigment{image_map{"test"}}}}

>  I said it's possible. I didn't say it would be as efficient.

right

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Warp
Subject: Re: My little addition to wishes list for POV 4
Date: 21 Nov 2001 06:18:09
Message: <3bfb8d71@news.povray.org>

: I found it within function chapter. I agree it should be mentioned at
: heigh_field chapter too. However it creates new instance of images by
: reevaluating it.

  On the other hand, it does so only during the creation of the heightfield.
I suppose that this temporary image is freed after the heightfield has been
created (or if it isn't, then I think that it definitely should be).

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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