POV-Ray : Newsgroups : povray.newusers : texturing problem : Re: texturing problem Server Time
31 Jul 2024 06:20:42 EDT (-0400)
  Re: texturing problem  
From: Christopher James Huff
Date: 6 Nov 2002 16:04:14
Message: <chrishuff-504F5C.15551106112002@netplex.aussie.org>
In article <3dc978ef$1@news.povray.org>,
 "Florian Brucker" <sir### [at] webde> wrote:

> i wondered if it is possible to assign a different texture to each side of a
> box. for example one side would be checkered black and white, another one
> would be pure green and the next had nice little bumps.

There are a few ways you could do it:

Construct a box out of an intersection of 6 planes, each with a 
different texture. Make sure to bound the resulting shape, POV can't 
automatically bound it. Slower than a box, but decently fast.

Make a mesh out of 12 triangles with different textures. Again, not as 
fast as a box primitive, but not too slow. A bit clumsier to code than 
an intersection of planes, and you'll need to specify an inside_vector 
if you want to use it for CSG.

There are other possibilities: a union of 6 very infinitely thin boxes 
or polygon primitives for example, but these have other drawbacks.

Use a real box primitive and a fancy texture. UV mapping might be 
capable of this, I've never used it. Other than that, you could rig up a 
texture with a few object or gradient patterns.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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