Jump to content
The Dark Mod Forums

Making Water Darker


grayman

Recommended Posts

Today I expanded on Sperpentines water:

 

textures/darkmod/serp/animatedtest2
{
	water
	{
	blend bumpmap
	map textures/Flanders/water_bump_ver
	scroll time*0.03, 0
	}

{
blend specularmap
map 	textures/Flanders/water_flanders_s
	scroll time*-0.03, 0
	}

	{
	blend diffusemap
	map 	textures/water_source/water_green
	}
	{
	vertexProgram heatHazeWithMask.vfp
	vertexParm 0 time*0.03, 0
	vertexParm 1 1.3
	fragmentProgram heatHazeWithMask.vfp
	fragmentMap 	0 	_currentRender
	fragmentMap 	1 	textures/Flanders/water_bump_ver
	fragmentMap 	2 	textures/water_source/vp_water
	}
} 

 

The bumpmap is just scrolled in one direction but because of the heathaze effect that's not really noticeable, it doesn't look like a conveyor belt. Now if I add a monochromatic specular map it does become apparent that the bumpmap is just a scrolling texture. To counter this I made the specular map of a cloud texture and let it scroll in the opposite direction of the bumpmap. See for yourself here:

 

http://www.gamefront...1/watertest.pk4

 

Just drop it in your darkmod folder, and load the map "watertest.map" It's not perfect yet, only an proof of concept.

Link to comment
Share on other sites

If I'm not mistaken, the scroll that Serpentine was trying to perform was supposed to move in discrete increments such that at each frame a different image appears mimicking the behavior of a film strip. So no scroll motion was supposed to be seen in his example either... it should have produced a succession of animation frames.

 

scroll table32[ time*0.9 ] * 0.03125, 0

 

The problem that Serpentine appears to grappling with is the quality of what is inside each frame ^_^

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

If I'm not mistaken, the scroll that Serpentine was trying to perform was supposed to move in discrete increments such that at each frame a different image appears mimicking the behavior of a film strip. So no scroll motion was supposed to be seen in his example either... it should have produced a succession of animation frames.

 

scroll table32[ time*0.9 ] * 0.03125, 0

 

The problem that Serpentine appears to grappling with is the quality of what is inside each frame ^_^

Yes, I changed that because I didn't like the idea of a kind of stop motion textures, You need a lot of textures (32 in that example) to make smooth transitions. I just have one bump and one specular map. So I took his material and in the end only kept the heathaze part then.

Link to comment
Share on other sites

I was thinking about the size issue there too...

 

