Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by SomaZ

  1. Looking very good so far! Be warned that jedi academy lighting can actually just darken your diffuse images though. Just because it is often just mutliplied and lightmaps and diffuse images are in 8bit (per channel) color depth. If you are interested I could show you how to use a blender addon that I've written to properly bake lighting with blender. I could also offer help if you are interested in providing rend2 support with your maps. Blender addon in action: Old version of rend2 in action:
  2. I just released the first verison of rend2 in a very long time. I've been busy with fixing and reworking alot of things. The weather system is fully functional now as also alot of other things. You can grab the latest release here: https://github.com/SomaZ/OpenJK/releases Changelog: - MSAA antialisaing cvar changed to r_ext_multisample which is the same as in the vanilla openjk renderer - Added external hdr lightmap support - Added autoload of images with following suffix "_specGloss", "_rmo" and "_orm" - Realtime sun shadows won't flicker anymore when the player is moving around - Some fixes regarding the HDR rendering pipeline (means rendering in hdr colors, but there's no HDR display support (and never will because OpenGL)) - Thanks to @Almightygirfor contributing a velvet shader (you can use it per shader stage, just add a 'cloth' to it (same as with glow or detail)) and fixes regarding pbr shading - Added a shader stage keyword to "pull out" parallax mapped surfaces ('parallaxBias [0.0 ... 1.0]', you can easily test this with r_forceParallaxBias [0.0 ... 1.0]) - Added mikkTSpace for normal mapping (means baking normal maps in blender or substance will result in the same shading in rend2 now) - Fixed rendering cloud layers - Fixed wrong camera exposure on maps with sky portals - Fixed alot of problems regarding fog - Added flare rendering back - Added most features back to surface sprites (only thing missing afaik is wind handling, swaying is implemented though) - Speed up rendering dynamic lights with parallax occusion mapped surfaces by alot - Added distortion rendering back (invicibility sphere, push/pull sphere) - Added glass shattering back - Added ghoul2 sabermarks back - Added r_showTris 1 back - Fixed a crash regarding md3 model caching - Lots of other small things I think that's all for now. Some WIP pictures of my bespin duel remake with hdr lightmaps
  3. That is not a thing. Q3map2 assignes lightstyles to surfaces, not entities. The entities are just linked by target and targetName keys in the triggers and target entities. So, as long as theres the keys intact, this shouldn't be a problem at all. Sounds more like q3map2 just clears the lightstyles on the corresponding surfaces. @KyleFanwould you mind sending me your patched bsp file in a dm? This would make the debugging process much easier.
  4. Might be a compiler bug or something like that. I'm not entirely sure how triggering lightstlyes works, but it looks like its using the actual light entities. Those are usually removed on compile in newer versions of q3map2. I guess, you did an ents only compile to add your "level change" entity. You might want to try doing this again, but add a "_keeplights" "1" to your worldspawn before. Else, we could try adding the entity via my blender addon to the bsp and see if the problem still exists.
  5. This is a short tutorial on how to import/export md3 models with the (currently) latest version of Blender which is 3.3.1. Installation of the addon: First of all you need to install the "Import id Tech 3 BSP" addon. You can download the lastest release here: https://github.com/SomaZ/Blender_BSP_Importer/releases If you want to utilize the addon to its full potential you need to extract the "models", "shaders", "textures" and "maps" folders from the games pk3 files into one seperate folder. If you only want to use the addon for exporting your models, you won't need to do that. In either case its needed to set the base path of your game install in the addons preferences. If you unpacked the folders I mentioned before, make sure the addon points to the folder where your files were extracted to. So, open Blender, go to 'Edit -> Preferences -> Add-ons' Click the 'Install...' button on the top right and navigate to the zip you downloaded, then click 'Install Add-on' Tick the checkbox next to 'Import-Export: Import id Tech 3 BSP' to enable the addon Open the addons properties with the arrowhead next to the checkbox and set your games basepath This is the default setting when installing the addon. Make sure the basepath is correct for your install. Importing MD3 files: Once you installed the addon, importing md3 files is as easy as opening the import dialog via the import menu entry and selecting a md3 file. If you want to skip importing md3 tags, you can untick the "Import Tags" checkbox on the right side of the import window. On default, the addon will merge all objects in a md3 file into one blender object. You can change that behaviour when you change the preset to "Objects". The addon will look for valid shaders and textures for the imported md3. The addon will also add some control elements to the UI under the Q3 Shaders tab on the right side of the viewport to manipulate the lighting preview. If you want to use the model in a rendering, you can just select your models and hit the "Reload Cycles Shaders" button to get a shader without fixed lighting values. Exporting MD3 files: Just open the export dialog via the menu. You can choose to only export the selected blender objects, or all meshes in the scene. The local space coordinates will export all models as if they are moved to the origin. Setting the start and end frame to different frames will result in exported vertex animations. The surfaces option will change the way the addon will export the model. If you choose the "From Materials" setting, the addon will create obejcts based on the used materials. You can use this with multimaterial blender objects like shown above. If you choose to export "From objects" you need to make sure your blender objects only have a single material. The addon won't split your model automatically then. Material names are based on the blender material name. The custom property which was used in older blender addons is not supported anymore and is completely ignored. Let me know if I forgot to explain something.
  6. I just uploaded a working version of the addon for Blender 3.3. This is a patched up version which still doesnt have pk3 support. https://github.com/SomaZ/Blender_BSP_Importer/releases/tag/v0.9.633 @Tchefuncte Bonaparte If you are used to the old md3 exporter, you can name the materials directly. The md3shader custom property is not used in this addon. You also dont need to split the model anymore, the exporter will take care of it. Triangulation is also taken care of by the exporter. Install guide is found here (but use the version I linked above): https://trello.com/c/aMEbgAXC You all can now also use this tutorial instead
  7. Hi. I wrote a blender addon to import bsp files which also features a md3 importer and exporter. It doesn't support blender 3.3 currently but I'll try patching it up, so you and other people can use it. Will let you know when and where you can get the updated version.
  8. 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!
  9. 78 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.
  10. 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.
  11. 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”
  12. 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 } }
  13. 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.
  14. 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
  15. 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 } }
  16. 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:
  17. 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 }
  18. 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
  19. Vertex normals seem to be ignored by your blender version / addon combination. What versions are you using?
  20. 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.
  21. 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?
  22. 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
  23. Must be an error in the engine. I probably fixed it already in my latest WIP version. Never really encountered this issue before.
  24. 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.
  25. 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.
  • Create New...