POV-Ray : Newsgroups : povray.newusers : Using different image maps with different clock values Server Time
4 Sep 2024 18:11:27 EDT (-0400)
  Using different image maps with different clock values (Message 1 to 7 of 7)  
From: nathan 2002
Subject: Using different image maps with different clock values
Date: 22 Aug 2002 12:10:04
Message: <web.3d650b9da4e8de9e179062da0@news.povray.org>
I know how to define an image map for an object, but what if I want to use
different image maps (seperate, pre-rendered scene) while the clock is
running? How could I change the reference automatically?

N.


Post a reply to this message

From: Tom Melly
Subject: Re: Using different image maps with different clock values
Date: 22 Aug 2002 12:19:03
Message: <3d650ef7$1@news.povray.org>
"nathan_2002" <nat### [at] excitecom> wrote in message
news:web.3d650b9da4e8de9e179062da0@news.povray.org...
> I know how to define an image map for an object, but what if I want to use
> different image maps (seperate, pre-rendered scene) while the clock is
> running? How could I change the reference automatically?
>

Not tested, but two ways I can think of:

1. Use a case statement
2. Use filenames that can be referenced from the clock value, e.g. 1.bmp, 2.bmp


Post a reply to this message

From: Warp
Subject: Re: Using different image maps with different clock values
Date: 22 Aug 2002 13:14:06
Message: <3d651bde@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
> 1. Use a case statement
> 2. Use filenames that can be referenced from the clock value, e.g. 1.bmp, 2.bmp

  Another solution, when you have file names without consecutive numbers,
is to put all the file names in an array and the index this array with
something like int((dimensions_size(Images,1)-1)*clock+.5)

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


Post a reply to this message

From: Dennis Miller
Subject: Re: Using different image maps with different clock values
Date: 22 Aug 2002 21:43:03
Message: <3d659327$1@news.povray.org>
This code looks for a sequence of images labeled "red001.tga" through
"red390.tga" while the clock ticks. You can then use Pigmap in any pigment
statement (or as a function in an isosurface if you want to build an object
with it; sorry, forget that):

 #declare Pigmap = pigment {
  image_map {tga concat("e:\\red\\red", str(clock*390,-3,0), ".tga")
    map_type  2  interpolate  2 } }

So maybe number the images sequentially? How many are there and how often do
you want the image to change?

d.

"Warp" <war### [at] tagpovrayorg> wrote in message
news:3d651bde@news.povray.org...
> Tom Melly <tom### [at] tomandlucouk> wrote:
> > 1. Use a case statement
> > 2. Use filenames that can be referenced from the clock value, e.g.
1.bmp, 2.bmp
>
>   Another solution, when you have file names without consecutive numbers,
> is to put all the file names in an array and the index this array with
> something like int((dimensions_size(Images,1)-1)*clock+.5)
>
> --
> #macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb
M()}}
> N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
> N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  -
Warp -


Post a reply to this message

From: nathan 2002
Subject: Re: Using different image maps with different clock values
Date: 29 Aug 2002 12:15:07
Message: <web.3d6e475fbc6d480690cc6b70@news.povray.org>
So then it would be somthing like...

> #declare Scene = pigment {
>  image_map {png concat("d:\\povray\\book\\scene", str(clock*180/.75,-3,0), ".png")
>    map_type  2  interpolate  2 } }
>
>So maybe number the images sequentially? How many are there and how often do
>you want the image to change?
>


The embeded scene would have 180 frames, I guess the clock wouldn't matter
after rendered.

the frame scene has the following properties:
+ki0 +kf0.75 +kfi1 +kff180

so in the "str(clock*180/.75,-3,0)", what do the -3 and 0 mean?


I'd try it myself but my computer only runs at 200Mhz...


N.


Post a reply to this message

From: Dennis Miller
Subject: Re: Using different image maps with different clock values
Date: 30 Aug 2002 22:18:56
Message: <3d702790@news.povray.org>
It has to do with the number of zeros tat POV should "pad" the file name
with. Can't remember the exact location in the docs on that one but -3
should work for a group that is numbered up to 180...
D.

"nathan_2002" <nat### [at] excitecom> wrote in message
news:web.3d6e475fbc6d480690cc6b70@news.povray.org...
> So then it would be somthing like...
>
> > #declare Scene = pigment {
> >  image_map {png concat("d:\\povray\\book\\scene",
str(clock*180/.75,-3,0), ".png")
> >    map_type  2  interpolate  2 } }
> >
> >So maybe number the images sequentially? How many are there and how often
do
> >you want the image to change?
> >
>
>
> The embeded scene would have 180 frames, I guess the clock wouldn't matter
> after rendered.
>
> the frame scene has the following properties:
> +ki0 +kf0.75 +kfi1 +kff180
>
> so in the "str(clock*180/.75,-3,0)", what do the -3 and 0 mean?
>
>
> I'd try it myself but my computer only runs at 200Mhz...
>
>
> N.
>
>


Post a reply to this message

From: Leroy Whetstone
Subject: Re: Using different image maps with different clock values
Date: 31 Aug 2002 01:01:51
Message: <3D7068FF.3B963D97@joplin.com>
I also used pigment average, if you want to fade from one image to another.

--
Have Fun!


Post a reply to this message

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