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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 2 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...