Wetness
by Joshua Horns · in Torque 3D Professional · 08/04/2009 (7:49 am) · 125 replies
Rumor has it the wetness effect won't be in the release, so I'd like to think about making one of my own.
To that end I'd like to view the wetness demo that was displayed a few months back but it appears to have been pulled. Is there any way to put that up on the site?
** NM found it on Gerhard's blog.
To that end I'd like to view the wetness demo that was displayed a few months back but it appears to have been pulled. Is there any way to put that up on the site?
** NM found it on Gerhard's blog.
About the author
#62
At the moment it takes gravity and the bump normal into account when animating the texture.
Testing
09/02/2009 (9:04 pm)
OK I know this looks terrible at the moment. It's more of a proof of concept for myself. At the moment it takes gravity and the bump normal into account when animating the texture.
Testing
#63
09/03/2009 (12:10 am)
Nice! Custom material?
#64
@deepscratch - amazing video with the screen wetness...when the video first started I didn't really know what I was seeing. Had to blink a couple of times to make sure I wasn't just tired - luckily, I wasn't and it was real ;)
09/03/2009 (12:37 am)
@Josh - Impressive as always! Keep it up, brah - your doing an outstanding job. I look forward to seeing more :)@deepscratch - amazing video with the screen wetness...when the video first started I didn't really know what I was seeing. Had to blink a couple of times to make sure I wasn't just tired - luckily, I wasn't and it was real ;)
#65
@Pat,
It's a custom material. I was able to get the post effect to work on about 80% of the surfaces at one time. It got frustrating because the direction of water flow would sometimes reverse with the camera angle and I couldn't track it down.
Also, for some reason the gravity vector only works correctly on two faces at a time. Which faces depends on the world space gravity direction. I haven't checked to see if it's a tangent space transformation problem yet. It will take some digging I guess but I'll be gone for a week or so.
At some point I'll go back to the post effect. Probably after I'm satisfied with the custom material.
Edit.. I guess I should also note that this isn't fluid flow. It's the scrolling of a texture in the direction of gravity and surface normal. I have basically just created the gravity map. Now I need to simulate fluid.
09/03/2009 (8:30 am)
Thanks, it still needs a ton of work.@Pat,
It's a custom material. I was able to get the post effect to work on about 80% of the surfaces at one time. It got frustrating because the direction of water flow would sometimes reverse with the camera angle and I couldn't track it down.
Also, for some reason the gravity vector only works correctly on two faces at a time. Which faces depends on the world space gravity direction. I haven't checked to see if it's a tangent space transformation problem yet. It will take some digging I guess but I'll be gone for a week or so.
At some point I'll go back to the post effect. Probably after I'm satisfied with the custom material.
Edit.. I guess I should also note that this isn't fluid flow. It's the scrolling of a texture in the direction of gravity and surface normal. I have basically just created the gravity map. Now I need to simulate fluid.
#66
I got to about 80% on the screenspace solution too, and, like you said, some have directions reversed for reasons that still elude me.
09/04/2009 (11:46 am)
Joshua, check the tangent W direction. For examples look at ShaderFeatureHLSL and the code it uses to create teh tangent space matrix. I got to about 80% on the screenspace solution too, and, like you said, some have directions reversed for reasons that still elude me.
#68
I'm waiting to see how things shake out in 1.1 before I play around with the engine again. (gives me time to check out opencl)
11/19/2009 (11:32 am)
<crickets>I'm waiting to see how things shake out in 1.1 before I play around with the engine again. (gives me time to check out opencl)
#69
11/19/2009 (3:45 pm)
It looks like it's not as easy as some people made it out to be. :(
#70
11/19/2009 (3:54 pm)
well i think they will have it when they update the engine for DX11 as the guy who made the first one was useing DX10 as he could not keep it working for DX9. thats just what i think is going to happen if once dx11 is in T3d we might finally see it. :P
#71
11/19/2009 (4:41 pm)
I dunno. I've looked at it as a screen space effect, which as pat says should be the way to go. If I know the world space normal and the position of the camera I should be able to determine a downhill vector in screen space to flow. For some reason it doesn't work 100% and I'm avoiding the C++ part of the engine like the plague.
#72
is it your intension, if you get it working, to realease the effect to the community?
if so, maybe you could share what you have up till this point, maybe one of us, in the community, could see what they can accomplish, instead of re-inventing another square wheel....
11/21/2009 (4:44 am)
@Joshua,is it your intension, if you get it working, to realease the effect to the community?
if so, maybe you could share what you have up till this point, maybe one of us, in the community, could see what they can accomplish, instead of re-inventing another square wheel....
#73
I'll try to get what I have together and post it here so someone can look at it.
12/08/2009 (2:10 pm)
Deepscratch,I'll try to get what I have together and post it here so someone can look at it.
#74
working with the eyePos (and eye transform - eyeMat) in the pixel shader is wrong (at this stage).
_initShader will pass it right,but sometimes it will lead to strange visual results.
It is a clean T3D bug,but i have not investigated some time in tracing the code in processedShaderMaterial.
The current 1.1 alpha is messed up,but i believe in 1.1 final all the shader bugs will be fixed.
I gave up to assemble shaders in 1.1,i can not get even simple things working there,so i am currently using 1.0.
Get the view position in the vertex shader,pass it as a texcoord to the pixel shader,then use it there.
This will work.
Another decision is to place the code here and may be somebody will fix it.
12/08/2009 (3:24 pm)
Hi Joshua,working with the eyePos (and eye transform - eyeMat) in the pixel shader is wrong (at this stage).
_initShader will pass it right,but sometimes it will lead to strange visual results.
It is a clean T3D bug,but i have not investigated some time in tracing the code in processedShaderMaterial.
The current 1.1 alpha is messed up,but i believe in 1.1 final all the shader bugs will be fixed.
I gave up to assemble shaders in 1.1,i can not get even simple things working there,so i am currently using 1.0.
Get the view position in the vertex shader,pass it as a texcoord to the pixel shader,then use it there.
This will work.
Another decision is to place the code here and may be somebody will fix it.
#75
02/27/2010 (12:26 am)
Bump... anyone else still working on this?
#76
Yeah, I've been wanting to know the same thing too! I hope someone gets around to getting this in to T3D, or at least post a code so the community can see what they can do with it!
02/27/2010 (7:16 am)
@stephenYeah, I've been wanting to know the same thing too! I hope someone gets around to getting this in to T3D, or at least post a code so the community can see what they can do with it!
#77
02/27/2010 (2:35 pm)
I hope to get the concept of "effect layers" into T3D after we revamp the ShaderGen system for 1.3.
#78
I know this is a bit off topic but is there a "roadmap" for the releases of T3D? T3D 1.3 seems awhile away; and if I remember right I believe after 1.1, it's a pay update. I may be wrong!
02/27/2010 (2:53 pm)
@Tom,I know this is a bit off topic but is there a "roadmap" for the releases of T3D? T3D 1.3 seems awhile away; and if I remember right I believe after 1.1, it's a pay update. I may be wrong!
#79
My personal guess would be 1.3 sometime in Q4.
02/28/2010 (11:59 pm)
@Kory - There is no official roadmap, but the pace of T3D development is really fast.My personal guess would be 1.3 sometime in Q4.
#80
03/06/2010 (3:52 pm)
Is it possible to get a copy of Gerhard's shader?
Associate Tom Spilman
Sickhead Games