[Closed] Geometry preview, how is it done?
When using a tool like Extrude in Max you’re able to still make selections on the underlying mesh while the extrusion is being drawn, almost as if it isn’t there at all. Now ‘fake’ geometry or wires/points can be created in the viewport via the graphics window (gw) system, but it’s way too slow to be showing a completely alternative version of the mesh each frame. Also I have no idea how they’re hiding the original faces but keeping them selectable.
So what exactly is happening with these tools? If this even something that’s possible with maxscript, or are they using SDK-only methods to achieve it?
are you talking about something like Face Extrude Modifer or the extrude ops in Edit mesh/Edit poly or spline extrude modifier or is it something else ?
Yea just regular tools like Extrude, Bevel, Bridge, etc. while their popup dialog is open in an editable poly.
While they’re running Max displaying a modified mesh but selections act like the original mesh is still there.
as a modifier yes and no to “Now ‘fake’ geometry”… you get to change the base geometry but to display some of those changes requires your own “shallow copy” funnily enough in epoly it’s called mPreviewMesh. something like extrude is handled by a custom command mode (which will change the selection on the base mesh) the modifier then applies the dialog settings (or the user input) to the current selection and displays the changes via the shallow copy. Its not for the faint hearted and I stay well clear of editable poly and mnmesh in the sdk as it’s a flakey shit storm waiting to happen. Though if you want do delve deeper you can troll through the epoly project in samples/mesh