Godot: Baked Pivots
Вставка
- Опубліковано 5 лют 2025
- This topic has always seemed cumbersome and difficult to understand when I studied it in Unity and Unreal Engine tutorials. Because... it really is. Why did someone think of using UV maps to store 3D coordinates? Anyway, the technique is quite powerful. And I'm going to use very similar techniques for my next tutorials. I've done my best to explain this topic, hopefully it's clear to you. Because if this is not, the following may not be clear to you either 😅
Upcoming tutorials:
-Hexagonal sphere simple - N to 1, 2D pivots
-Hexagonal sphere complex - N to 1, 3D pivots (rotation,scale,object detection)
-Fluffy trees - There are already implementations in Godot, but I want to make my own with a lot more features
-VAT (Vertex Animation Textures) crowd simulation | flocking
*this list may change because I have other plans also with compute shaders. Besides other tutorials pending
DOWNLOAD FREE PROJECT
/ baked-pivots-106665426
DOWNLOAD FULL FILE (SUPPORTER)
/ baked-pivots-106664999
#godot #godot4 #shaders
Really interesting work. You might want to reduce the volume of the intro music, it is hard to hear you over the music.
just in the case if you don't know , Godot 4 can directly support blender files . You just have to enable option in editor settings.
Bro, how you getting no views? This stuff is legendary👍
It's so simple, but I didn't figure it out! I tried using geonodes for this. It turns out well, but I baked everything into the texture and sometimes got artifacts.
And this.... It's so simple that it's even brilliant!)
can you add body collision and simulation gravity with this pivot feature , for example: crash a wall in pieces from bullets using pivot?
Maybe, but it wouldn't be worth it. A shader can't keep state, so it only reacts to external values (time, effector) as if it were a function. Then the physics of all the pieces would have to be calculated from outside (gdscript), which doesn't make sense.
This is one of the coolest effects I've seen someone doing in Godot. I'm new to non-visual shader programming. Is it possible to have each piece rotate continuously individually?
I guess so, they could rotate with respect to the TIME variable, and to make them rotate differently, use the random function
@@pixezy8962 Yeah, I've been experimenting with that but I'm not sure how to get the 'rotation' property of each of the pieces
Awesome job, one important detail you did not explain. At min minute 6:20 ... you did not mention Dimensions and Effector settings, if not set properly the effect is not visible.
Bottom Right of the screen (in the Inspector):
Dimensions (suggested)
1.8, 1.7, 0.2
Effector (suggested)
0, 1, 0.5
This is really important in order to replicate the effect you created. Also, just in case reload the project.
Really good work!
couldn't you have baked the pivot positions into vertex colors? because using both uv maps leaves you with a mesh that has no valid uv map for the fragment shader
That is something I need to explore in the hex sphere tutorial, because I'll need 3 UV maps. I was testing before the CUSTOM0,1,2,3 channels of the spatial shader and it seems that I can store additional UVs in those channels.
Baking pivot coords into vcols is unnecessary imo. Are you saying there's a limit on how many UV maps gltf/godot mesh can have?
Do you only get 2 uvs in Godot?
i need this
couldnt understand a word of the intro because of the loud music.