[Preview] FX Ocean Starter Kit vA

The ocean starter kit is now under development.
Currently I have implemented the Gerstner Formula, Fresnel, SSS, Reflection, and Directional (drag) Dynamic White Cap Generation.
Still quite a bit to do. This will then be integrated into a blueprint system and will also have weather/wind range support.

Hope you enjoy the sneak preview!

Ooooo … another nice one. Yeah baby … 8-}

As always , top work :wink:

Looks fantastic! Would buy. Would it be suitable for making other bodies of water? Like ponds, lakes, rivers and such that won’t behave like an ocean? Would be incredible to be able to use the same system so the style matches.

any it could be made to react to solid objects in the water (eg rocks, shoreline)?

could this be used to make a river flowing in controlled directions?

I would gladly pay more for these features!

thanks in advance

@Sitrec - This specific shader is primarily built for deep sea waves (both calm and windy). However, I can create another system that would deal properly with smaller bodies of water and package it with this without altering the price.

@SlinkyMuffins - Interactions could be added. However, depending on how realistic you would want them to be, the systems could get very complex. I would like to at some point build a wave deformation that allows them to crash into objects, reflect, and roll. In regards to the (making a river flow in a specific direction) - this would need to be built into a river system. Most people would use flow map [textures]. However, you could also build it to work with generated waves using vertex masking. I will think about doing this at a later point (but it would be separate from the ocean system). Unfortunately, these things need to be broken up into separate tools. Trying to make one that did all would most likely result in a 500+ node tree and performance killing shader complexity (unless done in C++).

Thanks for the support everyone. I hope to have another update in a few days.

This is awesome, exactly what I have been looking for. Shoreline interaction would be incredible, if it is possible. I would definitely buy what you are working on! As Slinky said, if you create a package with more advanced features, I would also pay more.

Very nice, I also would like for beach shoreline interaction if its not too much trouble for you to add :slight_smile:

https://www.sierrawestscalemodels.com/vanforum/uploads/FileUpload/13/6953.jpg

Interested in seeing where this goes! Your original thread was a huge help in getting my ocean project off the ground, even though I went a slightly different route (still based on GPU Gems though).

Looking great ! Finally another ocean surface shader to compete with! You have taught me too much… Mwahahaha :wink:

Thanks for the kind words :slight_smile:
@ - I just realized you had a trello board for your ocean development! Very cool.
I noticed you created your SSS function to mimic the same result as in Assassin’s Creed. I was using actual SSS, but wasn’t satisfied with the lighting model for an ocean. Did you look at a paper in order to build your function, or is that your own method?

Hey ,

The SSS function was actually contributed by to the project with couple small tweaks I added in, so I will need to get back to you on that with some more info. It works pretty well but the LightVector can’t be updated in real time without some pretty severe artifacts. I’ve been busy with some other elements recently and haven’t had time to go through it all properly.

I’ll message him and let you know how he came up with the function shortly. :slight_smile:

p.s. Removed the links in my sig in the post, feels wrong to link it here. Forgot to turn that off sorry :confused:

Sounds good! I would definitely be interested to see his sources. I Have been looking around for some formula’s that would be less performance hungry. Real SSS can kill the ms fast :slight_smile:

Nonsense! I don’t mind at all :smiley:
I am very different from others. I don’t mind people posting secondary recourse or even promoting themselves on my threads. For me personally, I don’t believe in hijacking. “My” thread is always public to everyone and they can post up their projects anytime. Plus, seeing your trello board was refreshing :slight_smile: Nice to see people working on full scale projects like that. If you have any further updates you would like to publicize, feel free to do it here as well as your own thread location!

I also wanted to announce that this is actually going to be FREE to the public. Seeing a lot of people need oceans, I thought it only fair.

Dude, one of our material guys was talking about this the other day, to use for our coastline in Dreamtime!

I love JBaldwin! <3

Thank you , I think this pack will become definitly my favory starter pack.
I think yes , but do you saw the Water Plan made by Alan Willard ,Maybe you will see some nice idea.

Spotlight member like Epic said !

hi
just got a quick question about it, will it have Buoyancy?
many thanks

I’m really looking forward to this!!!

Hey ,

Finally got around to asking TK which method he used. Here is what he said (he may post up here later as well :)):

“the sss is actually from the nvidia water demo hlsl code :stuck_out_tongue: haha I totally not came up with it… just translated some code”

So there you have it. Hope that helps! If you ever have any extra parts that don’t get used in your system, I am open for donations!! :cool:

Cheers,

Hey JBaldwin! awesome work :slight_smile:
I can’t wait to get my hands on your ocean! really need that foam :stuck_out_tongue:

About the SSS, take a look at this demo Check Out Your Favorite PC Games With NVIDIA GeForce RTX
It actually includes hlsl code, I just did my best translated it to work with the material editor :stuck_out_tongue: although you could also put some of that code into a custom node with some slight modification.
There is probably more you can learn from there, such as diffuse and specular highlight code, but SSS was already complicated for me as it is :rolleyes:

However keep in mind that the demo code doesn’t seem to be designed to work with dynamic sun rotation (the demo has static sun) so there will need to be some clamping/fading, I’m currently working on that.

Thanks TK. This wave formula was a quick working model of what I am going to be building into HLSL at a later time. Definitely will also take into account the nvidia formula’s presented in the demo files. Not sure if I will use these, but they are good references. I appreciate the link :slight_smile:

Scatter_Factor - via nVidia .fx file:


// only the crests of water waves generate double refracted light
	scatter_factor=2.5*max(0,input.positionWS.y*0.25+0.25);

	// the waves that lie between camera and light projection on water plane generate maximal amount of double refracted light 
	scatter_factor*=shadow_factor*pow(max(0.0,(normalize(float3(pixel_to_light_vector.x,0.0,pixel_to_light_vector.z)),-pixel_to_eye_vector)),2.0);
	
	// the slopes of waves that are oriented back to light generate maximal amount of double refracted light 
	scatter_factor*=pow(max(0.0,1.0-(pixel_to_light_vector,microbump_normal)),8.0);
	
	// water crests gather more light than lobes, so more light is scattered under the crests
	scatter_factor+=shadow_factor*1.5*g_WaterColorIntensity.y*max(0,input.positionWS.y+1)*
		// the scattered light is best seen if observing direction is normal to slope surface
		max(0,(pixel_to_eye_vector,microbump_normal))*
		// fading scattered light out at distance and if viewing direction is vertical to avoid unnatural look
		max(0,1-pixel_to_eye_vector.y)*(300.0/(300+length(g_CameraPosition-input.positionWS)));

	// fading scatter out by 90% near shores so it looks better
	scatter_factor*=0.1+0.9*input.depthmap_scaler.g;