![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Well, Tor Olav, your first example gives me a nice textured torus, albeit
with some seams, and the second gives me a sphere that looks like a planet,
but what I really want to do it actually save the UV-mapped texture itself,
not the 3D render. Is there any way to do that? (I'm trying to make models
for a game and I want to make the models in Wings, export to Povray, put in
some procedural textures, generate UV textures in Povray, convert my Wings
models to the game's .X format, and add the UV textures back in, because
the game doesn't support procedural textures. I'd use Renderman but the
current Wings->Renderman exporter won't let me have different textures on
different faces of an object, while the Povray exporter will, and that's
something I'd like to use if at all possible ;-)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
ekolis wrote:
> Well, Tor Olav, your first example gives me a nice textured torus, albeit
> with some seams, and the second gives me a sphere that looks like a planet,
> but what I really want to do it actually save the UV-mapped texture itself,
> not the 3D render. Is there any way to do that? (I'm trying to make models
> for a game and I want to make the models in Wings, export to Povray, put in
> some procedural textures, generate UV textures in Povray, convert my Wings
> models to the game's .X format, and add the UV textures back in, because
> the game doesn't support procedural textures. I'd use Renderman but the
> current Wings->Renderman exporter won't let me have different textures on
> different faces of an object, while the Povray exporter will, and that's
> something I'd like to use if at all possible ;-)
You can do something similar to what Gilles Tran suggested:
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
// Sample command line settings: +w1024 +h1024
#version 3.6;
#include "colors.inc"
global_settings {
ambient_light color White
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#declare Texture =
texture {
pigment {
// gradient y
bozo
color_map {
[ 0.0 color rgb <0.4, 0.2, 0.4> ]
[ 1.0 color rgb <1.0, 0.6, 0.0> ]
}
turbulence 0.8
omega 1.1
lambda 0.9
octaves 8
scale <1, 1, 1>/18
}
/*
normal {
bozo 0.4
turbulence 0.8
omega 1.1
lambda 0.9
octaves 8
scale <1, 1, 1>/18
}
*/
finish {
ambient color White
// specular 0.4
}
}
box {
<0, 0, 0>, <1, 1, 1>
texture { Texture }
translate -<1, 1, 0>/2
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
/*
light_source {
<1, 2, -1>*100
color White
}
*/
camera {
orthographic
right x
up y
}
background { color Gray40 }
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
--
Tor Olav
http://subcube.net
http://subcube.com
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> box {
> <0, 0, 0>, <1, 1, 1>
> texture { Texture }
> translate -<1, 1, 0>/2
> }
>
> camera {
> orthographic
> right x
> up y
> }
This would render a flat section of the texture. This is not what ekolis is
looking for.
I believe what he wants is this: consider a complex mesh floating in space,
with a procedural texture applied.
He wants to sample the procedural texture on the surface of the mesh in
order to create a 2D image, which, when applied with proper UV coordinates
on the mesh, will cause the mesh to look exactly as it did with the
procedural texture.
To answer his question, POV-Ray cannot do this on its own. I'm not even sure
if it can be done with SDL.
It would certainly be a useful feature for times when you want to animate a
mesh and have the texture remain static on it, yet still have textured it
procedurally.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> (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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> - 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
fak### [at] email address 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |