Skip to main content
gamedev.net
🔒 Locked

Simple mesh lighting question

Started by n0ob Dec 24, 2004 at 8:55 PM 1 replies 850+ views
Original Post
n0ob
n0ob
Hi there. I just got a simple mesh loading and drawing in my 3d program, by following the mesh example in the DX9 tutorials (with the tiger). I'm using the Pandasoft exporter to export my .X files, and I made a simple model with a couple different colors. If I open up this mesh in the DX model viewer, it looks normal, UNTIL I disable lighting. Then it shows up as solid white. And it does this in my program too. Sooo, what is the option that makes the colors show up when lighting is disabled? There are no bitmap resources or anything, just color materials. I guess I could eventually enable lighting, but I'd sure like to get this working. The tiger draws just fine with lighting off, in my program as well. Okay, thanks for any help!!
Muhammad Haggag
Muhammad Haggag
Quote:
Original post by n0ob
Hi there. I just got a simple mesh loading and drawing in my 3d program, by following the mesh example in the DX9 tutorials (with the tiger). I'm using the Pandasoft exporter to export my .X files, and I made a simple model with a couple different colors. If I open up this mesh in the DX model viewer, it looks normal, UNTIL I disable lighting. Then it shows up as solid white. And it does this in my program too. Sooo, what is the option that makes the colors show up when lighting is disabled? There are no bitmap resources or anything, just color materials. I guess I could eventually enable lighting, but I'd sure like to get this working. The tiger draws just fine with lighting off, in my program as well. Okay, thanks for any help!!

Check: How is the color at a vertex eventually determined? (The table's a little messed up, but you'll be able to work it out)

n0ob
n0ob
Thank you!! That was quite helpful! I figured out in max how to set the vertex color, which is what was missing. Thanks again!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.