This topic is 5476 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hello. Why does not this work:
OuterSpace.device.Lights(1).Type = LightType.Spot
OuterSpace.device.Lights(1).Position = New Vector3(1, 1, -3.0F)
OuterSpace.device.Lights(1).Direction = New Vector3(1, 1, 25.0F)
OuterSpace.device.Lights(1).InnerConeAngle = 0.5F
OuterSpace.device.Lights(1).OuterConeAngle = 1.0F
OuterSpace.device.Lights(1).Falloff = 1.0F
OuterSpace.device.Lights(1).Attenuation0 = 1.0F
OuterSpace.device.Lights(1).Diffuse = Color.WhiteSmoke
OuterSpace.device.Lights(1).Range = 800.0F
OuterSpace.device.Lights(1).Enabled = True


It's pointed at a highly tesselated flat square (about 20K triangles, 140x by 70y) with an origin of 0,0,0 that's parralell to the x/y axis. Nothing, ever.. I've tried all things and read 3 or 4 tutorials. I've even tried setting my normals all to (0,0,-1) The ambient material color is a dark grey.

Share on other sites
What part doesn't work? What does it render? Nothing at all? Does it render anything when the lighting is disabled?

Chris

Share on other sites
I've figured it out 5 minutes after I post it.
My normals were all inverted because when I flattened my geosphere
after the spherical trig blah blah blah there was one little negative sign.

THe ambient material light worked and setting my normals to 0,0,-1 was misleading because I had left the other light on (the sun shinning on my planets, and that washed out the spot)

OK.
No simple soultutions today I guess.
Back to coding.
I'll throw a couple rating points your way for the quick reply.

• Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 15
• 22
• 17
• 46