POV-Ray : Newsgroups : povray.newusers : Textures and mesh2 objects Server Time
25 Nov 2024 17:54:49 EST (-0500)
  Textures and mesh2 objects (Message 1 to 6 of 6)  
From: povray
Subject: Textures and mesh2 objects
Date: 30 Apr 2005 11:00:01
Message: <web.42739c9a41e1513486cac9ba0@news.povray.org>
Is there an easy way to texture a large (4 million+ triangle) mesh2 object
from an image file?  I'm trying to do some hi-res mars renders from
elevation data.  I can build the model, but I haven't thought of an easy to
to get the right colors onto it.  I have a .png mars texture, but it
doesn't want to play nice with the mesh2.  If someone could point me to an
example it would be much apreciated.


Post a reply to this message

From: Alain
Subject: Re: Textures and mesh2 objects
Date: 30 Apr 2005 13:32:33
Message: <4273c131$1@news.povray.org>
povray nous apporta ses lumieres en ce 2005-04-30 10:56:
> Is there an easy way to texture a large (4 million+ triangle) mesh2 object
> from an image file?  I'm trying to do some hi-res mars renders from
> elevation data.  I can build the model, but I haven't thought of an easy to
> to get the right colors onto it.  I have a .png mars texture, but it
> doesn't want to play nice with the mesh2.  If someone could point me to an
> example it would be much apreciated.
> 
> 
As your mesh2 is realy only a hight field, and your image probably a top-down view of
the same area. 
Can you simply the image_map as on a plane? Rotate your mesh to match the plane of the
image_map, 
translate the image so that both origins match.

Alain


Post a reply to this message

From: povray
Subject: Re: Textures and mesh2 objects
Date: 30 Apr 2005 15:35:00
Message: <web.4273dd7df510728986cac9ba0@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> povray nous apporta ses lumieres en ce 2005-04-30 10:56:
> > Is there an easy way to texture a large (4 million+ triangle) mesh2 object
> > from an image file?  I'm trying to do some hi-res mars renders from
> > elevation data.  I can build the model, but I haven't thought of an easy to
> > to get the right colors onto it.  I have a .png mars texture, but it
> > doesn't want to play nice with the mesh2.  If someone could point me to an
> > example it would be much apreciated.
> >
> >
> As your mesh2 is realy only a hight field, and your image probably a top-down view
of the same area.
> Can you simply the image_map as on a plane? Rotate your mesh to match the plane of
the image_map,
> translate the image so that both origins match.
>
> Alain

actually, it's not a height field, it a mesh2 that is created using data for
the whole planet, it's basically a bumpy sphere... but I think I've thought
of a way to texture it... It's not gonna be nice, but it'll work.


Post a reply to this message

From: Florian Brucker
Subject: Re: Textures and mesh2 objects
Date: 1 May 2005 06:18:10
Message: <4274ace2$1@news.povray.org>
If you're building the mesh yourself, why not add uv-vectors to it? You
could then use uv-mapping to texture the mesh. See these chapters of the
documentation:

2.5.7 - UV Mapping
http://povray.org/documentation/view/3.6.1/357/

2.4.2.4 - Mesh2
http://povray.org/documentation/view/3.6.1/293/


HTH,
Florian
-- 
camera{look_at-y*10location<8,-3,-8>*10}#local a=0;#while(a<999)sphere{
#local _=.01*a-4.99;#local p=a*.01-5;#local c=.01*a-4.995;<sin(p*pi)*5p
*10pow(p,5)*.01>sin(c*c*c*.1)+1pigment{rgb 3}}#local a=a+1;#end
/******** http://www.torfbold.com ******** http://www.imp.org ********/


Post a reply to this message

From: Alain
Subject: Re: Textures and mesh2 objects
Date: 1 May 2005 10:29:24
Message: <4274e7c4$1@news.povray.org>
povray nous apporta ses lumieres en ce 2005-04-30 15:33:
> Alain <ele### [at] netscapenet> wrote:
> 
>>povray nous apporta ses lumieres en ce 2005-04-30 10:56:
>>
>>>Is there an easy way to texture a large (4 million+ triangle) mesh2 object
>>>from an image file?  I'm trying to do some hi-res mars renders from
>>>elevation data.  I can build the model, but I haven't thought of an easy to
>>>to get the right colors onto it.  I have a .png mars texture, but it
>>>doesn't want to play nice with the mesh2.  If someone could point me to an
>>>example it would be much apreciated.
>>>
>>>
>>
>>As your mesh2 is realy only a hight field, and your image probably a top-down view
of the same area.
>>Can you simply the image_map as on a plane? Rotate your mesh to match the plane of
the image_map,
>>translate the image so that both origins match.
>>
>>Alain
> 
> 
I tough that it was only a section that could be assimilated to a bumpy plane. My bad
assumption.
> actually, it's not a height field, it a mesh2 that is created using data for
> the whole planet, it's basically a bumpy sphere... but I think I've thought
> of a way to texture it... It's not gonna be nice, but it'll work.
> 
> 
OK! Then use a warp{... spherical } to map your image onto the spherical mesh. You can
adjust the 
positioning using rotation. Read the documentation section: 3.5.12.6.5  Mapping using
warps


Alain


Post a reply to this message

From: povray
Subject: Re: Textures and mesh2 objects
Date: 1 May 2005 13:05:01
Message: <web.42750c2ff510728986cac9ba0@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> povray nous apporta ses lumieres en ce 2005-04-30 15:33:
> > Alain <ele### [at] netscapenet> wrote:
> >
> >>povray nous apporta ses lumieres en ce 2005-04-30 10:56:
> >>
> >>>Is there an easy way to texture a large (4 million+ triangle) mesh2 object
> >>>from an image file?  I'm trying to do some hi-res mars renders from
> >>>elevation data.  I can build the model, but I haven't thought of an easy to
> >>>to get the right colors onto it.  I have a .png mars texture, but it
> >>>doesn't want to play nice with the mesh2.  If someone could point me to an
> >>>example it would be much apreciated.
> >>>
> >>>
> >>
> >>As your mesh2 is realy only a hight field, and your image probably a top-down view
of the same area.
> >>Can you simply the image_map as on a plane? Rotate your mesh to match the plane of
the image_map,
> >>translate the image so that both origins match.
> >>
> >>Alain
> >
> >
> I tough that it was only a section that could be assimilated to a bumpy plane. My
bad assumption.
> > actually, it's not a height field, it a mesh2 that is created using data for
> > the whole planet, it's basically a bumpy sphere... but I think I've thought
> > of a way to texture it... It's not gonna be nice, but it'll work.
> >
> >
> OK! Then use a warp{... spherical } to map your image onto the spherical mesh. You
can adjust the
> positioning using rotation. Read the documentation section: 3.5.12.6.5  Mapping
using warps
>
>
> Alain

image_map with a map_type 1 works.  I didn't think to try that before for
some reason. Thanks for poiting me in the right direction.


Post a reply to this message

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