Menu Close

How to manage tools part 1 – Scripts (featuring new 3dsMax 2022.3 pipeline integration)

We, 3dsMax users, love 3rd party scripts and plugins. But, we don’t necessarily like the process of installing and managing those. Sometimes this is one of the reasons why we don’t even upgrade 3dsMax. In this post, I’ll show you how to decouple the installation of 3rd party scripts from 3dsMax for easier management. I will also show how the new pipeline integration feature in 3dsMax 2022.3 will make this task simpler. We will use the famous Soulburn script as an example.

First, we need to know how scripts are loaded when 3dsMax launches. Fortunately there is already very good documentation here. In a nutshell, 3dsMax executes startup scripts and macros scripts from certain locations while being launched. Users need to install scripts in those locations so they can be loaded properly.

Startup scripts

There are a few reasons why users would want to execute scripts automatically when 3dsMax starts. For example, If you use any scripted plugins such as the famous Paul’s PEN_Attribute_Holder, you probably want it to be loaded and ready to use just like C++ plugins. Another important use of startup script is setting working environments, defaults and system directories which we will utilize in this post. I also have a separate post about this subject here. Please check it out.

As you see in the above document, 3dsMax reads the startup script from the various places. But, the most commonly used folders are these two folders.

  • system startup scripts folder – C:\Program Files\Autodesk\3ds Max 2022\scripts\Startup
  • user startup scripts folder – C:\Users\[username]\AppData\Local\Autodesk\3dsMax\2022 – 64bit\ENU\scripts\startup

One of the important rules of 3dsMax tool management is you never touch the 3dsMax root folder. If you need to add/modify anything, you should add/modify files in the appdata folder which is usually called the “ENU” folder. C:\Users\[username]\AppData\Local\Autodesk\3dsMax\2022 – 64bit\ENU\

But, as you can see, using a user data folder brings a lot of challenges, especially for a team. So, I have been managing startup scripts using a seed startup script, [3dsMax root]/scripts/startup.ms. This script basically calls the real script like this.

FileIn @ "D:\PROJECT\_maxDefault\startup\mystartup.ms"

By using this seed script, I can update the startup script centrally without re-depolying again to all workstations. this is one of two files I allow an exception personally.

BUT! I don’t need this seed script anymore because of the new pipeline integration feature. This feature allows users to set various paths used by 3dsMax with Environment variables which means you can set paths from the outside of 3dsMax before it launches. Even though 3dsMax provides a great amount of control over every aspect of 3dsMax with Maxscript. The fundamental limitation of the script based approach is that everything happens after 3dsMax launched. The new pipeline integration removes this limitation. Also it allows you to control folders that never have been allowed to control before such as the appdata folder itself.

So, how can we use this feature? There are 2 ways to set environment variables in Windows.

  • The first one is setting in System Properties or using a group policy. As you can already see, IT dept. would love this central management.
  • The second way is using a batch file or Python to set env var only for the session. If your studio is using a launcher, they are already using this way.

For startup script, we can use the first method since scripts are usually compatible between 3dsMax versions and you can put a condition if there are any version specific things in it.

After I added “ADSK_3DSMAX_STARTUPSCRIPTS_ADDON_DIR” env var, my 3dsMax runs any scripts in this folder. I don’t need to add anything to 3dsMax root folder. I don’t need to worry about re-coying again this file after wiping out ENU folder to solve my 3dsMax issues. I don’t even need to do anything for any future version of 3dsMax. It is truly set it and forget it!

Setting custom system directories with startup script

Even though the new pipeline integration allows you to add “scripts” folders with “ADSK_3DSMAX_SCRIPTS_ADDON_DIR”. This folder actually doesn’t matter much because we never execute all scripts in these folders automatically. Also setting env var doesn’t actually change 3dsMax system directories, and most scripts are usually called other scripts or macroscript(We will discuss it later) using #scripts or #userScripts system directories to allow more flexible installation instead of hard-coded path. For example, this is a macroscript from the Soulburn script.

