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: 26536
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: 17450
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: 26536
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: 219
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: SimSun Shader - Simulated directional light for models

Post by DELTAtheDboi005 »

Does this work for voxels?
User avatar
Cherno
Posts: 1315
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.
User avatar
DELTAtheDboi005
Posts: 219
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: SimSun Shader - Simulated directional light for models

Post by DELTAtheDboi005 »

Honestly, I've been using it for models that I'm making for TAOD and I'm wondering: "why the hell isn't this in gzdoom?"

I would KILL to have this in the latest version of gzdoom, it really makes the models pop and I've made it my legal obligation to slap this in any model that I make for ANY mod that I make. You, my friend, are 347% on to something with this shader and I hereby give you a round of applause for your work! :thumb:
User avatar
DELTAtheDboi005
Posts: 219
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: SimSun Shader - Simulated directional light for models

Post by DELTAtheDboi005 »

Question: is it possible to make shiny/specular effects using a similar thing to simsun or am I just a big ol' dummy?
User avatar
Cherno
Posts: 1315
Joined: Tue Dec 06, 2016 11:25 am

Re: SimSun Shader - Simulated directional light for models

Post by Cherno »

DELTAtheDboi005 wrote: Sun Apr 23, 2023 11:10 pm Question: is it possible to make shiny/specular effects using a similar thing to simsun or am I just a big ol' dummy?
Not possible as far as I know. The necessary shader functions are not available to the kind of shader that can be added by users.

There are plans to introduce a SimSun-like fake lighting system natively to GZDoom in the future, which would then have support for PBR.
User avatar
DELTAtheDboi005
Posts: 219
Joined: Tue Apr 05, 2022 3:43 am
Preferred Pronouns: He/Him

Re: SimSun Shader - Simulated directional light for models

Post by DELTAtheDboi005 »

Cool
User avatar
Nash
 
 
Posts: 17450
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: SimSun Shader - Simulated directional light for models

Post by Nash »

SimSun ported for VKDoom
You do not have the required permissions to view the files attached to this post.

Return to “Shaders”