Popular Post peter_spy 1602 Posted July 16, 2017 Popular Post Report Share Posted July 16, 2017 Lately, I was fiddling with TDM frob shader, because often I find it too subtle for my taste. Don’t get me wrong, it works as intended, but it looks best in complete darkness. In more lit rooms, e.g. while putting out candles, it’s a bit hard to see whether you’re able to interact with an object or not. Modern games use Fresnel-based shader to achieve this, so an object gets a bright outline. This is very in-your-face and something more like the “atomic-blue frob” from Thief Deadly Shadows we all hated back in the day. That said, I think you can achieve some middle ground here. I couldn’t get the proper fresnel program to work, since I’m not that good at shaders, but I don’t think I will need it. Instead, I created a “fake Fresnel” cubemap, which looks like this: You can easily make it in Gimp. It’s a 256 texture with radial gradient from black to white, and offset of 50, so the color transition starts further away from the center. If you just want an outline, use pure black as starting color. I wanted both some highlight and an outline, so I used RGB 32. Now you have to save it 6 times with _back, _down, _forward etc., so it gets recognized as a cubemap.Then you have to go to your material definition and put this instead of standard frob code: // This is the code required for frob highlighting this texture{ if ( parm11 > 0 ) maskcolor map makealpha (_white) alpha .2 // modify it as you wish}{ if ( parm11 > 0 ) blend gl_dst_alpha, gl_one maskalpha cameraCubeMap cubemap/path/here texgen reflect} Cool thing is, you can tweak the cubemap intensity with alpha parameter, so you’ll get more consistent look when you need different values for e.g. wooden and glass objects (the latter typically require more visible frob). This effect also looks a bit different on .ase models and on brushes / func_statics made in DR, so you can tweak it to look the same across all materials and types of surfaces. Small comparison: 5 Quote Misc. assets for TDM Link to post Share on other sites
Bikerdude 3741 Posted July 16, 2017 Report Share Posted July 16, 2017 Ohh I see where your going, its like the frob we have seen in a lot of other games. Also what the heck is that thing...? Quote Link to post Share on other sites
peter_spy 1602 Posted July 16, 2017 Author Report Share Posted July 16, 2017 Yup, this is more like Bioshock / Dishonored kind of frob, only not that super shiny. I don't have any interactive objects in my FM yet, so I use what I can This is my electric lamp model. It's a good example of an object with high specularity. Notice that standard TDM frob highlights mostly the shiny parts, while contrast remains similar. Cubemap frob looks more like a layer put on top of the object, that's why it's more distinct. Quote Misc. assets for TDM Link to post Share on other sites
HMart 334 Posted July 17, 2017 Report Share Posted July 17, 2017 (edited) Nice done, not exaggerated like i like it, btw while editing the fhDoom engine, i found idsoftware played with item highlight for Doom 3, but disabled it for the final game, i was able to enable it again and it was just the case of changing a bool from false to true, i also found that the material shader for it is still in the game and it also uses a cubemap. itemHighlightShell { nonSolid { blend add cubeMap env/sheen texgen reflect rgb parm4 } } Unfortunately, is a pulse based highlight (on and off) system so it looks to obvious and in your face, but was cool to find how they did it. Edited July 17, 2017 by HMart 1 Quote Link to post Share on other sites
VanishedOne 546 Posted September 18, 2017 Report Share Posted September 18, 2017 I couldn’t get the proper fresnel program to work frob.vfp was designed to give a fresnel-like frob highlight, but it's unused because of a bug with TGA textures. http://forums.thedarkmod.com/topic/8747-tweaks-to-frob-highlight/?do=findComment&comment=174954http://forums.thedarkmod.com/topic/10129-tdm-commands-and-variables/?do=findComment&comment=199639 Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
Bikerdude 3741 Posted September 19, 2017 Report Share Posted September 19, 2017 Now that we are open source can the issue Greebo mentioned un the second post be now looked at? Quote Link to post Share on other sites
NeonsStyle 585 Posted September 20, 2017 Report Share Posted September 20, 2017 Sorry, but I really don't like it. One of the worst thing with T3 and T4 was the horrid frob glow. TDMs frob is perfect, not too bright, not too dark. When you know what can be frobbed, it's perfectly easy, and it's something we enjoy learningabout the game; what is touchable and what isn't. Making it obvious just ruins that discovery. Quote I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:https://www.youtube.com/c/NeonsStyleHD Dark Mod Missions: Briarwood Manor - available here or in gamehttp://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/ Link to post Share on other sites
peter_spy 1602 Posted September 20, 2017 Author Report Share Posted September 20, 2017 The default frob is far from perfect; it works well in the dark, but as I said above, finding what is frobable or extinguishing candles, in rooms which are better lit, can be a pain. This fake-fresnel frob is more pronounced and can be tweaked per material, so it's not so in your face, and it works more consistently. Quote Misc. assets for TDM Link to post Share on other sites
duzenko 659 Posted September 22, 2017 Report Share Posted September 22, 2017 My 5 cents.I don't like how TDM handles frob now. Each frobable material has these two extra stages, and not only it makes loading a map slower (because of extra data parsing) but it also adds extra draw call when an entity is selected.Instead I would propose to highlight the entity in the standard ambient shader by simple color add. (cubemap wrap, etc).This way once changed in the GPU shader code it would apply to all materials.It would also allow different. configurable frob visuals. 2 Quote Link to post Share on other sites
Springheel 4644 Posted September 22, 2017 Report Share Posted September 22, 2017 We've had lots of proposals for alternate frobs over the years. It really takes a test-map, or at least a video, to get a good sense of whether a proposal is preferable to what we already have. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
VanishedOne 546 Posted September 22, 2017 Report Share Posted September 22, 2017 (edited) Slightly tweaked frobs per material aren't unknown: tdm_pagan_orb_glow adds some white twice, which gives the orb a bluish frob glow.I remember finding the frob highlight of textures/darkmod/wood/panels/beam_brown_old too dark to see easily; had I needed to keep that entity frobable I'd probably have tweaked the material def.(I wondered whether it was a deliberate choice not to give bc_doublebass_* materials frob highlights: a frobable double bass will have only the strings highlighted. Whether that's helpful visual language probably depends on whether one intends to have the frob play a sound or pick up the entity.)So there's something to be said for being able to control the frob highlight on a per-material basis.Edit: quoting this here before I forget it's there:It blends in a portion of _white plus a portion of the diffuse. This is 99.9% effective but there were a few dark textures we had to boost that portion. I recall dark bottles were hard to see. The padlock also. [...] We may from time to time find a texture that needs adjusting. Fortunately its settable individually in every material. Edited November 7, 2017 by VanishedOne Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
peter_spy 1602 Posted January 8, 2018 Author Report Share Posted January 8, 2018 You asked for more tangible example, so here it is: This is a bit refined version, although it's probably not that much visible in the video. This material actually uses the same cubemap twice: first stage uses specular texture as alpha to give the grate a subtle shimmer to indicate it's interactive. It's not very pronounced, as lights make the cubemap more dim. But, it's very useful for finding objects in darker scenes. Second stage is actual frob and it uses diffuse texture as alpha, so it's a bit more pronounced. 3 Quote Misc. assets for TDM Link to post Share on other sites
peter_spy 1602 Posted January 8, 2018 Author Report Share Posted January 8, 2018 (edited) Also, I was a bit worried that in stronger lighting this frob will be less visible, which often happens with standard frob. But, instead of making material instances for different situations, you can just add parm3 to the alpha value and then set it in the model. So the base alpha value in the material can be, e.g. for models lit only with ambient_world (with shaderparm3 = 0). And if you need stronger outline for frob, e.g. in well lit room, you increase shaderparm3 value. For example: Shaderparm3 = 0 Shaderparm = 0.5 Code: // Frobable object outline { maskcolor map makealpha (texture) alpha .2 + parm3 // modify it as you wish, set shaderparm3 in the model to at least 0! } { blend gl_dst_alpha, gl_one maskalpha cameraCubeMap fake_fresnel_cubemap texgen reflect } // Better frob { if ( parm11 > 0 ) maskcolor map makealpha (texture) alpha .4 + parm3 // modify it as you wish, set shaderparm3 in the model to at least 0! } { if ( parm11 > 0 ) blend gl_dst_alpha, gl_one maskalpha cameraCubeMap fake_fresnel_cubemap texgen reflect } Edited January 8, 2018 by Judith Quote Misc. assets for TDM Link to post Share on other sites
the_deep 42 Posted January 8, 2018 Report Share Posted January 8, 2018 I like it. I agree that it can be hard to see what your focusing on in well-lit areas. Slightly annoying at times, especially when you're in a hurry. Quote Link to post Share on other sites
Obsttorte 1504 Posted January 11, 2018 Report Share Posted January 11, 2018 I really like what I am seeing. It looks a bit odd on the screenies, but in the video it looks good to me (strange, I know). Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter Link to post Share on other sites
Bikerdude 3741 Posted January 11, 2018 Report Share Posted January 11, 2018 @Judith could you do a video showing the new fron on some stock items..? Quote Link to post Share on other sites
peter_spy 1602 Posted March 12, 2018 Author Report Share Posted March 12, 2018 @Judith could you do a video showing the new fron on some stock items..? Should have done this long time ago, but here goes. This is the default frob in action. Notice that in such lighting conditions it's hard to tell whether these chalices are loot or not, especially if player is in a hurry, sweeping the room in a risky move:https://www.dropbox.com/s/8r0khi00f00s73i/frob_default.mp4?dl=0 Now this has both an initial outline for interactive objects, and the new frob. You may argue that the white outline doesn't fit here, maybe something more orange would be more suitable. And I agree Still, IMO with that kind of frob player can see better what's interactive and what's not:https://www.dropbox.com/s/yaobhqqrk8sv51c/frob_new.mp4?dl=0 1 Quote Misc. assets for TDM Link to post Share on other sites
Bikerdude 3741 Posted March 12, 2018 Report Share Posted March 12, 2018 I like this alot, its very T4 inspired and the frob is both easier to see while at the same time being less garish and in your face as it is now! Have you approched the team about getting this added to the core mod..? Quote Link to post Share on other sites
Abusimplea 168 Posted March 13, 2018 Report Share Posted March 13, 2018 It looks to me as if in the two videos the lighting on the candle holders differs in unfrobbed state too. They seem to be brighter in frob_new.mp4 . Unfrobbable items like the vases seem not to be affected. Quote Link to post Share on other sites
peter_spy 1602 Posted March 13, 2018 Author Report Share Posted March 13, 2018 I like this alot, its very T4 inspired and the frob is both easier to see while at the same time being less garish and in your face as it is now! Have you approched the team about getting this added to the core mod..? Thanks! No, I didn't think about adding it to the core mod yet. I'll add it as a feature proposal in the bugtracker. But I think it might need refinment and more extensive tests (not just loot but doors, junk objects, etc). It looks to me as if in the two videos the lighting on the candle holders differs in unfrobbed state too. They seem to be brighter in frob_new.mp4 . Unfrobbable items like the vases seem not to be affected. Great, that means my idea works That's the "frobable object outline" code at work. That said, this is a gameplay-changing feature i.e. it helps the player see what's static and what's interactive. It might be better if it was left optional, as originally TDM doesn't do that. The way I see it, TDM model of presenting interaction is more like Thief 1-2. What I'm proposing here is more like Dishonored and the like, only a bit more subtle. There are still more tests needed IMO. The outline may work for loot, but what about doors or junk objects? I'm not so sure about that. Best PoC would be a complete list of shaders modified for e.g. Tears of Saint Lucia or A New Job, to see how it works as a system. I have a lot on my plate right now, so no promises, but I'll get back to it, sooner or later. Quote Misc. assets for TDM Link to post Share on other sites
Obsttorte 1504 Posted March 13, 2018 Report Share Posted March 13, 2018 BTW: What is "texture" in your code referring to? Is it the diffusemap or do you use a standard texture material-independently? Best PoC would be a complete list of shaders modified for e.g. Tears of Saint Lucia or A New Job, to see how it works as a system.This should be doable via a script, similar to the one modifying missions for I18N. So you don't have to change all materials manually. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter Link to post Share on other sites
peter_spy 1602 Posted March 13, 2018 Author Report Share Posted March 13, 2018 BTW: What is "texture" in your code referring to? Is it the diffusemap or do you use a standard texture material-independently? For the chalice, I used its normalmap for the outline, as it's a bit more subtle. I used diffuse for the actual frob. You can also use _white in both cases, but it looks more like a plastic wrap or TDS-like frob. Code: // Frobable object outline { maskcolor map makealpha (models/darkmod/props/textures/gold_chalice_ornate_local) // Object normalmap for outline mask alpha .5 // modify it as you wish } { blend gl_dst_alpha, gl_one maskalpha cameraCubeMap env/fres texgen reflect } // Better frob { if ( parm11 > 0 ) maskcolor map makealpha (models/darkmod/props/textures/gold_chalice_ornate) alpha .3 // modify it as you wish } { if ( parm11 > 0 ) blend gl_dst_alpha, gl_one maskalpha cameraCubeMap env/fres texgen reflect } Btw. one thing against the "frobable object outline" is that it adds to the drawcall and triangle count of a model (two additional stages). The frob itself is not an issue, because it doesn't add anything to the scene unless you're highlighting an object. That's why I'd also exclude "junk items" from the outline, since many missions use them extensively. Quote Misc. assets for TDM Link to post Share on other sites
OrbWeaver 637 Posted March 13, 2018 Report Share Posted March 13, 2018 +1 from me. I always felt the default TDM frob was ridiculously weak, verging on invisible except in almost complete darkness. Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts Link to post Share on other sites
Destined 618 Posted March 13, 2018 Report Share Posted March 13, 2018 I also like it, but I would leave the outline as it might give away hidden switches and the like. I think it might give away some puzzles too easily. 1 Quote Link to post Share on other sites
peter_spy 1602 Posted March 13, 2018 Author Report Share Posted March 13, 2018 (edited) I changed a bunch of material files and replaced the standard frob. I ended up using _white so I could replace the code faster. Unfortunately, there's no one-size-fits-all solution in this case. Some objects look pretty decent, other, especially those with darker textures, not so much. Doors and boxy stuff looks like from TDS. This would need tweaking per object. Here are the material files, make sure you backup the originals before using these: https://www.dropbox.com/s/n2xjugnmwhle0rm/01_new_frob_materials.zip?dl=1 Edit: Oh, and to properly use these, you need to put this cubemap in the mod env folder: https://www.dropbox.com/s/z8ce4kxy4xakgdc/env.zip?dl=1 Edited March 13, 2018 by Judith Quote Misc. assets for TDM Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.