Jump to content
Maya01

Bake Ocean Foam to Texture

Recommended Posts

Hey!

I am doing some ocean stuff and I need to export it to Maya for rendering. I am currently trying to find a way to bake my ocean foam (generated by the ocean foam node) into a texture map. I know that I can use the "Ocean Evaluate" to bake the displacement for the waves but I am wondering if I can do something along the lines for the foam?

I would be really grateful if someone could help me out!

Thanks :)

Share this post


Link to post
Share on other sites

the ocean foam node generates particle geometry. Not sure if you could convert that to textures... The OceanShader does some magic under the hood to drive the displacement and streaking from that data.

the conventional export to texture from the ocean evaluate node should also have streaking and foam information if I'm correct

Share this post


Link to post
Share on other sites

Ahh too bad! Yeah I already kinda assumed so. I was hoping there might be some way to spit out something similar to what the shader uses for the displacement in the end but I thought it was a long shot!

I am going to investigate the ocean evaluate exported texture! 

Thank you for your reply!

Share this post


Link to post
Share on other sites

It's absolutely possible to export the foam as texture with the same pattern/method used in the shader. How? Using COPS and VOPs.

 
What I have done was copying the foam part inside the ocean shader in the VOPCOP generator. Here then you convert the data from world position to UV space.
 
 It has a few pros and cons though:
- First of all I have been using this method quite a lot to have a fast feedback while doing a project with tons of water shots. It's not very fast to generate but definitely waiting for the render of a small portion of the ocean is a lot slower.
 
- You are going to export a texture, so you have to export a really hires image to keep all the details and cover all the ocean. Also this has an easy solution. On the tool I've developed, there is the possibility to export an extra texture which is placed only near the camera/on the closeup sea. Further from the camera and more this texture is going to be blended with a low resolution texture.
 
- you need uvs in your ocean grid. This means it's going to be a little bit more complicated if you want to use it with also an ocean simulation.
 
If I'll have the time I'll post a more complete and accurate version, but here is an example for now. Hope you guys will find it useful:
 
 
foam_texture_export.thumb.png.04dfcddd79c39e1bf4726b62ac891e22.png
 
 
Edited by Andrea
  • Thanks 1

Share this post


Link to post
Share on other sites

Hey Andrea!

Thank you loads, this is super cool! I really really appreciate it!

I am indeed looking into using it with a sim but I can most likely figure some stuff out for the UVs and I have loads of whitewater on the sim itself that probably covers up some of the issues I could get close to the sim area.

I can't express enough how helpful this was! Thanks again! :)

Edited by Maya01

Share this post


Link to post
Share on other sites

Definitely using it just as a layer and not as unique foam layer will help a lot with the final look. Good luck with your project!

  • Like 1

Share this post


Link to post
Share on other sites

Hey Andrea!
Did you do a more final version of the .hip file for this?
Looking at the current one how do you render out whats being placed onto the grid?

 

Thanks

Share this post


Link to post
Share on other sites

Hi Steve,

I did not do any other versions, it was just for show how to do something similar to Maya.

You can render it by entering the cop2net node, inside there is a rop_comp which can be used to bake the texture. This texture is UV mapped to the grid, so you can use it as a mask or similar, if that's what you mean

Share this post


Link to post
Share on other sites

Thanks Andrea! 

Soz the cop2net node was way off to the right on my monitor so I missed it.

Thanks mate.

Share this post


Link to post
Share on other sites

So this foam stays in place & uses the foam particles to mask it.

Is there a way to get this foam to move with the movement of the particles & bake out as a sequence?

Thanks

Share this post


Link to post
Share on other sites

This is the replicated of the ocean shader and it works in the same way. Consider the particles as a mask on the foam shader build with noises. So if the particles coming out from "ocean foam" SOP are moving, also is this mask.

The distortion/movement in the noise itself is given by distance from the rest position attribute on the particles. The more they move from their initial position and the more the noise will evolve.

 

In the hip they should be moving ( even if not a lot). You can make them move more on the surface by increasing "drift rate".

I guess If you want the foam shader to evolve even more and not just moving following the drift of the particles, you have to animate the offset on the noise itself inside COPs.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×