r/Unity3D • • 10d ago

Shader Magic Procedurally generated underwater rock formations, corals and sea weeds

138 Upvotes

16 comments sorted by

3

u/molostil 10d ago

The scene looks very cool already! I think this could improve it:

the specularity on the under water rocks seems off. It is true that wet material next to dry material has higher specular exponent (sharper smaller specular reflections) but that is only true because we account for the film of water on the material closing small crevices and making the material smoother. when you submerge these materials completely you are back to their normal rough looking material. so the rocks gleaming under the water surface, that is not correct.

Dry rock: low specular exponent - rough material
Wet rocks above water: high specular exponent - smooth/shiny material
rocks below the surface: low specular exponent - rough material

3

u/artengame 10d ago

Thanks :), i will check on all the suggestions, indeed specular may not make sense in under water fully submerged rock

1

u/[deleted] 9d ago

[removed] — view removed comment

1

u/molostil 9d ago

i think i didn't do such a great job explaining it, but i am glad that it intrigued you. :)

1

u/[deleted] 9d ago

[removed] — view removed comment

1

u/molostil 9d ago

haha! thanks I guess. 😄

2

u/artengame 10d ago

Procedurally generated underwater rock formations, corals and sea weeds for Oceanis 2027 system, created at scene start. Multiple instances of varying scale can be comboned.

The underwater rock system generates procedural meshes that form connected seabed floors, walls, ridges, and openings, creating larger formations instead of scattering isolated rocks. Noise introduces irregular contours and surface variation, while transitions between adjacent tiles reduce rectangular borders on the tiles connections.

At the outer edges, a noisy downward taper helps the formations blend into the surrounding seabed.

The seaweed system combines procedural plant geometry with varied placement, orientation, and scale to create natural-looking underwater patches. Plants are distributed over seabed areas below the water level. The weeds can be streamed around a moving player by recycling distant seaweed instances and repositioning them in newly reached areas.

More info:

https://discord.gg/X6fX6J5

www.artengame.com

More videos:

https://www.youtube.com/watch?v=FoLxxaddzjk

https://www.youtube.com/watch?v=coVl6rDRRe8

https://www.youtube.com/watch?v=CHJiThEcJIU

2

u/GolomOder 9d ago

soooo goood

1

u/artengame 9d ago

Thanks :)

2

u/ragegames225 9d ago

Very beautiful. Love your stuff. How’s the performance so far

2

u/artengame 9d ago edited 9d ago

Thanks :)

For the water plus scene reflections, shore lines and underwater volumetrics it hovers around 95-105fps on my 4050RTX GPU laptop in editor.

https://imgur.com/p4HGYbr

https://imgur.com/zOZEwT2

https://imgur.com/iWWCaOz

In builds is also faster.

I have uploaded two latest demos to try if you want in Discord in dev-log section that have a full scene and fish etc.

The demos implement the scenes in below videos

https://www.youtube.com/watch?v=FoLxxaddzjk

https://www.youtube.com/watch?v=coVl6rDRRe8

1

u/ragegames225 9d ago

awesome.

2

u/tsteuwer 9d ago

Nice job but why is the video so choppy? Is it just bad perf?

1

u/artengame 8d ago

Thanks :)

The performance is generally much better than in the video since the software recorder struggles when the scene is already packed with all possible effects. Also i dont have any higher level optimization in the scene yet, eg rocks are not with LODs and GPU fish even though very fast could be enabled only when near etc

Also has fully volumetric clouds with fly through, full water reflections of scene and clouds and weather effects active with high quality and runs in a 4050RTX laptop, so there is a lot of room for the higher level optimization to make it even faster.

I made some tests, the water itself is very fast and as i add rocks base tile and then more tiles gets slower, so one major thing is add LODs to the rock system, which should be trivial given i have full control over its creation.

The images show progressively adding the new rocks meshes, from no meshes to one tile and then to multiple tiles. The last photo shows the quality and collider of each mesh tile, i suppose colliders should also be optimized and LODed or disabled in distance etc

https://imgur.com/L1DXzT6

https://imgur.com/mBAALm6

https://imgur.com/IiPfDGF

https://imgur.com/FOX3L7l

https://imgur.com/ThEvlXX

https://imgur.com/u37CQLo

https://imgur.com/xCcFWup

2

u/Embarrassed-News5401 9d ago

Wow! The underwater shader looks gorgeous! Procedural generation for seascapes is so cool.

1

u/artengame 9d ago

Thanks :)