
How to draw a beauty OBJ file.
Posted Wednesday, 16 March, 2011 - 16:26 by ToansoHi every one, i want to draw a obj file as shown blow, but i donot know how to make it looks beauty as the third picture shown.
could any one give me some hits. Thanks a lot.
- Toanso's blog
- Login or register to post comments


Comments
Re: How to draw a beauty OBJ file.
This is much more complex than it looks.
GPU Gems 3 has an article on advanced skin rendering techniques [1], but unless you know how to use shaders it won't be of much help. I'd suggest focusing on that first (learn about diffuse & specular lighting, normal mapping, shadowing and then you can move to more advanced topics such as subsurface scattering and BRDFs).
[1] Chapter 14. Advanced Techniques for Realistic Real-Time Skin Rendering
Re: How to draw a beauty OBJ file.
I just set light
but it does not work, just as shown in picture,
Below are my render code
Triangles[] contain the vertices' index which in triangle. and normal [] contain the vertices' normal, and texcoord [] contain the vertice's texcoord
What's wrong with me ,Thanks a lot.
Re: How to draw a beauty OBJ file.
Check http://glprogramming.com/red/chapter05.html
You don't seem to be specifying your light, so I do not know if the defaults are good for your scene. I do not even remember if any lights are enabled by default, you can individually enable/disable GL_LIGHTi, like glEnable(GL_LIGHT0);
You should check that your normals have valid values, and that they are unit length. If they seem to be otherwise valid but not unit length, you can enable GL_NORMALIZE, or normalize them yourself while you load them.