Godot-proposals: Add per-face materials to CSG nodes

Created on 28 May 2020  路  4Comments  路  Source: godotengine/godot-proposals

Describe the project you are working on:
3d racing game that makes heavy use of CSG because of it's lowpoly nature

Describe the problem or limitation you are having in your project:
CSG materials are all or nothing. Sometimes they fit perfectly on one face, but are stretched on another.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Per face CSG materials would massively increase the utility of CSG shapes.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Mockup in original issue.

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

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

Original issue: https://github.com/godotengine/godot/issues/22559

core

Most helpful comment

It's also worth mentioning that texture scale should be in the GLOBAL context
IE: If you scale a mesh, the textures should continue tiling instead of scaling with the mesh

Or have a texture lock switch. Like Trenchbroom has.

Also, while at it, let untextured CSG brushes have a checkerboard or grid pattern (tied to the grid size) to better understand scales.

All 4 comments

Thanks for posting this @Zireael07 .
I totally support this as (as previously mentioned) the current material system is extremely limited and others who've attempted to remedy this have had to completely re-implement CSG.

Here's the diagram from the old post (Which I stole and modified from a quake mapping tutorial)
46259095-762f8b80-c4cc-11e8-9a39-6bd464fa1cd3

Here's a (crude) mock-up of how an editor GUI for such a system could work.
Feedback would be appreciated but I think it gets most things down.
CSGProposalv3

It's also worth mentioning that texture scale should be in the GLOBAL context
IE: If you scale a mesh, the textures should continue tiling instead of scaling with the mesh

It's also worth mentioning that texture scale should be in the GLOBAL context
IE: If you scale a mesh, the textures should continue tiling instead of scaling with the mesh

Or have a texture lock switch. Like Trenchbroom has.

Also, while at it, let untextured CSG brushes have a checkerboard or grid pattern (tied to the grid size) to better understand scales.

I tried Trenchbroom and FreeCad and no one is so intuitive and easy to use as Godot csg system and is integrated in the engine. I really like it but is a bit limited and sometimes the result can broke and has texture or shading problems with smooth faces. Would be very nice features like this.

Was this page helpful?
0 / 5 - 0 ratings