Replies: 4 comments 1 reply
-
I believe there is a technical reason why Node3D (or rather, VisualInstance3D/GeometryInstance3D) doesn't have a |
Beta Was this translation helpful? Give feedback.
-
Perhaps. I don't know much about how this has been implemented in the engine. But it would be nice to have a more flexible rendering pipeline. After working with OpenGL, using Godot feels fairly limiting and you're always needing to create elaborate work arounds if you need to do anything other than draw meshes with Godot's lighting system. |
Beta Was this translation helpful? Give feedback.
-
This reminds me of I'm guessing that having it only draw/update when it should visible would be quite a challenge. |
Beta Was this translation helpful? Give feedback.
-
I wish 3d debug drawing was integrated in the engine, but for now there's a pretty good addon for it: https://github.com/DmitriySalnikov/godot_debug_draw_3d |
Beta Was this translation helpful? Give feedback.
-
At the moment, if you want to draw 3D graphics to screen, your only optin is to create a mesh, add it to a MeshInstance3D and then add it to the scene tree. Sometimes it makes more sense for the node to draw its own objects rather than having to defer to a MeshInstance3D. In my case, I'd like to draw tool helpers in an editor viewport, but I can also see this being useful if one wants to create a painting application and needs to draw brush strokes immediately and not at some deferred time.
I'd propose adding a _draw() call to Node3D that acts similar to the _draw() call on a CanvasItem. This method would be called very time the viewport is rendered. The Node3D would also provide a method that can be called from within the _draw() call which accepts a mesh object and a shader. This would then draw the given mesh with the indicated shader when the viewport completes its next render pass. This would only appear in the next pass and you'd need to supply it again in the next _draw() call if you wanted to have it draw in the next refresh.
Beta Was this translation helpful? Give feedback.
All reactions