How do I achieve the Quad Draw Look?

How do I achieve the Quad Draw Look?

addiskidan
Contributor Contributor
633 Views
7 Replies
Message 1 of 8

How do I achieve the Quad Draw Look?

addiskidan
Contributor
Contributor

Hi,

 

I'm building a maya retopology tool and i'm trying to get a viewport look similar to quad draw.
What i want specifically is the same visual result quad draw has where the wireframe overlay is above the material.

Since my retopologised mesh occupies nearly the same space as the source mesh, i had to use "alwaysDrawOnTop" with a semi transparent material. The problem is it brings the shading of the object over the wireframe rendering it useless. Is there a way to force wireframe to render on top of the object's shading without enabling wireframe on shaded globally? and maybe control thickness also? 

 

import maya.cmds as cmds

selection = cmds.ls(selection=True)

for ctrl in selection:
    shape = cmds.listRelatives(ctrl, shapes=True)
    if shape:
        for shp in shape:
            cmds.setAttr("{0}.alwaysDrawOnTop".format(shp), True)


Screenshot 2026-04-24 225720.png

0 Likes
Accepted solutions (1)
634 Views
7 Replies
Replies (7)
Message 2 of 8

brentmc
Autodesk
Autodesk

Hi,

This older post has information on how QuadDraw achieves that look.
https://forums.autodesk.com/t5/maya-modeling-forum/create-material-like-the-quad-draw/m-p/13757644#M...

You have already discovered the alwaysDrawOnTop attribute and the thick wireframes are handled by custom drawing in QuadDraw.

Brent McPherson
Principle Software Developer
0 Likes
Message 3 of 8

addiskidan
Contributor
Contributor

Hi Brent,
Thank you. I understand now that the wireframe is custom drawn and the mesh uses alwaysDrawOnTop. One thing i'm still trying to understand is the depth relation between the two. Are both (quad draw object and wireframe) custom drawn together or is the blue mesh a regular geometry with the wireframe only custom drawn on top? If the wire is custom drawn separately, how is it depth-sorted against the blue surface? Is it using MShaderInstance::setDepthPriority or a custom viewport ordering? Any guidance on the api path would be very welcome. Thanks in advance!

 


Screenshot 2026-04-29 011310.pngScreenshot 2026-04-29 014655.pngScreenshot 2026-04-29 025020.png

0 Likes
Message 4 of 8

brentmc
Autodesk
Autodesk
Accepted solution

Hi,

The two are drawn separately.

It has been a long time since I worked on this and I didn't work directly on the rendering aspect so take this info with a grain of salt...

The blue mesh (drawn with alwaysOnTop) is drawn with depth buffer trickery to appear on top of the mesh you are retopologizing with QuadDraw.

The thick wireframe mesh is drawn on top without depth buffering and it might be using something like alpha testing to handle self-occlusions.
This is done using a custom drawing mode that I don't believe is exposed via the API.

Brent McPherson
Principle Software Developer
Message 5 of 8

addiskidan
Contributor
Contributor

Screenshot 2026-05-01 022359.png

 I settled on a muted wireframe color without self occlusion. Not as nice as quad draw but it's readable. Thank you for the help!

0 Likes
Message 6 of 8

brentmc
Autodesk
Autodesk

You're welcome. Looks cool!

Brent McPherson
Principle Software Developer
0 Likes
Message 7 of 8

addiskidan
Contributor
Contributor

Hi Brent,
I'm very happy with how this turned out and I thought i'd share it with you. 

Thank you once again for helping me figure this out.

https://youtu.be/STMEkDkeZzc 

Message 8 of 8

brentmc
Autodesk
Autodesk

Thanks for sharing. That looks very cool!

Brent McPherson
Principle Software Developer
0 Likes