Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

FreJa

more bump mapping...

This topic is 5493 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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]

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
quote:
Original post by Unreal
Is this a doom3 character? were did you find the loader?


i wrote the loader...

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!