POV-Ray : Newsgroups : povray.newusers : Hey - new here, with a simple image map question : Re: Hey - new here, with a simple image map question Server Time
29 Jul 2024 18:30:49 EDT (-0400)
  Re: Hey - new here, with a simple image map question  
From: gonzo
Date: 27 May 2005 23:36:00
Message: <4297e720@news.povray.org>
Electrode wrote:

> All variables have been properly declared, and TextureScale is set to 1 - so
> that the image map is meant to come out in its original form.
> 
> The image in question is a brick texture, with eight rows of bricks, four
> bricks in each row. The image when used in POV-Ray either comes out
> stretched into a load of horizontal lines, or showing only two rows of
> bricks with two bricks in each row (this is depending on camera angle, or
> the value I've used for TextureScale, in some vain attempt to get the image
> map to display correctly). Is there something I'm not doing right? Is there
> something I may be completely missing here?
> 
Like Tim said, you can use multiple cubes, or UV mapping, or if you 
don't need the top & bottom, you could try a radial pattern on a cube 
centered at the origin. Something like:

#declare  Bricks = texture {
	pigment {
		image_map { png "brickwall_image.png" }
	}
	finish { ambient 0 diffuse 1 phong .35 phong_size 120 }
}
#declare BrickWall = texture {
	radial
	texture_map {
		[.5 Bricks ] } // might need to scale x slightly
	frequency 4  //  gives you four sides
	rotate y*45  //  moves edge of image to corners of cube
	#local Size = whatever_scale_suits_the_size_of_your_cube
	scale Size
}


And if you make a copy of your image in a paint program, convert to 
grayscale, then invert the colors (negative in PSP) and use that as a 
normal in the Bricks texture like:

normal { bump_map { png "brickwall_bump.png" } bump_size 6 }

You'll get a pretty good brick wall.

RG


Post a reply to this message

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