Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Debug Draw 3D (4.4.1+)

An asset by DmitriySalnikov
The page banner background of a mountain and forest
Debug Draw 3D (4.4.1+) thumbnail image
Debug Draw 3D (4.4.1+) thumbnail image
Debug Draw 3D (4.4.1+) hero image

Quick Information

0 ratings
Debug Draw 3D (4.4.1+) icon image
DmitriySalnikov
Debug Draw 3D (4.4.1+)

This is an add-on for debug drawing in 3D and for some 2D overlays, which is written in C++ and can be used with GDScript, C++ or C#.= Features =3D:* Arrow* Billboard opaque square* Box* Camera Frustum* Capsule* Cylinder* Gizmo* Grid* Line* Line Path* Line with Arrow* Plane* Points* Position 3D (3 crossing axes)* Sphere* 3D TextOverlay:* Text (with grouping and coloring)Precompiled for:* Windows* Linux (built on Ubuntu 22.04)* macOS (10.15+)* Android (5.0+)* iOS* Web (Firefox is supported by Godot 4.3+)This addon supports working with several World3D and different Viewports.There is also a no depth test mode and other settings that can be changed for each instance.This library supports double-precision builds, for more information, see the Documentation -> Double Precision.= Examples and documentation =During installation, you can unpack the "examples_dd3d" folder and examine its contents or go to the online documentation via 'Project - Tools - Debug Draw - Open the Documentation'. A list of all functions is available in the documentation inside the editor.!! Restart the editor after installation! !!

Supported Engine Version
4.4
Version String
1.7.3
License Version
MIT
Support Level
community
Modified Date
13 days ago
Git URL
Issue URL

README icon

Debug drawing utility for Godot

This is an add-on for debug drawing in 3D and for some 2D overlays, which is written in C++ and can be used with GDScript, C++ or C#.

Based on my previous addon, which was developed only for C#, and which was inspired by Zylann's GDScript addon

Documentation

Godot 3 version

Support me

Your support adds motivation to develop my public projects.

Boosty

USDT-TRC20

USDT-TRC20 TEw934PrsffHsAn5M63SoHYRuZo984EF6v

Features

3D:

  • Arrow
  • Billboard opaque square
  • Box
  • Camera Frustum
  • Capsule
  • Cylinder
  • Gizmo
  • Grid
  • Line
  • Line Path
  • Line with Arrow
  • Plane
  • Points
  • Position 3D (3 crossing axes)
  • Sphere
  • 3D Text

Overlay:

  • Text (with grouping and coloring)

Precompiled for:

  • Windows
  • Linux (built on Ubuntu 22.04)
  • macOS (10.15+)
  • Android (5.0+)
  • iOS
  • Web (Firefox is supported by Godot 4.3+)

This addon supports working with several World3D and different Viewports. More information.

There is also a no depth test mode and other settings that can be changed for each instance.

This addon supports double-precision builds, for more information, see the documentation.

Interactive Web Demo

README screenshot_web

Download

To download, use the Godot Asset Library or use one of the stable versions from the GitHub Releases page.

For versions prior to 1.4.5, just download one of the source codes in the assets. For newer versions, download debug-draw-3d_[version].zip.

Installation

  • Close editor
  • Copy addons/debug_draw_3d to your addons folder, create it if the folder doesn't exist
  • Launch editor

Examples

More examples can be found in the examples_dd3d/ folder.

Simple test:

func _process(delta: float) -> void:
    var _time = Time.get_ticks_msec() / 1000.0
    var box_pos = Vector3(0, sin(_time * 4), 0)
    var line_begin = Vector3(-1, sin(_time * 4), 0)
    var line_end = Vector3(1, cos(_time * 4), 0)

    DebugDraw3D.draw_box(box_pos, Quaternion.IDENTITY, Vector3(1, 2, 1), Color(0, 1, 0))
    DebugDraw3D.draw_line(line_begin, line_end, Color(1, 1, 0))
    DebugDraw2D.set_text("Time", _time)
    DebugDraw2D.set_text("Frames drawn", Engine.get_frames_drawn())
    DebugDraw2D.set_text("FPS", Engine.get_frames_per_second())
    DebugDraw2D.set_text("delta", delta)

README screenshot_1

An example of using scoped configs:

@tool
extends Node3D

func _ready():
    # Set the base scoped_config.
    # Each frame will be reset to these scoped values.
    DebugDraw3D.scoped_config().set_thickness(0.1).set_center_brightness(0.6)

