|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello All,
I have some trouble with UV_mapping and Mesh/Mesh2. All is ok with
bicubic patch but with mesh, I cannot get the whole texture on the
object even if I scale down??
The code can be found at pov.bin.scene-file and the image at
pov.bin.images. The code is long but you just need to look the lest
lines of code.
Thanks to help me :).
Fabian.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Fabian BRAU wrote:
>
> Hello All,
>
> I have some trouble with UV_mapping and Mesh/Mesh2. All is ok with
> bicubic patch but with mesh, I cannot get the whole texture on the
> object even if I scale down??
> The code can be found at pov.bin.scene-file and the image at
> pov.bin.images. The code is long but you just need to look the lest
> lines of code.
>
> Thanks to help me :).
>
> Fabian.
Hello!
How did you create this mesh2? I don't know about mesh2 format very
much, but I tried to create mesh2 from Rhino (via export to 3DS format
and 3ds2pov converter) and saw, that it contains uv_vectors section
after normal_vectors, but in your example file such section is missing.
So, I guess that in your mesh2 there is missing uv-information and some
default value (0?) is used for u and v.
HTH
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello,
This mesh was create by spatch, export in dxf, convert in udo/inc (mesh)
and after convert into mesh2 with the tools of Warp (nieminen juha).
This problem appear to me for every mesh/mesh2 (even mesh) I use.
In the doc, it say that uv_mapping works for mesh/mesh2.
Fabian.
>
> Fabian BRAU wrote:
> >
> > Hello All,
> >
> > I have some trouble with UV_mapping and Mesh/Mesh2. All is ok with
> > bicubic patch but with mesh, I cannot get the whole texture on the
> > object even if I scale down??
> > The code can be found at pov.bin.scene-file and the image at
> > pov.bin.images. The code is long but you just need to look the lest
> > lines of code.
> >
> > Thanks to help me :).
> >
> > Fabian.
>
> Hello!
>
> How did you create this mesh2? I don't know about mesh2 format very
> much, but I tried to create mesh2 from Rhino (via export to 3DS format
> and 3ds2pov converter) and saw, that it contains uv_vectors section
> after normal_vectors, but in your example file such section is missing.
> So, I guess that in your mesh2 there is missing uv-information and some
> default value (0?) is used for u and v.
>
> HTH
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Fabian BRAU wrote:
>
> Hello,
>
> This mesh was create by spatch, export in dxf, convert in udo/inc (mesh)
> and after convert into mesh2 with the tools of Warp (nieminen juha).
> This problem appear to me for every mesh/mesh2 (even mesh) I use.
> In the doc, it say that uv_mapping works for mesh/mesh2.
Yes, uv mapping works for mesh(mesh2), but in order to have correct
output, it needs information about u and v values. AFAIK, none of the
programs, mentioned above, support (output) this information. I'm afraid
that if you want to use uv mapping with given tools, you have to use
bicubic patch. May-be there is alternatives, but I'm not aware of them.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I don't how you can give u and v values information with mesh
syntax? But one says that uv_maping work with mesh! So...
Fabian.
>
> Fabian BRAU wrote:
> >
> > Hello,
> >
> > This mesh was create by spatch, export in dxf, convert in udo/inc (mesh)
> > and after convert into mesh2 with the tools of Warp (nieminen juha).
> > This problem appear to me for every mesh/mesh2 (even mesh) I use.
> > In the doc, it say that uv_mapping works for mesh/mesh2.
> Yes, uv mapping works for mesh(mesh2), but in order to have correct
> output, it needs information about u and v values. AFAIK, none of the
> programs, mentioned above, support (output) this information. I'm afraid
> that if you want to use uv mapping with given tools, you have to use
> bicubic patch. May-be there is alternatives, but I'm not aware of them.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Fabian BRAU wrote:
>
> I don't how you can give u and v values information with mesh
> syntax? But one says that uv_maping work with mesh! So...
>
> Fabian.
>
Perhaps I should leave this problem to people with better knowledge of
uv-mapping in POV-Ray, as I'm quite ignorant in this area. (When Nathan
logs in, then perhaps he will explain it better.) As I understand it,
MegaPov accepts uv_vectors inside triangle mesh block. But still there
should be something, who generates this uv information.
From MegaPov help file:
=================8<===8<====================================
I've added a new keyword, uv_vectors. This keyword can be used in
bicubic patches to set the UV coordinates for the starting and ending
corners of the patch. The default is
uv_vectors <0,0>,<1,1> // syntax is "uv_vectors <start>,<end>"
If you had another patch sitting right next to this (as happens often
with sPatch or Moray), you could map the exact same texture to it but
use something like
uv_vectors <0,1>,<1,2> // syntax is "uv_vectors <start>,<end>"
(depending on which side of this patch the other is on) so that the two
textures fit seamlessly together.
This new keyword also shows up in triangle meshes (the original kind),
and soon it will be in single triangles, too. Inside each mesh triangle,
you can specify the UV coordinates for each of the three vertices
uv_vectors <uv1>,<uv2>,<uv3>
This goes right after the coordinates (or coordinates & normals with
smooth triangles) and right before the texture. Now that I think about
it, I could maybe make the syntax a bit more flexible (allow you to
interchange "uv_vectors" and "texture").
=================8<===8<====================================
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks!
Fabian.
>
> Fabian BRAU wrote:
> >
> > I don't how you can give u and v values information with mesh
> > syntax? But one says that uv_maping work with mesh! So...
> >
> > Fabian.
> >
>
> Perhaps I should leave this problem to people with better knowledge of
> uv-mapping in POV-Ray, as I'm quite ignorant in this area. (When Nathan
> logs in, then perhaps he will explain it better.) As I understand it,
> MegaPov accepts uv_vectors inside triangle mesh block. But still there
> should be something, who generates this uv information.
> From MegaPov help file:
> =================8<===8<====================================
> I've added a new keyword, uv_vectors. This keyword can be used in
> bicubic patches to set the UV coordinates for the starting and ending
> corners of the patch. The default is
>
> uv_vectors <0,0>,<1,1> // syntax is "uv_vectors <start>,<end>"
>
> If you had another patch sitting right next to this (as happens often
> with sPatch or Moray), you could map the exact same texture to it but
> use something like
>
> uv_vectors <0,1>,<1,2> // syntax is "uv_vectors <start>,<end>"
>
> (depending on which side of this patch the other is on) so that the two
> textures fit seamlessly together.
>
> This new keyword also shows up in triangle meshes (the original kind),
> and soon it will be in single triangles, too. Inside each mesh triangle,
> you can specify the UV coordinates for each of the three vertices
> uv_vectors <uv1>,<uv2>,<uv3>
>
> This goes right after the coordinates (or coordinates & normals with
> smooth triangles) and right before the texture. Now that I think about
> it, I could maybe make the syntax a bit more flexible (allow you to
> interchange "uv_vectors" and "texture").
> =================8<===8<====================================
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Fabian BRAU <Fab### [at] umhacbe> wrote:
: I don't how you can give u and v values information with mesh
: syntax? But one says that uv_maping work with mesh! So...
Of course it works, but it can't read your mind to see what is what you
want. You have to tell it that "for this vertex, take the texture from these
texture coordinates" and this for all vertices of the mesh.
This usually is not made by hand but with a modeller program.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ok I reformulate,
practically, how one can use uv_mapping with mesh/mesh2?
> This usually is not made by hand but with a modeller program.
There is a modeller which do this?
Fabian.
>
> Fabian BRAU <Fab### [at] umhacbe> wrote:
> : I don't how you can give u and v values information with mesh
> : syntax? But one says that uv_maping work with mesh! So...
>
> Of course it works, but it can't read your mind to see what is what you
> want. You have to tell it that "for this vertex, take the texture from these
> texture coordinates" and this for all vertices of the mesh.
> This usually is not made by hand but with a modeller program.
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Fabian BRAU wrote:
>
> Ok I reformulate,
>
> practically, how one can use uv_mapping with mesh/mesh2?
>
> > This usually is not made by hand but with a modeller program.
>
> There is a modeller which do this?
>
Yes, I guess that many modellers do this. I use Rhino (
http://www.rhino3d.com ), export from it to 3DS format and convert with
3ds2pov to pov-ray mesh. Only drawback is that it costs $800 ($195 for
students). (Trial version with 25 saves is free for download)
Perhaps mr. "Linkmaster" Ken has links to other modellers, with which
uv-mapped objects could be created (truespace is one, that I know,
versions 1 and 2 could be downloaded from some magasine site free, IIRC,
but I'm not sure, whether with these versions it is possible, I have
version 4.3 and it is possible to use uv-mapping from it in POV).
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|