more bump mapping...

Started by
11 comments, last by FreJa 20 years, 9 months ago
Hi, I thought I had solved this problem already, but no... I'm trying to implement bump mapping on a model, but look at the result: the man is kinda black, and the bump mapping isn't very believable... By the way... I'm using the ARB extensions... Any help? Thank you
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
Advertisement
And if anyone is really interested in giving a hand... here''s the important part of the code:

MainWnd.cpp
Normalisation Cube Map.cpp
Normalisation Cube Map.h


thank you really a lot
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
weird... I now tried with a cube and with different texture and it SEEMS, I repeat, it SEEMS, to be working... look at the shot:



what do you think?


[edited by - FreJa on July 8, 2003 10:04:20 AM]
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
Try this. Draw your normal vectors for each triangle. See if they make sense. If they do, then try drawing your S and T vectors to see if they make sense (this is a little harder to tell).

There are a couple things that I noticed with your code also:

-Do all 3 vertices in each triangle have the same n,s,t vectors? You might want to 'smooth' them out by calculating the vertices normal, and not the triangles. This is done by calculating every triangle's normal, and then averaging them accordingly for the vertices.

-I don't think you are saving your S and T vectors after you calculate them:

VECTOR3D tempSTangent=deltaT1*side0-deltaT0*side1;
sTangent.Normalize();

All this does is normalize sTangent. maybe change it to:

sTangent = deltaT1*side0-deltaT0*side1;
sTangent.Normalize();

I'm not sure how your math is set up, but I think that is right.

Let me know if this helps. I also have a md5 model viewer that (tries) to bumpmap, But it's not working 100%. Maybe we can help each other out.


Robbie

[edited by - mrrolf810p on July 8, 2003 10:10:30 AM]
Is this a doom3 character? were did you find the loader?
quote:Original post by Unreal
Is this a doom3 character? were did you find the loader?


i wrote the loader...

"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
thanks mrrolf810p, but I still couldn't make this work...

quote:Original post by mrrolf810p
I don't think you are saving your S and T vectors after you calculate them


you're write... but when I "corrected" it, it looked even more strange...


quote:Original post by mrrolf810p
Maybe we can help each other out.


would love that...


[edited by - FreJa on July 8, 2003 11:44:10 AM]
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
Have you tried to draw the normals when you render the scene?
Also see if everything looks fine with no bumpmapping, just GL_LIGHTING.
That helped me out a little bit. I''ll look over what you posted a little more carefully once I have a chance... I''m at work now.

Tonight I''ll get out my program and see what''s in there. I''ll try to post a pic for ya.

What is the md5mesh file called for the fat guy? I just got the marine up and going.
everything works just fine... all textures (bump and diffuse) are rendered correctly)...


quote:Original post by mrrolf810p
What is the md5mesh file called for the fat guy?


try facepain.md5mesh



[edited by - FreJa on July 8, 2003 1:07:28 PM]
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
Hey

here is a quick screenie of what I got. Notice the nice triangles. I can''t get them to smooth out.



Looking through your code real quick, I''m not sure if you are giving the correct LightObject, LightEye vectors. Have you played around with those?

This topic is closed to new replies.

Advertisement