POV-Ray : Newsgroups : povray.general : Can I bake UV textures with Povray? Server Time
2 Aug 2024 22:13:53 EDT (-0400)
  Can I bake UV textures with Povray? (Message 18 to 27 of 27)  
<<< Previous 10 Messages Goto Initial 10 Messages
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

From: Slime
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 21:54:58
Message: <4126ab72$1@news.povray.org>
> 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.

True. The solution that I'm currently rendering requires UV coordinates to
be supplied. But once you have those, you can do it.

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


Post a reply to this message

From: Slime
Subject: Re: Can I bake UV textures with Povray?
Date: 20 Aug 2004 22:24:41
Message: <4126b269$1@news.povray.org>
> 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.

Example in povray.binaries.images.

 - 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 23:50:00
Message: <web.4126c5978e935ceeec31d9280@news.povray.org>
Wow! I must say that is impressive! Now I do have a program to unwrap a
mesh, so getting the UV coordinates should be a cinch... so how did you get
the texture onto the UV map, or did I just miss the explanation somewhere?


Post a reply to this message

From: Slime
Subject: Re: Can I bake UV textures with Povray?
Date: 21 Aug 2004 00:53:02
Message: <4126d52e$1@news.povray.org>
> Wow! I must say that is impressive! Now I do have a program to unwrap a
> mesh, so getting the UV coordinates should be a cinch... so how did you
get
> the texture onto the UV map, or did I just miss the explanation somewhere?

I've posted the source code in povray.binaries.scene-files. You're welcome
to use the macro.

It *does* have severe limitations, but if you need the functionality, it's
there. =)

Actually, I managed to get it about twice as fast by changing the way it
works a little, so it's not so bad anymore. But it's still probably an
overnight render for larger meshes.

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


Post a reply to this message

From: ekolis
Subject: Re: Can I bake UV textures with Povray?
Date: 21 Aug 2004 13:10:00
Message: <web.412781c68e935cee1cfc60780@news.povray.org>
Wow... it works! Thanks a whole lot! :-D

Now to try it with one of my own meshes... you say that if the mesh were
split into individual triangles it would be quicker though? I think that
might be possible with a few minor modifications to the exporter I'm using
to get the meshes from Wings format to Povray format, since it can already
split a mesh by material... now if I only knew Erlang... :-(


Post a reply to this message

From: Slime
Subject: Re: Can I bake UV textures with Povray?
Date: 21 Aug 2004 17:59:10
Message: <4127c5ae@news.povray.org>
> you say that if the mesh were
> split into individual triangles it would be quicker though?

No. I'm saying there is a better method than the one my macro uses which
involves splitting up the mesh into triangles. That's not implemented and if
it were it wouldn't be something you would have to do.

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


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Can I bake UV textures with Povray?
Date: 21 Aug 2004 20:33:10
Message: <4127e9c6@news.povray.org>
> > but that's backing a uv texture from a uv texture, pretty pointless if
you
> > ask me
>
> Hmm well that's the usual meaning of baking textures (at least in C4D).
The
> point is to turn a complex, computer-intensive procedural texture into a
> fast-rendering bitmap. A typical use for instance is to bake procedural
> dirt.

hmm, you're right, not as pointless as I thought :)

cu!
-- 
ZK AKA SaD
http://www.povplace.be.tf
"Trust is only dangerous when you have to rely on it."


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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