Hi,
Thanks for your help,please send me your
URL with the full source code of the program.
Thanks again:-)
Main Topics
Browse All TopicsHi,
I need to do a texture mapping on a 3D object,
cube mapping,sphere mapping and cylinder mapping.
My program now,includes the ability to load
*.skl format,then *.obj/*.off and then *.wgt(weights
file).
I have hierarchy window which has a tree of all the
skeleton bone heirarchy,i have also sidebar with bitmaps
buttons,and a toolbar with three buttons(cube,sphere,cylind
for example:
When i choose cube from toolbar,then one of the bmp file
by pushing the specific bitmap button,and then push a bone from the hierarchy window, after that the chosen bone should be with the specific texture.
Any help with some algorithm,explane about the three
texture mapping technics (projection calculate),opengl code...
Thanks a lot.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
dani333:
Sorry about the delay. I was away for the past couple days. Here are the URLs:
http://www.cse.psu.edu/~jm
The main file is maze2.cpp. Have fun :)
-jack-
Thanks I have another problem...
Lets say I have 3d object like an human body ,
on this object i'm applying some diffrent texture, some of the texture will be blended with each other on the intersections parts,
now that all the textures are applied on the object i want
to save the texture in (one!) bitmap file and of course remap the u,v coordinates of the object to correspond
to the new merged texture.
how can i do it ?
Business Accounts
Answer for Membership
by: JackNCalvinPosted on 2003-03-13 at 06:00:31ID: 8127767
Dani333:
IGNMENT, 1);
_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); _2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); _2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); _2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
, 0, *components, *width,*height, 0, GL_RGBA, GL_UNSIGNED_BYTE, image_texture);
---------- ----------
----------
I created an openGl 3d maze program that uses texture mapping. I have an init function, where I initialize the settings for appropriate texture mapping:
/* read in texture example */
/* you can try some of the smaller image files (e.g., mandrill2.rgb,
mandrill3.rgb) to see if they are faster */
//read_image("brick.rgb");
/* set up texture environment */
glPixelStorei(GL_UNPACK_AL
/* The texture can either modulate or decal the floor */
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
/* We repeat the textures rather than clamping them to tile the floor*/
glTexParameteri(GL_TEXTURE
glTexParameteri(GL_TEXTURE
/* GL_NEAREST might be faster, but you get aliasing */
glTexParameterf(GL_TEXTURE
glTexParameterf(GL_TEXTURE
/* GL_LINEAR should do a better job of interpolating textures */
glTexParameteri(GL_TEXTURE
glTexParameteri(GL_TEXTURE
/* set our fine texture */
glTexImage2D(GL_TEXTURE_2D
--------------------------
Then when you want to draw the texture object in another function you need to enable it. Here I am texture mapping a floor:
glColor4f(1.0, 1.0, 1.0, 0.0);
glEnable(GL_TEXTURE_2D);
glBegin(GL_QUADS);
glTexCoord2f(world.xmax, world.zmax);
glVertex3f(world.xmin, -0.01, world.zmin);
glTexCoord2f(world.xmin, world.zmax);
glVertex3f(world.xmax, -0.01, world.zmin);
glTexCoord2f(world.xmin, world.zmin);
glVertex3f(world.xmax, -0.01, world.zmax);
glTexCoord2f(world.xmax, world.zmin);
glVertex3f(world.xmin, -0.01, world.zmax);
glEnd();
glDisable(GL_TEXTURE_2D);
--------------------------
If you still have questions, or my code is hard to read let me know and I can give you the URL to the full source code of the program.
Hope this helps!!!
-Jack-