MacroScript blendedBoxMapMaker category:"SoulburnScripts" tooltip:"blendedBoxMapMaker" Icon:#("SoulburnScripts_blendedBoxMapMaker",1)
(
Include "$scripts/SoulburnScripts/scripts/blendedBoxMapMaker.ms"
on execute do blendedBoxMapMakerDefaults()
on Altexecute type do blendedBoxMapMakerUI()
)

As you can see, this action will try to find “/SoulburnScripts/scripts/blendedBoxMapMaker.ms” file under #scripts folder($scripts is a symbolic pathname for #scripts).

By default #scripts is set to C:\Program Files\Autodesk\3ds Max 2022\scripts and  #userScripts is set to C:\Users\ChangsooEun\AppData\Local\Autodesk\3dsMax\2022 – 64bit\ENU\scripts. 3rd party scripts are suppose to use #userScripts. This means that we have to install the Soulburn script files under C:\Program Files\Autodesk\3ds Max 2022\scripts unless we change the location.

The good news is that we can change any system directories using the “setdir” Maxscript command! This is the first two lines of my startup script. This allows me to install any 3rd party script under D:\PROJECT\_maxDefault\scripts\ instead of 3dsMax root or my user folder.

setdir #scripts @"D:\PROJECT\_maxDefault\scripts\"
setdir #userscripts @"D:\PROJECT\_maxDefault\scripts\"

TIP! As you can see from the 3dsMax system directories document, you can also set any project folders using “setdir” command. By default, they are set as a relative path to the current project folder. But, you can change those using “setdir“ command. For example, you can change autoback folder to “D:\3dsMax_Autoback” instead of in your Document folder.

setdir #autoback @"D:\3dsMax_Autoback"

Macroscripts

Macroscript is a script that defines “ActionItems” in 3dsMax. ActionItem is “that represents the action that can be assigned to Toolbars, Menus, QuadMenus and Keyboard Shortcuts using the Customize User Interface dialog”. Basically if you want to make an UI like a button or shortcut, you need a macroscript for the script. It also allows the script to show up in Global Search(X menu).

3dsMax executes the macroscripts in #userMacros and #macroScripts system directories by default when it starts. Now you may think we could change these folder to own custom folder like #scripts and #userscripts. BUT! We can’t do that for macroscript because 3dsMax and many 3rd parties actually use these folders. BTW, there is the new Autodesk Application Plug-in Package format which 3rd parties can completely separate their files from 3dsMax factory installation. If your favorite plugin doesn’t support this. Ask them!

Another problem of #userMacros folder is that it is used when user create macroscript by drag and drop. For example, if I type print “Hello, World” and drag and drop this line to a toolbar. 3dsMax makes “DragAndDrop-Macro1.mcr” under #userscripts folder. If you share this folder across many users, you will get macroscript from all your teammates.

Therefore, it is better to load the commonly shared macroscripts from an added folder using “ADSK_3DSMAX_MACROS_ADDON_DIR” env var.

If you are using 3dsMax without the pipeline integration, you have a few ways to do this.

  • Copy all .mcr files to #userMacros folder.
  • Just run all .mcr files with the “FileIn” function.
  • You can copy to the 3dsMax root folder. But, I wouldn’t recommend it.

Honestly none of the above options are good. This just shows how beneficial the new pipeline integration is.

Icons

This is the last piece of puzzle for 3rd party script management. Sometimes 3rd party scripts include icon files. We can use both startup script or env var for this. It doesn’t matter much. I choose to use “ADSK_3DSMAX_ICONS_ADDON_DIR”  env var.

If you are using older version of 3dsMax, I will just set #usericons folder in a startup script.

Let’s put together all the pieces for Soulburn script

I have set 3 environment variables.

  • ADSK_3DSMAX_STARTUPSCRIPTS_ADDON_DIR = D:\PROJECT\_maxDefault\startup
  • ADSK_3DSMAX_MACROS_ADDON_DIR = D:\PROJECT\_maxDefault\usermacros
  • ADSK_3DSMAX_ICONS_ADDON_DIR = D:\PROJECT\_maxDefault\usericons

