Community
3ds Max Shading, Lighting and Rendering
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max materials topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Remove Materials/shaders/texture enteirly from 3ds max scene?

12 REPLIES 12
SOLVED
Reply
Message 1 of 13
Chri688m
6684 Views, 12 Replies

Remove Materials/shaders/texture enteirly from 3ds max scene?

Alright so i have a problem, i want to remove materials/shaders/texture enteirly from my 3ds max scene.

I have tried looking at a bunch of different forums but i cant seem to find any option i 3ds max or method even, can it really be true there is no way to remove materials,shader and textures from a scene.

 

(Normally i use Maya, and in there is a button called 'delete all unused nodes' this entirly cleans the scene from unused nodes).

 

Best Regards

12 REPLIES 12
Message 2 of 13
darawork
in reply to: Chri688m

Hi,

 

via MaxScript Listener window simply type:

 

$*.material = undefined

 

After you type that script, extract and run this .MCR script from the Scripting drop-down Menu -> Run Script...

 

http://www.digitalanimation.net/maxscripts/DAS_PurgeUnusedMaterials1.1.zip

Right-click the toolbar -> Customise...

 

Then browse to the Toolbars Tab, Group 'Main UI', Category 'DAS Tools' and from the Action list click and drag 'DAS Purge Materials' to a free slot on any toolbar on the screen.

 

Now: Open the Slate Material Editor or The Compact Material Editor and then Click the new button on the toolbar. 

 

Be careful, as this script will delete all materials from your Editor... even used ones (I just tested it myself).

 

To check that it has worked: Click the [MAX] file menu button ->  References -> Asset Tracking -> File -> Refresh

 

Darawork
AutoDesk User
Windows 10/11, 3DS Max 2022/24, Revit 2022, AutoCad 2024, Dell Precision 5810/20, ASUS DIY, nVidia Quadro P5000/RTX 5000/GTX760

Message 3 of 13
Chri688m
in reply to: darawork

Many thanks for the solution Darawork, and for the time you spend testing it, really apriciated!

Message 4 of 13
piwonski
in reply to: darawork

This is ridiculous. U know how to delete materials in blender? Ctrl + A + Delete. Why is 3DS Max so overcomplicated?

Message 5 of 13
ads_czechoj
in reply to: Chri688m

To remove an already assigned material in 3ds max:

  1. Select the Utilies panel
  2. Select more
  3. Select "UVW Remove"
  4. Select your object(s) and remove the UVWs, Materials or both
Message 6 of 13
Yggdrasilbury
in reply to: Chri688m

Is there a way to remove an unassigned material?

I have a material that is giving me problems in the Arnold renderer. It's not used by any objects in the scene. I can see it in the Material Editor, but clicking Delete does not remove it, neither do the various scripts. Is there no way to remove it?

Message 7 of 13
ads_czechoj
in reply to: Yggdrasilbury

A material in SME doesn’t mean it’s used in the scene, and vice versa. It can be deleted in SME, but still used in the scene.

 

There’s an option in SME to select objects based on the material. That is a starting point to see if it’s still used.

 

Then, a map/material can be used in modifiers, like Displace or H&F, or in places like Environment Map or Lights.

 

It’s also possible to “flush the cache” with Main Menu>Arnold, to release all maps in memory.

Message 8 of 13
oliver
in reply to: Chri688m

To get rid of an unused material in the regular MaterialEditor you can just replace it with another one (loading a fresh material or drag&drop another one onto that slot). In SlateMaterialEditor just delete it from the canvas.

To get rid of unused bitmaps open File-->Reference-->AssetTrackingToggle and click on Refresh (the left button) - this should force a new indexing and flush unnecessary stuff from the scene.

Message 9 of 13
darawork
in reply to: oliver

Hi,

Just putting in some additional input, and yet another call out for the Devs to work on an in-software 'Purge' routine in 3DSMax. At the end of the day .Max files are databases of code. A few simple crosschecks internally in the software would throw up truncated materials, xrefs, plugins, pathways, materials and other junk (animation tracks, unnecessary modifier stack history). Either you love the code, or not. AutoCad has it. I don't want to be relying on 3rd party 'Cleaner' utilities, and scripts to try and keep the basic scene size to the bare minimum. Disk space may be cheap, but that is not a solution. Teague Scene Checker by Colin Senner and Forensic by Sinisoftware are some solutions that should be integrated into 3DSmax by default. They are screaming out to be integrated.

https://forums.autodesk.com/t5/3ds-max-ideas/3d-max-heavy-files-purge/idi-p/7049422

Regards,

Darawork
AutoDesk User
Windows 10/11, 3DS Max 2022/24, Revit 2022, AutoCad 2024, Dell Precision 5810/20, ASUS DIY, nVidia Quadro P5000/RTX 5000/GTX760

Message 10 of 13
domo.spaji
in reply to: darawork

Nobody have problems with unused scene materials - so all help suggestions are wrong or unnecessary.

 

"Purge material" script = Ctrl+A+Delete or Edit-> Clear View

 

Asset Tracking Refreshing - No comment on that!

 

If want to keep the scene size to the minimum don't delete "unnecessary modifier stack history"

 

As for scripting - "Things" from Max getting exposed to Maxscript - not other way around...

Message 11 of 13
darawork
in reply to: domo.spaji

3DSMax needs a purge routine. 

251905259_10159621643126142_3533009831709842277_n.jpg

 

 

Darawork
AutoDesk User
Windows 10/11, 3DS Max 2022/24, Revit 2022, AutoCad 2024, Dell Precision 5810/20, ASUS DIY, nVidia Quadro P5000/RTX 5000/GTX760

Message 12 of 13
domo.spaji
in reply to: darawork

Make a simple test in fresh scene:

-Create some primitive obj. like teapot - Save scene (SS)

-Add Edit Poly modifier -(SS)

-Collapse the stack (to Editable Poly)-(SS)

 

Now something more serious, clear scene:

-Create 10 teapots - Save scene (SS)

-Select all, add TurboSmooth modifier (2-3 iterations) -(SS)

-Collapse the stack (convert all to Editable Poly)-(SS)

 

After every scene save(SS) look at the scene file size...

Surprise!? But shouldn't be, reason is pretty simple, same for all "computer" files size.

Harder to understand is why is that "collapsing" workflow officially recommended.

And there is no benefit from it in any field.

 

Message 13 of 13
darawork
in reply to: domo.spaji

Interesting alright, I generally do collapse models before rendering, and attach all objects with a similar material. There is no doubt that this will speed up viewport fps and rendering time in my case. Corona render suggests that users do it as a means of scene optimization. There is also some interesting information here:


https://garagefarm.net/blog/guide-to-rendering-optimizing-scenes-in-3ds-max-through-geometry

 

And in this Autodesk Knowledge article:

 

"

  1. Each modifier applied to an object essentially creates a new reference of that object. Three (3) modifiers make the object 3X "heavier" in terms of memory and scene calculations."

https://knowledge.autodesk.com/support/3ds-max/troubleshooting/caas/sfdcarticles/sfdcarticles/How-to...


Scene optimisation is always worth discussing. 🙂

Darawork
AutoDesk User
Windows 10/11, 3DS Max 2022/24, Revit 2022, AutoCad 2024, Dell Precision 5810/20, ASUS DIY, nVidia Quadro P5000/RTX 5000/GTX760

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report