godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.14k stars 20.21k forks source link

Add more useful 3D viewport rendering modes #11392

Closed Calinou closed 4 years ago

Calinou commented 7 years ago

Now that Godot includes a wireframe mode for the 3D viewport, more viewport rendering modes could be added for the convenience of developers and artists alike.

Outline mode

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.

Lighting mode

Lighting mode example

This mode sets the normal map strength of all materials to 0, sets the albedo texture and color to pure white (#ffffff), disables specularity, sets roughness to 1 and metallic to 0.

Example use case: Analyzing lighting conditions in a level, regardless of the applied materials.


Footnote: the screenshots come from Cube 2: Sauerbraten, I am not working on an implementation of these modes in Godot.

blurymind commented 7 years ago

Do we have wireframe mode? Just wires, no materials, no faces

Calinou commented 7 years ago

Do we have wireframe mode? Just wires, no materials, no faces

Yes, Godot already supports this (in 2.1 and 3.0, I think).

ghost commented 7 years ago

Another one, Viewport movement locking when using a Quad setup.

fracteed commented 7 years ago

The main issue with wireframe mode at the moment is that it is always fully shaded. If there are no lights or gi generated in the scene you will see no wires, unless objects have a luminant texture.

As can be seen in the first image which has full baked lighting, all wires are visible and this actually looks really cool (haven't seen this style of wireframe mode in a 3d app before). The problem is this same scene, before any lighting is added looks like the second image. It would be totally black if there were no luminant meshes.

wire1

wire2

There are workarounds, like putting in some temp directional lights, but there is a great need for a solid color wireframe mode that can optionally pick up the albedo solid color to use per mesh. Would be great to keep the existing wireframe mode (called wireframe shaded) and have an additional wireframe solid option(like traditional wireframe looks). Since the current wireframe mode does look solid for meshes with luminant textures, I am guessing this is possible?

I agree that a combined unshaded + solid wire mode would be VERY useful! I would mostly use a mode such as this to lay out levels. Currently I mostly use unshaded, with some wireframe or overdraw as needed. The main issue with unshaded is that it is difficult to see any separation between separate meshes, which an overlaid wireframe (or even better just an outline of each mesh) would help rectify.

nunodonato commented 6 years ago

@fracteed I also had the same "wow" reaction when I saw that kind of wireframe for the first time. it does look cool, but is it useful? Usually when we need to go into wireframe mode, you dont want to get lighting problems in the way of debugging.

I would say to keep a standard wireframe would be more useful, but maybe we can have both? A cool wireframe and a clean wireframe? :D

clean wireframe with no light affecting it (but still using material and texture) cleanwire

clean wireframe without material textures cleanwire2

cleaner wireframe (no background) wiredark

clay render: clay

however, this is not fit for implementation due to a few issues:

fracteed commented 6 years ago

@nunodonato I agree that the current wireframe mode is not very usefull. A non-shaded wireframe and a wireframe over unshaded mode would be preferable. I also like that clay mode option you mentioned. To take that idea further, I would love to see a "matcap" option as can be used in Blender or Zbrush. This is very useful to see all models with uniform shading/lighting with some added cavity shading to simulate SSAO.

nunodonato commented 6 years ago

according to comments I read in other issues, by @akien-mga and @reduz , it seems the gizmo problems won't see a fix before 3.2 when we have render layers. So I guess that for now maybe this isn't a showstopper?

would it be useful to do a PR with a different wireframe and clay mode?

akien-mga commented 5 years ago

Assigning to @reduz as per https://github.com/godotengine/godot/pull/20333#issuecomment-446246476 and IRC discussion.

aaronfranke commented 5 years ago

Considering this has to do with rendering, should it have the 4.0 milestone?

clayjohn commented 4 years ago

Lighting mode has been added. Still need to improve wireframe mode to close this.

Calinou commented 4 years ago

Closing in favor of https://github.com/godotengine/godot-proposals/issues/1000, as feature proposals are now tracked on the Godot repository.