Jump to content

SomaZ

Members
  • Posts

    420
  • Joined

  • Last visited

Everything posted by SomaZ

  1. 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.
  2. 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
  3. 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.
  4. 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!
  5. 126 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.
  6. 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.
  7. 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”
  8. 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 } }
  9. 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.
  10. 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
  11. 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 } }
  12. 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:
  13. 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 }
  14. 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
  15. Vertex normals seem to be ignored by your blender version / addon combination. What versions are you using?
  16. 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.
  17. 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?
  18. 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
  19. Must be an error in the engine. I probably fixed it already in my latest WIP version. Never really encountered this issue before.
  20. 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.
  21. 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.
  22. 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
  23. 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.
  24. Some WIP on my rend2 bespin duel remake. Materials are mostly finished. The untouched parts will be replaced with models (and new materials ofc)

     

  25. 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.
×
×
  • Create New...