Jump to content

SomaZ

Members
  • Posts

    420
  • Joined

  • Last visited

Posts posted by SomaZ

  1. We had a talk about this over on discord. It boils down to:

    GtkRadiant wasn't configured correctly and shader file name was not added to the shaderfiles.txt file in the shaders folder under base.

    NAB622 likes this
  2. I just had a look with my WIP version of my Bsp editor, which will have some additional features. The problem is that bsp surfaces get one fog assigned. If it isn't it simply won't draw. A global fog would take place. It's also not just the door, but also the rotating fan that doesn't have the correct fog assigned. I'll try finishing some parts of my bsp editor and then we can try fixing the problem with that.


    7kxlRdn.jpg

  3. 4 hours ago, Noodle said:

    Was the mapping part done in blender too or did you do it in GTKRadiant and just applied the textures to it? 

    Yea, I used this addon: https://github.com/c-d-a/io_export_qmap

    DMG1xvR.jpeg

    I used blender to blockout everything. Later, once I've added all the models, I build collision brushes for the models in Radiant though. Building brushes in blender is a huge pain tbh. Wouldn't recommend it. Extruded terrain is something different, I would never do this in radiant agian but always with the addon I linked.

    ItlI9s5.jpeg

    PierceDoughty and DarthValeria like this
  4. Just now, Futuza said:

    Anyway you'd consider including the source stuff for this for other modders that want to try and see an example for how to do things with rend2?  I'd like to add rend2 to JKG at some point, but I'm not much of a mapper and not really too sure where I'd have to start with that aspect of it - plus I gotta merge rend2 with JKG's source too.  I'm not really ready to do it quite yet as I'm busy with some other things for the mod that take priority, but I imagine there's other projects like ours that would like more instruction for how to use/implement rend2.

    Yea, I will release some of the sources when I had some time to tidy them up. One essential part for rend2 is just modern asset creation. I can't really teach that. Though there are lots of resources online for it. I planned on doing some tutorials on some things like: "How to properly bake normal maps for rend2","How and where do I place cubemaps and what do they actually do?" or "What are deluxemaps and why should I bother?" 😄

    All the blender lighting/mapping stuff I'm still figuring out myself tbh. Theres some kind of workflow, but I think I could potentially streamline this much more, make it less error prone etc. Main problem about that is that I really dont have much time right now and it will just get less end of october. Trying to teach as much as possible to others and helping where I can.

    Futuza likes this
  5. So this is intended to be some "behind-the-scenes" and/or feedback thread for the released Bespin Duel Reborn mod, which you can grab here:

     

    The idea behind this mod is simple: I need something to show the modern rend2 features. Duel1 is quite small, so lets just remake this. Easy

    Like so often in life, things aren't as easy as they seem at first glance. I imported the original duel1 map into blender and realised that this will take quite some time to actually remake the complete map. This is like redoing 40 materials and rend2 requires Albedo/BaseColor textures, normal maps, roughness maps, metalness maps, ambient occulsion maps and in some cases hight maps. Uff.

    Spoiler

    ZsIe2Se.jpeg

    Image by @AshuraDX ❤️

    Since most of the walls are based on the same materials, I created one material from scratch. This material I repurposed as a master material in substance designer. All other wall materials are based on this master material.

    Spoiler

    eAy3P5Y.jpeg

    First material made in Substance Designer

    QdJIfoe.png

    Reusable material graph derived from the first material

    1lzqtA8.png

    Another material using the resusable one

    8eCPsjp.png

    Another material using the resusable one

    Here are some images when I was testing the first iterations of the textures in-game

    Spoiler

    x2KBEkA.jpeg

    esGhUDt.jpeg

    KMPSdIv.jpeg

    6V0BSq3.jpeg

    kWFEQx8.jpeg

    After finishing all the materials I wanted to replace completely, I started modeling all the missing parts of the map.

    Spoiler

    Left model is the highpoly model, right model is the lowpoly version with baked normal map

    image.png

    image.png

    image.png

    image.pngimage.pngimage.png

    image.png

    image.png

    After that I started building the new map.

    Spoiler

    aSpxFRY.jpeg

    dDt7rmE.jpeg

    HkdXs6T.jpeg

    After I added all the materials and models to the map, I started working on the lighting in blender. The first iteration of a lighted map looked like this

    Spoiler

    dHEdF2S.jpeg

    uyFwvi5.jpeg

    I worked on a proper sky for a night time version of the map, but was never really satisfied, so I started working on a day time version instead

    Spoiler

    r7jHlvt.png

    inY3NNS.png

    Last few edits for the materials and some adjustments to the lighting

    Spoiler

    TVv1W80.png

    Kqr6oeJ.png

    If you are interested in more details of some of the workflows or if you want to know more about a specific model or material, feel free to ask.

    Futuza, OCD2, DarthValeria and 1 other like this
  6. In your latest example the line must be

    surfOn		"torso_galaktorso_off torso_collar_off torso_galakface_off torso_eyes_mouth_off torso_galakhead_off"

    Single arguments dont need quotation marks, multiple arguments must use them like above demonstrated.

     

    But this still won't work in JA because you need to use the .skin file instead. Or maybe both is required?

  7. 56 minutes ago, RobiWanKen0bi said:

    Tried it, doesn't work. Tried it with and without "" but no luck so far. It says in the console: WARNING: UNKNOWN KEYWORD "TORSO_COLLAR_OFF" WHILE PARSING "GALAK_MECH"

    I even tried mixing everything. The helmet turns off but not the rest. Tried throwing out the collar, but the message is still the same with the others.

    Galak_Mech
    {
    	playerModel	galak_mech
    //	customSkin	gal
    	surfOn		"torso_eyes_mouth_off" "torso_galakhead_off"
    	surfOff		"helmet" "torso_galakface_off"
    	weapon		WP_REPEATER
    	health		1000
    ......... etc.

     

     

    Have you tried this?

    surfOn		"torso_eyes_mouth_off torso_galakhead_off"
    surfOff		"helmet torso_galakface_off"

     

  8. On 5/13/2023 at 11:28 PM, EvasionStudios said:

    So as the disclaimer has said in the posts, most of these photos were created in Blender.  However, we have every confidence that with the proper shader files, and some other modifications - that JA will be able to handle all of these effects without hindering performance. 

    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:

    Spoiler

     

    Old version of rend2 in action:
     

    Spoiler

     

    GeoBall and EvasionStudios like this
  9. 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

    Spoiler

    jYO3jAi.png

    b64HJ8l.png

    1Qrwf1B.png

  10. 1 hour ago, NAB622 said:

    Wait.....For some reason I was thinking you used misc_bsp. If all you did was add a target_level_change, where did you add it on the entity list? I think depending on where you put it, it might change which entity is linked to the lightmap, and that would definitely break all switched lights.

    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.

     

    NAB622 likes this
  11. 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.

  12. 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.

    1. So, open Blender, go to 'Edit -> Preferences -> Add-ons'
    2. Click the 'Install...' button on the top right and navigate to the zip you downloaded, then click 'Install Add-on'
    3. Tick the checkbox next to 'Import-Export: Import id Tech 3 BSP' to enable the addon
    4. Open the addons properties with the arrowhead next to the checkbox and set your games basepath

    Tb3WVgr.png
    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.

    tob3kOz.png

    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".

     

    SZJK6ET.png

    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:

    szjT7gu.png

    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.

  13. 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

     

  14. 10 hours ago, Tchefuncte Bonaparte said:

    If anyone is using Blender 3.3 can you point me to an addon that will support md3 files? All the addons I can find are for older versions and don’t work

    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.

    NumberWan likes this
  15. 2 hours ago, triplex said:

    If pk3s have been loaded in reverse order since the start, why do we bother adding Zzzz etc to the front of files we want to load last?

    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.

  16. 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”

    Lazarus and AshuraDX like this
  17. 1 hour ago, Szico VII said:

    Well still messing with cubemaps - got them to work on a glass window but not on the water, also as suggested have made the water line sand darker, thoughts?

    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.

  18. 1 hour ago, Szico VII said:

    See, i didnt even know these commands existed: (and incidentally, the line "

    alphaGen 0.08 

    is not recognised by the renderer (ingame error)

    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  🙂

  19. 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
    	}
    }

     

  20. 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
    }


     

  21. 3 hours ago, Szico VII said:

    @SomaZ @Circa

    I haven't found any good resources really. Just that one post that mjt already highlighted.

    And there's no explanation of what each type of texture is, or does. Some example files for each type of shader pass/material pass would be extremely useful.

    e.g the terms, albedo map, RMO mean nothing to me, and even google doesnt tell me what RMO stands for

    It also mentions liquid shaders but that doesnt seem to work at all in my mtr so in need of refreshing

    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
    Texture_Composition.png

     

    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

  22. 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.

×
×
  • Create New...