![](/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) |
Why do the UV vectors in mesh2 only accept UV vectors?
It may sound like a stupid question put like that, but I really see no
reason whatsoever why I can't define my UV-triangles in 3D space. I think
it's a great and very annoying limitation.
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.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) |
On Sat, 13 Jan 2001 11:45:46 +0100, "Rune" <run### [at] iname com>
wrote:
>Why do the UV vectors in mesh2 only accept UV vectors?
>It may sound like a stupid question put like that, but I really see no
>reason whatsoever why I can't define my UV-triangles in 3D space. I think
>it's a great and very annoying limitation.
UV mapping is used to map a 2D texture onto a 3D mesh. I know POV
textures are 3D and one might want to take advantage of that, but tell
this to the image-map geek types who made up UV mapping ;)
Maybe you can use a matrix transform to map the 3D texture to the XY
plane and then use a UV vector on it... just a suggestion.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray 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) |
"Peter Popov" wrote:
> "Rune" wrote:
>
> >Why do the UV vectors in mesh2 only accept UV vectors?
> >It may sound like a stupid question put like that, but
> >I really see no reason whatsoever why I can't define my
> >UV-triangles in 3D space. I think it's a great and very
> >annoying limitation.
>
> UV mapping is used to map a 2D texture onto a 3D mesh. I
> know POV textures are 3D and one might want to take
> advantage of that, but tell this to the image-map geek
> types who made up UV mapping ;)
The mesh2 syntax could be changed to accept xyz vectors as well as uv
vectors. I see no reason not to do it.
> Maybe you can use a matrix transform to map the 3D texture
> to the XY plane and then use a UV vector on it... just a
> suggestion.
I originally did "UV-mapping" using matrixes to transform textures for the
individual triangles in a regular mesh, but this required me to remove the
mesh{} block around the triangles, which of course was a great disadvantage,
as the triangles were then not optimised anymore.
So I wanted to use mesh2 instead as it had internal UV-support. I didn't
know it accepted UV-vectors only. Now, if I have to use matrixes again to
get the desired result, I'm back where I started. I have to use a bunch of
unoptimised triangles. Which is not an acceptable solution for me. :(
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.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) |
I think this could be a good idea. It wouldn't break backwards
compatibility either (because povray automatically promotes 2D-vectors
to 3D-vectors with the z coordinate being 0 when needed).
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
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) |
In article <3a6190cc@news.povray.org>, "Rune" <run### [at] iname com>
wrote:
> I originally did "UV-mapping" using matrixes to transform textures
> for the individual triangles in a regular mesh, but this required me
> to remove the mesh{} block around the triangles, which of course was
> a great disadvantage, as the triangles were then not optimised
> anymore.
I don't understand what you mean...as far as I know, there are no
problems using per-triangle textures in meshes.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.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) |
"Warp" wrote:
> I think this could be a good idea. It wouldn't break
> backwards compatibility either (because povray automatically
> promotes 2D-vectors to 3D-vectors with the z coordinate
> being 0 when needed).
Exactly.
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.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) |
"Chris Huff" wrote:
> "Rune" wrote:
>
> > I originally did "UV-mapping" using matrixes to transform
> > textures for the individual triangles in a regular mesh,
> > but this required me to remove the mesh{} block around the
> > triangles, which of course was a great disadvantage, as
> > the triangles were then not optimised anymore.
>
> I don't understand what you mean...as far as I know, there
> are no problems using per-triangle textures in meshes.
In a mesh the textures cannot be translated differently for the different
triangles. So to do UV mapping I have to either
A) Remove the mesh{} block around the triangles.
B) Predeclare a unique texture for every single triangle.
Neither of those are attractive solutions.
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.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) |
In article <3a61d04f@news.povray.org>, "Rune" <run### [at] iname com>
wrote:
> In a mesh the textures cannot be translated differently for the different
> triangles. So to do UV mapping I have to either
>
> A) Remove the mesh{} block around the triangles.
>
> B) Predeclare a unique texture for every single triangle.
>
> Neither of those are attractive solutions.
How about:
C) Declare an array of textures. Use the textures in the array instead
of individual textures.
Or:
D) Write a macro that declares a texture (transformed to fit) and then
uses it in a triangle. This *should* work...in fact, I think it has been
done.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.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) |
> In a mesh the textures cannot be translated differently for the different
> triangles. So to do UV mapping I have to either
> A) Remove the mesh{} block around the triangles.
> B) Predeclare a unique texture for every single triangle.
For B) I suppose you suggest something like:
#declare t1=texture{... transform ...}
#declare t2=texture{... transform ...}
...
mesh{
triangle{ ... texture{t1} } // or smooth triangle
triangle{ ... texture{t2} }
...
}
which of course requires a lot of memory to declare both texture variables
and textures in the mesh. But what about the following syntax ?
mesh{
#declare t=texture{ ... transform ...} // #local is more elegant ?
triangle{ ... texture{t} }
#declare t=texture{ ... transform ...}
triangle{ ... texture{t} }
...
}
which might be only a little longer to parse... maybe not.
In case you were talking about this syntax, please ignore my post !
BTW declaring UV vectors with XYZ should change the mesh2 syntax ;-)
*** Nicolas Calimet
*** http://pov4grasp.free.fr
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) |
"Chris Huff" wrote:
> "Rune" wrote:
> > In a mesh the textures cannot be translated differently for
> > the different triangles. So to do UV mapping I have to either
> >
> > A) Remove the mesh{} block around the triangles.
> >
> > B) Predeclare a unique texture for every single triangle.
> >
> > Neither of those are attractive solutions.
>
> How about:
> C) Declare an array of textures. Use the textures in the array
> instead of individual textures.
That's what I meant in B) of course. But it's still individual textures no
matter if they're in an array or not.
> D) Write a macro that declares a texture (transformed to fit)
> and then uses it in a triangle. This *should* work...in fact,
> I think it has been done.
Now I'm completely confused.
Maybe you've misunderstood me. Coding the POV-script that does the
UV-mapping is not the problem at all. I've already done that, and it works.
The problem is the amount of memory required: One unique texture for every
single triangle.
Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.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) |