Texture Inside of Quadric Sphere???

Alright I know how to create and texture the outide surface of a quadric sphere… How can I texture the inner surface??

texture mapping on sphere is same as on square,you may think mapping on square,but it project on the sphere

I dont understand waht you are saying…

Are you saying that you do not map onto a sphere you project…

Is it possible to project a texture on the inside of a sphere??

[This message has been edited by delic (edited 10-18-2002).]

Both the front and back of polygons have the same texture. The inside of the sphere is already textured for you. If you want different textures on the in- and outside you need to render the mesh twice with different textures and back face culling reversed.

hey…
or you could just turn it inside out:
glScalef(-1,-1,-1);
gluSphere(…);

i think that would work. -PmanC

Wait if the inside is already textured then when I am inside the sphere why do I only see black?? but when I zoom out of it i see the textured sphere… This is a quadric, do I have to create a sphere of polygons to do what I want?

I centered a sphere at 0,0,0 and when I zoom into the inside I dont see anything in the distance,just black (the clear color)… I also positioned a light at 0,0,0 thinking maybe there was no light…

I dont get it…

Ohh, I dont really care what the outside looks like, I am going to be inside the sphere not outside…

thanks for the ideas, by the way…

[This message has been edited by delic (edited 10-19-2002).]

Hi,

I am just a newbe but when I create a triangle it has the same texture on both sides I don’t see why a quadratic should be any different unless you have turned on back face culling,

fringe

unless you have turned on back face culling

I’m betting this is the problem…

I assure you I never called glenable culling. It is a small program only to demonstrate this effect, no other code.

Unless culling is default, which it isnt to my knowledge, this isnt the cause…

::::::::::::::::::::

[This message has been edited by delic (edited 10-23-2002).]

A couple of observations. First of all:

gluQuadricOrientation(qobj,GLU_OUTSIDE);

That’s going to make your normals point outwards. If you are inside the sphere, things will appear dark due to the lighting.

Second, you do the gluNewQuadric in initGL, and you do gluDeleteQuadric in display. If your display gets called more than once (which it will if you do things such as, mimimize and restore) then you are going to run into problems because you are trying to do a gluSphere with a deleted quadric.