Advertisement

Can anybody help pls?

Started by March 29, 2002 02:26 AM
3 comments, last by Least Lee 22 years, 11 months ago
I want to map an image with some predefined point onto a sphere with some predefined points. In the some texture mapping, I can''t control which point of image map to which point on sphere. Can anybody help pls, I have stuck for a long time!!! Thanks in advance.
Well... If you can generate appropriate tex coords for the sphere, you can map pretty much anything in any way you want. However, is''t not trivial to do so.

What do you need this for? Did you try using texture matrices?
---visit #directxdev on afternet <- not just for directx, despite the name
Advertisement
I am doing a project that need to do an image projection on a curved surface, particularly sphere!!

the mapping must be as accurate as possible!

The coordinate of the mapping on the sphere, and the image has already calculated! The remaining things is how can I map the image correctly onto the sphere now!

Can you help pls??

Thank you very much for your attention and your help!!
Sounds like environment mapping might help you. Unfortunately, I know next to nothing about it.

You can try using the texture matrix, however how to use it heavily depends on your application.
---visit #directxdev on afternet <- not just for directx, despite the name
If you need precision your sphere should have as many vertices as the number of pixels in the texture, right?

If my understanding is correct, the most accurate way to do it would be to simply use a glColor for each vertex, with the corresponding color of the pixel in the texture.

This is without lighting and texturing of course. To get better results you should also need to enable gourad shading (sorry, can''t remember exactly how)

Hope that helps!

This topic is closed to new replies.

Advertisement