powroupi / blender_mmd_tools

mmd_tools is a blender addon for importing Models and Motions of MikuMikuDance.
GNU General Public License v3.0
1.81k stars 277 forks source link

Sharing geometry nodes stuff #345

Closed nathanvasil closed 3 years ago

nathanvasil commented 3 years ago

Geometry nodes have some potential to simplify and improve a lot of the stuff that MMD Tools is doing, at least once they get to a 2.93 release.

image

I'm doing two things there with geometry nodes to simplify outline generation. First, I'm just making a great big join of (almost) everything in the scene, to simplify how everything is laid out. That means that almost everything being rendered on the preview is actually one single object. Because of that, I can use a single modifier and a single new outline material on the object.

Then I'm doing a roughly screen-space displacement to generate my outline. I'm not doing the FoV calculations here, or taking resolution into account, but the idea is to do something akin to a single pixel outline. (This has been doable in Cycles via true displacement for a while, but not in Eevee.)

Vertex groups are currently a little bit bugged in the beta, so I'm not doing edge line thickness here, but when that's all worked out, I could. It might be better for performance reasons at that point to just use GN to create appropriate vertex group weights and let a basic solidify or displace handle the actual displacement.

UV support isn't all the way there yet, but the UV warping that MMD Tools is currently doing should soon be able to be collapsed into a single MMD geometry nodes modifier.

I can't say anything certain about performance, but geometry nodes have the potential to at least simplify the user experience of MMD Tools.

Just wanted to share, in case anybody would find it interesting :)