Jump to content
The Dark Mod Forums

Recommended Posts

Posted

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!

 

 

Posted (edited)

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
Posted

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...)

Posted

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...)

Posted

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...)

Posted (edited)

 

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
Posted

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.

Posted (edited)

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
Posted

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

  • 2 months later...
Posted

@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
Posted

Um, no, model / geometry materials.

Right

 

But the this rim highlight should only appear as a component of ambient light interactions, no?

 

Because we already have some fresnel in the point light interactions.

Posted

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?

Posted

I think that separate material stage will be more versatile, as you can use different blend modes, textures, and such.

In that case we might as well use the new custom material shader I've added recently

Do you have a test map for this?

Posted (edited)

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

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...