Jump to content
The Dark Mod Forums

Rim Lights?


duzenko

Recommended Posts

Judith actually hacked together a kind of rim light consisting of a radial gradient texture on a cubemap (IIRC), I'm sure he can re-post his steps here.

 

In general I've always found the Deadly Shadows rim light frob highlighting a bit better, but even if you undertook the task of find & replacing all the old frob highlight code in the materials, I can't think of anything else that would benefit from something like that ATM.

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

Is it something we want to add to the engine?

https://www.epicgames.com/unrealtournament/forums/filedata/fetch?id=343728

If so, does it need to be per material or per entity?

 

Hell yes! Some kind of fresnel function would be great to have, I wanted to do a frobbing shader that would look like that, but it could have other uses too. This should be defined by material IMO.

Edited by Judith
Link to comment
Share on other sites

???

 

The HDR light post process includes rim lighting:

 

http://forums.thedarkmod.com/topic/10518-id-like-to-contribute-my-hdr-implementation/

 

Did that get removed?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I'll double check when I get home.

 

Here is a screen from 1.03:

 

penitence01.jpg

 

The highlighting on the normal map on the left wall is influenced by rim lighting.

 

Whether we do too much or not enough is an open question.

 

As well as whether we should give more control of this aspect to mappers.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

OK I tested tonight:

 

post-3763-0-92084500-1538359939_thumb.jpg

 

Left Image = 2.06 GLSL Default Interaction Shader (No Rim lighting)

 

Middle Image = 2.06 GLSL Enhanced Interaction (Rim lighting on the barrel closest to candle)

 

Right Image = 2.04 ARB Enhanced Interaction shader (Rim lighting on the barrel closest to the candle)

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Now, whether we also want something extreme like the first (top post) screenshot is another question.

 

Judith made a custom cubemap material for frob that matches that look:

 

http://forums.thedarkmod.com/topic/18990-custom-frob-idea/

 

Do we really need a custom GLSL program to do this when we can do it already (albeit less efficiently)?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

 

Do we really need a custom GLSL program to do this when we can do it already (albeit less efficiently)?

 

Yes, to control it in more meaningful manner and without using lights.

The shader I made often goes through the whole model:

obraz.png

 

While Duzenko is talking about something like this:

https://api.unrealengine.com/udk/Three/MaterialsCompendium.html#DotProduct

https://api.unrealengine.com/udk/Three/MaterialsCompendium.html#Fresnel

 

And that can be used for things like frob outline, force fields, but also for stuff like metals or transparent glass.

Edited by Judith
Link to comment
Share on other sites

Rim lighting is not only good to make a better frob highlighting like Judith showed but can also give characters well more character, by making them stand out from the background, Valve for example used it for good effect on all their games since HL2.

 

https://www.gamasutr...im_Lighting.php

 

Yup, rim shaders are often used to separate characters from the environment a bit, or to differentiate friend/foe teams in coop games.

 

I was talking about the ambient silhouette highlighting from all sides, not that "specular" stuff from the point light direction.

 

That's how I understood it, fresnel effect from in engine lighting is a different thing.

Edited by Judith
Link to comment
Share on other sites

Can we sort out the terms here.

I was talking about the ambient silhouette highlighting from all sides, not that "specular" stuff from the point light direction.

 

That is also rim lighting, it is a term for a particular effect "Rim lighting is a light that typically comes from beside or behind your subject", Valve just used specular to do it in that case. Search for rim lighting on google you will see the picture bellow.

 

rim-lighting-02.jpg?resize=500%2C750&ssl

Link to comment
Share on other sites

  • 2 months later...

@Duzenko, do you plan on working on this? IMO that would be pretty useful shader to have.

Yes, I just need to be poked every so often so I remember that it's something useful for mappers/players

 

What's the consensus on controlling this effect? Material flag / entity spawn arg / etc?

  • Like 1
Link to comment
Share on other sites

Material flag seems right. The input will be a color or a texture (normalmap?), and the fresnel effect would need some kind of exponent value. Something similar to this: https://api.unrealengine.com/udk/Three/MaterialsCompendium.html#Fresnel

Edited by Judith
Link to comment
Share on other sites

Yeah, it will be a fake rim light, independent of a light source. Probably the most common use will be the blend add mode.

Independent of light source meaning a separate material stage resulting in one more draw call and needing a new GLSL shader?

Or rather a parameter for the ambient light interaction that adds brightness on visible rims when doing our existing ambient light interactions?

Link to comment
Share on other sites

Here it goes: https://we.tl/t-XIAHMSqMhI

 

Let's start with a test sphere that is translucent white and two sided, and try to make it look like this (ignore the stuff on the right side):

DotProductExample.jpg

 

 

Basic material for the sphere is:

textures/frestest/models/sphere
{
	translucent
	twosided
	nonsolid
	
    qer_editorimage		textures/frestest/models/sphere_d
    diffusemap       	textures/frestest/models/sphere_d
	
        // TDM Ambient Method Related
        {
                if (global5 == 1)
                blend add
                map                   textures/frestest/models/sphere_d
                scale                  1, 1
                red                     global2
                green                  global3
                blue                    global4
        }
}
Edited by Judith
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 1 reply
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...