I have set 2 system directories in a startup script in D:\PROJECT\_maxDefault\startup

folder(ADSK_3DSMAX_STARTUPSCRIPTS_ADDON_DIR).

  • setdir #scripts @”D:\PROJECT\_maxDefault\scripts\”
  • setdir #userscripts @”D:\PROJECT\_maxDefault\scripts\”

If you download the SoulburnScriptsPack_3dsMax_v112_R2013toR2022.zip file, it has 3 folders.

  • Copy all files in “MacroScripts” folder to D:\PROJECT\_maxDefault\usermacros (ADSK_3DSMAX_MACROS_ADDON_DIR)
  • Copy “SoulburnScripts” folder in “scripts” folder to D:\PROJECT\_maxDefault\scripts\ (#scripts)
  • Copy all files in “\UI_ln\IconsDark” or “\UI_ln\Icons” folder to D:\PROJECT\_maxDefault\usericons (ADSK_3DSMAX_ICONS_ADDON_DIR).
    You can’t use “Icons” or “IconsDark” folder in #usericons folder. .bmp icons are only supported for backward compatibility since 3dsMax 2017. If you want to have a different set of icons per theme, you need to use the new .png icon naming convention and “iconname:” argument. The details are here.

Now I have the Soulburn script in my 3dsMax 2021, 2022 and will have them in the whatever future version of 3dsMax without any more steps. I can nuke the ENU folder anytime without worrying about re-installing these scripts.

This also works with any 3rd party scripts.

  • If they are .mcr files, put in the ADSK_3DSMAX_MACROS_ADDON_DIR folder.
  • If they are .ms files, put in the #scripts folder.
  • If they have icons, put in the ADSK_3DSMAX_ICONS_ADDON_DIR folder.

To help your understanding, I’ll give one more example, another famous script, DebrisMaker2.

In this case, the downloaded file is .mzp file. This is a self-installation zip file. You can actually unzip with any zip uncompressor such as 7-zip.

If you unzip, it has 3 folders under “DebrisMaker2.0” folder. Guess where would you need to copy the files?

  • MacroScripts -> D:\PROJECT\_maxDefault\usermacros
  • Scripts -> D:\PROJECT\_maxDefault\scripts\
  • UI_ln\Icons -> D:\PROJECT\_maxDefault\usericons

Again, now you will have DebrisMaker2 in any 3dsMax 2021 and above!

Before I finish this post. Someone might wonders why I said “3dsMax 2021 and above”. Isn’t it a new feature of 3dsMax 2022.3? Yes, right. It is officially added to 3dsMax 2022.3 with more complete support. But, 3dsMax 2021.3 actually have had some env var support for Autodesk internal use. At least, the 3 env var we have utilized work for 2021.3, too. I let you know because setting env var as system env var will affect 2021.3. I don’t want you to be confused or surprised.

If you want to use the pipeline integration for only certain version of 3dsMax, you have to use batch file of Python script which I will cover in the next post.

Happy rendering with renderStacks 2!

3dsMax 2022.3 Highlights

3dsMax 2022.3 has been released with new/improved features and fixes. Here are some highlights. Please check Unofficial 3dsMax What’s New for all 3dsMax updates in detail!

Advanced Wood OSL shader

As an OSL shader, UVW can be modified with external shaders, and a random seed can be driven to have per-object variations.It is also fully supported in a ‘High Quality’ viewport and will render exactly the same on any OSL capable renderer.

Per-Viewport Filtering

You can hide/unhide objects by category or by class per each viewport. Each viewport’s settings can be set independently from one another, giving you the flexibility to display what you need in a given viewport. Per-Viewport Filtering does not affect the scene or renderer. User can copy/paste filter setting between viewport. Shift+K to toggle on and off the viewport filter Full MXS exposure with ViewportFilter interface. Per view settings/preference dialog is modeless and dockable now.

Pipeline Integration

You can control most 3dsMax path with environment variables. This reduce the need of extra file deployment. It also allow you have more flexible setup like different plugin configuration for same version easily.Support for Environment Variable Tokens in Paths found in Configuration Files.

Occlude mode – marquee(box)/paint selection support

High-polling rate mouse fix

Save Performance Improvement 2

We got the second round of file save performance improvement.,This is the sheet I made during beta testing. As you can see, 2022.3 saving is 20-40% faster on top of 2022.2. The % number in the table is how much it is improved. So, 100% means 2 times faster. 200% means 3 times faster.You can see some of big files are saving more than 4 times faster than 3dsMax 2016.

Autodesk Official Site https://makeanything.autodesk.com/3dsmax?fbclid=IwAR1Nlc-oTE0dm4n9yYYGgHZnF3V-BPC92Hcrdf_aCkBVT_GwAeVqKIy-z2k
3dsMax 2022 What’s New https://help.autodesk.com/view/3DSMAX/2022/ENU/?guid=GUID-E2B9038C-3041-44CC-A957-AB2E5EEC631E
3dsMax 2022
Release Notes https://help.autodesk.com/view/3DSMAX/2022/ENU/?guid=3dsMax_ReleaseNotes_3dsmax_2022_3_releasenotes_html
Maxscript What’s New https://help.autodesk.com/view/MAXDEV/2022/ENU/?guid=What-s-New-in-MAXScript-in-3ds

Make your rendering life awesome with renderStacks 2!

3dsMax tips #6 – Viewport GPU caching with Alembic Performance Mode

First check this video. 4.7 million tris/2.4 million verts playing @ 49fps on GTX960/Ryzen 2700X

I know you can not believe this. So, what’s the secret sauce? Alembic Performance Mode.

3dsMax 2016 introduced alembic import/export into 3dsMax. One of the feature was Performance Mode in Alembic Container object, the auto generated root object when you import alembic.

It does 2 thing.

  • Generate a Nitrous ready animated GPU cache of all children.
  • Temporarily hide all children from scene to clock any evaluation.

Even tho it was originally developed for only alembic cache, it added support for any generic object in 3dsMax 2017. So, if you make an Alembic Container object and link any object under it. You can generate the GPU for the objects just like alembic objects.

Like this. You can keep the original rig hierarchy under AlembicContainer. AlembicContainer will pick up all descendant under him.

* Sometimes explicit normals can cause issue. If you are using 3dsMax 2022.2, you can just apply Smooth modifier to clear all explicit normals. Or, check my 3dsMax tips #3 How to make imported tree animation 15 times faster

Now,Click “Performance Mode” button. You can see all object under AlembicContainer disappeared from Scene Explorer, and all geometries are combined as one cache. You can also see yellow bar on timeline which means indicated that uncached frame.

Now if you go to any frames, that frame will be cached or play animation while turn off Real time playback to make sure for max to evaluate every frame.

Or, there is a better way. just press “Force Caching” button.

Then, you will see the yellow bar is progressing as green bar.

Make sure turn off the above “Real time”, and try to scrub or play animation. This guy was playing at 42fps before. Now it is playing at 140fps.

So, this is how I could play 4.7 million tri at 48fps.

This is not perfect. But, when you have to light heavy scene, it could be very useful. Or, if you need to make preview from multiple angles. It could save time, too. But, this feature is not play well with Real time option(literally). So, it will be hard to use for animation real time preview.

A fewthing…

  • You can choose to cache geometry only since anything other than geometry will not be include the cache in anyway. But, if you put the entire rig under AlembicContainer, it will block the evaluation of the rig which will improve fps even more.
  • Even tho you could do this in 3dsMax 2017+, I recommend to use 2019+ because 2019 would only cache animation range and a lot stable than previous version.

Now I want to ask you a favor. as you can see this tool has amazing potential. But, it also misses some features. I hope I could save/load cache instead of re-generating every time when I open max file. Also, I want to explicitly choose object to cache instead of relying on hierarchy. Also, it doesn’t like when Real time playback is On. So, I created user idea item and need your vote.

https://forums.autodesk.com/t5/3ds-max-ideas/allow-to-save-alembic-performance-mode-cache/idi-p/10672171

3dsMax 2022.2 Highlights

3dsMax 2022.2 has been released with new/improved features and fixes. Here are some highlights. Please check Unofficial 3dsMax What’s New for all 3dsMax updates in detail!

Unfold3D Packing – New

The well known Unfold3D tech has been introduced to 3dsMax 2022.2.  You can enjoy Unfold3D Peel, Pack and Relax. Unfold3D Pack works great. But, it requires to have non-manifold clean faces. When it is not, Unfold3D struggle to fix by itself and usually ending up in mangled output. So, #3dsMax dev went one step further and implemented automatic uv data fix.

Unfold3D Peel – New

Unfold3D is the default algorithm used for the Peel functions now inside of 3ds Max 2022.2 with the Unwrap UVW modifier.

UV Editor Performance Improvement

Improved performance of selection and uv manipulation by multithreading and optimizing memory allocations of topology validation and selection algorithms. Also threaded and batched data gathering for uv window painting. Add modifier, opening UV editor, switching sub-object mode, selecting and transforming sub-object is now a lot faster. In the video, you can see selecting an UV element is 10 times faster.

Smart Extrude – Multi Cut-Through & Partial Merge

You can now drag a face through multiple surfaces, or drag a face partially through a volume of a mesh and it will cut and clean the geometry as expected. It has been enhanced to produce more accurate results that might occur from numerical precision on overlapping faces. The stability has been also improved when quickly moving the results back and forth before committing to a final position.

File Save Performance Improvement

File save code has been greatly optimized by caching data instead of recalculating it, minimizing moving file pointers, eliminating the object creation/destruction and setting\clearing flags instead.  Tested with 10 files which took more than a few seconds to save previously. The file save without compression is now 193% faster and 423% faster with compression on than 2021.3. In many case, turning on compress in 2022.2 is faster than composers off in 2016. I have a 6G scene(compress off) with 25mil tris. 2016 compress off took 118s to save. 2022.2 compress ON took 102s.

Pen Pressure Improvement

More device support as long as they support Wintab32.dll. (E.g. Huion, XP-Pen). Now 3dsMax 2022.2 supports the full range of pressure sensitivity that is offered by the pen tablet device by checking with the Wintab32.dll on your local Windows system. (E.g. Huion Kamvas16 support 8192 level)

Improved Hide by Category

New Qt UI. New Show Renderable Only checkbox. New Scene Contents to show only categories which exist in the scene.

USD b0.2

A lot of new features has been added since beta 0.1 including transform/animation support. Various export options include fully customizable uv data export. Ready to use pre-compiled USDView with all required Python module.

Do you like 3dsMax 2022.2 updates? Then, you will also love renderStacks 2!

 

3dsMax 2022.1 Highlights

I have been making some short videos to showcase the new release of 3dsMax version or Product Update. This is the collection of items for 2022.1

Explicit Normal Performance Improvement

Last year I have posted a tip about “3dsMax tips #3 How to make imported tree animation 15 times faster“.
In that post, I hinted 3dsMax dev is working on improving the situation. Finally that effort come to fruition and released in 2022.1. Now all explicit normal computation is fully safely multithreaded. My test shows 2x to 4x “overall” performance improvement. The video I attached has 4 of 25k verts characters with explicit normals(total 100k deforming verts). It went from 9 fps to 36 fps! This was no simple task and touched the core of 3dsMax. As you can see from the last a few release, 3dsMax team is putting a lot of effort for modernizing the core and improving performance.

Occlude mode for EditablePoly/EditPoly

Occlude mode is for WYSIWYG selection for Editable Poly/Edit Poly. If you turn on this mode, you can only select objects you can see. In this video, I have a tons of verts behind box. As you can see, 3dsMax is not allowing to select any verts that you can’t see if I turn on Occlude mode.

Smart Extrude Performance Update

As you can see from the last a few release, 3dsMax dev is trying to provide not only cool but also performant feature. The original implementation kind of naively looked at every mesh face as a candidate for cut-through, until it did a test to exclude the face. The new improved smart extrude is using a spatial partitioning approach to drastically reduce the number of those costly tests. Even better, this improvement could also bring more cool new features to smart extrude.

MaxFluid Loader Particle ID support for Particle Interface

Now MaxFluid loader expose ID properly to particle interface. What does this mean in English? This means any particle system that supports interface can read MaxFluid data directly. Here is an example reading MaxFluid with tyFlow and instancing shapes. The green thingies are leaves. I know I should have made it bigger.

Restore Factory Settings & Startup Failure Detection

Everybody knows “Deleting ENU folder” trick to solve many odd issues. But, you also lose user macros and script by doing so. Also you have to remember those hidden folder location. Bow, 3dsMax will reset only needed setting for you with a button. Also it will give you one click shortcut to access the folder. A new Restore to Factory Settings button has been added to the General Preferences tab to let you restore 3ds Max default settings from within the software if you experience unexpected UI behavior or performance issues. The best thing about this feature is it is not removing the entire ENU folder. It only reset the needed settings. But, if you want to reset other folders, you can choose to do so, too.


No more MentalRay missing plugin error

Hidden gem of #3dsMax 2022.1. Apparently there is one important 2022.1 feature was undocumented in release note.
A new mechanism (came with a new SceneConverter API – AddSilentClassID ) was introduced in 2022.1 to allow to hide any missing plugin data (e.g., from MentalRay). In English, you wouldn’t see this popup anymore. It doesn’t matter if the missing plugin data is in xref or material library. The new feature will simply ignore them and will not show popups.


Here is the details from dev.
—————————————————————————–
By default, the scene contain only following types of MentayRay data which polluted scene even MentalyRay plugin was never touched wouldn’t trigger MissingDLLs and SceneConverter dialogs on file open.
mental ray: material custom attribute
mental ray: Displacement Custom Attributes
mental ray: Indirect Illumination custom attribute
mental ray: light shader custom attribute
If you want to hide more plugin data for missing plugin cases (not limited to MentalRay plugins) on file open, you can:
  1. Open 3ds Max 2022 Installation Folder\stdplugs\stdscripts\SceneConverter.ms
  2. Add a maxscript call to SceneConverter.AddSilentClassID with the class_id you want to hide. E.g, hide MentayRay mr Area Spot light objects:
  3. SceneConverter.AddSilentClassID #(0x0001b669L, 0x000875c2L) –mental ray: mr Area Spot
  4. Restart 3dsMax
NOTE: On file open, all plugin data from missing plugins will be removed automatically if “Automatically remove missing legacy assets on File Open” is checked, otherwise, they will be kept in the scene, and you can use Scene Converter later to remove or convert them. Remove all SceneConverter.AddSilentClassID calls from SceneConverter.ms will restore old behavior.

renderStacks is waiting for you. Click here!

 

3dsMax 2022 Modifier Modernization & Performance Improvement (includes 3dsMax 2021 PUs)

3dsMax is now 25 years old program. But, that doesn’t mean that all its core is 25 years old. The core of 3dsMax has been continuously updated and being updated at this moment. Upgrading core while not breaking the existing feature is a monumental task. It is very difficult and somewhat boring. But, that hasn’t stop 3dsMax team.

After 3dsMax 2021 has been released, 3dsMax developers put some great effort for modernizing modifiers and underlying cores related to modifiers I made a comprehensive list of the efforts since this kinds of things are hard to show as video.

EditPoly Remove Edges/Vertices [2533x!]

This was a typical case of “a good sample file load to fast and effective fix” case. I had to lower the poly count of a model which already had animation. I applied Edit Poly and was removing many extra loops. But, it was so slow as I remove more and more loops. I sent the max file to 3dsMax dev team. I got the fix. 3dsMax dev accelerated EditPoly Remove edges (with ctrl on) and Remove vertices in various places (including EditablePoly). How much is it improved? A LOT. REALLY A LOT.

I tested on an object with 318402 verts  and removed 238,800 verts from it.
2021.3 : 4276.9 seconds
2022 : 1.688 seconds : 253370% improvement
2533 times faster!

Since Edit Poly is recomputed when you open a max file. It will also improve file loading time a lot if you have many deleted many verts with Edit Poly.

This change break backward compatibility. This means you will not see improvements when loading old files. Only the newly added Edit Poly modifier will use this improvement. Saving to previous versions will collapse EditPoly.

Bevel Faces and to a lesser extent Chamfer Edges [22x]

3dsMax dev accelerated underlying algorithms of Bevel Faces and Chamfer Edges.  This change will also accelerate any code which uses max’s “mesh clusters”. One of test showed.
2021.3 : 85 seconds
2022 : 4 second. 2125% improvement

Auto Smooth [ 3.8x – 3057x ]

The underlying auto smooth algorithm has been totally revamped which means this improvement not just for Smooth modifier. EditableMesh and EditablePoly AutoSmooth command, EditMesh and EditPoly Autosmooth command, Autosmooth modifier and Renderable Spline with Autosmooth on.

The performance gains are significant. Yes, you saw it right in the headline. One of models showed 3000 times faster performance. The particular model was tree from MaxTree. Tons of elements. Most million+ big mesh shows 30-40 times faster performance. Now Smooth modifier is faster than any other 3rd party solution.

MaxTree model / Verts : 4,467,434 / faces  : 1,381,628
2021.3 :  6664.69 seconds
2022 : 2.18 seconds : 305719% improvement
3057 times faster

An Engine CAD model / Verts : 2,260,497 / faces  : 4,516,570
2021.3 :  74.853 seconds
2022 : 2.207 seconds : 3391% improvement

Turning on Enable in Viewport for an imported spline pattern / 523k knots.
2021.3 : 724.388 seconds
2022 : 12.432 seconds : 5826% improvement

Extrude [ 4.5x – 130x ]

Optimized capping provides significant performance improvement for complex shape with a lot of elements. Also it is now cache the capped shape. Therefore, when you adjust the amount value, you can see the change instantly.

A spline with 220 spline / 523,176 points
2021.3 : 3576.56  seconds
2022 : 27.7 seconds : 12911% improvement

Relax [ 1.5x – 3x ]

It is fully multi-threaded now. It also provide the volume preservation option.

Stanford dragon model / Verts : 3,609,455 / faces  : 7,218,906
2021.3 :  21.5 seconds
2022 : 7.22 seconds : 297% improvement

Slice/Symmetry [ 1.5x – 3x ]

This modifier has some story. In the legacy Slice modifier, there is a mode button at the bottom which is set to “Poly” by default. I never paid attention to this button. But, apparently this button determines which data structure Slice would operate on. That means if you apply a Slice modifier on a mesh object. It will convert to editable poly first(!) and slice. This means there will be the conversion tax. On top of that, slicing poly is slower than slicing mesh. When I change the mode to mesh for highres mesh object, even the legacy Slice was not that slow.

Now, “Automatic” option has been added and is ON by default. It will use whatever native type which is coming from stack. BUT! Here is a catch. Because mesh slicing in 2022 is so fast now. Even with conversion tax, slicing in mesh mode is always faster. Therefore, I recommend to set to mesh especially you would use mesh for the above level.

Measuring performance was a little bit tricky because the shape of slice has greater effect than tri count. So, I applied Slice and animate rotation and measured the average time.

Stanford dragon model / Verts : 3,609,455 / faces  : 7,218,906
MESH
2021.3 :  2.88 seconds
2022 : 1.00 seconds : 286.73% improvement

I mentioned that 2021.3 default is set to “Poly”. If I don’t change this option as Mesh. It took  9.49 second! Therefore, when you apply Slice modifier on a mesh object. the improvement is actually 900% compare to 2021 when you use the default option.

POLY
2021.3 :  7.22 seconds
2022 : 5.08 seconds  – 141.95% improvement
2022 as mesh : 2.52 second – 286.66% improvement

One more tip. When your sliced a section with a lot of elements, somehow mesh slicing slowed down a lot. It is not sure what is causing an issue as of now. But, dev need to investigate what’s going on. Good news is. Poly performs very well for this case.

This is a test with 100 elements in section.
2021.3 Mesh : 4.91 seconds
2021.3 Poly : 0.22 seconds
2022 Poly : 0.19 seconds

PathDeform [ 3x – 20x ] – 3dsMax 2021 PU3

PathDeform is now fully multi-threaded. You can see hi poly models shows 20 times faster performance.

A CAD Tank thread model / Verts : 1,078,300 / faces  : 2,161,000
2021.3 :  63.463 seconds
2022 : 2.793 seconds : 2272.4% improvement

Stanford dragon model / Verts : 3,609,455 / faces  : 7,218,906
2021.3 :  9.773 seconds
2022 : 0.497 seconds : 1966% improvement

Push [ 1.5x – 5x ] – 3dsMax 2021 PU2

PathDeform is now fully multi-threaded. In the past, poly was performing worse than mesh. Now it is fixed. There is not much difference between mesh and poly. Therefore, you will see bigger improvement on poly objects.

Stanford dragon model as poly  / Verts : 3,609,455 / faces  : 7,218,906
2020 :  2.623 seconds
2021 : 0.842 seconds : 311% improvement

Have you tried renderStacks?

DCM mini tutorial #1 – Smooth Push

I made this DCM(DataChannel Modifier) while ago to help my friend’s shot. I thought that it might be worth as my first DCM mini tutorial. So, here we go!

Let’s see the following picture. This is the famous Stanford Bunny model. Left is the original shape. The right is 3dsMax Push modifier. As you can see, when you push a lot the faces start to overlap. The middle is the result of “Smooth Push” which is a simple DCM setup. As you can see It pushed it, but it pushes more gently(?).

How Push modifier works is really really simple. It moves each verts along the its normal by the given amount. As you can see, Push modifier only has one parameter which is the distance the verts are moved along normals.

Becase the verts move along the normal, verts will meet each other if you have concave shape. To prevent that, I simple smooth or blurred or relaxed the normals and used that. Let’s see how that translate to DCM setup.

First, we need to get vertex normal for each verts.

  1. Click “Add Operator”
  2. Add “Vertex Input”.
  3. Choose “Average Normals”.

As an Input operator, Vertex Input allow you to grab various data from each verts. The 3 dot icon in front of operator name indicates, you are processing vertex data.

Next, Add “Smooth” operator from Process operators. It has 2 values, Iteration and Amount just like Relax modifier. The bigger Iteration and Amount is, the the smoother result you will get. This operator will make more gentle normals by averaging normals with neighboring normals just like blurring an image.

Now we need to have a way to control amount of Push. This is simple. Let’s add “Scale” operator from Process operators. This operator multiplies the given value to float or vector. If the value is 1.0. The size of normal doesn’t change. If the value is 1.0, you ar making normal bigger. If the value is less than 1.0, you are making normal smaller. This is exactly what “Push value” in Push modifier does.

What we have now in the current Data Channel is the offset vector of the each vertex. So, you need to add these vectors to the original vertex position.

  1. Add Vertex Output operator from Output operators.
  2. Choose “Position” as output channel.
  3. Change “Selection Method” from “Replace” to “Add”, which means you will add the current channel data to the existing vertex position data.

Dadah! You have a Smooth Push! Easy, right?

You know what’s also easy? renderStacks! Try it, your rendering life will become 1000% easier!

3dsMax tips #5 – Make SkinWrap faster

Often the riggers skin a low res character and use it to drive hires version of character with SkinWrap modifier.

When you use SkinWrap, your driver object need to be Mesh object. If it is not, it will convert to poly under the hood. The mesh <> poly conversion price is very high.When I tested this originally in 3dsMax 2014. The test result was 9.75fps vs 17.89fps. I retested other file in 2021.3. The difference was 10.8fps vs 13.1 fps. So, I guess there has been some progress. It is still taxing 30%.

Skin modifier doesn’t care about poly or mesh. Therefore, if your base object is Editable Poly, just apply Mesh Select before Skin. You will get performance boost.