POV-Ray : Newsgroups : povray.newusers : using an image file as texture Server Time
2 Nov 2024 11:25:50 EDT (-0400)
  using an image file as texture (Message 1 to 6 of 6)  
From: Marc Roth
Subject: using an image file as texture
Date: 29 Feb 2004 18:44:43
Message: <4042796b$1@news.povray.org>
hi there!
i think i already saw a picture where someone used an imagefile as a 
texture, but i can't find anything about it in the manual. what i want 
to do is render a picture, use it in another picture as a texture, use 
this picture again in anoter one... and so on... to create a kind of 
infinity-effect :)
thank in advance,
	Marc


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: using an image file as texture
Date: 29 Feb 2004 18:52:20
Message: <40427b34$1@news.povray.org>
> i think i already saw a picture where someone used an imagefile as a
> texture, but i can't find anything about it in the manual. what i want
> to do is render a picture, use it in another picture as a texture, use
> this picture again in anoter one... and so on... to create a kind of
> infinity-effect :)

If you look in the docs, search for "image_map". There are several types of
file-formats POV-Ray understands and several ways to do this. My approach
would be to create a simple #if-statement:

#if (file_exists("image.ext"))
 #declare Texture = texture{With_ImageMap}
#else
 #declare Texture = texture{Without_ImageMap}
#end

For "image.ext" I'd put the output of the current file, e.g. for
"project.pov" this would be "project.ext" where "ext" is either tga, png,
bmp, or however you set POV-Ray to Output your images.

So, once the image is created, it'll use it as image_map and overwrite it.
Render the that scene several times and voila: image in image in image in
image...

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Email: tim.nikias (@) nolights.de


Post a reply to this message

From: Ken
Subject: Re: using an image file as texture
Date: 29 Feb 2004 18:52:28
Message: <40427BF4.5952A7CE@tag.povray.org>
Marc Roth wrote:
> 
> hi there!
> i think i already saw a picture where someone used an imagefile as a
> texture,

Look for - image_map - in the docs.

-- 
Ken Tyler


Post a reply to this message

From: Marc Roth
Subject: Re: using an image file as texture
Date: 29 Feb 2004 18:59:03
Message: <40427cc7$1@news.povray.org>
> If you look in the docs, search for "image_map". There are several types of
> file-formats POV-Ray understands and several ways to do this. My approach
> would be to create a simple #if-statement:
<snip>
> Regards,
> Tim
> 
i think i misunderstood what image_map meant. i thought it would provide 
some kind of pattern to be used with textures or pigments. i'll try this.
thx,
	Marc


-- 
---------------------------------
and god said: let there be a light_source { location SUN look_at EARTH, 
rgb SUNLIGHT }


Post a reply to this message

From: Gilles Tran
Subject: Re: using an image file as texture
Date: 1 Mar 2004 04:18:10
Message: <4042ffd2$1@news.povray.org>

news:40427cc7$1@news.povray.org...
> i think i misunderstood what image_map meant. i thought it would provide
> some kind of pattern to be used with textures or pigments. i'll try this.
> thx,

Also, look for a file named desk.pov in the advanced directory. It contains
code for the "image in the image in the image in the image" trick.

G.


-- 

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Marc Roth
Subject: Re: using an image file as texture
Date: 1 Mar 2004 12:29:18
Message: <404372ee$1@news.povray.org>
Gilles Tran wrote:
> Also, look for a file named desk.pov in the advanced directory. It contains
> code for the "image in the image in the image in the image" trick.
> 
> G.
i solved it myself by using three scene files, which contain more or 
less the same scene: the first one (logo.pov) creates a picture of the 
cube. the second one (logo1.pov) creates again a cube but uses logo.png 
for one side. the third one (logo2.pov) takes logo1.png for one side and 
after that i change one line in the code of logo1.pov to make it use 
logo2.png. after that i can render logo1.pov and logo2.pov as often as 
neccessary.
i think it's a rather complicated way, but hey it was 2 in the morning 
when i started. for the result look at p.b.i (pov-ray logo)
bye,
	Marc


Post a reply to this message

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