Wall Worm Forums

Design Tools => Commercial Tools => Topic started by: wallworm on June 15, 2016, 12:59:27 PM

Title: Delete Faces Modifier
Post by: wallworm on June 15, 2016, 12:59:27 PM
New plugin by Wall Worm: Delete Faces Modifier (https://wallworm.com/store/index.php?route=product/product&product_id=66).

https://www.youtube.com/watch?v=SWpDTPvFfBw 

Note this modifier requires 3ds Max 2016 SP2+. Version 2 Now works in 3ds Max 2015-2017.
Title: Re: Delete Faces Modifier
Post by: wallworm on August 09, 2016, 07:48:23 PM
Update today. Converted to a C++ plugin and added support for 3ds Max 2015-2017. Works faster now and includes new options for SmoothingGroups and MaterialIDs:

Smoothing Groups now allow deleting faces matching SG values and these rules:
* Match Any (default and previous) where any SG value found on face deletes the face
* Many All (only deletes faces with all of the SG values)
* Match None (deletes faces that have none of the SG values)

Material ID:
* Has ID (default and previous) where any matching material ID gets deleted
* Does Not Have ID: deletes faces that don't use one of the listed MatIDs

The MAXScript version is still available in the store to download, but must be deleted before installing the new version. Also, the new version has a DLM file and a MAXScript file. Please read the installation instructions as the MS file is needed to add the UI for some of the functions in the modifier.
Title: Re: Delete Faces Modifier
Post by: AeRo on April 30, 2017, 03:47:07 AM
Very useful tool, I use it permanently.

But very serious bugs:

New version 04/15/2017 Max 2018 and Max 2016 C++ version don't work at all: error on plugin load. Error "Module not found". Tested on win7 and win10. Max 2018 and Max 2016 SP4 EXT2. Scripted version works fine, but don't work after Sweep modifier on Max 2018.

So I use only previous C++ version on win7 and win10. Max 2016 SP4 EXT2:

1. Plugin delete polygons, but isolated vertices stays. Scripted version do this.

2. On complex geometry with "selected poly"=on and "by polygon"=on some tris remain undeleted.

3. After stack collapse "delete poly rollout" stays under edit poly rollouts.


It is possible to fix this?
Title: Re: Delete Faces Modifier
Post by: wallworm on April 30, 2017, 09:01:20 AM
Thank you for reporting. I will test and see why they are no working. The files I am using are working fine, so it's possible the version uploaded to the store is bad.

I would not suggest using the scripted version at all if you plan on using the C++ version as I've learned that they are not compatible and I inappropriately gave them the same classID. So opening the same scene with different plugin created than the version running in Max can cause an issue. I'd only use the MAXSCRIPT  in older Max that C++ wasn't compiled for.
Title: Re: Delete Faces Modifier
Post by: wallworm on April 30, 2017, 09:29:11 AM
EDIT: I meant to say only to use the MAXSCRIPT version in versions of Max that haven't been compiled to C++ yet. I am looking into the C++ problem.
Title: Re: Delete Faces Modifier
Post by: wallworm on April 30, 2017, 12:24:12 PM
Version 2.1

   * Added support for Max 2018.
   
   * Fixed some problems with Delete Faces.
   
   * Fixed isolated vertices not being deleted.
   
   * Added button in Custom Attribute to delete the rollout when it persists after the modifier list has been collapsed.
Title: Re: Delete Faces Modifier
Post by: AeRo on April 30, 2017, 01:16:20 PM
Many thanks for fast response!!!

But still problem with some selected faces and "by polygon"=on

Screenshot. Max 2016 SP4 EXT2 Win10.
Title: Re: Delete Faces Modifier
Post by: wallworm on April 30, 2017, 01:18:20 PM
OK, I will look at that issue ASAP. I may not have a fix today but will prioritize it.
Title: Re: Delete Faces Modifier
Post by: wallworm on April 30, 2017, 02:29:47 PM
After reviewing, I could find no issues. I then looked at the image you posted and I'm thinking that there may be some communication error. When using the By Polygon option, every face belonging to the same polygon as the selected face will be deleted. That means that if one face of a polygon is selected, all faces will be deleted. The screen shot looks to be working as expected.

Could you explain to my what you intended for the By Polygon to be and how it isn't working as you'd expect? If you just want the face and not the entire polygon, just uncheck the By Polygon option. Maybe I'm misunderstanding your issue?
Title: Re: Delete Faces Modifier
Post by: AeRo on May 01, 2017, 02:33:34 AM
Its may be the bad angle of the taken screenshot. Its look like the the wohle polygon be deleted, but its not.

95% of polygons are deleted with this method correctly, bot only some not. This screenshot shows this fall.

Title: Re: Delete Faces Modifier
Post by: AeRo on May 01, 2017, 02:38:49 AM
the max scene

I try to delete the whole polygon with only one face selected.
Title: Re: Delete Faces Modifier
Post by: wallworm on May 01, 2017, 10:06:51 AM
Thanks for the scene.

I updated the plugin and it will no longer skip faces when using By Polygon. You can download the update in the WW Store.
Title: Re: Delete Faces Modifier
Post by: AeRo on May 01, 2017, 10:29:16 AM
Yes, now its work perfect!

I'm use this case to delete border row: STL-Check->open edges->select faces.

Parametric modelling with this modifier its so powerful! Thanks so match!

Title: Re: Delete Faces Modifier
Post by: wallworm on May 01, 2017, 10:43:33 AM
Glad you like it. Please consider sharing your view as a review on the WW store and/or over on ScriptSpot (http://www.scriptspot.com/3ds-max/scripts/delete-faces-modifier).
Title: Re: Delete Faces Modifier
Post by: AeRo on May 06, 2017, 12:13:03 PM
May be, if possible, to have in the next release nice future "Don't delete - select faces only". As a sample: next modifier in stack "face extrude".
Title: Re: Delete Faces Modifier
Post by: wallworm on May 06, 2017, 01:19:55 PM
I started coding this option and then paused when I thought about it more.

Would it not just work to use the Select Faces = ON and Invert = On ?
Title: Re: Delete Faces Modifier
Post by: AeRo on May 06, 2017, 01:43:33 PM
Yes, "Select Faces = ON" is fine.

"Invert = On" already exist  in the modifier.
Title: Re: Delete Faces Modifier
Post by: wallworm on May 06, 2017, 04:10:56 PM
OK, I updated Delete Faces. I added option to Skip Selected Faces. Also, I fixed a bug with the Selected Vertices setting.
Title: Re: Delete Faces Modifier
Post by: AeRo on May 07, 2017, 04:13:40 AM
Hmm. Again communication error ) Sorry for my English.

With  "Don't delete - select faces only" I mean the modifier should not delete faces, but only select all faces, that must be deleted.

Like the Shell modifier do with "Select Inner Faces = ON" checkbox.

Title: Re: Delete Faces Modifier
Post by: wallworm on May 07, 2017, 11:23:40 AM
I misunderstood.

So I don't really see the point of that inside the Delete Faces modifier which is specifically about deleting faces. What you are really asking for is a Select Faces modifier that utilizes the same selection rules as in Delete Faces?
Title: Re: Delete Faces Modifier
Post by: AeRo on May 07, 2017, 01:25:08 PM
Yes, that's right ) Select Faces modifier with the same selection rules as in Delete Faces.

But this was just a suggestion to improve the functionality.
Title: Re: Delete Faces Modifier
Post by: wallworm on May 11, 2017, 03:58:14 PM
Quote from: AeRo on May 07, 2017, 01:25:08 PM
Yes, that's right ) Select Faces modifier with the same selection rules as in Delete Faces.

But this was just a suggestion to improve the functionality.

OK, after thinking about it, I decided to make a new modifier but with expanded selection tools: Select Faces Modifier has some of the same selection functions in Delete Faces but adds onto it with various extra selection tools. See Select Faces Modifier (https://wallworm.com/store/index.php?route=product/product&path=68&product_id=74).
Title: Re: Delete Faces Modifier
Post by: AeRo on May 27, 2017, 01:05:48 PM
Now Delete Faces Modifier is redundant.

Select Faces + Max Delete mesh mod = Delete Faces Modifier.
Title: Re: Delete Faces Modifier
Post by: wallworm on May 27, 2017, 01:45:19 PM
Not exactly. I'm updating DeleteFaces to use MNMesh so it will preserve Explicit Normals (which Delete Mesh won't do). I'll release that update in the coming week or two. So although Select Faces is very similar to DeleteFaces, it does have separate functionality (not to mention reduce modifier count when using just Delete Faces).
Title: Re: Delete Faces Modifier
Post by: AeRo on February 25, 2020, 05:13:16 AM
Hi! Latest version - the same bug again - isolated vertices after modifier.
Title: Re: Delete Faces Modifier
Post by: wallworm on February 29, 2020, 04:03:51 PM
Can you send me a Max scene demonstrating this? I could not replicate the problem.
Title: Re: Delete Faces Modifier
Post by: AeRo on March 06, 2020, 05:12:26 AM
Every time PolyUnwrapper error after deleteFaces modifier. Maybe UV-map dirty. (max 2020). ExportCleaner modifier helps.  Screenshot:
Title: Re: Delete Faces Modifier
Post by: wallworm on March 08, 2020, 03:13:47 PM
I will look into it. For now you may want to use the SelectFaces Modifier with a Delete Mesh modifier above. This will likely solve your problem in the meantime.
Title: Re: Delete Faces Modifier
Post by: AeRo on April 06, 2020, 12:36:47 PM
Any news? I am using ca. 100-200 times this modifier in one project.  SelectFaces + Delete Mesh is no Speed-modelling (
Title: Re: Delete Faces Modifier
Post by: wallworm on April 06, 2020, 12:52:14 PM
Sorry for the long delay. I have implemented a fix and recompile for Max 2018-2021. I will release that update this evening.
Title: Re: Delete Faces Modifier
Post by: wallworm on April 06, 2020, 10:16:24 PM
I have loaded an update to Delete Faces that removes dead structs now. This update is included in the plugin for 3ds Max 2018+.
Title: Re: Delete Faces Modifier
Post by: AeRo on May 01, 2020, 06:44:41 AM
Thanks! Works fine.

But another bug: various versions are not compatible with himself. 

If I try to open one old file with newer version - all edit_poly operation after Delete_Faces mod are broken.  I think newer modifier give back another face order.
Title: Re: Delete Faces Modifier
Post by: wallworm on May 01, 2020, 08:35:19 AM
Unfortunately, there is no way to have the clean version (devoid of dead verts/faces) and keep face order. The previous implementation deleted the faces from the mesh that you see, but they still existed in the data--and because they still existed, face order was preserved. In the update, the dead faces get cleared--meaning that face IDs that are deleted get filled with previously higher face IDs. There is no way to avoid this.

A workaround is to use the older implementation and clean at the end. But the current implementation is the correct way it should be done so I will keep the current logic in the modifier. It's unfortunate this affects previous usage that has topology-dependent modifiers above, but I didn't notice the issue until you posted about the issue. My habit is to avoid using topology dependent modifiers whenever possible--and the situations I built this for didn't highlight the issue in my own usage.
Title: Re: Delete Faces Modifier
Post by: AeRo on June 25, 2022, 11:35:32 AM
Hi again!

Max 2022 Version (and maybe 2023) - Again problem from version 1.
After stack collapse "delete poly rollout" stays under edit poly rollouts.

Can you fix it fast? - work must go to the Cliient.

Thanks!
Title: Re: Delete Faces Modifier
Post by: wallworm on June 25, 2022, 12:27:25 PM
You should be able to select the object(s) and paste this into MAXScript listener then hit enter:

for obj in selection do (while (custAttributes.count obj > 0) do (custAttributes.delete obj 1))

Note it will delete ALL custom attributes on the node... so if you have others that you want to keep, you'll need more selective code.
Title: Re: Delete Faces Modifier
Post by: AeRo on June 25, 2022, 12:40:01 PM
Thanks! Script works fine!

When to expect fixed Modifier?
Title: Re: Delete Faces Modifier
Post by: wallworm on July 01, 2022, 01:32:14 PM
The issue is that the modifier UI is mostly a custom attribute instead of native C++ because I am much better with MAXScript than C++. The default behavior of custom attributes is to propagate into collapsed geometry. I may be able to detect this in an event listener; I will put it onto my backlog to address. No ETA.
Title: Re: Delete Faces Modifier
Post by: AeRo on August 06, 2022, 05:34:53 AM
Version for Max 2023 passible ?
Title: Re: Delete Faces Modifier
Post by: AeRo on August 11, 2022, 04:57:06 AM
Since this plugin has become free - maybe make it as a startup ms script - that way the need for new versions and collapse problem will disappear?
Title: Re: Delete Faces Modifier
Post by: wallworm on August 13, 2022, 03:06:36 PM
Quote from: AeRo on August 06, 2022, 05:34:53 AM
Version for Max 2023 passible ?

Sorry I did not update the independent downloads for 2023. The 2023 version has been included in the WW Pro Pack Installer for months, but I forgot to update the zips for each one for those installing independently.

Quote from: AeRo on August 11, 2022, 04:57:06 AM
Since this plugin has become free - maybe make it as a startup ms script - that way the need for new versions and collapse problem will disappear?

The plugin has a startup script for the custom attribute needed to interface with some of the plugin. But it won't be practical to change to MAXscript instead of the C++ version. There is a button in the command panel that will delete the rollout after you collapse it down. Clicking that should remove the rollout.

Title: Re: Delete Faces Modifier
Post by: AeRo on June 05, 2023, 02:17:38 AM
Any chance for 2024 version?
Title: Re: Delete Faces Modifier
Post by: wallworm on June 19, 2023, 01:47:09 PM
Quote from: AeRo on June 05, 2023, 02:17:38 AMAny chance for 2024 version?
This is already included in WW Pro installer. I'll look to update the standalone download in the next week.