POV-Ray : Newsgroups : povray.general : Can I bake UV textures with Povray? Server Time
2 Aug 2024 22:13:46 EDT (-0400)
  Can I bake UV textures with Povray? (Message 11 to 20 of 27)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>
From: ekolis
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 16:30:00
Message: <web.41265e718e935cee8d515f450@news.povray.org>
That's right; that's exactly what I'm looking for - I want to sample the
texture at every point on the mesh and map it to a UV plane. So Povray
can't do this? Oh well, I guess I'll find another way...

(SDL is Renderman, right? I know Aqsis can do it with an experimental plugin
that it has; maybe that plugin is Aqsis-specific and not for any Renderman
renderer...)


Post a reply to this message

From: Daniel Hulme
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 16:59:32
Message: <20040820215932.547d7f7d@dh286.pem.cam.ac.uk>
> (SDL is Renderman, right? I know Aqsis can do it with an experimental
SDL is POV-Ray Scene Description Language.

Daniel

-- 
A most peculiar man    With the windows closed      And Mrs Reardon says
He died last Saturday  So he'd never wake up  He has a brother somewhere
He turned on the gas   To his silent world   Who should be notified soon
And he went to sleep   And his tiny room    .oO( http://sad.istic.org/ )


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 17:09:34
Message: <4126688e$1@news.povray.org>
ekolis wrote:

> That's right; that's exactly what I'm looking for - I want to sample the
> texture at every point on the mesh and map it to a UV plane. So Povray
> can't do this? 
...

It can probably be done, but it would be a LOT of work.

-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

From: Gilles Tran
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 17:13:39
Message: <41266983$1@news.povray.org>

news:web.41265e718e935cee8d515f450@news.povray.org...
> That's right; that's exactly what I'm looking for - I want to sample the
> texture at every point on the mesh and map it to a UV plane. So Povray
> can't do this?

In fact we're talking about two different things here.

- uv-mapping itself: creating uv coordinates isn't a trivial issue. Since
the original mesh doesn't have uv data in the first place, you need to
create them beforehand in Wings or to add them to the obj file using
UVMapper or one of the more expensive 3D painting apps like BodyPaint or
Deep Paint / Deep UV. POV-Ray itself cannot create the uv vectors. In fact,
even if it could do it at render time, that would be useless to you since
your final model is in another format.

- creating the pigment map: once the uvs are created, you can use POV-Ray to
"bake" whatever pigment into a bitmap, as previously explained. The
limitation is that the 3D-ishness of the procedural mapping will be lost,
which can be a problem if the aspect of the final texture really depends on
it (like wood for instance). Of course, it's still possible to use POV-Ray
to generate some basic maps and put them together by hand on the final
texture map.

To do what you want, you need to uv-map (i.e. attach the uv coordinates)
your models first. Then you can convert them to POV-Ray and create the
bitmap itself there (like you'd do in Photoshop in fact). The map will be
usable for your final model since the uv coordinates won't change.

G.


-- 
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Slime
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 19:01:25
Message: <412682c5@news.povray.org>
> - creating the pigment map: once the uvs are created, you can use POV-Ray
to
> "bake" whatever pigment into a bitmap, as previously explained. The
> limitation is that the 3D-ishness of the procedural mapping will be lost,
> which can be a problem if the aspect of the final texture really depends
on
> it (like wood for instance). Of course, it's still possible to use POV-Ray
> to generate some basic maps and put them together by hand on the final
> texture map.

I'm not sure you really understand. The 3D-ishness won't be lost; in fact,
if the final UV map were of infinite resolution, the resulting UV mapped
mesh will look *exactly* the same as if it were still using the procedural
texture. The goal is to make a UV-map which, when mapped to the mesh, will
look the same. This has to be done by sampling the procedural texture along
the (probably curved and 3D) surface of the mesh and then transferring those
samples onto a 2D image.

I'm wondering if there's a way to do this with a (really really complicated)
function{}, when the vertex indices, faces, and uv coordinates of the mesh
are specified as SDL arrays. I'm going to experiment...

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: ekolis
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 19:05:00
Message: <web.412682d28e935ceec2a68d520@news.povray.org>
OK, maybe I was asking a bit much... heck, I can't even figure out how to
get the Lite version of Caligari's gameSpace to do what I want - it just
generates one planar projection for each face (in separate bitmaps) instead
of actually using the UV coordinates! Aaagh! :-P

So I guess now I'll go back to that experimental Aqsis plugin... thanks
anyway :-)


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 20:02:12
Message: <Xns954C1501DCB79raf256com@203.29.75.35>
fak### [at] emailaddress news:412682c5@news.povray.org

> The goal is to make a UV-map which, when mapped to the mesh, will
> look the same.

I quess You could take each triangle and render it, with camera{} that will 
exacly fit this triangle into viewport. 

Then You could perhaps combine this hundrets of  tir0001.png tri0002.png  
into one big textures.png and create a uv-textured mesh.



-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Slime
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 21:27:02
Message: <4126a4e6@news.povray.org>
> I'm wondering if there's a way to do this with a (really really
complicated)
> function{}, when the vertex indices, faces, and uv coordinates of the mesh
> are specified as SDL arrays. I'm going to experiment...

I managed to find a solution. Unfortunately, it's really slow (120pps for
768 polygons and gets slower with more polygons). I'm rendering an example
now and I'll show it later.

I've thought of another solution which uses the same principle but isn't
based on functions, so it will probably be a lot faster; I might try that
next.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Gilles Tran
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 21:31:16
Message: <4126a5e4@news.povray.org>

news:412682c5@news.povray.org...
>
> I'm not sure you really understand. The 3D-ishness won't be lost; in fact,
> if the final UV map were of infinite resolution, the resulting UV mapped
> mesh will look *exactly* the same as if it were still using the procedural
> texture. The goal is to make a UV-map which, when mapped to the mesh, will
> look the same. This has to be done by sampling the procedural texture
along
> the (probably curved and 3D) surface of the mesh and then transferring
those
> samples onto a 2D image.

I'm not saying that it shouldn't be 3D, just that by using the usual uv
mapping techniques it won't be, unless a lot of hand tweaking is involved. I
remember having this exact problem with a model of a wood toy: procedural
wood was perfect for it, but default uv mapping sucked because it was
basically 2D, so 3D-ishness had to be recreated by hand. I believe I
understand what Ekolis would like to do, but the problem is still that you
need to create a relation between the 3d coordinates and the uv vectors at
some point. Once you have sampled the pigment in the 3D space, it will tell
you what pigment should be at any 3D point, but it won't tell you how to
organise the map itself, for instance where the seams should be or how to
arrange the vertices in the <0,0>,<1,1> 2D area without losing too much
space. It's all about unwrapping a a 3D object in 2D, which is not trivial.
The only trivial (?) way would be to assign a map to every polygon...

G.

-- 
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: povray
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 21:41:50
Message: <4126301f.12263642@localhost>
On Thu, 19 Aug 2004 23:03:19 EDT, "ekolis" <kol### [at] fusenet> wrote:

>I know there's a trick in Renderman to get the renderer to "bake" UV
>textures from procedural textures, but is there a way to do the same in
>Povray?
>Thanks!
>
>

Not exactly sure what you are saying, but you can
uv-map a procedural texture in pov-ray



-- 
to all the companies who wait until a large user base becomes
dependant on their freeware, then shafting said happy campers with
mandatory payment for continued usage. I spit on your grave.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>

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