Jump to content
The Dark Mod Forums

[Resolved in TDM 2.03] Testers requested: soft particles


SteveL

Recommended Posts

Installing the patch

 

Download the zip file and unpack it to your darkmod folder: https://www.amazon.co.uk/clouddrive/share/YutrBa88NvBtZtFA1z2Cy5uLDpK3KAcIwjKBOLEYJ24

 

It contains two files:

TheDarkMod.exe -- this replaces your existing TheDarkMod.exe

glprogs/soft_particle.vfp -- this is a new file, in a new folder that you won't normally have in your darkmod folder. If you do already have a glprogs folder, just add the file to it.

 

Unpacking the zip in your existing darkmod folder should do the right thing automatically.

 

That's it. If you want to revert to a standard TDM installation, just run tdm_update.exe

Edited by SteveL
Link to comment
Share on other sites

Did some testing on my WIP 90% of the lights are noticably better, but here is some feedback -

 

Perfect depth behavour -

post-496-0-42094300-1416143027_thumb.jpg

 

Awesome graduation against hard surfaces -

post-496-0-96232700-1416143105_thumb.jpgpost-496-0-19891200-1416143116_thumb.jpg

post-496-0-29749400-1416143296_thumb.jpgpost-496-0-71023900-1416143426_thumb.jpg

 

Dual/multi effect particles have some overlap on hard surfaces -

post-496-0-27569000-1416143229_thumb.jpgpost-496-0-29942300-1416143313_thumb.jpg

post-496-0-00424600-1416143394_thumb.jpg

 

When particle are very close to hard surface this seem's to be in avoidable -

post-496-0-76237000-1416143242_thumb.jpgpost-496-0-71861800-1416143524_thumb.jpg

Link to comment
Share on other sites

Thanks Biker. Were the bright dust spots all from tdm_glare_lamp01s? I put in a last-minute "fix" for those yesterday but only did a quick check in my test map. The fix was that there should be no softening for particle fragments smaller than 2 or 3 units across, and those dust motes are only 0.5, but I'll check it's working.

 

I'll try to rep those situations in my test map but if I can't I'll be asking for a copy of your WIP :) Just to check: did you turn off soft particles to confirm the problems went away?

 

It will be avoidable by the way, because I'm adding a keyword for particle stages that'll let you reduce or cancel the overdraw for an individual particle stage. But I'll be doing my damndest in the meantime to see that it won't be needed (essential for existing maps, unless we update the particle def too), so please keep them coming :)

Link to comment
Share on other sites

Before I look into that, I'll report back the result of my tests this morning, on sub-views like mirrors and "security camera" screens (big thanks to Obs for his test map, saved me a lot of work!).

 

Depth capture and depth windows work perfectly in the subview, using the correct relative depth from where the "camera" is positioned. But particles don't show up at all in the subview. That's confusing, because I stepped through the renderer as it drew one of those views and I can see it generate the draw surfaces for the particle, and draw them. But nothing shows up, and I can't see what could be hiding them. That's a separate issue that I'll put on the tracker.

Link to comment
Share on other sites

There's a new command r_softparticles.

 

Is this command in line with the others (I can't check right now) or shouldn't it be name "r_use_softparticles" (or "r_usesoftparticles") instead?

 

Sorry if this is a silly question!

 

Cheerrs for the work! Is it possible to test this in linux, too?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

That sure looks purty :) odd though that the particles fail in the subview ? maybe related to depthmasking, i noticed in your code part that you do the depth copy between the subview calls and guessed that you might have a reason for that or maybe just that it was convinient ?.

Edited by revelator
Link to comment
Share on other sites

Is this command in line with the others (I can't check right now) or shouldn't it be name "r_use_softparticles" (or "r_usesoftparticles") instead?

 

Sorry if this is a silly question!

 

Not a silly question... I didn't check the wording of similar commands. Will do.

 

Cheerrs for the work! Is it possible to test this in linux, too?

 

Here's the patch to TDM 2.02: [fixed link] https://www.amazon.co.uk/clouddrive/share/im-z0RKOfyexVDnj-fj7gW3mueFM03Eb_UlG8FA5WDU

NB You'll have to use this with a checkout of the 2.02 tag in svn, not the current dev version. The patch has only the depth capture code plus soft aprticle implementation in it.

Also note that it's a WIP. I plan to keep the hard-coded values but as defaults, configurable if desired through a particle stage keyword. The keywords are not in this patch.

 

That sure looks purty :) odd though that the particles fail in the subview ? maybe related to depthmasking, i noticed in your code part that you do the depth copy between the subview calls and guessed that you might have a reason for that or maybe just that it was convinient ?.

It needs to happen once for each call to RenderScene (each DrawView command), and before any drawing, so it does need doing separately for each subview. Subviews are drawn in their entirety before the main view, including any depth-affected surfaces that they contain, so they need their own depth buffer capture.

I can't remember exactly why I put it where I did, but I know I moved it at least once for some reason or other, so it didn't just land in a random spot :)

