Jump to content
The Dark Mod Forums

Patch Rendering Problem


grayman

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.

  • Recent Status Updates

    • 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
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...