POV-Ray : Newsgroups : povray.general : reset children ? (3.5Beta) Server Time
19 Nov 2024 15:47:47 EST (-0500)
  reset children ? (3.5Beta) (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Jan Walzer
Subject: reset children ? (3.5Beta)
Date: 20 Jan 2002 10:01:33
Message: <3c4adbcd$1@news.povray.org>
I remember, there was something like this in Megapov ... Never tried it,
though

Now I've come along a situation, where I'd need it ... is this in 3.5 ?
PovDoc doesn't reveal anything 'bout it ...

I have some textures, used inside a texture_map ...

It would be a lot of work, to divide it into pigment_map, normal_map... and
finish_map isn't possible

Reverse transformation of these inner textures is hard to compute ...
So easiest would be a reset_children thingie ..

suggestions ?

My code looks something like this :

-------------------------------

#declare LPos=f1(clock);
#declare SphPos=f2(clock);

#declare Tex1=texture {
    pigment { ...
        }
    normal {...
        }
    finish {...
        }
    scale ...
    translate ...
    }


#declare Tex2=texture {
    pigment { ...
        }
    normal {...
        }
    finish {...
        }
    scale ...
    translate ...
    }

#declare Tex=texture {
    gradient vnormalize(SphPos-LPos)
    scale 2
    translate vnormalize(LPos-SphPos)
    texture_map {
        [0.0 Tex1]
        [1.0 Tex2]
        }
    }
--------------------------------------------
as you can see, Tex1 and Tex2 will be transformed together with Tex, but they
should
stay, where they are...

--
[Talking about cardriving]
"People are opstacles?
Oh...I always treat them as bonus points..." [Ian Burgmyer in p.o-t]
// Jan Walzer <jan### [at] lzernet>


Post a reply to this message

From: Christopher James Huff
Subject: Re: reset children ? (3.5Beta)
Date: 20 Jan 2002 10:14:23
Message: <chrishuff-365C2E.10151720012002@netplex.aussie.org>
The reset_children feature was not added to 3.5, but the same effect is 
possible. Since you are using plain transformations, you can do this:


#declare TexTrans = transform {
    scale 2
    translate vnormalize(LPos-SphPos)
}

#declare Tex = texture {
    gradient vnormalize(SphPos-LPos)
    transform {TexTrans}
    texture_map {
        [0.0 Tex1 transform {TexTrans inverse}]
        [1.0 Tex2 transform {TexTrans inverse}]
    }
}

More complex textures using warps are a different matter, you would have 
to do something like:

#declare Tex = texture {
    function {
        pattern {
            gradient vnormalize(SphPos-LPos)
            scale 2
            translate vnormalize(LPos-SphPos)
            turbulence 0.5
        }
    }
    texture_map {
        [0.0 Tex1]
        [1.0 Tex2]
    }
}

-- 
 -- 
Christopher James Huff <chr### [at] maccom>


Post a reply to this message

From: Warp
Subject: Re: reset children ? (3.5Beta)
Date: 20 Jan 2002 10:56:32
Message: <3c4ae8af@news.povray.org>
I think that the reset_children was found obsolete because the same
functionality can be achieved with pigment_pattern or functions.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Jan Walzer
Subject: Re: reset children ? (3.5Beta)
Date: 20 Jan 2002 11:06:13
Message: <3c4aeaf5$1@news.povray.org>
"Christopher James Huff" <chr### [at] maccom> wrote:
> The reset_children feature was not added to 3.5,
Ah ... OK ...
> but the same effect is possible. Since you are using
> plain transformations, you can do this:
>
>
> #declare TexTrans = transform {
>     scale 2
>     translate vnormalize(LPos-SphPos)
> }
>
> #declare Tex = texture {
>     gradient vnormalize(SphPos-LPos)
>     transform {TexTrans}
>     texture_map {
>         [0.0 Tex1 transform {TexTrans inverse}]
>         [1.0 Tex2 transform {TexTrans inverse}]
>     }
> }



Thanks so far ... You gave me the idea, but your solution doesn't work ...
Can this be a bug ?

