Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

[2.6] renderclient() lighting

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
Locked
Protagores
Member
Member
Posts: 4
Joined: August 12th, 2010, 7:34 am
Name: Ilyas Gasanov
IRC Username: Prottey

[2.6] renderclient() lighting

Post by Protagores »

It seems that all client (player/bot/etc.) models are rendered fullbright (with lightcolor(1,1,1) and lightdir(0,0,1); since the call of render() routine is done with NULL light parameter) Does anyone have any idea to fix this issue?
Thanks.
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: [2.6] renderclient() lighting

Post by Hirato »

it's done irregardless of the light parameter
you should see a line like this inside iengine.h

Code: Select all

extern void lightreaching(const vec &target, vec &color, vec &dir, bool fast = false, extentity *e = 0, float ambient = 0.4f);
simply change the default value for ambient - typically to something lower like 0.1 or even 0 if you want pitch black models
This is not a url, clicking it is pointless
Protagores
Member
Member
Posts: 4
Joined: August 12th, 2010, 7:34 am
Name: Ilyas Gasanov
IRC Username: Prottey

Re: [2.6] renderclient() lighting

Post by Protagores »

The thing I actually need is lighting that depends on location, e.g. in a bright place models are lighted more, in a dark one - lighted less, and the direction of lighting not being from camera, but from actual sources.
Mapmodels seem to be lighted properly, but not client models. And everything was working in 2.5 version, but now broken for some reason. :(
Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: [2.6] renderclient() lighting

Post by Hirato »

it was always like that; now just do what I told you to
This is not a url, clicking it is pointless
Locked