Though a Megatexture could be used for this (at great pain and inconvenience to it's creator :laugh: )

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

Scrolling textures dont really cut it for animated purposes tho, they're the same thing that we have now :)

You can use less samples with the filmstrip method, but 16+ is really required. May be able to get away with 8 for ripples and stuff (I really need to make a vid of that for you guys, mmm ripple patches). Also half got stream edges done, where the friction of the bank slows the laminar flow... but that's possible with simple scrolling too!

 

Tho I want to take a week off from rl and work on tdm stuff, prolly wont happen til mid way through June :(

Link to comment
Share on other sites

This is the new Thief water video.

 

Apart from the bad tiling in the big open expanse near the start I reckon it's pretty good especially when swimming in it both on the surface and below. This uses 20 frames. I'd really like to see this converted to TDM just to see.

Link to comment
Share on other sites

I've cooked up a 30 frame looping normal map for water you can fool with if you like. I don't know if it's more expensive to leave it as an image sequence or to create one long strip. At any rate...

 

http://www.megaupload.com/?d=Z4T8SSS1

Thanks RiB. I had been wondering if there was a modulo operator to calc the frame. This is a very quick test of your material using the plain blue grey dark surface. I had to use about 4 fairly bright lights close to the water to see it well with my dark surface but the principle works and it animated nicely (I just did another quick test with the surface texture scale at 1 instead of 0.25 and it's better.) Needs more experimenting. Are these frames the same as jermi's?

 

post-400-130355817373_thumb.jpg

 

[EDIT] I wonder if a plain specular would help visibility eg _white?

 

[EDIT2] haha - I see it already has it.

Link to comment
Share on other sites

  • 2 weeks later...

It looks like you can crossfade animating bumpmaps but it's tricky enough where the shader comments advise that you have "John set it up for you" :laugh:

 


table snapTen { snap { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }

table snapFive { snap { 1, 0, 0, 0, 0 } }

table lerp2Table { { 0, 1 } }

//

// This shader features a cross-faded, animating bump map, which is tedious to set up.

// Bump maps can't really be blended, so it selects one bump map and blends the diffuse

// and specular maps, then selects an adjacent bump map and inverse blends the diffuse

// and specular maps. There must be an even number of frames, with the odd numbered

// frames going in the first pass, and the even numbered frames going in the second.

//

// It is probably easiest to just ask John to set these up.

//

textures/sfx/waterbump

{

qer_editorimage textures\decals\bloodpool01_jim

nonsolid

//

// first part of the crossfade

//

{

	if snapFive[ time * Parm3 * 0.5 + Parm4 + 0.0 / 5 ]
	blend 	bumpmap
	map	heightmap (textures/sfx/untitled001, 4)
	rgb	elevenstage [ time * Parm3 + Parm4 + 10.0 / 11 ]

}

{

	if snapFive[ time * Parm3 * 0.5 + Parm4 + 1.0 / 5 ]
	blend 	bumpmap
	map	heightmap (textures/sfx/untitled003, 4)

}

{

	if snapFive[ time * Parm3 * 0.5 + Parm4 + 2.0 / 5 ]
	blend 	bumpmap
	map	heightmap (textures/sfx/untitled005, 4)

}

{

	if snapFive[ time * Parm3 * 0.5 + Parm4 + 3.0 / 5 ]
	blend 	bumpmap
	map	heightmap (textures/sfx/untitled007, 4)

}

{

	if snapFive[ time * Parm3 * 0.5 + Parm4 + 4.0 / 5 ]
	blend 	bumpmap
	map	heightmap (textures/sfx/untitled009, 4)

}

{

	blend	diffusemap
	rgb		lerp2Table[ ( time * Parm3 * 0.5 + Parm4 ) * 5 ]
	map		textures\decals\bloodpool01_jim

}

{

	blend	specularmap
	rgb		lerp2Table[ ( time * Parm3 * 0.5 + Parm4 ) * 5 ]
//		map		textures\decals\bloodrun01_s
	map		_white

}


//

// second part of the crossfade

//

{

	if snapFive[ time * Parm3 * 0.5 + Parm4 + 0.5 / 5 ]
	blend 	bumpmap
	map	heightmap (textures/sfx/untitled002, 4)

}

{

	if snapFive[ time * Parm3 * 0.5 + Parm4 + 1.5 / 5 ]
	blend 	bumpmap
	map	heightmap (textures/sfx/untitled004, 4)

}

{

	if snapFive[ time * Parm3 * 0.5 + Parm4 + 2.5 / 5 ]
	blend 	bumpmap
	map	heightmap (textures/sfx/untitled006, 4)

}

{

	if snapFive[ time * Parm3 * 0.5 + Parm4 + 3.5 / 5 ]
	blend 	bumpmap
	map	heightmap (textures/sfx/untitled008, 4)

}

{

	if snapFive[ time * Parm3 * 0.5 + Parm4 + 4.5 / 5 ]
	blend 	bumpmap
	map	heightmap (textures/sfx/untitled010, 4)

}

{

	blend	diffusemap
	rgb		1.0 - lerp2Table[ ( time * Parm3 * 0.5 + Parm4 ) * 5 ]
	map		textures\decals\bloodpool01_jim

}

{

	blend	specularmap
	rgb		1.0 - lerp2Table[ ( time * Parm3 * 0.5 + Parm4 ) * 5 ]
//		map		textures\decals\bloodrun01_s
	map		_white

}


}

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

  • 11 months later...

Following up on this thread...

 

Rich_is_Bored just posted a new animated normal map water material over at Doom3world:

 

http://www.doom3world.org/phpbb2/viewtopic.php?t=25388

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

  • 1 year later...

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • 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.
      · 7 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
×
×
  • Create New...