Maya01 Posted July 20, 2020 Share Posted July 20, 2020 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 Quote Link to comment Share on other sites More sharing options...
Jebbel Posted July 20, 2020 Share Posted July 20, 2020 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 Quote Link to comment Share on other sites More sharing options...
Maya01 Posted July 20, 2020 Author Share Posted July 20, 2020 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! Quote Link to comment Share on other sites More sharing options...
Andrea Posted July 21, 2020 Share Posted July 21, 2020 (edited) 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: AS_convert_ocean_foam_to_texture.hip Edited July 21, 2020 by Andrea 1 Quote Link to comment Share on other sites More sharing options...
Maya01 Posted July 21, 2020 Author Share Posted July 21, 2020 (edited) 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 July 21, 2020 by Maya01 Quote Link to comment Share on other sites More sharing options...
Andrea Posted July 21, 2020 Share Posted July 21, 2020 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! 1 Quote Link to comment Share on other sites More sharing options...
Stevie Mac Posted September 9, 2021 Share Posted September 9, 2021 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 Quote Link to comment Share on other sites More sharing options...
Andrea Posted September 9, 2021 Share Posted September 9, 2021 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 Quote Link to comment Share on other sites More sharing options...
Stevie Mac Posted September 10, 2021 Share Posted September 10, 2021 Thanks Andrea! Soz the cop2net node was way off to the right on my monitor so I missed it. Thanks mate. Quote Link to comment Share on other sites More sharing options...
Stevie Mac Posted September 10, 2021 Share Posted September 10, 2021 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 Quote Link to comment Share on other sites More sharing options...
Andrea Posted September 10, 2021 Share Posted September 10, 2021 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.