duzenko Posted December 5, 2018 Author Report Share Posted December 5, 2018 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 } } Quote Link to comment Share on other sites More sharing options...
peter_spy Posted December 5, 2018 Report Share Posted December 5, 2018 Yup, it works, but as a global keyword it will have limited uses IMO (and I suspect it will be modified by normalmaps and such). Stage keyword or image program will be more versatile. Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
duzenko Posted December 5, 2018 Author Report Share Posted December 5, 2018 Doing it as a separate stage will require a custom shader. I'm not opposed to that in principle, as long as few materials are going to use it.When it becomes widespread, it's better off as a part of the ambient shader. 1 Quote Link to comment Share on other sites More sharing options...
peter_spy Posted December 5, 2018 Report Share Posted December 5, 2018 (edited) 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: While the expected result would be more like this: Edited December 5, 2018 by Judith Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
duzenko Posted December 5, 2018 Author Report Share Posted December 5, 2018 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: While the expected result would be more like this:Let me have that model to test Quote Link to comment Share on other sites More sharing options...
peter_spy Posted December 5, 2018 Report Share Posted December 5, 2018 There you go: https://we.tl/t-5J6FwSainy Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
peter_spy Posted December 5, 2018 Report Share Posted December 5, 2018 (edited) For additional reference: This is UE4, but this was done the same way in non-PBR UE3 (dx9), so it should be possible. Edited December 5, 2018 by Judith Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
duzenko Posted December 10, 2018 Author Report Share Posted December 10, 2018 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 Quote Link to comment Share on other sites More sharing options...
peter_spy Posted December 10, 2018 Report Share Posted December 10, 2018 You mean that most models have just one smoothing group? https://we.tl/t-u9IUMKzft3 Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
duzenko Posted December 10, 2018 Author Report Share Posted December 10, 2018 You mean that most models have just one smoothing group? https://we.tl/t-u9IUMKzft3Not sure what is the correct term for thatBut this version is not fully it - see the attached and compare to the top side of the drawer deskMost of the faces still have hard normals Quote Link to comment Share on other sites More sharing options...
peter_spy Posted December 10, 2018 Report Share Posted December 10, 2018 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. 1 Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
duzenko Posted December 10, 2018 Author Report Share Posted December 10, 2018 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 possibleI'm afraid the basic rim lights can't do that exact contour thing from your screenshot Quote Link to comment Share on other sites More sharing options...
peter_spy Posted December 10, 2018 Report Share Posted December 10, 2018 I don't have UE4 installed ATM, but I will export that model in the evening. Or, maybe something more practical will be better, like a usable item or lever? Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
duzenko Posted December 10, 2018 Author Report Share Posted December 10, 2018 I don't have UE4 installed ATM, but I will export that model in the evening. Or, maybe something more practical will be better, like a usable item or lever?Whatever model makes sense from the mapper/gameplay point of view Quote Link to comment Share on other sites More sharing options...
peter_spy Posted December 12, 2018 Report Share Posted December 12, 2018 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. 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. 2 Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
STiFU Posted December 12, 2018 Report Share Posted December 12, 2018 That could be a neat frob highlight... Quote Link to comment Share on other sites More sharing options...
peter_spy Posted December 13, 2018 Report Share Posted December 13, 2018 Yup, that could be one of its uses. Some more degree of control over the effect and we're good Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
STiFU Posted December 13, 2018 Report Share Posted December 13, 2018 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. :-( Quote Link to comment Share on other sites More sharing options...
duzenko Posted December 13, 2018 Author Report Share Posted December 13, 2018 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 Quote Link to comment Share on other sites More sharing options...
peter_spy Posted December 13, 2018 Report Share Posted December 13, 2018 (edited) 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): 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 December 13, 2018 by Judith Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
duzenko Posted December 13, 2018 Author Report Share Posted December 13, 2018 Are we good for now or there's more finetuning to do? (Short of the outline thing) Quote Link to comment Share on other sites More sharing options...
peter_spy Posted December 13, 2018 Report Share Posted December 13, 2018 No, this is exactly how it should work Outlining is whole other thing (I thought it wasn't, sorry). 1 Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
peter_spy Posted December 13, 2018 Report Share Posted December 13, 2018 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. Quote Misc. assets for TDM Link to comment Share on other sites More sharing options...
VanishedOne Posted December 13, 2018 Report Share Posted December 13, 2018 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. Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to comment Share on other sites More sharing options...
STiFU Posted December 13, 2018 Report Share Posted December 13, 2018 Problems start when you want to make quick global changes for all materials.That's exactly what I was aiming at. I would like the player to be able to configure the frob highlight to his desires. :-) 1 Quote Link to comment Share on other sites More sharing options...
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.