Jump to content
The Dark Mod Forums

Leaderboard

Popular Content

Showing content with the highest reputation on 01/11/23 in all areas

  1. This exact behaviour can be created using a blendLight using the blend filter blend mode. The light becomes a volume which simply multiplies (darkens) its projected texture with the texture of contained objects, almost like a 3D volumetric decal.
    2 points
  2. Kingsal has graciously converted the highly map-specific animated grass from Arcturus' gorgeous "moonlit castle by a lake with grass plains blowing in the wind" demo map into something that can easily be used by mappers, now also featuring different varieties of grass, different sizes, 2 different wind speeds and LOD stages: I'd like to run a small beta of this asset here for mappers to try it out in their FMs, so feedback on it (i.e. animation, performance impact, looks) before it gets added to core assets would be very appreciated. I won't go too much into the details because the entity & spawnarg tooltips are part of the testing. You can grab the asset here and just drop the .pk4 in the folder of your FM, no need to unpack it. Look for the animated entities in the entity menu. Once the assets are in core you can just delete the .pk4.
    1 point
  3. I recently saw discussion about PBR materials being added to Doom3BFG with folks also talking about it on Discord. One of the things I always wanted from PBR is proper reflections, especially in a way that works on all FM's new and old without requiring changes (eg: new light entities). Lack of proper reflections is one of the biggest limitations we still have, leaving us with mere boring specular reflections lacking any detail. While currently we can't have things like metallicity or per-pixel roughness, not even the ability to use the skybox or player camera feed as a reflection map, we do have a generic cubemap used only on windows and a few special textures. So the thought itched me: What if we could make every material with a specular map also blend a cubemap reflection? I've done Linux batch scripts for complex tasks before, so after lots of searching (and dealing with DOS era line terminations getting in the way) I managed to create a bash script that will do just that! This 50 line script will detect all materials with a specular map, inject a customized cubemap reflection, then repack everything. It scans every material in TDM thus it changes all map textures models and entities alike, everything gets modified to benefit from this. Modifications are NOT made to the official pk4 files, instead a single pk4 named Z-tdm_materials_cubemap.pk4 is generated to override the old defs, you can revert at any time simply by removing this one file. The cubemaps are subtly blended in without using extra vertex / fragment shaders which should have minimal performance impact, they also respect the bump map of the material and are deformed by it... each cubemap is masked by the specular map which gives it a close feel to PBR, materials without a specularity texture are considered rough and remain unchanged. Simply download the script and use it in your TDM folder, you'll need either Linux or a bash environment on Windows (untested): material_cubemaps.sh #!/bin/bash # Add cubemap reflections to all TheDarkMod materials containing specular maps # Use sub(/\r$/,"") to fix DOS line termination, https://stackoverflow.com/questions/45772525/why-does-my-tool-output-overwrite-itself-and-how-do-i-fix-it # Unpack all materials mkdir "temp" for f in *.pk4; do unzip -o $f "materials/*" -d "temp" done mv "temp/materials" "temp/mtr" mkdir "temp/materials" cd "temp/mtr" # Inject cubemap code into all materials with specular maps, the reflection is masked by specular intensity # First ensure the file contains at least one definition that need to be modified to avoid needless repacking for f in *.mtr; do awk '{ sub(/\r$/,"") if($1 == "specularmap" && $2 != "_black" && $2 != "") exit !f }' "$f" if [ $? == 1 ]; then awk '{ sub(/\r$/,"") print $0 if($1 == "specularmap" && $2 != "_black" && $2 != "") { print "" print " // Cubemap reflection for specularity" print " {" print " maskcolor" print " map makealpha(" $2 ")" print " }" print " {" print " blend gl_dst_alpha, gl_one" print " maskalpha" print " cubeMap env/gen3" print " texgen reflect" print " }" } }' "$f" > "../materials/$f" fi done # Pack modified materials cd ".." zip -r "../Z-tdm_materials_cubemap.pk4" "materials" rm -r "../temp" At the moment I haven't done a full comparison and only tried it out on a map I'm working on: It's possible I might do my next TDM stream with this on which will allow others to see it better. From what I'm noticing it's pretty much perfect: Very subtle and doesn't disrupt visually, it does improve realism in a lot of cases as you move around and see the shine... given the texture is almost always masked and distorted by bump you don't feel the reflection is ugly and fake but it feels natural. Currently this is here as a mod for players that wish to use it... not gonna lie part of me is tempted to suggest it be considered for 2.11, it's definitely an improvement to having no reflections at all until a better method is found. Please try it out and share your own thoughts and images, below are a few screenshots I took during my first test to confirm it works as expected.
    1 point
  4. It's alright, and that is normal: You won't see a huge difference on everything, just a few surfaces typically smooth metal and stone. The goal of the experiment was to see how close I could get to realistic reflections that would match what you get from a PBR engine... obviously this has nothing to do with PBR itself, just a comparison to its feel. Like in real life only some surfaces will produce reflections: You won't see sharp reflection on your walls for instance, but will see a light one on your door knob. The trick in my approach is only those materials with a specular map are given a cubemap reflection, the reflection is masked by the specular map and works as a supplement to it; This ensures every material is only as shiny as intended by the texture pack, which makes the effect barely noticeable on surfaces with low specularity. Making everything shiny could have looked prettier in the moment but would be fake and unrealistic. Also worth noting: There are three default /env/gen# cubemaps. gen1 is very low intensity (almost unnoticeable), gen2 is the strongest (makes everything bright), gen3 is somewhere in the middle (looks best so I used it). You can change the script to gen2 but apart from making the universal cubemap too obvious it might make everything too bright by default. I prefer Python myself, Bash is weird and uses strange syntax. It's what Linux has by default so I got used to thinking it's best for stuff like editing files, especially as I also need to zip / unzip archives. Something like this is easy to do though, if there was real need it could be easily redone in Python or Lua or NodeJS. That would be ideal and what I wanted, either something like this with light probes or actual SSR (screen space reflections). Unfortunately it's not currently possible with existing capabilities: I spent the first day trying to trick the material into using the _currentRender or _scratch pass to fake reflections, obviously it won't work. My approach is admittedly meant to be a crutch till we have that, for those of us who prefer seeing some kind of shine rather than just the boring specular reflections... both approaches are ugly and unrealistic but at the moment it's a pick between which is the least ugly.
    1 point
  5. This is old I know, but for capturing world location, getviewpos has that info already, so modifying the cubemap capture to also grab this info shouldn't be too hard.
    1 point
  6. You used bash for this? Why not a proper cross-platform language with decent text processing support that others might be able to understand and maintain, like Python?
    1 point
  7. No, I dont have time to fix them at the moment, and I think a lot of FMs that use custom briefing GUIs are affected by numerous new warnings, too.
    1 point
  8. https://bugs.thedarkmod.com/view.php?id=6227 Cannot reproduce on rev 9985... moving forward Rev 10036 is good... moving forward Rev 10071 is good Rev 10071 with matching 16599 dev assets = good ( no crash ) ( maybe try to run the latest SVN with 16599 assets plus the blackjack patch assets ? ) Rev 10071 with 10107 assets = crash Rev 10072 = crash ( all testing was done with 10107 assets, if 10071 crashes the next step might be to revert assets too... that said, if 10107 asset changes are responsible TDM still shouldn't crash ) Rev 10073 = crash ( may need to retest 10071 ) Rev 10078 = crash Rev 10092 = crash Rev 10093 = crash Rev 10095 = crash Rev 10107 = crash Nothing in Rev 10093 should cause a crash like this. New backtrace seems similar to the old one but uses different hash lookup ? Thread 11 "thedarkmod.x64" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffaf6bf700 (LWP 3026)] idDict::FindKey (this=0x80, key=key@entry=0x12e8bfb "pre_pickup_origin") at /home/user/tdm_src/new/piggie/darkmod_src/idlib/Dict.cpp:462 462 for ( int i = argHash.First( hash ); i != -1; i = argHash.Next( i ) ) { (gdb) bt #0 idDict::FindKey (this=0x80, key=key@entry=0x12e8bfb "pre_pickup_origin") at /home/user/tdm_src/new/piggie/darkmod_src/idlib/Dict.cpp:462 #1 0x000000000074f67a in idDict::GetString (out=<synthetic pointer>, defaultString=0x12995cc "0 0 0", key=0x12e8bfb "pre_pickup_origin", this=<optimized out>) Going back to 10092 to see if I missed the crash somehow. Yep, same crash there. Rolling back to an earlier one... Ran outta time. I will continue tomorrow ( unless someone else wants to build from source and bisect between 10071 and 10078 )
    1 point
  9. It's an uptick in the number of FMs released one way or the other anyway. Great to see! I hope we can continue the momentum this year too.
    1 point
  10. I managed to reproduce it: 6225 Yes, it is very hard to reproduce.
    1 point
  11. DR has a relatively new map merge feature. It should allow multiple people to work on the same map and periodically merge their map versions together. It probably works best if mappers work on separate regions of the map.
    1 point
  12. This awesome to see thanks for putting this together @Goldwell! This was our biggest year since 2014 with lots of incredible releases and newcomer authors!
    1 point
  13. I really like what I see so far. I don't have the best test scene but I really like the "patch" entities as just a few of these sprinkled around add a nice sense of life to even a simple natural scene. I like being able to switch between the wind variants, but the default low wind variant is rather subtle and the strong is quite, well, strong. Animations are probably a pain but I could see if there was an option in the middle using it. Seems like the meshes don't have the skin variants defined? You can find a bunch in the general skin browser but nothing limited to the model itself. The larger patches look great, especially at a distance, but they don't hold up as well close up. Part of that is a given with billboard alpha, but iirc in the original test map the large tufts have a sort of dense ground cover that pops in at a very low distance, but this kind of fleshes out the tufts when you're standing right in the middle of them, which I imagine as a sneaky thief you're likely to be. I don't really see an issue with performance, but I am not pushing as many of these entities as something like the original scene might. Really cool work and I think these will be an awesome addition!
    1 point
  14. This I, also, often accidentally click "New Mission" when I really meant to click "Start this Mission". Thief's wording is "New Game", so maybe that's why I make the mistake often. How about changing "New Mission" wording to "Missions"?
    1 point
  15. Sorry for resurrecting an old thread, but I thought this might interest a few people (I accidentally applied the wrong normal map to the floor, so ignore those artefacts you may see.) This works by means of a new custom shader, which I've attached to this post. I don't know if it'll land in the upcoming 2.08 release, but you could also bundle the shader with your map, and it should even work in 2.07. How to use it? Well, it's admittedly not super user-friendly. You'll need the regular cubemap capture as before. But in addition you'll also need the world position from where the cubemap capture was taken, and you need to specify an axis-aligned bounding box that approximates the captured geometry in the cubemap. This means that this technique works best in rectangular-shaped areas (like in Epifire's test map from this video), and that rectangular shape should be axis-aligned. You can of course still define an axis-aligned bounding box for non-rectangular or rotated geometry, but it'll probably not look as good. Since there's currently no support from DR or the game to get those parameters, you'll have to measure those three positions yourself (cubemap capture position and AABB min and max corners), either in DR or in the game with noclip and getviewpos. They don't have to be exact, but it'll look better if they are not totally off. Now, in your material, you'll need to replace the default cubemap reflection stage, i.e. this part: { blend gl_dst_alpha, gl_one cameraCubeMap env/cubetest texgen reflect } Replace it with the following: { blend gl_dst_alpha, gl_one program parallaxCubeReflect vertexParm 0 0, 40, 100, 0 // cubemap capture position vertexParm 1 -130, -240, 0, 0 // proxy AABB min vertexParm 2 130, 320, 200, 0 // proxy AABB max fragmentMap 0 cameraCubeMap env/cubetest // reflection cube map fragmentMap 1 _flat // normal map } vertexParm 0,1,2 are the cubemap capture position and the AABB min and max corners in world space, respectively. fragmentMap 0 is the actual captured cubemap, and fragmentMap 1 is the normal map for your surface (or '_flat', if you don't want one). parallax_cubemap_shader.7z
    1 point
×
×
  • Create New...