|
|
Here is the code i'm using to map the image of a face onto a head...
#declare Head = object {head
uv_mapping texture {
pigment {
image_map {gif "face.gif" } // face image
scale <.8,.9999,.9999> // scaling the image to
fit the head
rotate -23.5*y rotate 9*x // rotating the image to
position eyes with eyes, mouth with mouth etc.
}
}
scale 10 // enlarging the head to see it better
rotate 180*y // rotating the head to face the front
}
object {Head
rotate -45*y // attempting to turn the whole head, texture and all
}
I try this and the image stays pointing forward and the head turns, so that
the face is on the side of the head......
any ideas?
Post a reply to this message
|
|
|
|
kane wrote:
>
> I try this and the image stays pointing forward and the head turns, so that
> the face is on the side of the head......
> any ideas?
What kind of object is the head ? There are only a limited number of objects
that support uv mapping in Megapov 0.4 : bicubic_patch, mesh, mesh2, lathe,
sor, sphere and box
Other objects are not supported (but could be) while others, like blobs or
julia fractals, won't be supported (from the Megapov 0.4 doc). Using a uv map
for an unsupported object could give unexpected results.
G.
Post a reply to this message
|
|
|
|
"kane" <ann### [at] mindspringcom> wrote in message
news:3918cb90$1@news.povray.org...
> Here is the code i'm using to map the image of a face onto a head...
>
[snipped code]
>
> I try this and the image stays pointing forward and the head turns, so
that
> the face is on the side of the head......
>
> any ideas?
>
I'm with Giles on wanting to know what type of object "head" is. Personally
I tend to include the texture declaration for UV-mapped objects with the
mesh2 declaration of the mesh. E.G.
mesh
{
smooth_triangle {
<-0.0277779 , 0.371302 ,-0.0331393 > <-0.0639206 ,-0.152895
,-0.986173 >,
<-0.0257146 , 0.367395 ,-0.0327338 > < 0.00433927 ,-0.113552
,-0.993523 >,
<-0.0238329 , 0.370178 ,-0.0331331 > < 0.0084841 ,-0.150033
,-0.988645 >
uv_vectors
< 0.638865 , 0.36532 >,< 0.640906 , 0.361171 >,< 0.642727 ,
0.364192 >
}
...more trianlges...
smooth_triangle {
< 0.00102733 , 0.335028 ,-0.00355518 > <-0.112846 ,-0.934316 ,
0.338112 >,
< 0.000504653 , 0.335198 ,-0.00377561 > <-0.28251 ,-0.900641 ,
0.330201 >,
< 0.000501327 , 0.337475 , 0.00231839 > <-0.432333 ,-0.855839 ,
0.28395 >
uv_vectors
< 0.666954 , 0.328181 >,< 0.666477 , 0.328178 >,< 0.666358 ,
0.327304 >
}
uv_mapping
texture {MyTextureNameHere}
}
and I haven't noticed any problem with UV--POV or MegaPOv (0.3,0.4, and just
started using 0.5). I *did* notice some odd features when trying to do
UV-mapping in official POV (and befor eI got the hang of the syntax used
above) but not since.
Hope this helps (which version of POV are you using BTW?)
Cheers,
Cliff Bowman
Post a reply to this message
|
|
|
|
kane wrote:
>
> It was an .obj file converted to .3ds then to pov, in which it was a
> union of smooth triangles. I later converted the .obj again to get it into
> mesh. So far this hasn't help but thanks for the advice, I try an work with
> it some more at a later date when I have more time to fool with it. Thanks.
>
Try this link:
http://www.stmuc.com/thbaier/tools.html
Check out 3Dto3D version 4. AFAIK it supports MegaPov's mesh2 format, which can
store uv information, and should therefore work better with uv mapping than
plain mesh.
--
Margus Ramst
Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Post a reply to this message
|
|