- Edited
Is it possible to project an image on a 3D surface from a camera view when a game is running?
How can this be implemented?
like here
Is it possible to project an image on a 3D surface from a camera view when a game is running?
How can this be implemented?
like here
It is definitely possible, though the implementation varies on your game's specific needs and how you choose to implement it. The technique is called Decal Projecting.
Decal support is planned for a future Godot version according to the Roadmap on the GitHub repository. There is an open issue for adding decal support as well that has some interesting discussion about the feature.
That said, it is entirely possible to implement your own decal system for use in Godot right now. Here are a couple repositories I found that implement decals:
There are also several good resources that explain how the process works. Below I have linked a few that either I have used, or look helpful:
Depending on your project, you might be able to use some tricks and shader work to get something that works well enough for your needs: (I can also now test the Twitter embed! :mrgreen: )
https://twitter.com/TwistedTwigleg/status/1142603571776630784
I'm currently working on a project utilizing this. Once the project is farther-along/finished I plan to share how the system works.
It isn't a true decal system, as it doesn't actually project the texture. This makes it not wrap around objects very well. However, this system works fine for my project(s), as I'm primarily using flat surfaces. One advantage I have with my fake decals is that I'm doing simple calculations, leading to pretty good performance with high numbers of decals. One disadvantage with faking a decal system is I do not have nearly the same flexibility and visual prowess.
What will work best may depend on the specific needs of your project, what features you need, and what problems you can work around. Every decal system I have used has it's own set of quirks/limitations.
I would definitely check out the Godot repositories listed above! They both look very helpful, and they should provide a head start if you need to make your own decal system.
Hopefully this helps! (Side note: welcome to the forums)