func _process(delta):
    # Draw using the base scoped config.
    DebugDraw3D.draw_box(Vector3.ZERO, Quaternion.IDENTITY, Vector3.ONE * 2, Color.CORNFLOWER_BLUE)
    if true:
        # Create a scoped config that will exist until exiting this if.
        var _s = DebugDraw3D.new_scoped_config().set_thickness(0).set_center_brightness(0.1)
        # Draw with a thickness of 0
        DebugDraw3D.draw_box(Vector3.ZERO, Quaternion.IDENTITY, Vector3.ONE, Color.RED)
        # If necessary, the values inside this scope can be changed
        # even before each call to draw_*.
        _s.set_thickness(0.05)
        DebugDraw3D.draw_box(Vector3(1,0,1), Quaternion.IDENTITY, Vector3.ONE * 1, Color.BLUE_VIOLET)

README screenshot_5

[!TIP]

If you want to use a non-standard Viewport for rendering a 3d scene, then do not forget to specify it in the scoped config!

API

This project has a separate documentation page.

Also, a list of all functions is available in the documentation inside the editor (see DebugDraw3D and DebugDraw2D).

README screenshot_4

Known issues and limitations

The text in the keys and values of a text group cannot contain multi-line strings.

The entire text overlay can only be placed in one corner.

Frustum of Camera3D does not take into account the window size from ProjectSettings.

Usage Analytics

This addon collects anonymous statistics on editor usage time. The data includes the library version, engine version, operating system, system architecture, and locale. No personally identifiable information is gathered.

Libraries without editor support do not collect statistics in any way. Also, previews running in the editor do not collect any usage statistics.

You can disable this in the editor settings at: debug_draw_3d/settings/telemetry_state.

More screenshots

DD3DDemo.tscn in editor README screenshot_2

DD3DDemo.tscn in play mode README screenshot_3

This is an add-on for debug drawing in 3D and for some 2D overlays, which is written in C++ and can be used with GDScript, C++ or C#.

= Features =
3D:
* Arrow
* Billboard opaque square
* Box
* Camera Frustum
* Capsule
* Cylinder
* Gizmo
* Grid
* Line
* Line Path
* Line with Arrow
* Plane
* Points
* Position 3D (3 crossing axes)
* Sphere
* 3D Text

Overlay:
* Text (with grouping and coloring)

Precompiled for:
* Windows
* Linux (built on Ubuntu 22.04)
* macOS (10.15+)
* Android (5.0+)
* iOS
* Web (Firefox is supported by Godot 4.3+)

This addon supports working with several World3D and different Viewports.
There is also a no depth test mode and other settings that can be changed for each instance.

This library supports double-precision builds, for more information, see the Documentation -> Double Precision.

= Examples and documentation =
During installation, you can unpack the "examples_dd3d" folder and examine its contents or go to the online documentation via 'Project - Tools - Debug Draw - Open the Documentation'.

A list of all functions is available in the documentation inside the editor.

!! Restart the editor after installation! !!

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Debug Draw 3D (4.4.1+) icon image
DmitriySalnikov
Debug Draw 3D (4.4.1+)

This is an add-on for debug drawing in 3D and for some 2D overlays, which is written in C++ and can be used with GDScript, C++ or C#.= Features =3D:* Arrow* Billboard opaque square* Box* Camera Frustum* Capsule* Cylinder* Gizmo* Grid* Line* Line Path* Line with Arrow* Plane* Points* Position 3D (3 crossing axes)* Sphere* 3D TextOverlay:* Text (with grouping and coloring)Precompiled for:* Windows* Linux (built on Ubuntu 22.04)* macOS (10.15+)* Android (5.0+)* iOS* Web (Firefox is supported by Godot 4.3+)This addon supports working with several World3D and different Viewports.There is also a no depth test mode and other settings that can be changed for each instance.This library supports double-precision builds, for more information, see the Documentation -> Double Precision.= Examples and documentation =During installation, you can unpack the "examples_dd3d" folder and examine its contents or go to the online documentation via 'Project - Tools - Debug Draw - Open the Documentation'. A list of all functions is available in the documentation inside the editor.!! Restart the editor after installation! !!

Supported Engine Version
4.4
Version String
1.7.3
License Version
MIT
Support Level
community
Modified Date
13 days ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers