This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > VRML > October 2004 > spherical texture mapping problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
spherical texture mapping problem
|
|
| yosi keller 2004-10-11, 4:15 am |
| We are using VRML to display spherical texture mapping results. The
texture map is a soccer ball.
There is a an artifact in a shpe of a line that appears in the VRML
viewer.
It is not seen if the same mesh is converted to VTK format and
displayed in a VTK viewer.
The image can can be seen at:
http://pantheon.yale.edu/~yk253/par...or_football.jpg
Thanks,
keller
| |
| Joerg Scheurich aka MUFTI 2004-10-11, 12:16 pm |
| > We are using VRML to display spherical texture mapping results. The
> texture map is a soccer ball.
> There is a an artifact in a shpe of a line that appears in the VRML
> viewer.
> http://pantheon.yale.edu/~yk253/par...or_football.jpg
Your image has a size of 381 x 395. In current VRML browsers, you should
use a size of 2^N x 2^N resolution (e.g. 64 x 64, 128 x 128, 512 x 512).
If your texture do not have 2^N x 2^N resolution, the image can be scaled
first, which can cause artifacts.
AFAIK the new OpenGL 2.0 standard do not require any more 2^N x 2^N
so long
MUFTI
--
Wenn ich verdopple, klicken Sie im browser, Bilder werden in gesaust.
(aus einem Softwarehandbuch)
| |
| Holger Grahn 2004-10-12, 7:15 pm |
|
Hi Yosi,
you might consider adding
repeatS FALSE repeatT FALSE to your ImageTexture node,
otherwise the graphics cards wraps around wrongly at the border of the
texture
producing a seam.
Mufti wrote
>AFAIK the new OpenGL 2.0 standard do not require any more 2^N x 2^N
Yes, but at least for DirectX non pow of 2 texture have several limiations,
e.g. no
mip-mapping , no repeating etc.
-- Holger
"Joerg Scheurich aka MUFTI" <rusmufti@helpdesk.rus.uni-stuttgart.de> schrieb
im Newsbeitrag news:ckdqi2$n9m$3@infosun2.rus.uni-stuttgart.de...
>
>
>
> Your image has a size of 381 x 395. In current VRML browsers, you should
> use a size of 2^N x 2^N resolution (e.g. 64 x 64, 128 x 128, 512 x 512).
>
> If your texture do not have 2^N x 2^N resolution, the image can be scaled
> first, which can cause artifacts.
>
> AFAIK the new OpenGL 2.0 standard do not require any more 2^N x 2^N
>
> so long
> MUFTI
> --
> Wenn ich verdopple, klicken Sie im browser, Bilder werden in gesaust.
> (aus einem Softwarehandbuch)
| |
| Joerg Scheurich aka MUFTI 2004-10-15, 7:14 am |
| > We are using VRML to display spherical texture mapping results. The
> texture map is a soccer ball.
> There is a an artifact in a shpe of a line that appears in the VRML
> viewer.
> http://pantheon.yale.edu/~yk253/par...or_football.jpg
Your image has a size of 381 x 395. In current VRML browsers, you should
use a size of 2^N x 2^N resolution (e.g. 64 x 64, 128 x 128, 512 x 512).
If your texture do not have 2^N x 2^N resolution, the image can be scaled
first, which can cause artifacts.
AFAIK the new OpenGL 2.0 standard do not require any more 2^N x 2^N
so long
MUFTI
--
Wenn ich verdopple, klicken Sie im browser, Bilder werden in gesaust.
(aus einem Softwarehandbuch)
| |
| Holger Grahn 2004-10-15, 7:14 am |
|
Hi Yosi,
you might consider adding
repeatS FALSE repeatT FALSE to your ImageTexture node,
otherwise the graphics cards wraps around wrongly at the border of the
texture
producing a seam.
Mufti wrote
>AFAIK the new OpenGL 2.0 standard do not require any more 2^N x 2^N
Yes, but at least for DirectX non pow of 2 texture have several limiations,
e.g. no
mip-mapping , no repeating etc.
-- Holger
"Joerg Scheurich aka MUFTI" <rusmufti@helpdesk.rus.uni-stuttgart.de> schrieb
im Newsbeitrag news:ckdqi2$n9m$3@infosun2.rus.uni-stuttgart.de...
>
>
>
> Your image has a size of 381 x 395. In current VRML browsers, you should
> use a size of 2^N x 2^N resolution (e.g. 64 x 64, 128 x 128, 512 x 512).
>
> If your texture do not have 2^N x 2^N resolution, the image can be scaled
> first, which can cause artifacts.
>
> AFAIK the new OpenGL 2.0 standard do not require any more 2^N x 2^N
>
> so long
> MUFTI
> --
> Wenn ich verdopple, klicken Sie im browser, Bilder werden in gesaust.
> (aus einem Softwarehandbuch)
| |
| yosi keller 2004-10-16, 4:14 am |
| Thanks for the help.
I tried both things: resizing the texture map and setting repeatS
FALSE repeatT FALSE. It did not solve the problem, so I suspect there
is a bug in my spherical mapping routine.
I attached the VRML2 file to:
http://pantheon.yale.edu/~yk253/david.zip
Do you know of a VRML tool that will allows me to click on a vertex or
face and get its parameters. By identifying the "bad" vertices or
faces I can debug the mapping routine.
Keller
| |
| Holger Grahn 2004-10-16, 7:15 pm |
| Hi,
ok now it becomes clear,
whenever the texturecoodinates will wrap via the 1 - 0 and 0 -1 border you
have to insert
additional vertices/texturecoodinates.
In your case you have triangles with texcoordinates lets saying going from
0.99 to 0.1 accross the vertices of the triangle so the complete textures is
displayed in this triangle, giving the seam effect. Ideally you wound
introduce the texture boarder uv/ 1.0 into your triangulation.
-- Holger
"yosi keller" <keller@post.tau.ac.il> schrieb im Newsbeitrag
news:2f125bb4.0410152127.5d51f805@posting.google.com...
> Thanks for the help.
>
> I tried both things: resizing the texture map and setting repeatS
> FALSE repeatT FALSE. It did not solve the problem, so I suspect there
> is a bug in my spherical mapping routine.
>
> I attached the VRML2 file to:
>
> http://pantheon.yale.edu/~yk253/david.zip
>
>
> Do you know of a VRML tool that will allows me to click on a vertex or
> face and get its parameters. By identifying the "bad" vertices or
> faces I can debug the mapping routine.
>
> Keller
| |
| yosi keller 2004-10-18, 4:14 am |
| "In your case you have triangles with texcoordinates lets saying
going from
> 0.99 to 0.1 accross the vertices of the triangle so the complete textures is
> displayed in this triangle, giving the seam effect"
Do you mean that for traingles going fro 0.99->1.1 the VRML viewer
displayes the entire texture map compressed in these triangles?
Is the only solution to change my mesh? or is there a certain VRML
instruction that solves this problem?
Keller
"Holger Grahn" <spam@x79.net> wrote in message news:<2td5m8F1tfa77U1@uni-berlin.de>...[color=darkred]
> Hi,
> ok now it becomes clear,
> whenever the texturecoodinates will wrap via the 1 - 0 and 0 -1 border you
> have to insert
> additional vertices/texturecoodinates.
>
> In your case you have triangles with texcoordinates lets saying going from
> 0.99 to 0.1 accross the vertices of the triangle so the complete textures is
> displayed in this triangle, giving the seam effect. Ideally you wound
> introduce the texture boarder uv/ 1.0 into your triangulation.
>
> -- Holger
>
>
>
> "yosi keller" <keller@post.tau.ac.il> schrieb im Newsbeitrag
> news:2f125bb4.0410152127.5d51f805@posting.google.com...
| |
| yosi keller 2004-10-18, 4:14 am |
| You were right!!
I wrote some code, where I detect the triangles which arr over the
edge and then split them and detach the reminder - the crack
disappeared!!
Isn't there support to be a better solution in VRML to this problem?
It seems to me that every one who uses texture mapping in VML will
encounter it.
Keller
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|