Hi guys,
I'm working on new ocean shader for my project. [ame="
http://www.youtube.com/watch?v=-h795SUTUOc"]Previous[/ame] (not my!) realization was actual for "yesterday", but today tech allows us to make much more.
When you're working on something you can loose freshness of vision easy, so the topic here is to get comments and defects detection
I'll be very appreciated. Once it will be done the final shader will be avaible for community with tech comments.
The first milestone: [ame="
http://www.youtube.com/watch?v=NCQtc2UGLX0"]UDK Ocean Shader WIP - YouTube[/ame] Plus
static screens. There are few issues, but my first goal was to create basic material for diffuse/specual/normals/heightmap.
The second mileston is deepness. Today it looks:
No special things required to make a material with transparency, but my ocean is not usual UE3 transluent material shader. Transluent materials and dynamic lighting system are not a friends. For example, sun reflection isn't blocked by dynamic actors, the ship hasn't a shadow, and there are no light'n'shadow effects from explosions, especially at night levels.
I'm a trickster, and my ocean is opaque material. It has self-shadowing, dynamic shadows, light effect, etc., and it's really cool for my game.
My trick has it's limitations. But they are irrelevant for gameplay I have.
Next steps will be:
- Foam
- Geometry optimization and transparency LODs
- Big stormy waves
- Bugs hunting
Also, I'm looking for a guy who is familiar to FFT algorythm. I have few issues with butterfly passes (according to Moreland & Angel paper) and will be happy to discuss it or to get an advice
Replies
Not a final result - it shouldn't be used for production, but it's a good point to start. I think that it's a good idea to share my work with you
You can download source and howto here: http://www.hagodemon.com/2013/04/udk-ocean-wip-2-shader-source.html
:thumbup:
or instead like this
But as this is water shader thread. I'm gonan give him the benefit of the doubt that he hasn't gotten there yet.
it will create a mask where everything below the value defined in the position of plane vector will be white which you can than plug into lerps to blend a darker texture into that area, and to blend in more spec in that area.
Anyway, regarding the foam, instead of using masks, you could use vertex color to mark where it should be. Dont know what kind of object your ocean is, but if you use landscape, you should be able to easy paint the vertex colors to it. Even more important, its possible to dynamic affect the vertex colors, so you could, for example with ships, get the foam to follow it when it moves.
or use a sphere mask, with a vector3 paramater with the xyz coords of the ship, and use its output as a mask for the foam around ships.
true, was just poc proving you can avoide not having access to vcol at runtime with just a little vector math, but ya a render texture would be best.