Previous Post

DrawDebugMesh v1.0

Next Post
DrawDebugMesh v1.0
DESCRIPTION

One of the problems I encountered while creating the Breast_RefM morph was dealing with inconsistencies in how Blender and DAZ render the mesh versus VaM. Especially with regard to shading. The geometry can look spot on in Blender, but produce annoying issues in VaM - for example, one triangle in a quadrilateral displaying as shadowed and causing a blocky appearance that's inconsistent with the surrounding geometry.

To help debug these issues, I created a rudimentary plugin which draws a wireframe on top of the model in VaM. I imagine this might be useful in general when creating or editing looks. For example, it makes it easier to identify morphs that have unintended side effects.

Features

 

  • draw triangles or quadrilaterals

  • force Smooth Passes 0 (because the mesh is drawn from pre-smoothed position data)

  • toggle x-ray

  • offset the mesh along vertex normals for better visibility (at the cost of precision)

  • color and alpha settings for the wireframe

  • add to a Person atom (works with both male and female)

Draw quadrilaterals:

Draw triangles:

Draw quadrilaterals with x-ray:

Issues / good to know

The plugin consumes a lot of memory and has a heavy impact on frame rate. This isn't fixable because it results from having to fetch vertex positions from GPU buffers every frame. However given that it's a tool for editing, that should be OK, and the memory it uses is periodically freed up by VaM anyway.

  • You can minimize the memory buildup when tabbed out of VAM using FrameRateControlEE with "Pause VaM when not focused" checked.

  • There is a Keybindings command DrawDebugMesh.ToggleEnabled for toggling it on/off without having to navigate to the plugins list

Reload the plugin after changing the character in Skin Select. Note that not reloading allows you to disconnect the wireframe from the character which is kind of cool:

The wireframe isn't exactly 1:1 unless using the dummy skin. It seems VAM does some form of smoothing when using a non dummy skin, even if Smooth Passes is 0:

Further development

It would be possible to implement additional features such as

  • different wireframe display settings per Genesis 2 Female vertex group (head, torso etc), including toggling by region

  • highlight a morph's vertex deltas on the wireframe with a "heat map" showing affected areas

    • hover over a skin vertex to see the exact morph delta value for that vertex

    • group morphs together to visualize their combined deltas before merging the morphs with a separate tool like MorphMergeAndSplit

  • draw triangle/quad area with solid colors and disable rendering the skin texture (basically an attempt to display the mesh similarly to Blender's solid mode viewport shading)

Do you think this is useful, and would you like to see the above additional features? If you have an idea for a feature not mentioned here, let me know!

-everlaster

everlaster PATREON 43 favs
VIEWS1
FILES1 file
POSTEDNov 28, 2024
ARCHIVEDJun 10, 2026