Jump to content
The Dark Mod Forums

Rim Lights?


duzenko

Recommended Posts

https://drive.google.com/file/d/0B9OoHSmkeSeNZWdyZFliQkNsVTA/view?usp=sharing

textures/frestest/models/sphere
{
	translucent
	twosided
	nonsolid
	ambientRimColor		0.2, 0, 0.2
	
    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
        }
}

post-3508-0-94703100-1544026477_thumb.jpg

Link to comment
Share on other sites

I think it will have limited uses. It might become widespread in a sense that it could look good e.g. as a part of a frob shader. But that will be displayed on screen only in close proximity of an object, so it shouldn't be too taxing on a system.

 

Right now with standard _d _n _s material, the ambient rim color looks like this:

obraz.png

 

While the expected result would be more like this:

obraz.png

Edited by Judith
Link to comment
Share on other sites

I think it will have limited uses. It might become widespread in a sense that it could look good e.g. as a part of a frob shader. But that will be displayed on screen only in close proximity of an object, so it shouldn't be too taxing on a system.

 

Right now with standard _d _n _s material, the ambient rim color looks like this:

obraz.png

 

While the expected result would be more like this:

obraz.png

Let me have that model to test
Link to comment
Share on other sites

For additional reference:

 

 

This is UE4, but this was done the same way in non-PBR UE3 (dx9), so it should be possible.

I'm curious how this partucular model looks with rim lights on in UE?

 

Can you convert it so that it has smoothed normals? See the attached - each face has a hard fixed normal unlike regular D3/TDM models where vertex normals are averaged for each triangle it forms

post-3508-0-05414300-1544439855_thumb.jpg

Link to comment
Share on other sites

Yeah, the drawer has one smoothing group for the whole piece. I didn't save the source file for the cube, I'll have to make it from scratch. There's something seriously wrong with DR exporting .ase models. It often exports triangles 2-3 times, so they all overlap and have z-fighting.

  • Like 1
Link to comment
Share on other sites

Yeah, the drawer has one smoothing group for the whole piece. I didn't save the source file for the cube, I'll have to make it from scratch. There's something seriously wrong with DR exporting .ase models. It often exports triangles 2-3 times, so they all overlap and have z-fighting.

I would really like to see the end result of that model in UE if possible

I'm afraid the basic rim lights can't do that exact contour thing from your screenshot

Link to comment
Share on other sites

Sorry that it took me so long, but I wanted to have a fully unwrapped switch to see how the rim light utilises 0-1 uv space.

 

obraz.png

 

Right now it works quite nicely, although it is affected by the normalmap. That's why I opted for image program rather than global keyword, so we could e.g. overlay it on top.

  • Like 2
Link to comment
Share on other sites

I am interested in changing the look of the frob highlight because in certain lighting situations I just can't tell whether an object is highlighted or not. So I had a quick look at the code yesterday, to see how extensive a code change for frob highlight would be. Apparently, it is pretty much all defined in the mtr files, which means there is no flexibility in the current implementation. I guess this subpar solution came to fruition due to the fact the SDK was not open-source yet. So, changing the frob highlight code would require quite some refactoring which I should better leave to people more experienced with TDM's codebase. :-(

Link to comment
Share on other sites

I wonder how that model looks with UE rim light

 

 

Right now it works quite nicely, although it is affected by the normalmap. That's why I opted for image program rather than global keyword, so we could e.g. overlay it on top.

I think the engine should already support it via a custom material shader

Link to comment
Share on other sites

 

I wonder how that model looks with UE rim light

 

Actually, it looks the same, so the math is correct (if you were worried about that):

 

obraz.png

obraz.png

 

Edit: okay, so this works as it should. I mean, having a thin outline like in this Dishonored shot is impossible to have with fresnel function. Creating object outline is pretty complex thing, actually:

 

http://www.michalorzelek.com/blog/tutorial-creating-outline-effect-around-objects/

 

Edited by Judith
Link to comment
Share on other sites

So I had a quick look at the code yesterday, to see how extensive a code change for frob highlight would be. Apparently, it is pretty much all defined in the mtr files, which means there is no flexibility in the current implementation.

 

IMO per-material approach is the most flexible, as you can fine-tune the frob intensity in relation to a model, and even to its particular instance in the world (with shaderparm). Problems start when you want to make quick global changes for all materials.

Link to comment
Share on other sites

 

IMO per-material approach is the most flexible, as you can fine-tune the frob intensity in relation to a model, and even to its particular instance in the world (with shaderparm). Problems start when you want to make quick global changes for all materials.

Agreed. It's a shame the available version of id Tech 4 doesn't have a template system for material defs like Q4's or ET:QW's, which could have reduced the amount of text needed.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

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