spinning propeller blade

Create a MeshInstance3D, set the mesh type to a plane then add this shader to it to see the effect.

Shader code
shader_type spatial;

uniform vec3 color = vec3(0.0);
const float lim = 0.0;
const float speed = 2.5;

void fragment() {
	ALBEDO = vec3(0.5);
	
	float angle = TIME * speed;
	float x = cos(angle)*(UV.x-0.5) + sin(angle)*(UV.y-0.5);
	float y = -sin(angle)*(UV.x-0.5) + cos(angle)*(UV.y-0.5);
	
	float dist = sqrt(pow(x, 2) + pow(y, 2));
	if(dist < 0.5){
		ALPHA = 0.25 - (((pow(x, 2)/dist) - pow(y, 2)/2.0) * 5.0);
		ALPHA /= 2.0;
		if(ALPHA < lim){
			ALPHA = lim;
		};
		ALPHA += 0.15;
	}else{ ALPHA = 0.0; }
}
Tags
3d, animated, hellicopter blades
The shader code and all code snippets in this post are under MIT license and can be used freely. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from Matthias

Brick Wall

Matrix style 3D hologram

Carbon fiber wrap

Subscribe
Notify of
guest

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
GEG-fairbear8974
4 months ago

This is great!