how to change sprite depend upon angle between a spriter3d (lets say a tree) and a player. I am trying to create a imposter LOD for a tree using its billboard effect.. please help me ... godot 4.
trying to make a cardboard imposter tree with sprite3d in godot4
bongblender Are you asking how to turn sprites into camera facing billboards? If that's the question, 3d sprites have 'Billboard' property that can be set to full billboard or y-billboard.
xyz No, not that ... I know there is this billboard effect. i want to change the sprite depend upon the angle between the sprite3D and player.. essentially emulate Octahedral Impostors.
I think something like the code in this link might help: https://godotengine.org/qa/135902/billboarding-how-change-enemy-sprite-based-player-position
TwistedTwigleg Thanks, that is what i exactly wanted..
one more thing, i think i need to learn shader... can you direct me to some resourse for that. (godot 4)
- Edited
bongblender i think i need to learn shader... can you direct me to some resourse for that. (godot 4)
There are few resources for learning shaders at all. And for Godot 4 shaders, only the official documentation. Option: learn basic shader handling, compare to working examples, and try to grasp the differences.
Yeah, shaders sadly are not very easy to learn. I have some experience with shaders in game engines prior to Godot and some raw OpenGL experience as well, which helps a bit
The official Godot documentation on shaders is a good start for the Godot version of shaders, which is roughly 90% OpenGL and 10% Godot niceties that make it a little easier than raw OpenGL.
- Edited
With regards to visual shader graph, while things aren't called the same 1 to 1 I recommend looking at tutorials for other visual shader graph systems, such as unreals. It's quite doable to port solutions over.
And once you have a basic grasp of how things work there it becomes easier to get into writing shaders in code as well. I'd start with that - visual graph shaders first.