POV-Ray : Newsgroups : povray.newusers : texturing problem Server Time
31 Jul 2024 08:20:02 EDT (-0400)
  texturing problem (Message 1 to 9 of 9)  
From: Florian Brucker
Subject: texturing problem
Date: 6 Nov 2002 15:17:51
Message: <3dc978ef$1@news.povray.org>
hey guys

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.

i found nothin about in the docs or in the groups, so i dared to ask ;-)

would be really nice if you could help me..

thanks,
florian


Post a reply to this message

From: Johannes Dahlstrom
Subject: Re: texturing problem
Date: 6 Nov 2002 15:49:29
Message: <3dc98059@news.povray.org>
You have a couple of alternatives: First, you could construct the box from 
six square polygons. Or, you could intersect six planes, just remember to 
bound the composite object properly, POV can't do this for you in this 
case. You could also use uv_mapping, it kinda wraps the texture around the 
box - check the docs for an illustration.

-Johannes


Post a reply to this message

From: Christopher James Huff
Subject: Re: texturing problem
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

From: Tom Melly
Subject: Re: texturing problem
Date: 7 Nov 2002 05:14:43
Message: <3dca3d13$1@news.povray.org>
"Florian Brucker" <sir### [at] webde> wrote in message
news:3dc978ef$1@news.povray.org...
> hey guys
>

Hmm, could a slope pattern do this? I think so.


Post a reply to this message

From: Warp
Subject: Re: texturing problem
Date: 7 Nov 2002 10:11:22
Message: <3dca829a@news.povray.org>
Christopher James Huff <chr### [at] maccom> wrote:
> Use a real box primitive and a fancy texture. UV mapping might be 
> capable of this, I've never used it.

  UV-mapping *is* capable of this. You just have to come up with a texture
with the sub-textures layed out as described in the documentation (which
might not be trivial in all cases).

-- 
#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: Warp
Subject: Re: texturing problem
Date: 7 Nov 2002 10:13:32
Message: <3dca831c@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
> Hmm, could a slope pattern do this? I think so.

  Perhaps, but it's not trivial. You would have to use a slope vector
which is not parallel to any of the sides of the cube nor at 45 degrees
and then you'll have to figure out the exact slope at which each side
of the cube is with respect to that vector... Better have a good math
knowledge. :)

-- 
#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: Tom & Lu Melly
Subject: Re: texturing problem
Date: 7 Nov 2002 14:52:44
Message: <3dcac48c@news.povray.org>
"Kari Kivisalo" <pro### [at] luxlabcom> wrote in message
news:3DCAA3AE.1904FAFE@luxlab.com...

<snip>

Ah - I knew it would be easy.... ;)


Post a reply to this message

From: Warp
Subject: Re: texturing problem
Date: 7 Nov 2002 17:22:40
Message: <3dcae7b0@news.povray.org>
Kari Kivisalo <pro### [at] luxlabcom> wrote:
> #macro Slope(T1,T2,T3,Mix,Tr)

  Last time I checked, a cube had 6 sides, not 3.

-- 
#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: Florian Brucker
Subject: Re: texturing problem
Date: 7 Nov 2002 17:23:02
Message: <3dcae7c6$1@news.povray.org>
hey guys!

oh there seems to be more than one possible solution. i'll try them.

thanks a lot,
florian


Post a reply to this message

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