Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Lighting an externally created model

Author
Message
Deego
16
Years of Service
User Offline
Joined: 21st May 2008
Location:
Posted: 23rd Jun 2009 06:54
I tried to import a .x model exported from Blender and lighting it, it isn't working right. In the picture is an example of what's happening. The DBPro created wall and sphere are being lit just fine, but for some reason the columns aren't picking up the light very well. They are picking it up SOMEWHAT, in that the polygons facing the light aren't true black and the opposite polygons are. You can't see this in the JPG, though.

This is the code I used to set up the lights.


I didn't apply any lighting or shader effects in Blender, I only set the UV map. The texture on the columns, when ambient light is set to 100, is much brighter than the brown tile texture on the wall.

I was hoping lighting .x files would work the same as lighting objects that were created in DBPro. What am I missing? Do I need to set up some lighting in Blender?

Attachments

Login to view attachments
Deego
16
Years of Service
User Offline
Joined: 21st May 2008
Location:
Posted: 23rd Jun 2009 07:00 Edited at: 23rd Jun 2009 07:04


I took a screenshot using 3 identical lights to show how the .x model is being lit much darker than the other objects; you can see how the sphere is way overexposed, and the columns are getting just a hint of light.

Thanks for any help!

Attachments

Login to view attachments
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 23rd Jun 2009 10:24 Edited at: 23rd Jun 2009 10:26
hmmm the only thing i could suggest is checking your normals, i also believe that there is a normalization command in dbpro... Ill see if i can find it..

here try using this
it will will normalize all "normals" contained in 3D rendering data.

Come and have a look at my hobby site once your ready..
http://darkdstudio.webs.com/
Note: its still really bare..
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 23rd Jun 2009 16:19 Edited at: 23rd Jun 2009 16:19
Normals couldn't be it, if the normals were wrong you'd have a lot worse problems than that . I know I've had this problem before, try SET OBJECT AMBIENT ObjectNo,1. If that doesn't do it, try messing with SET OBJECT DIFFUSE and the other object lighting settings.



Diggsey: I have a spine and memory, but one memorable guy says he hates me. What am I?
Deego
16
Years of Service
User Offline
Joined: 21st May 2008
Location:
Posted: 23rd Jun 2009 17:42 Edited at: 23rd Jun 2009 20:05
The object light settings haven't changed the fact that the columns don't seem to be receiving light in the same way as the other objects. Set object normals just makes the faint lighting appear on the wrong side of the columns.

But I think I found the problem, if not the solution. The models are scaled up to make them the right height in DBPro; returning them to their original height gives them correct shading. See the picture.

However, when I went into Blender and scaled the column up by the same amount and removed the scaling in DBPro, the same problem occurs. And when I set the scaling low in DBPro, the column is lit correctly again! What does the size of the column have to do with how well it's lit? Am I going to need to scale down the entire game to get around this?

Edit: I put set normalization on after creating my light. Now it works fine. I used SET OBJECT NORMALS instead of SET NORMALIZATION ON last time...

Attachments

Login to view attachments
zeroSlave
15
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 23rd Jun 2009 21:09
I have never used blender, but I do know that I have had issues with creating models and then scaling them inside the 3d UI. What has worked for me, is to go into (3ds max commands) "Edit mesh">"Edit vertices" then scale all the vertices instead. Or even the faces. This has fixed my problems before. Also, reading on the forum, I have discovered that scaling has an adverse affect on lighting. Hope this helps.

Login to post a reply

Server time is: 2024-09-28 08:27:21
Your offset time is: 2024-09-28 08:27:21