|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ekolis 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!
I'm not as familiar with baking textures as I am with cakes... Perhaps a
bit more detail will make this term less err-- esoteric.
I'm thinking that if you heat the UV Map to 350F, and leave it there
fore about 20 minutes, you'll have a nice fluffy sphere... ;)
--
~Mike
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
news:web.412569f73137e9f1406ebe00@news.povray.org...
> 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?
A typical uv map takes its coordinates from <0,0> to <1,1>, so rendering an
orthographic view of the <0,0,0>,<1,1,0> area of plane{z,0} textured with
the desired procedural pigment or normal should create a bitmap version of
that pigment or normal, usable for uv mapping. Totally untested...
G.
--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Gilles Tran" <gitran_nospam_@wanadoo.fr> wrote in message
news:4125e891$1@news.povray.org...
> news:web.412569f73137e9f1406ebe00@news.povray.org...
> > 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?
>
> A typical uv map takes its coordinates from <0,0> to <1,1>, so rendering an
> orthographic view of the <0,0,0>,<1,1,0> area of plane{z,0} textured with
> the desired procedural pigment or normal should create a bitmap version of
> that pigment or normal, usable for uv mapping. Totally untested...
but that's baking a uv texture from a uv texture, pretty pointless if you ask me
:)
I think ekolis wants an uv-map of a non-uv-map procedural texture, for example
an image that would, uv-mapped on a sphere, give the same result as sphere {0,1
pigment {bozo}}
But as far as I know, that's not possible with pov-ray, not for every type of
object anyway...
cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x) // ZK http://www.povplace.be.tf
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
message de news:4125ff9d$1@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.
> I think ekolis wants an uv-map of a non-uv-map procedural texture, for
example
> an image that would, uv-mapped on a sphere, give the same result as sphere
{0,1
> pigment {bozo}}
>
> But as far as I know, that's not possible with pov-ray, not for every type
of
> object anyway...
For spheres it's almost straightforward : render a sky_sphere using the
pigment and a spherical camera in the center. The resulting map can then be
used on a sphere as an image map identical to the pigment, at the price of
some rotation and mirroring. For other primitives it's surely tougher and
probably requires a lot of maths...
G.
--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ekolis 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?
Is this what you are looking for:
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#version 3.6;
torus {
4, 1
texture {
uv_mapping
pigment {
marble
// gradient <1, 0, 0>
turbulence 0.4
color_map {
[0.2 color rgb <1, 0.8, 0>*1.2 ]
[0.8 color rgb <0.1, 0.3, 0.4>*1.5 ]
}
scale <3, 1, 3>/4
}
}
}
camera {
location <1, 1, -2>*4
look_at <0, -1, 0>
}
light_source {
100*<1, 1, -1>
color rgb <1, 1, 1>
shadowless
}
background { color rgb <1, 1, 1>/2 }
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
This code takes the procedural texture "residing"
in the region from <0, 0, 0> to <1, 1, 0> and
maps it onto a torus. It can of course be mapped
onto any primitive that has support for UV-mapping
in POV-Ray.
By applying some more math you can remove the
visible seams in the texture.
In this thread you will find an image of a shape
with a texture that is UV-mapped that way:
http://news.povray.org/povray.binaries.images/thread/%3CXns934A8B380763Dtorolavkhotmailcom%40204.213.191.226%3E/?ttop=197385&toff=1650
http://tinyurl.com/6ovqy
--
Tor Olav
http://subcube.net
http://subcube.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tor Olav Kristensen wrote:
...
> This code takes the procedural texture "residing"
> in the region from <0, 0, 0> to <1, 1, 0> and
> maps it onto a torus. It can of course be mapped
> onto any primitive that has support for UV-mapping
> in POV-Ray.
Here's another exapmple
#declare MyTexture =
texture {
pigment {
marble
color_map {
[ 0.2 color rgb <1.0, 0.8, 0.0> ]
[ 0.7 color rgb <1.0, 1.0, 1.0> ]
}
turbulence 0.7
scale <1, 3, 1>/6
}
normal {
marble 0.3
turbulence 0.7
scale <1, 3, 1>/6
}
finish {
ambient 0.2
specular 0.8
}
}
sphere {
-y, 4
texture { uv_mapping MyTexture }
}
--
Tor Olav
http://subcube.net
http://subcube.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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
|
|
| |
| |
|
|
|
|
| |
|
|