Tempust85 Posted March 10, 2014 Posted March 10, 2014 Rend2 doesn't just read .mtr files. It checks for an .mtr before it loads .shader. Rend2 shader stuff works in both. Boothand likes this
Szico VII Posted March 11, 2014 Posted March 11, 2014 Rend2 doesn't just read .mtr files. It checks for an .mtr before it loads .shader. Rend2 shader stuff works in both.I dont think it does - Unless I have a .mtr which is identical to my .shader I get a load of buggy texture errors. It doesnt appear to me like it falls back on the .shader at all. Every time I add a new shader I also have to add it to .mtr or rend2 wont load it properly. Or, at the very least, if you do have an mtr, but it doesnt contain all the same details that the shader does, it doesnt also reference the shader too.
Xycaleth Posted March 11, 2014 Posted March 11, 2014 rend2 treats .mtr and .shader files in the same way - you can use all the new keywords in either. The only difference is, like DT said, that priority is given to the .mtr files. The benefit of using the .mtr file is so you can use the .shader file for the vanilla renderer and not have any errors. Tempust85 likes this
Boothand Posted March 11, 2014 Author Posted March 11, 2014 I dont think it does - Unless I have a .mtr which is identical to my .shader I get a load of buggy texture errors. It doesnt appear to me like it falls back on the .shader at all. Every time I add a new shader I also have to add it to .mtr or rend2 wont load it properly. Or, at the very least, if you do have an mtr, but it doesnt contain all the same details that the shader does, it doesnt also reference the shader too. Actually, through experimentation I found that my rend2 wanted a .shader equivalent of the name of the .mtr that kept my rend2 shaders. But what I put in the .shader didn't matter, it seemed, it just needed to exist. So all that exists in my bootland_nmaps.shader is "//placeholder file for rend2". The same file with .mtr contains all my normal maps, and they work in game, but without the placeholder file all my textures lack normal/-parallax maps and load up like a regular texture.
Xycaleth Posted March 11, 2014 Posted March 11, 2014 Actually, through experimentation I found that my rend2 wanted a .shader equivalent of the name of the .mtr that kept my rend2 shaders. But what I put in the .shader didn't matter, it seemed, it just needed to exist. So all that exists in my bootland_nmaps.shader is "//placeholder file for rend2". The same file with .mtr contains all my normal maps, and they work in game, but without the placeholder file all my textures lack normal/-parallax maps and load up like a regular texture.Huh, didn't know that! The code confirms what you've found as well. I think the .shader should be optional to be honest, so I might look at changing that. Tempust85 likes this
Szico VII Posted March 11, 2014 Posted March 11, 2014 Really...Every time I add a new shader to my normal .shader, I also have to add it to the .mtr to get it to work in rend2 (even if theres no rend2 specific stages)
Xycaleth Posted March 11, 2014 Posted March 11, 2014 If you have a .mtr file present, it will ignore the .shader file. Or do you mean, it doesn't work at all without a .mtr file?
Tempust85 Posted March 12, 2014 Posted March 12, 2014 I've been able to use rend2 stages in .shader files. The point of using .mtr is to provide a rend2 version of the vanilla .shader you want to keep for compatibility. If you don't want compatibility with vanilla, just use a .shader for rend2 and forget .mtr. This always works in my tests.
Boothand Posted March 12, 2014 Author Posted March 12, 2014 Weird, I don't have Szico's issue at all. I removed all .mtr files and apart from some console errors, everything shows up as it should when not using nmaps etc. The tables have turned!
Szico VII Posted March 12, 2014 Posted March 12, 2014 I think I have explained poorly. What I mean is, rend 2 wont grab data from the .shader that it doesn't find in the .mtr if such a shader is present in the map. So unless you re-transpose any new shaders into your .mtr as well as the .shader (even if they have no rend2 specific stages) then rend2 wont load them. As Xycaleth said, it seems to ignore the .shader entirely if there is an mtr present, I thought it would intelligently look at both, but guess not hah
eezstreet Posted March 14, 2014 Posted March 14, 2014 Uhmmm...grab data? Shaders are like images, it makes absolutely no sense at all to mix their data. Explain better? The system already makes a lot of sense - use .mtr for rend2 specific, use .shader for vanilla. That's the best and safest way to do it. I wouldn't recommend using rend2 keywords in .shader files. @@Syko, try using a parallax map (not a normal map). rend2 is highly experimental; OpenJK as a whole is much more stable than base.
mrwonko Posted March 14, 2014 Posted March 14, 2014 Uhmmm...grab data? Shaders are like images, it makes absolutely no sense at all to mix their data. Explain better? The system already makes a lot of sense - use .mtr for rend2 specific, use .shader for vanilla. That's the best and safest way to do it. I wouldn't recommend using rend2 keywords in .shader files. @@Syko, try using a parallax map (not a normal map). rend2 is highly experimental; OpenJK as a whole is much more stable than base.As in, a single .shader/.mtr file contains multiple materials. The (sensible) suggestion is to load the materials from the .shader and the .mtr, with .mtr being preferred for materials that are in both. That way, materials that need no rend2-specific changes don't have to be duplicated.
Xycaleth Posted March 14, 2014 Posted March 14, 2014 Down the road, I plan to greatly simplify the .mtr shader syntax anyway So you'll need to write two separate shaders.
Keyten Posted August 4, 2014 Posted August 4, 2014 Maybe it's some weird Vista issue. I have similar problems.Win 8 / Acer TravelMate P253-MG-53234G75Mnks / NVIDIA GeForce 710M I'll try to update drivers
Xycaleth Posted August 4, 2014 Posted August 4, 2014 A driver update won't fix these issues. Make sure you have the correct Visual C++ redistributables installed.
Mr.Zz Posted October 22, 2014 Posted October 22, 2014 Guys, I'm not sure if I understand correctly, but does this mean I can start reworking/revisiting and improving my Tex Overhaul plus creating parallax and normalmaps and implement them without recompiling levels (at least for MP, SP has to wait, right??) Cheers z3filus likes this
Tempust85 Posted October 22, 2014 Posted October 22, 2014 For MP, yes but rend2 is far from complete. There is no dedicated programmer, so there's no prediction on rend2's completion.
mrwonko Posted October 22, 2014 Posted October 22, 2014 Though you have to keep in mind that the impact of normal maps is fairly limited without dynamic lights.
Mr.Zz Posted October 22, 2014 Posted October 22, 2014 True, but If parallax mapping works, then every texture will look much more 3-dimensional One would have to recompile the levels to achieve dynamic lighting, right? or is thatnot possible with rend2?
Boothand Posted October 23, 2014 Author Posted October 23, 2014 No rend2 features in itself require you to recompile (it's only the renderer), but I don't think it's quite finished when it comes to dynamic lights yet. To really achieve dynamic lighting that looks good, I found that you could recompile the map and bypass the q3map2 lightmap (_cs 0 and _rs 0 on worldspawn).This way, the pre-compiled shadows won't exist and won't interfere with rend2's dynamic lighting. However, it would obviously be rendered incompatible with people running the vanilla renderer, until Xycaleth potentially finds a way to bypass the lightmap in rend2 itself. The other side effect is that cubemaps won't yet work properly without a lightmap present. I'm not sure if more has been done to the parallax mapping (or if it's at all possible to fix what bothered me), but at the time I played around with it, everything kind of broke at the seams. It looked good, but two different surfaces (in a map) that didn't line up alignment-wise and angle-wise, would break the illusion and you could see into the parallax from each surface, *under* the other. If it's just an unfortunate consequence, it still looks very nice when used in the right place. Mr.Zz likes this
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now