Export PBR textures from Blender (Water)

Hi

Being inspired by projects like these: In-Game Realistic Ocean Thunderstorm, Seamless, endless, and performant custom water using skinned meshes and PBR.
I wondered how they were able to create such realistic looking water textures. I saw this thing called PBR: Physically Based Rendering and it’s implementation in Roblox: SurfaceAppearance, and set out to try creating realistic water.

In this tutorial I will show you how you can use Blender (an awesome piece of FOSS) to export PBR materials for use in Roblox.

You should be pretty familiar with Blender to follow this tutorial, as I won’t be covering every step. Make sure to ask questions if you have any.

Let’s start!
To export textures, I used this awesome Blender plugin: https://github.com/danielenger/Principled-Baker
This tutorial can help you with the installation: https://www.nodragemgames.com/post/gamedev/02_pbr_blender_to_unity/

For making the water material I used this resource: Realistic Water Shader - CYCLES volumes - Blender Tests - Blender Artists Community

Here’s my modified version:

For finally baking the material, make sure to tick these boxes inside the “Bake list”:
image
The exported images go respectively under ColorMap, MetalnessMap, RoughnessMap and NormalMap.

Here’s the finished result:

Make sure to post any improvements or mistakes I made, and I will try to update this post.
Thanks for reading!

15 Likes

I wasn’t very pleased with the texture of my water, so I looked around for some more realistic textures and I found this video.
The shader in blender looks like this:


And here’s how it looks in-game with EnvironmentSpecularScale set to 1:

Much better!

I also didn’t use the ColorMap property. This way I can easily change the color of the ocean, whilst still retaining the realistic reflections:

Here are the assetId’s:
Colormap: empty
MetalnessMap: 6697862789
NormalMap: 6697865338
RoughnessMap: 6697866266

19 Likes

really good job w those texture maps and use of lighting properties

3 Likes

I wonder how would someone approach making the character swim in this or a boat that sails

2 Likes

i did it by getting the bones of the ocean surrounding the player then plugging the characters x and z positions into the equation of the plane (of the bones) to get the y value if the players y value is less than the given y value then start swimming and boats is a bit more complicated

3 Likes

Yes, just as @S0MBRX said.
Some extra points:
Plug in the offset twice, to get a better approximation of the actual waveheight at a position.

Look at ‘swimpart’ resources on the devforum and see how they make your character swim.

For a boat, I would first make a floating part, then make this part invisible and weld the actual boat model to this floating part.

Making a single part float is easier than a complex boat model…

For boat movement, start with a SmoothTerrain water boat and play with the forces.

One last thing is to add a force that resists motion. This will make everything more stable especially with players jumping on top of the parts. (Also torque)

2 Likes

I have copied your shader settings, and baked the texture with the addon but my results are wayyy uglier what am i missing?

Hi
You mean the final result is worse? Or is it already worse in blender?

Maybe you’re using another blender version? Or perhaps there’s a small thing you forgot?
I’m not sure.

No I meant the exported result in roblox looked way worse it was overly detailed, i toned down strength of bumps to like 0.005 and now it looks good

1 Like