Jump to content
The Dark Mod Forums

Proper & realistic moving water:


Bikerdude

Recommended Posts

Im working on updating a map atm and one of the tasks was to try and get thr water to flow realistically. We have a moving waster texture and two args to make moving waves (shderParm5 and 6).

 

But in still is very basic, does anyone know if we can import the water from thwe rescent Thief gold texture pack by gecko..?

Link to comment
Share on other sites

  • Replies 77
  • Created
  • Last Reply

Top Posters In This Topic

Did you try Rich_is_Bored's water?

 

http://forums.thedarkmod.com/topic/12574-making-water-darker/page__view__findpost__p__283652

 

You might improve it by adding a transparent cubemap (haven't tested it myself yet).

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

Thief 2 water is using multiple texture frames. This method hasn't been used before in Darkmod, at least I haven't seen it. I'm actually doing some tests with rich_is_bored's method. I'm making my own animated water texture in Blender right now. But in the meanwhile I would try the reflective water like in the grass test. Maybe it's not that resource consuming as you think. There are 2 layers:

 

a) Swimable water entity with a reflective texture on top:

 

reflective_water
{
noshadows
noimpact
nonsolid
sort Underwater
{
blend	blend
mirrorRenderMap	128	128

translate	0.5, 0.5
scale		0.5, 0.5
}
}

 

B) Refractive water - a single patch slightly above water with this texture (nonsolid):

 

refractive_water
{

noshadows
noimpact
nonsolid

{
	program		heatHaze.vfp
	vertexParm	0	time * 0.1 , time * 0 // scroll
	vertexParm	1	4 //magnitude
	fragmentMap	0	 _currentRender
	fragmentMap	1	textures\water_source\water_green_local.tga
}
}

It's only a model...

Link to comment
Share on other sites

If you mean by that displaced geometry then it would require loooots of bones and tris to look right. Modern games use displacement maps and tessellation for that.

@Rich_Is_Bored if you read this, how do you make heat haze effect with multiple normalmaps? You said here that you tried it. I want to use large images so combining them into strip doesn't make sense.

It's only a model...

Link to comment
Share on other sites

Would love to see how that would turn out.

a) Swimable water entity with a reflective texture on top:

 

reflective_water
{
noshadows
noimpact
nonsolid
sort Underwater
{
blend	blend
mirrorRenderMap	128	128

translate	0.5, 0.5
scale		0.5, 0.5
}
}

 

B) Refractive water - a single patch slightly above water with this texture (nonsolid):

 

refractive_water
{

noshadows
noimpact
nonsolid

{
	program		heatHaze.vfp
	vertexParm	0	time * 0.1 , time * 0 // scroll
	vertexParm	1	4 //magnitude
	fragmentMap	0	 _currentRender
	fragmentMap	1	textures\water_source\water_green_local.tga
}
}

 

Testing now... brb

Link to comment
Share on other sites

@ Bikerdude. Remember that swimable water has to be made the same way as always, except with mirror at the top. Judging from the screenshot it looks as expected. If you're not happy with the result you can always adjust the scroll and magnitude values in the material. Also the material uses stock TDM normalmap textures\water_source\water_green_local.tga. You can replace it with any other normalmap, like rocks for example.

 

@ Rich, you mean the whole shader, like this?

 

water
{
{
	if ( (time * 24) % 23 == 0 )
	program		heatHaze.vfp
	vertexParm	0	time * 0 , time * 0 // scroll
	vertexParm	1	4 //magnitude
	fragmentMap	0	 _currentRender
	fragmentMap	1	textures/water/water0001.tga
}
{
	if ( (time * 24) % 23 == 0 )
	program		heatHaze.vfp
	vertexParm	0	time * 0, time * 0 // scroll
	vertexParm	1	4 //magnitude
	fragmentMap	0	 _currentRender
	fragmentMap	1	textures/water/water0002.tga
}
}

 

I tried different things yesterday without result.

It's only a model...

Link to comment
Share on other sites

http://www.speedysha...20114.02.08.zip

 

@ Bikerdude, I rescaled and rotated the refractive texture, changed speed and magnitude and added another layer that is visible from the other side. Reflection doesn't work well with player model visible. I created a nodraw model for player (head is still visiblle). I'm sure there are better ways to turn it off. Water entity has to have caulk on sides rather than nodraw, otherwise it didn't work for me. Anyway, this water doesn't look good in that small brightly lit room. Pool needs to be deeper to make the reflection realistic:

 

http://www.youtube.com/watch?v=VDwTGL590zA&feature=youtu.be

It's only a model...

Link to comment
Share on other sites

I don't know how to do it. Cubemaps can be transparent but they don't look as good as real reflection. I also didn't say that I had to delete reflection on the wall behind the waterfall. Mirrors that "see" each other cause unwanted effects. Also it's not visible on the video but I modified uv map so that water turns properly:

 

 

It's only a model...

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.
      · 4 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...