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.

Dark GDK / Light question

Author
Message
Yero008
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location: Romania
Posted: 26th Feb 2011 14:03 Edited at: 26th Feb 2011 14:09
I made a few models in 3d Max sutdio 2011, and I added a little light. In 3d Max studio the lightning looks ok, but when I load my models in the game, th light is messed up. For example I added light upwards like a statue, but it doesn't look like in the 3d editor.
Or if I put a little light to light just one side, half of the level is going to be lit and the other is dark. But my light is very small, so it shouldn't light up so much.
What should I do, should I try to modify my models and the light in them, or should I try to create the light effect with dark gdk?
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 26th Feb 2011 14:23
Your mesh is made up of triangles, so in real time rendering the light will get messed up. If you tessalate your mesh the lighting will be viewed a tad better and also adding smoothing to parts of it will affect the lighting. The larger the triangles on the mesh will cause the light to spread over a longer range. Cut these down to make it better on the screen.

Warning! May contain Nuts!
Yero008
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location: Romania
Posted: 28th Feb 2011 22:02
Can I make the light to look like it's a small spot?
And can I multiply it so it will be like a row? I want to use the light to show a path. And I read in the documentation that you can have only 7 lights.
Should I export a .x file from 3d Max Studio that has just the light and position it and multiply?

Many forward thanks.
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 1st Mar 2011 01:43
You can export your scene as an X file. Import it into Deled and add your lights from within that. Once you've lightmapped your scene you can export as either an X file or a DBO file.

Deled is free for non-commercial use and you can use as many lights as you like.

Lightmapping is great for speed and effects in your scene but you cannot move the lights around afterwards. Lightmapping is used in games such as Unreal Tournament, Quake, etc.

Warning! May contain Nuts!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 1st Mar 2011 08:51
Yero008, you can reduce and set the ambient light with 'dbSetAmbientLight', then set the light number 0 (the default light source) to a spot light with 'dbSetSpotLight', and give it position, pointing and color.

Take a look to other available light functions in the 'DarkSDKLight.h' header.

Login to post a reply

Server time is: 2024-10-02 15:19:55
Your offset time is: 2024-10-02 15:19:55