20
submitted 1 year ago* (last edited 1 year ago) by MossBear@lemmy.world to c/godot@programming.dev

I'm not terribly proficient with making materials yet, but I was wondering if something like this is doable and if so, what it might involve. I basically want to make a part of a creature appear beneath the ice in 3d. but I don't know how to approach it or what I should be looking at.

top 4 comments
sorted by: hot top controversial new old
[-] Zachs@lemm.ee 8 points 1 year ago

Check out an ice shader (ex: https://godotshaders.com/shader/spatial-ice-shader/). I'd imagine you could make a rectangle or plane with a material using the shader and place it over your creature. There's lots of good information in the Godot docs on shaders, I would recommend taking a look once you have a good grasp on the basics with materials.

The simplest would be to just create a material with alpha transparency and alpha set to e.g. 0.5 to be semi transparent. Apply the material to some object (cube/plane/etc.) in the scene and anything behind this object should appear as if behind a tinted glass. Or if you want something more sophisticated, then someone already posted links to ice shaders you might want to look into.

[-] Bezier@suppo.fi 1 points 1 year ago* (last edited 1 year ago)

Is this the effect you're after?
https://piped.video/watch?v=uLN69rtiu4Y
It's definitely possible with custom shaders, thought there might be somewhat of a learning curve.

[-] ICastFist@programming.dev 0 points 1 year ago

If it was in 2D, you could couple the sprites/textures under a CanvasGroup node.

In 3D, I suspect you'll want to apply a NoiseTexture3D. Although this video uses the 2D noise, I suspect it won't be too different in how to make it work for a 3D texture - https://youtu.be/IvOfx-kbqac

https://piped.video/watch?v=IvOfx-kbqac

this post was submitted on 28 Sep 2023
20 points (100.0% liked)

Godot

6027 readers
123 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

!roguelikedev@programming.dev

Credits

founded 2 years ago
MODERATORS