Updated to 1.11! 11/29/2021
3dsMax 2021.1 has been released today. There are many fixes and nice improvement.
One of a new feature is the custom default parameter using Maxscript by DefaultParamInterface. Click here for details. This new feature allows you to have custom default for most areas of 3dsMax as long as it is a class.
The simplest example would be the height segment of Cylinder. The current default is 5. Id you change it, whatever that value becomes the default for the session. Now you can set your own default height segment using Maxscript DefaultParamInterface. It is not limited to object and modifiers since it is supported for all classes. You can also use this to set your own renderer default include 3rd party plugins.
The custom defaults will be saved in C:\Users\[username]\Autodesk\3ds Max 2021\User Settings\DefaultParameters.ini. Next time when you update to 3dsMax 2022. You just need to copy that file to the corresponding 3dsMax 2022 folder.
BUT, you would wonder… “why do I have to use Maxscript?”. I think setting the custom default using UI will come in the future. There was some prototype for UI in beta. But, it was removed from release because it doesn’t cover some cases.
So, that’s why I made this Custom Default Param Manager script. This script give you a UI to search a class and parameters and allow you to set default value.
Download, unzip and drag and drop the script into the viewport. It will be nder csTools > CustomDefaultParamManager. Or simply type X > CustomDefaultParamManager.
On the left, you can choose a class. On the right, you can choose a parameter name. Then, you will see the spinner of checkbox to input the new default.
Then, just press Set button.
Persistent checkbutton is on by default. To make the default for the next session, you need to check this. So, don’t turn off.
The last 3 buttons are to remove the custom default. You can clear custom default for selected parameter or restores to the factory default. You can also remove everything you set.
3dsMax 2021 has been release. One of the new feature is the brand new BakingToTexture tool. This tool is written from scratch and the replacement of legacy Render to Texture tool. This is the first iteration of this tool and still in active development.
Along with this tool, now 3dsMax provide the full support of MikkT tangent space from baking to rendering , viewport and SDK.
simpleMapBaker is a simplified front-end of new BakingToTexture. It allow users to bake certain utility map with one click. Also it was used to test the maxscript exposure of BakingToTexture tool.Download simpleMapBaker
- World Normal
- Vertex Normal
- Material IDs
simpleMapBaker utilize the new override map feature to render most maps at once. Also it uses Arnold’s Curvature and AO shader. Therefore, it will save render preset of the current render.Therefore, it will switch to Arnold for all maps other than Normal map. For normal map, it will switch to Scanline renderer(This is temporary workaround until Arnold normal baking is ready). After baking, the renderer will be reverted to back.
Select objects, and just turn on the map buttons to render and press the big Bake button.
You can set up parameters for some maps and output parameters that BakingToTexture supports.
After bake, it will show all baked maps in the dropdownlist at the bottom. If you select a map there, it will use viewport override for preview baked map.
For normal map, it is using the new MikkT tangent space.
If you want to preview the previously baked maps, select object and press Reload button. It will search the maps and show preview if it finds the map.
- Download simpleMapBaker zip file
- drag and drop .ms into a viewport
- csTools > simpleMapBaker
One of the hidden gem of the new 3dsMax 2019 feature is the Custom Scene File Data Streams. This allows uses attach custom strings to your max and access from outside of 3dsmax. It is not only eliminate the need of companion external file for such data but also opens up accesing of .max file related data to any program or language.
For more details, check the help.
To show the power of this feature, I made a sample implementation of this feature. csMergeBy script. It allows users to merge object from other .max file by Layer, SelectionSet, ObjectID and Material name.Download CsMergeBy 1.0
There are 2 files in the zip file. The first one is csMergeBySave.ms which registers post save callback to save the scene data as xml and write to Custom Scene File Data Stream. You need to drop this into your startup script folder or one of plugins folder to run this script automatically everytime when you launch 3dsMax.
For exmaple, C:\Users\[username]\AppData\Local\Autodesk\3dsMax\2018 – 64bit\ENU\scripts\startup
This script would increase file saving a littlt bit. When I tested it, it took 0.1 sec for for 1,000 objects. BUT, I also have an extreme case of 29,769 objects which add 4.5 sec for saving. Considering the file saving itself would take some time, It was not noticable. But, I still want to give you heads up for the possible saving time increase.
The second file is csMergeBy.ms. This is actually a macro script. Just drag and drop this file into iewport. It will make csTools > csMergeBy action. This is the merge dialog.
How to use is simple.
- Select a max file which you want to merge from using the top button
2. Choose “Merge By” method from dropdownlist. You can use…
Layer – with hierarchy
Layer – no hierarchy
3. Choose items in the left list. You can CTRL+click to select multiple items. CTRL+click also deselect item.
As you choose item in the left list. Preview object list will be updated.
By default, all objects in the preview will be selected. But, you can only select the objects you want.
If you have a lot of objects(1000+), it might take a while to update the object list. Then you cah turn off Preview object names chekbox to not to show the object list. Then all objects in the selected items will be merged.
4. Then press Merge.
5. All megered object will be in “JustMerged” selection set for your convinience.
You don’t need to download this shaders anymore. 3dsMax 2020 has a better version of all these shaders built-in.
While I was beta testing 3dsMax 2019, I made a few OSL maps. Nothing spectacular. Most of them are just “artist-friendly” pre-made setups to save some nodes.
UVW > MatCapUV
This is a renderable version of my superClayMode script. Plug into the UVW slot of Bitmap Lookup.
Value > Color by Colorspace
You can conver to a vector value of other color space to RGB.
Math\Color > RGB to Other(Color)
You can convert a color from RGB to other color space. Output value is vector. after you process it, you can convert back to RGB with Color By Colorspace
Switchers > Random Index by Number/Color
It generates random integer index by number or color input. When you need to randomize something by Object ID, Materaal ID, Node Name and Node Handle, this map will be very handy. Of course you can also do the same thing by assembing a few other maps. I just made as one map for your convinience.
Math\Float > Sine wave function of frames
You can generate sine wave of time. It supports amplitude, period, phase value and square wave option. Check my sample animation. This map is very handy when you need to make some cyclic map animation.
!!! You DON”T need to connect Frame Number input. It already has float expression controller assigned. !!!
Scene > Normal
You can get normal value of pixel in various spaces.
Falloff map OSL version. It supports Perpendicular/Parallel and Towards/Away.
Legacy Composite map OSL version. It supports all bklending mode in legacy Composite map. I was trying to support all Photoshop mode. But, I gave up on Vivid Light and Linear Light.
Here is a QC image that shows this map and legacy Composite map are producing the same result.
How to Install
1. Make “OSL” subfolder in any plugin folder
2. Unzip and copy *.osl files into the folder
A sample max file
Here is the shader tree for the animation. I used the distance from local center and random sin wave as the light intensity. No keyframes al all. The max file is included in the shader pack .zip file.
3dsMax 2018.4 has been released today.
One of the feature is the full BiFrost channel support for PRT export.
You can export all BiFrost channels even with custom channel names.
As of now, export channel setup is only exposed to Maxscript.
So, I made a UI for that.
You can turn on/off channels and rename channels.
Installation is simple.
Download the zip file and drag and drop to your viewport.
You can find the script in csTools > MaxFluidsPRTExportChannelSetup.
It is a macroscript so you can make button, menu or shortcut.
It will also show up in Global Search(X)
As always, it is free!
Download : SuperClayMode
Some background information about the new viewport override
3dsMax 2017 introduced the new viewport material override. As you cans see from viewport menu, there are three override modes.
This mode uses self illuminated Standard material with UV Checker map.
This material is defined by uvchecker_override_material.ms script.
This files is in [maxroot]\scripts\Startup\ folder.
Usually C:\Autodesk\3ds Max 2017\scripts\Startup\uvchecker_override_material.ms
In that file, you can see the script is using [maxroot]\maps\uvwunwrap\UV_Checker.png.
Therefore, if you want to change the texture of the default UV Checker, you can 1)edit startup script or 2)replace the default bitmat file.
This a specially designed build-in shader for faster viewport display. “Performance” mode preset is using this shader overide.
This is a mode for custom override shader.
You can use any material for viewport override by using this maxscript.
nitrousgraphicsmanager.OverrideRenderSettingMtl = yourMaterial
SuperClayMode is a script which mimics built-in clay mode with custom matcap texture by utilzing this Rendering Setting mode.
This script makes a ShaderFX shader with matcap uv on the fly and assign the material as override material and turn on Rendering Setting mode. It is designed as a toggle mode. Therefore, you should make button or assign shortcut for this script.
If you want to know more about matcap. Check the following links.
This script doesn’t contain any matcap material. You can easily search google for texture.
How to use
- Unzip the downloaded file
- Just drag and drop to viewport.
- Go to Customize User Interface. You will see SuperClayMode in csTools category.
- Make button or assign to shortcut.
- Run script while pressing SHIFT. It should open matcap file selection dialog.
- Choose a matcap texture.
- Toggle the button/shortcut.
When you assign matcap texture, it stores the file path in plufcfg. You don’t need to assign texture every session.
This is a collection of macro script relate to construction plane. It started as an implementation of Modo’s work plane. It includes the following four scripts.Download csWorkPlane 1.52
First of all, Special thanks to Fausto De Martini for all great feedback.
It is similar to LockWorkPlaneToOrigin except this aligns construction plane to view.
autoAutogrid renamed as Place Grid
a small floating dialog for csWorkPlane funtions. It is dockable. To undock, just rightclick any button.
It allow you create a grid object. After the grid is made, the grid will be automatically activated, and all transform coordinates will be set to Grid.
The core functionality of this script has been in 3ds Max for long time. AutoGrid, Grid object, Grid coordinate. I just make more streamlined workflow.
If you want to go back to the default coordinate, Run this script again while pressing SHIFT.
If you turn on this mode, the plane which face to camera will automatically become the construction plane.
If you want to go back to the default coordinate, Run this script again while pressing SHIFT.
1) Select an object
2) Select face(s)
3)Run this script.
This script will make a grid object at the center of face and activate it. The ZAxis will be aligned to face normal.”
Turn off workplane by deleting the workplane from the scene. It is same as SHIFT+LockWorkPlaneToOrigin
How to install
2) Just drag and drop csWorkPlane_1_52.ms into viewport.
3) Make button or shortcut. This script will show up in “csTools” category.
The main calculation engine is CollapseSW MCG object. This MCG object converts vertex position from world space to local space.
Accompanying Maxscript calculate a new mesh using this MCG object and either replace original object with the collapse object or generate point cache and apply to the original object.
This MCG shows a few benefits of MCG.
1) The node based nature of MCG and the large amount of built in functions and Auto UI generation allow fast development. It took less than 5 minute for me to make this MCG object.
2) All MCG parameters are automatically exposed to Maxscript.
To provide a complete workflow, I made CollapseSW macroscript. It is easier to make script than trying to explain in English for me.
The parameters are self-explanatory.
1) Select objects to collapse/pointcache. you can select multiple objects.
2) Choose what to do with Collapse/PointCache.
3) If you want to collapse, you don’t need to set anything. If you want to point cache, you need to set parameters for point cache and assign out file name.
4) If you select multiple objects and point cache, this script will only use the path portion and use object name as point cache name. If you check Make SubDir Per Obj, it will create a sub folder for each object automatically. If you choose to use One File Per Frame, you probably want to check this.
* Currently MCG mesh building is a little slow for high polycount mesh. It might take a while to point cache.
How to Install
CollapseSW.zip includes two files.
CollapseSW.mcg is the MCG package.Install this package through Scripting menu > Install MCG package..
csTools-CollapseSW.mcr is macroscript. Just drag and drop to a viewport. Then you will see Collapse/PoinrCache SW in csTools category.