Jump to content

Bake Ocean Foam to Texture


Maya01

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 :)

Link to comment
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

Link to comment
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!

Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 1 year later...

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

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...