Archived

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

KevinCoyle

Lighting Problem

Recommended Posts

I''ve been experimenting with Direct3D for a while now, I''m working on lighting now. I created a simple map in 3dsmax and I''m try to get orange-colored lighting to make the map look like it''s lit by torch or candle light, it seems all I can do is turn colors on and off, I can''t vary them any. I have the red diffuse set to 1.0f and my green diffuse set to 0.5 but I get yellow. if my green is anything but zero, It''s the same yellow color, the same goes for the other colors. Any idea what I''m doing wrong?

Share this post


Link to post
Share on other sites
Whether lighting falls off and varies it''s shade depends on a number of things, including:

1) What you have set for your Attenuation values. (The falloff value is just an optimisation hint for D3D rather than being the light falloff range like Max).

2) How highly tesselated your meshes are. If the area your light is meant to affect only consists of a single large polygon, the lighting will be pretty much one flat shade (the same as you''d see in the Max viewport with Smooth+Highlights enabled).


I''d suggest having a play around with the Lighting sample in the SDK. Pay particular attention to their light and material settings and how different tesselation levels ("mesh density" in the sample) change the quality of the point light.

--
Simon O''Connor
ex -Creative Asylum
Programmer &
Microsoft MVP

Share this post


Link to post
Share on other sites