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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...