Jump to content
  • Advertisement

Archived

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

jmoses

Finding the color of a point that intersections a polygon with colors

This topic is 5387 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

I asked a simular question like this about a month ago when I was using lightmaps, but now that the lighting in my game got bumped down to vertex lighting, I have to find a new solution to my lighting problem, so here it is: Lets say I have a triangle, and every vertex of that triangle has a color applied to it, if I know an intersection point of that triangle, How would I find the color of the intersection point? Thanks a bunch

Share this post


Link to post
Share on other sites
Advertisement
I assume you want a smooth gradient of colour throughout the triangle.

Google "barycentric coordinates".

Share this post


Link to post
Share on other sites
Yeah, well I''m using vertex color lighting for my level, and I''d like players in the level to be drawn with the color of where they are standing. for instance, if the player is a dark room, he should be drawn dark, ect...

Thanks

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!