Lighting Problem

Started by
1 comment, last by KevinCoyle 20 years, 9 months ago
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?
Advertisement
btw, I''m using point lights
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

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement