Jump to content
  • Advertisement
Sign in to follow this  
iammisc

Room lighting

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been trying to get a simple room object lit. The room is a polygon with normals facing inwards. I know the normals are facing inwards because lighting works (but incorrectly). The problem is that the roof and floor is rendered black. I've attached links to three screenshots and an obj file. One is the roof and the floors that are coming out wrong. The second is one where the camera is rotated down and the floor is lighted a little more (so the normal is pointing inwards). The last is the same scene without lighting. All this data is from a wavefront obj which I've also attached. Just so you know, loading the model in another 3d model viewer (osgviewer, included in the OpenSceneGraph) also has the same lighting problem. The lighted (wrong) rendering: http://iammisc.googlepages.com/Screenshot-galaxia.png The lighted rendering with the camera down showing the floor a little brighter: http://iammisc.googlepages.com/Screenshot-galaxia-2.png The unlighted one (I want the scene to look like this but lighted): http://iammisc.googlepages.com/Screenshot-galaxia-1.jpg And the obj file: http://iammisc.googlepages.com/level.obj And a blend file from which the obj file was generated: http://iammisc.googlepages.com/level.blend The spheres in the rendering are the lights by the way

Share this post


Link to post
Share on other sites
Advertisement
Hi,
When I opened up the .blend file you provided of your room, I saw that normals are in fact, facing outward. You can have blender draw the normals for faces if you go into edit mode and under "Mesh Tools More" you press the "Draw Normals". I am linking to a screenshot showing this and the normals of your model.

Try turning your normals inward and try again. I think this will fix your problem.

Link to Image

Good luck.



-Levi

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!