POV-Ray : Newsgroups : povray.general : Mesh2 Texture Gotcha Server Time
6 Nov 2024 20:19:45 EST (-0500)
  Mesh2 Texture Gotcha (Message 1 to 2 of 2)  
From: Tom Melly
Subject: Mesh2 Texture Gotcha
Date: 12 Jul 2002 04:49:10
Message: <3d2e9806$1@news.povray.org>
If you apply a texture to a union of several copies of a mesh, and the texture
is  duplicated on each mesh, rather than "flowing" across them, comment out the
uv_mapping keyword in the mesh code.

This is probably bleedin' obvious to some, but I managed to waste a couple of
hours on it last night.

--
#macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
}light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM


Post a reply to this message

From: Warp
Subject: Re: Mesh2 Texture Gotcha
Date: 14 Jul 2002 11:31:03
Message: <3d319937@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
> If you apply a texture to a union of several copies of a mesh, and the texture
> is  duplicated on each mesh, rather than "flowing" across them, comment out the
> uv_mapping keyword in the mesh code.

  Well, if you are using uv-coordinates, then it means that you are saying
for each vertex, where the texture should be got from. Since you are copying
the mesh, then of course these uv-coordinates are the same for each mesh.

-- 
#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

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