Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Phong lighting and normal mapping working.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 RobinsonUK   Members   -  Reputation: 108

Like
0Likes
Like

Posted 04 April 2012 - 12:58 PM

It's taken me weeks to get simple Phong lighting model up and running. Bugs tend to be well hidden if you're looking at an object placed at the origin, or the camera never moves, or the light source is pointed along a certain axis, or you're always using sampler 0, or etc. As soon as you start them all moving/changing, well, it doesn't look so hot Posted Image.

Anyway I think I finally cracked it. Compared to how long it took me to do Phong, adding normal mapping was a breeze. The only trouble was that ASSIMP doesn't bother checking for a map on the bump channel in a .3DS export, so I had to mod it to get it to add a normal map to the material description. It does magically calculate tangent and bi-normals for vertices though, so that's something going for it.

This is a major achievement for a dumbass like me, so I thought I'd share :-)... Obviously I don't have a knowledgable expert sitting next to me, so I'm assuming it's correct just by looking at it myself. I'm wondering if it looks correct to everyone else?

Phong:

http://www.youtube.com/watch?v=kfoLksz_mlE&feature=relmfu

Phong + Normal Mapping:

http://www.youtube.com/watch?v=o7Fk9RyfRxQ

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS