Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by SomaZ

  1. Great work of art. I'd love to have rend2 materials for all your models though. Like normal maps and ORM packed ambient occulsion, roughness and metalness maps. Nevertheless, keep up the good work!
  2. 27 downloads

    *************************** JEDI OUTCAST MODIFICATION *************************** File Name: JK2 Logo with custom normals Authors : SomaZ File Name : logo_replacement.pk3 File Size: ~20 KB Date Released : 20/08/2022 Description: Replaces the md3 model of the JK2 Logo in the main menus with a new version. The model was imported into Blender 2.83, then the vertex normals were altered, uvs were altered, then exported again. Known Bugs: None Comments: Let me know if there are any issues. * How to install * Just extract the .pk3 into the GameData/base in your game directory. * Copyright / Permissions * THIS MODIFICATION IS NOT MADE, DISTRIBUTED, OR SUPPORTED BY ACTIVISION, RAVEN, OR LUCASARTS ENTERTAINMENT COMPANY LLC. ELEMENTS TM & © LUCASARTS ENTERTAINMENT COMPANY LLC AND/OR ITS LICENSORS.
  3. That's because the game won't load resources it has already "seen". So things you consider to be "loaded last" are actually loaded first and everything with the same name will be ignored afterwards.
  4. In the singleplayer there's a hardcoded cull distance of 8192 units for dynamic models. Here is the corresponding line, if someone wants to have a go at fixing this. https://github.com/JACoders/OpenJK/blob/master/code/cgame/cg_main.cpp#L2040 For others hitting this limit as well: Making this a misc_model prevents the culling, but makes the model stationary. So this can be an alternative. In some cases you also need to remap the shaders of the model with alternaive versions. Models made to be misc_model_statics usually use the lightgrid to get all the lighting information. Misc_models can't access the lightgrid. The easiest way of fixing this is duplicating the shader (if theres one) and swap all "rgbGen lightingDiffuse" with "rgbGen vertex". Remap the original shaders with the new duplicated ones. For every shader add the key “remap0X” “original_shader_name;duplicate_shader_name”. Replace X with 1 or higher for the following shaders like: “remap01” “original_shader_name1;duplicate_shader_name1” “remap02” “original_shader_name2;duplicate_shader_name2”
  5. Hello all, here is a list of all the new shader stage keywords and what they are for. // a single value representing the specular level // non metallic surface values range between 0.04 and 0.08 // which translates to 4% to 8% reflectance // metallic surfaces have higher reflectance // this value is in linear space in range [0.0, 1.0] specularReflectance <value> // sets the stages gloss value in range [0.0, 1.0] // 1.0 beeing a perfect mirror and 0.0 beeing a very very dull rock gloss <value> // the same as gloss, but reversed, pick what you like better // roughness = 1.0 - gloss // value is also in range [0.0, 1.0] roughness <value> // controlls the depth of the parallax correction when a // normalHeightMap is supplied to the stage // value is also in range [0.0, 1.0] parallaxDepth <value> // shifts your parallax correction out of the surface // helps with floor materials creating gaps between floor and walls // value is in range [0.0, 1.0] // can be forced on all surfaces for testing purposes // with r_forceParallaxBias when cheats are enabled parallaxBias <value> // scales the values of the supplied normalMap // can flip normalmaps green channel so you can use opengl format normal maps too // eg. normalScale 1.0 -1.0 // height value overwrites parallaxDepth when normalScale is written after parallaxDepth normalScale <xy> or normalScale <x> <y> or normalScale <x> <y> <height> // r, g and b values are specularReflectance of the surface // gloss is gloss obviously // overwrites specularReflectance, gloss or roughness if written after those keywords specularScale <rgb> <gloss> or specularScale <r> <g> <b> or specularScale <r> <g> <b> <gloss> // sets a stages normal map or a normal map with a height map in the alpha channel // for parallax mapping normalMap <name> or normalHeightMap <name> // sets a stages specular gloss map // must have a gloss map in the alpha channel, else the material will always be mirror like specMap <name> or specularMap <name> // RMO packed material map (must have same image dimensions as the map provided) // <red channel> roughness map // <green channel> metalness map // <blue channel> occlusion map // <alpha channel> specular scale map (only when using rmosMap) rmoMap <name> or rmosMap <name> // ORM packed material map (must have same image dimensions as the map provided) // <red channel> occlusion map // <green channel> roughness map // <blue channel> metalness map // <alpha channel> specular scale map (only when using ormsMap) ormMap <name> or ormsMap <name> // MOXR packed material map (must have same image dimensions as the map provided) // <red channel> metalness map // <green channel> occlusion map // <blue channel> specular scale map (only when using mosrMap) // <alpha channel> roughness map moxrMap <name> or mosrMap <name> // change the stages BRDF to look more like fabrics // just need to provide the keyword like glow or detail cloth Here is a simple example of a gold shader that doesn't use any texture: textures/rend2/Gold { { map $lightmap } { map $whiteimage specMap $whiteimage rgbGen const ( 0.0 0.0 0.0 ) specularScale 0.8 0.466807 0.254887 roughness 0.5 blendfunc GL_DST_COLOR GL_ZERO } }
  6. I guess you have exactly 1 deformVertexes in the shader. Theres another stupid in rend2 which originates from the ioq3 renderer where shaders with 1 deformVertexes aren't able to use the shader system to its full extend. Maybe add a deformVertexes normal next to the other one for now. For my taste, the darkening could be even stronger than it is now, but its already a nice improvement.
  7. Yea, my bad. alphaGen const 0.08 should be standing there. Just typed everything from memory because I wasn't at my computer. I post a list of shader commands tomorrow in the rend2 tutorial section. Might even take the time to make comparison screenshots with different values for every new shader keyword. Hm, no idea what would cause parallax to break. Did you add a rmo map with different image dimensions than the main image of a stage? The console might tell you more. Theres nothing else I can think of right now. If thats not the case, could you send me your current project so I can test it myself? Might take some time to figure out via text exchange only
  8. The dummy stage actually forces the renderer to think its a solid material. Currently only solid materials can use the new lighting system (even if they actually arent solid). I will remove this restriction when I have some time because its stupid. As I said, pbr materials try to decouple lighting from the material itself. Reflections are a component of lighting. So the roughness of the material defines how much reflection you will get. Not the most physical correct explaination. Reflection is always there. The roughness actually tells how much the reflection will scatter. The stronger the scattering, the less noticiable is the reflection itself. There is no dedicated reflection stage for cubemaps. Else you could not use the material in other places without defining a new shader with a different cubemap assigned. EDIT: For a water shader you probably dont need a rmo. Theres no real occlusion happening, and you dont have metallic components. You can just skip that map completely. You can just define the roughness per stage with the keyword "roughness 0.5" for something that is more rough, "roughness 0.1" should be fine for water like surfaces. Since you scale down the reflection with your blend, you can counter it with "specularreflectance 0.0-1.0". If you have a uniform transparency of 0.08, your specularreflectance should be around 1.0, the less transparent, the less the reflectance. Like uniform transparency of 0.16: specularreflectance should be 0.5 and so on. At least thats how I handled glass. Water might be more reflective overall. Assuming you use a texture without alpha channel, your shader could look similar to this textures/rend2/water { qer_trans 0.5 { map $whiteimage alphaGen const 0.0 alphaFunc GE128 } { map textures/rend2/water normalMap textures/rend2/water_n specularreflectance 1.0 roughness 0.1 alphaGen 0.08 blendFunc GL_ONE_MINUS_SRC_ALPHA GL_SRC_ALPHA } { map $lightmap blendFunc GL_DST_COLOR GL_ZERO } }
  9. Some little hints on exporting textures from substance painter to rend2 / gl2: Export preset for the roughness metallic workflow looks like this: Export preset for the gloss specular workflow looks like this: Example pictures:
  10. Hm, I'm totally invested in the Substance 3D suite. I have very little experience with free tools regarding pbr tbh. I know about ArmorPaint and ArmorLab which looks actually pretty good on first glance https://armory3d.org/ Theres also alot of free CC0 licensed materials here http://www.3dassets.one/#license=cc-0&type=pbr-material&order=latest Quixel Mixer is kind of free. Adding free materials is annoying though, but its a really nice software overall https://quixel.com/mixer Blender is also potentially viable if you are familar with that. Though the workflow consists of baking your maps manually, which can get annoying. Cubemapping needs to be enabled via cvar: r_cubemapping 1;vid_restart It will use deathmatch spawn points to create them on level load, or you place new entities with "classname" "misc_cubemap", "radius" "#your_parallax_correction_radius", "origin" "#origin_obviously". Parallax radius is not very intuitive tbh, I'd start with something big like 1000 and reduce or increase when reflections behave strangely. Surfaces use the closest available cubemap around them. Theres another way of defining cubemaps via a json file, but this feature is like 100% undocumented. I added an export to my blender addon for the file, but also not public yet and undocumented. The darkening would be a seperate material stage, so yea. Bascially like in vanilla. Theres no specialized way of doing it in rend2 (yet). You might be able to blend those based on vertex alpha, but havent put much thought into it. EDIT: Havent tested any transparent surface with cubemaps for a long time. You might need to add a "solid" dummy stage first that actually draws nothing. textures/rend2/transparent_cubemapped { { map $whiteimage alphaGen const 0.0 alphaFunc GE128 } // your transparent layers after that }
  11. Yea, I'm sorry for the lack of resources regarding rend2. I started writing a tutorial series, but its far from beeing finished. The main idea of the new material system of rend2 is the usage of a pbr material pipeline. It decouples lighting information from material information. Means, theres no diffuse texture anymore, but a simple material color (also called albedo or basecolor) and some maps defining material properties. Like normal maps. The RMO texture (or ORM or MOXR) is a packed texture. It actually consists of 3 different gray scale textures defining different material properties. R stands for roughness, M for metalness, O for occlusion (ambient occlusion or cavity occlusion), X is a spare channel that is not used. So RMO textures pack roughness in the red channel, metalness in the green channel and occlusion into the blue channel of the texture. Here is an example image made by @AshuraDX I started remaking the bespin duel map with rend2 in mind last year, but found rend2 to be too unfinished to release anything yet. Had to change normal map handling and some other things that are mostly finished now. So expect a sample map with some nice rend2 tricks soon. Also working on a blender addon to bake proper lighting for rend2, which also took alot of time. Hope to release this beast with proper documentation this year. More on that also soon. Hope this helps at least a bit with your current project. Really like the aesthetic so far. I'd probably add some darkening for the wet sand near the water line to make it look even better. If you have further questions, I'm happy to answer them. EDIT: Whoops, totally forgot about the liquid shader. The liquid shader is only implemented in gl2 which is the df2 mod fork of rend2 for sp. There are no plans in porting this over to rend2 as the code is quite messy. But never say never
  12. Vertex normals seem to be ignored by your blender version / addon combination. What versions are you using?
  13. Hm, it's hard to tell what causes the issue without access to the map nor the compile settings you used. My guess is that you are using external lightmaps? Using GLdirect is always a bad idea tbh. We have the source code. If you encounter problems regarding rendering (without GLdirect), open an issue on the OpenJK Github page, so it can be fixed properly.
  14. Oh, in this case you should at least add a fixed gloss/roughness value to your stages with specular images. Those textures weren't authored for a pbr material pipeline. Try this for an example: textures/strombine/paint01 { qer_editorimage textures/strombine/paint01_d { map textures/strombine/paint01_d.tga normalmap textures/strombine/paint01_h.tga specularmap textures/strombine/paint01_s.tga gloss 0.3 } { map $lightmap blendfunc gl_dst_color gl_zero } } Should work just like in vanilla. Are you talking about glow stages or light emitting shaders?
  15. Try removing the rgbGen vertexLit from your first stage. On a side note: Looks like you are using standard specular maps. Rend2 uses the alpha channel of the specular map for glossiness of the surface. If you don't provide a proper gloss map in the alpha channel, all surfaces are super reflective. The specular workflow is prone to create bad materials. I'd recommend switching to the metal roughness workflow instead
  16. Must be an error in the engine. I probably fixed it already in my latest WIP version. Never really encountered this issue before.
  17. Currently there's no easy way of finding the location of a shader. The surface you showed in the screenshot probably doesn't even use a shader, but just the texture. If that's the case, you can make use of the auto loading of material textures. Rend2 will automatically find normal maps for files with the suffix of "_n", normalHeight maps with "_nh", packed maps with "_rmo" and specular gloss maps with "_specgloss". Means, if your material uses "textures/example/test.jpg" as a diffuse texture, rend2 will try to load "textures/example/test_n" as the corresponding normal map.
  18. The stage qualifiers are gone for a while now. Using .mtr files require .shader files of the same name to be in place. Your file extension is .mat which is not supported. Corrected shader looks like this textures/korriban/k_ceiling { qer_editorimage textures/korriban/k_ceiling.jpg { map textures/korriban/k_ceiling.jpg normalHeightMap textures/korriban/k_ceiling_n.tga // normalMap for images without parallax height in the alpha channel // if you use a packed material definition // rmoMap is packed roughness, metalness, ambient occlusion in red, green, blue channels rmoMap textures/korriban/k_ceiling_s0.tga // if you have a specular texture with glossiness in the alpha channel use: // specMap textures/korriban/k_ceiling_s0.tga } { map $lightmap blendfunc GL_DST_COLOR GL_ZERO } } More info on the rend2 shaders can be found here. The liquid shader is not implemented in rend2 though.
  19. Hey! Currently refactoring the whole addon to be easier to maintain and also adding some new features like pk3 support. Target version of the new version will be Blender 3.0, though I'd like to keep it 2.93 compatible. You can get the latest working wip verision (Blender 2.83 - 2.93) on our discord. Link is in the first post. Direct download link (Blender 2.83-2.93): Latest release with current code from Github
  20. Yea, I remember. Was part of the dev team before it died. All I can say is that everybody from the team was disappointed how it went. We really wanted to release at least something, but because of legal problems we weren't able to.
  21. Some WIP on my rend2 bespin duel remake. Materials are mostly finished. The untouched parts will be replaced with models (and new materials ofc)


  22. I'm sorry, but 2.81 simply won't be supported anymore. It had some bads in the material system and they finally fixed them in 2.83. It would be a huge task to support older versions, or more precise it would clutter the code so its not very readable anymore. And that's not very nice to work with. 2.83 is in fact the most ideal version of blender right now as its the long term support version of 2.8. When 2.93 arrives, this will be the new ideal version to work with.
  23. Found the problem and fixed it. I uploaded the updated renderer to our repository. You might want to set r_refraction to 1 to get the push/pull effect back. You can also delete your current config and start with a fresh one. Refraction rendering is on per default now
  24. Looking great! I'll try to reproduce the issue you have and fix it asap. Would you mind sharing your config file with me?
  25. Ah sorry. I missed your message. Hm, hard to tell whats wrong, simply because this version of the addon is very outdated (note to myself: make a new release on GitHub). You can get the latest version when you download the current code from GitHub. You need to repack it into another zip file though. Extract everything, and pack the "import_bsp" folder into another zip file. You can install the new zip file afterwards. You might need to restart blender after you installed it. The only Blender versions working with the latest code are Blender 2.83 to 2.91. If you still run into problems, you can always join the discord server I linked in the first post for quick help. It could be used for mapping to some extend, but its complicated. For beeing able to write bsp files from scratch, I'd need to write some nasty things like collision mesh generation and visibility computation.
  • Create New...