Skip to content

Add an outline mode to the editor 3D viewport rendering modes to complement the wireframe mode #1000

Open
@Calinou

Description

@Calinou

Describe the project you are working on:

The Godot editor 🙂

Describe the problem or limitation you are having in your project:

To visualize a 3D scene's polygon layout, Godot currently offers a wireframe mode:

Wireframe mode for the 3D viewport

However, this rendering mode can become difficult to read in more complex scenes due to the lack of occlusion. The background color can also make individual lines difficult to notice.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

Similar to what's offered in most Quake-derived engines (r_showtris 1), an outline mode could be added. It would keep the original scene's shading but draw colored lines on top (with occlusion provided by the original scene). The line color could be made configurable in the 3D viewport settings, ideally with an adjustable alpha component for translucent lines. The default color would probably be translucent white (or some shade of light gray if transparency isn't available).

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

Outline mode example

This mode displays materials as usual, but displays a wireframe on top of them. The color should be settable by the user, but probably should default to a white or light gray color.

Example use case: Displaying geometry complexity while still being able to freelook through a level easily. If this mode ends up being accessible during gameplay, it could be used to debug procedural geometry generation more efficient as well.

If this enhancement will not be used often, can it be worked around with a few lines of script?:

It would require a few hundreds of lines of script, if it's even possible (see below).

Is there a reason why this should be core and not an add-on in the asset library?:

I don't think this is possible, especially in a performant way.


PS: The screenshots come from Cube 2: Sauerbraten. I'm not currently working on an implementation of these modes in Godot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions