Tempust85 Posted July 26, 2017 Posted July 26, 2017 I intend on porting the changes to MP once somaz is done, at least with major stuff.
ChalklYne Posted July 31, 2017 Posted July 31, 2017 How are the Tangents and biNormals being calcuated? Is it MCT Space like Unreal or more like Unity? Just asking for Substance Painter purposes
SomaZ Posted July 31, 2017 Posted July 31, 2017 Ah, rend2 has its own tangent space calculations. Thought on adding mikkt-space, but for now you simply cant get the right tangents and bi-tangents, sry ChalklYne likes this
dvg94 Posted November 4, 2017 Posted November 4, 2017 Having trouble loading up rend2 in mp --- ambient sound initialization --- Sound memory manager started VM_Create: uix86.dll failed! VM_CreateLegacy: uix86.dll succeeded ^3menu file not found: ui/mb_menus.txt, using default --- Common Initialization Complete --- Winsock Initialized Hostname: Daan-PC IP: 192.168.178.18 Opening IP socket: localhost:29070 ]cl_renderer rd-rend2; vid_restart cl_renderer will be changed upon restarting. ----- Initializing Renderer ---- Trying to load "rd-rend2_x86.dll" from "C:\GOG Games\Star Wars Jedi Knight - Jedi Academy\GameData"... Mismatched REF_API_VERSION: expected 8, got 9 Closing SDL audio device... SDL audio device shut down. Couldn't initialize refresh Can you guys help me?
SomaZ Posted November 4, 2017 Posted November 4, 2017 Having trouble loading up rend2 in mp ----- Initializing Renderer ---- Trying to load "rd-rend2_x86.dll" from "C:\GOG Games\Star Wars Jedi Knight - Jedi Academy\GameData"... Mismatched REF_API_VERSION: expected 8, got 9 Can you guys help me? This message tells you, that the game tried to load a renderer with the API Version 9, but the libary you set is designed for the API Version 8. This means, the latest rend2 version is not compatible with newer versions of OpenJK. Not sure which version of OpenJK will work, but you need to take an older version of it to make rend2 work. There is currently noone who has time updating rend2. Sorry.
Tempust85 Posted November 4, 2017 Posted November 4, 2017 You need to run the openJK build that has rend2 included. Unfortunately, you can't just move the rend2 dll over to any openJK build and expect it to work.
dvg94 Posted November 10, 2017 Posted November 10, 2017 Anyway, I used a build that was made around the time rend2 was last updated, and it now works fine!
Tempust85 Posted November 10, 2017 Posted November 10, 2017 "Like" this comment if you would play with or make mods for the updated renderer from df2 mod on a fresh copy of OpenJK MP. Just to gauge interest. Archangel35757, bert, MaceMadunusus and 14 others like this
Gamebrain Posted November 22, 2017 Posted November 22, 2017 i'm looking for shader example for rend2 like wood, metal,rock glass,water,chrome etc.... trying to understand it all thank you...
Xycaleth Posted November 22, 2017 Author Posted November 22, 2017 Latest build at http://gandalf.acslo.com/rend2/b49/ should work with the latest (working) OpenJK build now... I think. If someone would like to be my guinea pig it would be much appreciated (food not included)!
Tempust85 Posted November 22, 2017 Posted November 22, 2017 I can give it a go tomorrow. Does it support PBR materials?
SomaZ Posted November 22, 2017 Posted November 22, 2017 I can give it a go tomorrow. Does it support PBR materials?It uses diffuse and specular with roughness (maybe still gloss?) in the alpha channel afaik. So yea. It does support pbr materials. Though ambient occlusion is not supported. @@Xycaleth tried the build with an OpenJK version with the newer api. Works fine for me.
Bad Dancer Posted December 9, 2017 Posted December 9, 2017 For this you need to understand how normal mapping actually works. It fakes the normal direction of the surface and darkens the areas that point kind of the same direction as the light. Problem with that is, that you have to know where the light is, to compair the normal vector and the light incident vector. The real problem in this case is that all the surfaces lit by static lights only store the information of how much light there is and which color shines on it. This information is stored in the .bsp as a lightmap (actually several ones). You have no information about the incident light vector. This results in normal mapping that is only visible with (real) dynamic lights like saber and muzzleflashes. You have multiple options.First one: Tell the shader before compilation that there is a normal map and bake the occlusion information in the lightmaps. Pro: Easy to work out, you find a tutorial in the tutorials section about it. Con: You actually loose the advantage of very crisp normal mapping for static lights, because lightmaps have a low resolution. (you could krank it up in GTKRadiant, but you will loose lots of performance overall)Second one: Use fxRunners. There was a map Scizo made for rend2 and he added dynamic ligths via fxRunners. I have no idea how this works, I guess you can find the map 2 or 3 pages prior this one. He included his map file (also all his shaders, textures and so on, so this is worth a look for you). Third one: Use parallax mapping. Example also in the map made by Scizo.Last one (not a real one I guess): Fix deluxe mapping in the rend2 branch and simply compile your map with -deluxe in the lighting stage. (this technique is not perfect, but it should suffice for most cases) GL2 can use deluxemapping, ioq3 too. Hope this helps. Thank you SomaZ. I tried fxRunners, I like it.But fxRunners shine through objects and do not give shadows. So I need to bake bump in the lightmap. I tried to do this, but unfortunately I did not succeed. Tell me what I do wrong. assets1.pk3\shaders\Deleterock.shader Shader: textures/Deleterock/Deleterockd{ q3map_normalimage textures/Deleterock/Deleterocknormal.tga qer_editorimage textures/Deleterock/Deleterockd q3map_lightmapsamplesize 1x1{ map $lightmap rgbGen identity}{ map textures/Deleterock/Deleterockd blendFunc GL_DST_COLOR GL_ZERO}} assets1.pk3\textures\Deleterock Deleterockd.jpg...Deleterocknormal.tga... In Gtkradiant:worldspawn:_lightmapscale 0.2classname worldspawn After compilation, I go into the game and I do not see any changes. Please tell me what I do wrongr_lightmap 1 ------UPD. I solved the problem. (Shaderlist.txt) SomaZ, dg1995, Smoo and 1 other like this
Bad Dancer Posted February 16, 2018 Posted February 16, 2018 Hello.I can not figure out Cubemap.I am very interested in the environment reflections for water, metal surfaces, smooth dielectric surfaces ... How to get reflection?Please tell me how to correctly place and configure Cubemap? .. (What programs are needed for this, besides Gtkradiant?)Should I do "Cubemap shot"? If so, how to do it?Are there any other ways to get eNvironment reflections? Cubemapped skybox shader, cubemapped water shader? ..Please create a small test map (1 floor, 1 wall, Skybox and cubemap), so I can check if the cubemap works in the game. (If you already have a map created with Cubemap, please provide a download link.)
SomaZ Posted February 18, 2018 Posted February 18, 2018 Ok here is a short form tutorial.Mapping and compiling Ok, first of all, mapping and compiling is nearly untouched by the new rendering engines. There are only a very few things you might want to consider. If you want to have crisp shadows coming from the sun, remove the sun in your sky in the shader files (maybe just comment them out) and compile the map without the sun. You have to add a new shader for the sun, but I'll explain it in the material shader part.Second thing you want to do is placing cubemaps. You need to place new entities that are named "misc_cubemap" and give them a field "radius". This radius is not drawn in GTK radiant so you need to look at the rulers.It should look something like this after placing them (without the radiuses):There is nothing special to say about compiling. Compile as usualEdit: Ups, forgot one could add -deluxe for the light stage of compiling. This is partially implemented in GL2 materials and shaders To support the old renderer, the shader files don't need to be changed, but you need to write some new shader files. To start with you can simply copy your shader file and rename the extension to ".mtr" instead of ".shader".example of a shader for brushes: textures/test/test_wall_d { { map textures/test/test_wall_d } { stage normalmap map textures/test/test_wall_n } { stage specularmap map textures/test/test_wall_s } { map $lightmap blendfunc GL_DST_COLOR GL_ZERO } } example of a shader for models an playermodels: models/weapons2/clonedummy/helmet { cull disable { map models/weapons2/clonedummy/helmet rgbGen lightingDiffuse } { stage normalmap map models/weapons2/clonedummy/Helmet_normal } { stage specularmap map models/weapons2/clonedummy/helmet_Specular } } example for a sky shader textures/skies/rend2 { surfaceparm sky surfaceparm noimpact surfaceparm nomarks surfaceparm nolightmap notc //q3gl2_sun <red> <green> <blue> <intensity> <degrees> <elevation> <shadowScale> q3gl2_sun 240 238 200 500 195 35 0.5 0.2 //q3gl2_tonemap <toneMapMin> <toneMapAvg> <toneMapMax> <autoExposureMin> <autoExposureMax> skyParms textures/skies/desert 512 - } Can't think of anything else right now. For more information, go to: https://github.com/ioquake/ioq3/blob/master/opengl2-readme.md Bad Dancer likes this
Bad Dancer Posted February 20, 2018 Posted February 20, 2018 Ok here is a short form tutorial.Mapping and compiling Ok, first of all, mapping and compiling is nearly untouched by the new rendering engines. There are only a very few things you might want to consider. If you want to have crisp shadows coming from the sun, remove the sun in your sky in the shader files (maybe just comment them out) and compile the map without the sun. You have to add a new shader for the sun, but I'll explain it in the material shader part.Second thing you want to do is placing cubemaps. You need to place new entities that are named "misc_cubemap" and give them a field "radius". This radius is not drawn in GTK radiant so you need to look at the rulers.It should look something like this after placing them (without the radiuses):There is nothing special to say about compiling. Compile as usualEdit: Ups, forgot one could add -deluxe for the light stage of compiling. This is partially implemented in GL2 materials and shaders To support the old renderer, the shader files don't need to be changed, but you need to write some new shader files. To start with you can simply copy your shader file and rename the extension to ".mtr" instead of ".shader".example of a shader for brushes: textures/test/test_wall_d { { map textures/test/test_wall_d } { stage normalmap map textures/test/test_wall_n } { stage specularmap map textures/test/test_wall_s } { map $lightmap blendfunc GL_DST_COLOR GL_ZERO } } example of a shader for models an playermodels: models/weapons2/clonedummy/helmet { cull disable { map models/weapons2/clonedummy/helmet rgbGen lightingDiffuse } { stage normalmap map models/weapons2/clonedummy/Helmet_normal } { stage specularmap map models/weapons2/clonedummy/helmet_Specular } } example for a sky shader textures/skies/rend2 { surfaceparm sky surfaceparm noimpact surfaceparm nomarks surfaceparm nolightmap notc //q3gl2_sun <red> <green> <blue> <intensity> <degrees> <elevation> <shadowScale> q3gl2_sun 240 238 200 500 195 35 0.5 0.2 //q3gl2_tonemap <toneMapMin> <toneMapAvg> <toneMapMax> <autoExposureMin> <autoExposureMax> skyParms textures/skies/desert 512 - } Can't think of anything else right now. For more information, go to: https://github.com/ioquake/ioq3/blob/master/opengl2-readme.md Thank you, SomaZ. (1) - I did not find misc_cubemap.(2) - I created a light entity.(3) - After that I clicked "N". Сlassname light changed to classname misc_cubemap. (In the upper right corner is my sketch, I closed the blank space in the image.) (4) - I removed the sun from the sky shader.(5) - Q3map2build settings. (6) - Compiling.(7) - After completing the compilation, the sun has reappeared. (8) - Devmap a1.(9) - Cl_render rd-rend2; vid_restart. The sunny side of the wall. (No environment reflections. Only fx runners and sun.)(10) - The shadow side of the wall. (No environment reflections. Only fx runners and sun.) (11) - I did everything the same, from 1 to 10, only with other textures. (No environment reflections. Only fx runners and sun.) (12) - The shadow side of the wall. (No environment reflections. Only fx runners and sun.) r_normalmapping 1r_specularmapping 1r_deluxemapping 1r_sunlightmode 2r_hdr 0r_gennormalmaps 1r_basenormalx 2.0r_basenormaly 2.0r_ssao 0r_dlightmode 1 Smoo and dg1995 like this
SomaZ Posted February 20, 2018 Posted February 20, 2018 R_cubemapping 1? I guess thats the needed cvar. Edit: why have you disabled r_hdr?
Bad Dancer Posted February 20, 2018 Posted February 20, 2018 R_cubemapping 1? I guess thats the needed cvar. Edit: why have you disabled r_hdr?I forgot to write. That's right, r_cubemapping 1. Regarding r_hdr ... When r_hdr 1, r_cubemapping 1, here's what happens:ERROR: GL_State: invalid src blend state bits********************RE_Shutdown (0)recursive error after: GL_State: invalid src blend state bits Can you suggest something to me? P.S. (1)-(7) Did I do everything right? Were there any mistakes? P.P.S. I have one more question. R_sunlightmode 1. There is a shadow, but there is no reflection of the sun in the metal.R_sunlightmode 2 - The reflection of the sun. Smoo likes this
SomaZ Posted February 20, 2018 Posted February 20, 2018 hm, thats crazy. could you pls try setting r_ignoreDstAlpha 0 and try again using hdr rendering? Could you also pm me your map? best with shaders and textures. It's easier to find mapping issues this way, though it looks like you did fine on first glance. Sry to be so short on explanations, haven't been home some days and I'm writing all of this with my phone. Bad Dancer likes this
Bad Dancer Posted February 21, 2018 Posted February 21, 2018 Your advice (r_ignoreDstAlpha 0) helped me get rid of another problem (in the game menu).Sorry, I provided you with incorrect information.I was wrong. When r_hdr 1, r_cubemapping 1, here's what happens:12Regarding r_ignoreDstAlpha 0 ...When I opened the game with rend2, the game showed me an ERROR.--------------------------ERROR: GL_State: invalid src blend state bits********************RE_Shutdown (0)recursive error after: GL_State: invalid src blend state bits--------------------------I had to run the game with cl_renderer rd-vanilla, after that I wrote devmap "mapname", and only then I entered cl_renderer rd-rend2 ... Before each output in the game menu, I had to change the renderer on (rd-vanilla). When I entered r_ignoreDstAlpha 0, crashes stopped. Thank you.What does r_ignoreDstAlpha affect?
SomaZ Posted February 21, 2018 Posted February 21, 2018 There are blends that can use the alpha value of the underlaying objects. Problem was that some graphic cards or the driver, not Sure about this, had problems with those blend states. Therefore this cvar exists. It simply replaces this blend Mode with another one to prevent problems with some cards. There was an error in this code though. I fixed it in newer versions of rend2. You should update your rend2 to the current build. Maybe this also fixes your error with cubemapping, havent had the time yet to check your map. Edit: Well it works fine on my machine with latest rend2 build. Can you send me your complete config? Smoo, dg1995, Bad Dancer and 1 other like this
Bad Dancer Posted February 22, 2018 Posted February 22, 2018 Thank you.Do you mean computer configuration or game configuration?I sent some additional information to PM.
Monsterovich Posted February 23, 2018 Posted February 23, 2018 Where can I get the latest sources of this awesome stuff?
SomaZ Posted February 25, 2018 Posted February 25, 2018 First post: CodingFor coding, I would recommend you know computer graphics well enough to implement some basic algorithms on their own (e.g. shadow maps, some post-processing effects). If you are able to do this in Direct3D, then learning OpenGL should be reasonably easy. Unfortunately I don't have the time or inclination to teach graphics to every coder that comes my way. If you think you are able to help, you can find the latest rend2 code in my fork of OpenJK:https://github.com/xycaleth/OpenJK/All rend2 work is being done in the rend2 branch.
RecklessJames Posted February 26, 2018 Posted February 26, 2018 A shame that so many up and coming enhancements/mods for JK3 I see like this almost always focus on MP only and treats SP as an after thought... extremely rare that SP is held to the same level (at least from what I've seen) even though SP offers, arguably, more diverse variety and possibilities compared to online and less engine/gameplay restrictions overall (different character/combat animations, just to name one example) except for the fact that its not online..... obviously. I get that its because of MP that this game's community is still even alive today... but still. :/ Well the screenshots were nice to look at I guess, lol!
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