SimSun Shader - Simulated directional light for models

Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Enjay
 
 
Posts: 26443
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: SimSun Shader - Simulated directional light for models

Post by Enjay »

Cherno wrote:SimSun can be combined with brightmaps, which I suggest for any light source models.

A SimSun-like feature will be integrated into one of the future GZDoom releases and automaticaly work without the need for GLDEFS entries, so this whole thing can be made obsolete, which I am looking forward to.
I do use brightmaps with the models concerned. I can definitely see that the brightmaps are being respected but SimSun still darkened them more than I would have wanted.
Spoiler:

I have to say, I'm also wary of unconditionally applying this to all models as an engine feature, if that's what you suggest is going to happen. I have found several models which, for a variety of reasons, do not look as good with the shader as they do without it. e.g. a model specifically given a skin of game textures so that it blends seamlessly with level architecture, a space satellite floating in space that just looked wrong lit from above, a little floating droid model that for whatever reason simply looked better without the shader, a model that I had spent some time carefully baking subtle lighting onto the skin, a model with quite a dark skin anyway just ended up looking too dark with the shader...

For the majority of models it looked good (really good) but exceptions were common enough that I feel that a blanket "enable or disable" is not appropriate. Some way to opt in or opt out specific skins is needed IMO.
User avatar
Nash
 
 
Posts: 17357
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: SimSun Shader - Simulated directional light for models

Post by Nash »

Already anticipated it. ;) I have included a new MODELDEF flag, "NoDirectionalLight" that will make the model ignore the directional lighting.

(I am the one who's working on the native engine feature of this, BTW)

The engine version also doesn't have the problem with the brightmaps. Because it's done at the proper place in the engine (as per dpJudas' advice) - the brightmaps work as they're expected (they fully poke out of everything).

Materials like normal maps and PBR also work, which is a welcome bonus. This is the advantage of doing it in the engine; it is done at the proper place in the shader pipeline.
User avatar
Enjay
 
 
Posts: 26443
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: SimSun Shader - Simulated directional light for models

Post by Enjay »

Well that's all my concerns taken care of then. This should indeed be an interesting and valuable feature. Thanks for doing it.

Is the target to have it in the next official GZDoom?
User avatar
DELTAtheDboi005
Posts: 142
Joined: Tue Apr 05, 2022 3:43 am

Re: SimSun Shader - Simulated directional light for models

Post by DELTAtheDboi005 »

Does this work for voxels?
User avatar
Cherno
Posts: 1300
Joined: Tue Dec 06, 2016 11:25 am

Re: SimSun Shader - Simulated directional light for models

Post by Cherno »

No. However, using voxels as-is is discouraged anyway. Better to convert them to models and use them as such. Voxel editors like MagicaVoxel have the option to export to obj.

Return to “Shaders”