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.

Author
Message
saintvicious
13
Years of Service
User Offline
Joined: 6th Feb 2011
Location:
Posted: 11th Feb 2011 01:48
I'm trying to make lights but it only lights up the corners of boxes and stuff. How do I make the lights look realistic like for example a flashlight that makes a circle on a wall. I used to use an addon for Game Maker 7 that allowed you to split the texture or something like that so that there would be more corners to light up rather than just the 4 main ones and if the first option doesn't work then is there an option like that?
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Feb 2011 12:22
Try this simple demo.



DBPro's built-in point lights and spot lights don't work very well with low poly objects. In the demo the lighting only looks OK for the high poly sphere. The reason is that the default positional lights use vertex lighting. In other words the light intensity is calculated at the vertices and then interpolation (a form of weighted averaging) is used to get the lighting intensity of points between the vertices. For the cube in the demo, each vertex is outside (or nearly outside) the spotlight's cone so the whole cube is badly lit.

Hope this helps.
saintvicious
13
Years of Service
User Offline
Joined: 6th Feb 2011
Location:
Posted: 11th Feb 2011 23:38
I found this shader pack:
http://forum.thegamecreators.com/?m=forum_view&t=79849&b=8

It has a pixel shader effect but it acts as a point light. Is there a way to make it a directional or spot light? If I can't then is there anything else I can use to make directional lights?
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 12th Feb 2011 13:02
Quote: "If I can't then is there anything else I can use to make directional lights? "


Just use the built-in DBPro set directional light command.

A directional light is quite different from a spot light - a spot light is a special kind of point light.

If you are using shaders then you need to pass the lighting information to the shader or specify it in the shader.

I'm a bit confused about what your main problem is now.

Login to post a reply

Server time is: 2024-11-24 07:21:53
Your offset time is: 2024-11-24 07:21:53