Edited by SteveL
Link to comment
Share on other sites

  • Thanks Biker. Were the bright dust spots all from tdm_glare_lamp01s?
  • I'll try to rep those situations in my test map but if I can't I'll be asking for a copy of your WIP :)
  • Just to check: did you turn off soft particles to confirm the problems went away?
  • It will be avoidable by the way, because I'm adding a keyword for particle stages that'll let you reduce or cancel the overdraw for an individual particle stage. But I'll be doing my damndest in the meantime to see that it won't be needed (essential for existing maps, unless we update the particle def too), so please keep them coming :)

  • it was from "tdm_glare_lamp_01.prt" and the second stage "textures/particles/smokepuff" which are 0.3-0.5 in size.
  • No probs mister, just drop me a PM.
  • yes, and no effect on the second stage "textures/particles/smokepuff". Your fix only effects the first stage "textures/darkmod/sfx/fake_haze_01"
  • Grand.

Link to comment
Share on other sites

Such simple changes and the difference is so much more immersive. I recall when the first Bioshock came out and it was one of the first AAA DX10 titles and offered fog without the lines that make it look like a sprite rotating as you move around, and it added so much more atmosphere to the environments.

 

This has the same effect, SteveL. Absolutely fantastic work.

  • Like 1
Link to comment
Share on other sites

Aye great work :)

 

And ok i had a hunch you had a specific reason for putting the code where it is atm, i did do some testing with it in another place which still is before the call to RenderScene but placed into the normal shader loop but without the postprocess sorting, seems to work fine there also but it s a bit crude.

Link to comment
Share on other sites

Aha, I know where Biker's unwanted sparkling dust motes are coming from :) I'm at work now but just downloaded my patch from the post above to check. Yep, when I disabled the softening for tiny particles, I accidentally re-enabled the old modelDepthHack for that particle stage, which in the case of those light glares will let the dust motes overdraw solids by up to 20 units.

 

I ran out of brain power for testing yesterday and downed tools but hope to get a new patch out tonight.

 

Aye great work :)

 

And ok i had a hunch you had a specific reason for putting the code where it is atm, i did do some testing with it in another place which still is before the call to RenderScene but placed into the normal shader loop but without the postprocess sorting, seems to work fine there also but it s a bit crude.

Thanks! I capture the depth buffer immediately after it gets populated so it'll be available even during the first, opaque, shader pass -- which could be useful for putting ambient occlusion in the light interaction shader for example. IIRC, RenderScene recurses to create the extra drawView commands for subviews, so you can't put the instruction any higher level than that if you want it to be available in subviews, and it seemed simplest just to capture it in the backend without any commands needed from the front end or game, given that we'll end up using it for so much.

  • Like 1
Link to comment
Share on other sites

I've added a new version of TheDarkMod.exe to the archive linked in post #2 above.

 

Changes:

  • Fix for the dust particles reported by Biker
  • The cVar is now r_useSoftParticles
  • New particle stage keyword: softeningRadius. This is to allow mappers to tweak particles to fit awkward spots, or to disable softening for individual particle stages. Recognised values:
    • -1 = turn off soft particles completely. Use former setup, including modeDepthHack if specified [oops, this is bugged in the file above, but working this end]
    • 0 = no softening, but override modelDepthhack for the stage too
    • N = Soften and overdraw by up to N units (decimal places are fine)

I'll wikify the info fo course assuming we don't update the plan in the next couple of days.

 

I've also finished testing particle colors and shaderparms. Bugfixes only from now on :)

Edited by SteveL
Link to comment
Share on other sites

Hadn't had time to try this, sorry.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

  • 2 weeks later...

Wow I didn't know that such big changes on the graphic engine would be possible - I really like the "soft particles" and really want to see them in action in the next version of TDM! (have to go back to playing TDM finally some day in the holidays)

 

And the water not responding to the weapon of the player! Awesome!

 

But you know what comes after soft particles, SteeveL? Right! Soft shadows! :P

  • Like 1

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

Revision #6340 compiles on my old Kubuntu box, I'm gonna do a testrun in a few minutes. Thank you, Steve :wub:

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Hm:

 

gamex86 - No SO found in EXE path
gamex86 - Found SO in pak file with timestamp of 1417810470 - /home/te/games/tdm/tdm_game02.pk4/gamex86.so
gamex86 - SO in pak file is newer, extracting to darkmod path /home/te/games/tdm/tdm_game02.pk4/gamex86.so
copy gamex86.so to /home/te/games/tdm/gamex86.so
gamex86 - Correction of file modification time successful
dlopen '/home/te/games/tdm/gamex86.so' failed: /home/te/games/tdm/gamex86.so: undefined symbol: _ZTIN2ai13GuardSpotTaskE
Regenerated world, staticAllocCount = 0.
Shutting down sound hardware
----------- Alsa Shutdown ------------
close pcm
dlclose
--------------------------------------
idRenderSystem::Shutdown()
I18NLocal: Shutdown.
Sys_Error: couldn't load game dynamic library
About to exit with code 1

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

It's probably an asset problem. The latest build refers to assets that haven't been released :-/

 

The missing symbol means that the linker build a DLL that doesn't match the executable, assets have not yet been loaded at this stage. So either I jumbled the build, or did not put the correct .so in the directory. Techncially the build overrides these, always. But lately I toyed with relevators branch and this might have accidently overwritten the tdm_game.pk4 file.

 

I'll recompile and test again.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 1 reply
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...