Jump to content
The Dark Mod Forums

Patch Rendering Problem


grayman
 Share

Recommended Posts

I have a patch of water falling into a body of water.

 

It displays like this:

 

post-3633-0-04728800-1384476202_thumb.jpg

 

The area marked in red is where the problem is. As far as the eye is concerned, the falling water is in front of the still water surface, but it's rendering as if it's behind.

 

Is this a renderer issue that's correctable, or are we just stuck with it? Is there any way to force the patch of falling water to be rendered properly in the z-buffer?

 

Thanks.

Link to comment
Share on other sites

This is how the water shader works. It's a post process. It might be possible to add a different sort order attribute to the material. Will take a look.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Try this:

 


// vim:ts=4:sw=4:cindent
// Tels 2010-09-23:
// Water shaders modified to support parm5 = wave speed (texture translation and vertex wave speed),
// and parm6 (vertex wave height)
// The default values for parm5/parm6 are 0.1 and 1.5, so the formulas reflect this.
// (( parm5 + 0.1) - (( parm5 || 0) * 0.1)) Acts to set the default expected of parm5 to 0.1, however if parm5 is specified it will use that rather.

// Author: lloyd
textures/water_source/water_clear
{
qer_editorimage textures/water_source/w_c_ed
discrete
nonsolid
water
twosided
translucent
sort decal

deform turbulent sinTable 0.0175 (time * (( parm5 + 0.1) - (( parm5 || 0) * 0.1)) * 1.5) 10
{
	vertexProgram heatHazeWithMask.vfp
	vertexParm 0 time * (( parm5 + 0.1) - (( parm5 || 0) * 0.1)) , time * ((( parm5 + 0.1) - (( parm5 || 0) * 0.1)) * 5)
	vertexParm 1 (( parm6 + 1.5) - (( parm6 || 0) * 1.5))
	fragmentProgram heatHazeWithMask.vfp
	fragmentMap 0 _currentRender
	fragmentMap 1 textures/sfx/vp1
	fragmentMap 2 textures/water_source/vp_water
}
{
	blend blend
	map textures/water_source/water_clear
	translate 0.01 * sintable[time * (( parm5 + 0.1) - (( parm5 || 0) * 0.1))], 0.01 * sintable[time * ((( parm5 + 0.1) - (( parm5 || 0) * 0.1)) * 1.25)]
	alpha 0.01
}
}

 

 

Edit:

 

This probably wont work.

 

We need Sikkpin's fix:

 

http://www.doom3world.org/phpbb2/viewtopic.php?f=13&t=25444&st=0&sk=t&sd=a&start=60

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Try putting "sort 101" or higher into the waterfall material.

 

Anything that uses _currentRender ( this includes refraction ) gets automatically set to sort value 100 by the engine.

The downside is that this might make the surface not play well with fog.

 

Or alternatively don't use a water shader that is mainly based on refraction.

Link to comment
Share on other sites

Could you just have the water patch hit the water brush surface, then mask the interface with some fancy water splash particles?

 

The waterfall patch stops at the water surface. I do have a splash particle emitter there, but I haven't gotten around to looking for something more "splashy" to hide the clean line at the point of impact.

Link to comment
Share on other sites

  • 2 months later...
Anything that uses _currentRender ( this includes refraction ) gets automatically set to sort value 100 by the engine.

The downside is that this might make the surface not play well with fog.

 

Does this address the issue of water distorting things (like player weapons) that are in front of the water?

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.

 Share

  • Recent Status Updates

    • freyk

      Some years earlier i created some launchers for TDM. uploaded today some new sourcecode and executables on my github repo.
       
      · 0 replies
    • Epifire

      Say, I know it's been a while since the site got overhauled from the crash. But did we ever figure out if/how to get the recent topics & replies list back? It's not a total deal breaker but it was nice for becoming a thread creeper again...


      · 2 replies
    • Epifire

      Some of you who've been on the TDM discord know I was out of work last Winter, just putting in hrs for the developer portfolio. Currently I've been working a seasonal job to pay the bills and now I'm finally in my last week before I get bumped off. Things will be tight but I'm planning a long off period to make as much content as I can. Big plans in Unreal Engine as well as my most ambitious TDM collab yet! Never been so excited to be a stuck at home to pursue my life's work. With a lotta time and maybe some luck, I'm hoping to get enough art work done that I may start applying around to studios.
      · 4 replies
    • STiFU

      I finally got around to play Prey and I truly loved it. It is an incredible homage to System Shock and Deus Ex. While the gameplay is not en par with those two titles, the game makes up for that with its well written lore and story. The whole "world" just feells so authentic and it features a ton of really god environmental story-telling. Recommended for every immersive sim fan, i.e., everyone on this forum.
      · 2 replies
    • jaxa

      Alder Lake has arrived:
      https://forums.thedarkmod.com/index.php?/topic/18055-2016-cpugpu-news/page/15/&tab=comments#comment-466190
       
      · 0 replies
×
×
  • Create New...