I can't write

   transform {TexTrans}   // Parser Error

nor
   transform {TexTrans inverse}   // Parser Error

but only

   transform TexTrans

....

I can write:

#declare TexTrans=transform { scale 2 translate P1-P2 }

and

#declare TexTransInv=transform { scale 2 translate P1-P2 inverse }


Can this be a bug ?
I'll put a minimal Example, with error to p.b-t.b


--
[Talking about cardriving]
"People are opstacles?
Oh...I always treat them as bonus points..." [Ian Burgmyer in p.o-t]
// Jan Walzer <jan### [at] lzernet>


Post a reply to this message

From: Jan Walzer
Subject: Re: reset children ? (3.5Beta)
Date: 20 Jan 2002 11:07:34
Message: <3c4aeb46$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote:
>   I think that the reset_children was found obsolete because the same
> functionality can be achieved with pigment_pattern or functions.

Can it in this case ? ...
As you can see, I want to do it with complete textures, without having to
split them up ...
also I use different finishes, and I don't think there's an finish_map ...


--
[Talking about cardriving]
"People are opstacles?
Oh...I always treat them as bonus points..." [Ian Burgmyer in p.o-t]
// Jan Walzer <jan### [at] lzernet>


Post a reply to this message

From: Christopher James Huff
Subject: Re: reset children ? (3.5Beta)
Date: 20 Jan 2002 11:15:11
Message: <chrishuff-B34563.11160620012002@netplex.aussie.org>
In article <3c4aeaf5$1@news.povray.org>, "Jan Walzer" <jan### [at] lzernet> 
wrote:

> Can this be a bug ?
> I'll put a minimal Example, with error to p.b-t.b

It's a bug, but I thought it was fixed in the most recent version.

-- 
 -- 
Christopher James Huff <chr### [at] maccom>


Post a reply to this message

From: Warp
Subject: Re: reset children ? (3.5Beta)
Date: 20 Jan 2002 11:38:58
Message: <3c4af2a2@news.povray.org>
Jan Walzer <jan### [at] lzernet> wrote:
: also I use different finishes, and I don't think there's an finish_map ...

  But there's a texture_map.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Jan Walzer
Subject: Re: reset children ? (3.5Beta)
Date: 20 Jan 2002 11:41:43
Message: <3c4af347@news.povray.org>
"Warp" <war### [at] tagpovrayorg> schrieb im Newsbeitrag
news:3c4af2a2@news.povray.org...
> Jan Walzer <jan### [at] lzernet> wrote:
> : also I use different finishes, and I don't think there's an finish_map
...
>
>   But there's a texture_map.

... which I'm using ...
.. but it doesn't reset the children...

--
[Talking about cardriving]
"People are opstacles?
Oh...I always treat them as bonus points..." [Ian Burgmyer in p.o-t]
// Jan Walzer <jan### [at] lzernet>


Post a reply to this message

From: Christopher James Huff
Subject: Re: reset children ? (3.5Beta)
Date: 20 Jan 2002 11:48:35
Message: <chrishuff-2FA576.11493020012002@netplex.aussie.org>
In article <3c4aeb46$1@news.povray.org>, "Jan Walzer" <jan### [at] lzernet> 
wrote:

> As you can see, I want to do it with complete textures, without having to
> split them up ...
> also I use different finishes, and I don't think there's an finish_map ...

The function pattern technique will let you do this. It is basically 
warping the pattern itself instead of the texture.

-- 
 -- 
Christopher James Huff <chr### [at] maccom>


Post a reply to this message

From: Jan Walzer
Subject: Re: reset children ? (3.5Beta)
Date: 20 Jan 2002 11:51:20
Message: <3c4af588$1@news.povray.org>
"Christopher James Huff" <chr### [at] maccom> wrote:
> The function pattern technique will let you do this. It is basically
> warping the pattern itself instead of the texture.

Yes .. I've seen this ... I replied to Warp ...


--
[Talking about cardriving]
"People are opstacles?
Oh...I always treat them as bonus points..." [Ian Burgmyer in p.o-t]
// Jan Walzer <jan### [at] lzernet>


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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