Open Grix opened 1 year ago
MeshTexture can't be used with decals. It can only be used with Canvas items or custom 2D drawing commands.
The docs for MeshTexture definitely have room for improvement
The engine should also provide an error when users try to set an invalid texture type on a Decal.
MeshTexture can't be used with decals. It can only be used with Canvas items or custom 2D drawing commands.
The docs for MeshTexture definitely have room for improvement
The engine should also provide an error when users try to set an invalid texture type on a Decal.
I see, that is unfortunate. Is there any other way of using decals with textures that you dynamically create at runtime like you can with a mesh?
Is there any other way of using decals with textures that you dynamically create at runtime like you can with a mesh?
You can generate ImageTextures at run-time with a script, but this will be slow with large image sizes.
Has this issue been resolved?
I'll probably start digging into this in the next couple of days, but if this issue has been resolved do let me know!
Hello, I want to look into this issue. Specifically, "The engine should also provide an error when users try to set an invalid texture type on a Decal."
@Meowzszs Feel free to open a pull request for this :slightly_smiling_face:
Godot version
4.0.3 (.NET)
System information
Issue description
I am trying to use a Decal with a MeshTexture, because in my game it would be very useful to dynamically draw decal shapes at runtime, which I could do by creating a MeshTexture with SurfaceTool etc, as far as I understand.
However, Decals with MeshTextures as their texture appears to not work. There are two problems I encounter:
Take a look at the reproduction project. There should be three decals visible, but only one is. To verify that the MeshTexture used in the decal in the sample project is a valid one, you can enable the TestingTexture instance. I generated the MeshTexture by converting a Sprite2D to this MeshInstance2D.
The documentation for MeshTexture is also generally very barebone. It is hard to understand exactly what this class does and how it's used, maybe this whole issue stems from me using it incorrectly.
Steps to reproduce
Minimal reproduction project
meshtexture_decal_test.zip