UPDATE 2:
- Now if you render with a selection you'll get a single gradient for the selection instead of one per object.
UPDATE 1:
- Saves your options when you open and close the dialog.
- Spinner for padding and selecting UV channel
- Optional Output path
- Shows progress bar while rendering
- Due to a max bug, I added a checkbox to hack the UVs so wide textures render as expected. If this is ever fixed, uncheck Use Hack.
- Textures that display after rendering reload from disk more reliably.
If you've already installed and set a hotkey/button, simply drag and drop this script into the viewport to update. The hotkey/button should continue to work.
Download: https://dl.dropboxusercontent.com/u/2904948/MaxScript/Martinez_Macro_GradientMap.mcr
It's becoming popular to overlay a gradient to give emphasis to more important areas of a character. (See DOTA2 style guide.) This script will take your object selection and apply a gradient in object space for each object and render it out to a texture. Your objects must already be unwrapped. If your character has a hat or other gear you'll want to combine the objects temporarily to get one map.
This worked on all the models I tested it on. But let me know if there are any issues.
To install drag and drop the MCR file into the viewport, then look in Customize > Customize User Interface > Keyboard > Category > monsterBlues.
BTW: This script doesn't actually apply any textures to your models. The screenshot above is to illustrate. The script will output and display a bitmap you can save.
Replies
good idea to have automated that
Takes all of 30 seconds in Mari
BTW i'm using Max 2011
It renders to the Max Temp folder. But It should display the texture after it renders and you can press the save or copy clipboard button on the images toolbar.
I've tested it only in Maya 2012, but it should work everywhere.
You can just paste contents of .py file into Script Editor (PYTHON tab) and run, or you can follow README how to make script more permanent on you shelf.
http://s000.tinyupload.com/?file_id=00918842223988639094
Props to monster for idea
Thanks!
All characters in Dota2 use this. But there are also plenty of other uses. For weapons I use it to draw attention to the important parts, same for props. It adds a very nice amount of depth to the object you apply it on. Not for everything and not just for characters.
I just apply a gradient() to a diffuse channel, and set it to Object Space, instead of explicit UV or world space. Then I use render to texture to get the map. The script isn't complicated at all, but takes 15-20 steps down to one.
Nice man! I was about to make one, but haven't had time.
It's also a pretty common technique for illustration. But look up the DOTA 2 style guide for examples.
It renders to the temp folder. But I display the bitmap so that you can save it where ever you want it. There is a save and copy clipboard button on the image's toolbar.
I can add a save to location option. Maybe it would be useful.
Another problem I have is, on a non square texture (1024x512) it renders out only the top half of the texture.
But this is a real timesaver, thanks for putting in your time to make it.
I use it in all my art.
As others have said, it's used to draw attention to the important parts of your character. In this case, the head:
It also helps ground your character. Real humans have blood that rushes down to their legs (especially if they have poor circulation).
Heck, I even use it on vehicles.
Since I dont use 3dsmax too often, having alternatives is nice. So thanks ArYeS for the Maya plugin.
That being said, this is also easy to do in Cinema4d/Bodypaint3d.
Make sure to check "Project on invible parts", in the preferences.
And use the gradient tool.
Using BP3D, allows you to simply drag a line for the gradient, so you are not limited to just top down projections. You can make diagonal ones like the creature that skankerzero posted.
However for a "perfect" top-down projection I'd recommend using the side or front view.
https://dl.dropboxusercontent.com/u/2904948/MaxScript/Martinez_Macro_GradientMap.mcr
If you've already installed and set a hotkey/button, simply drag and drop this script into the viewport to update. The hotkey/button should continue to work.
this is really cool script!!
I used this script and I got upside down of the dradient, is it bug ?
or did I miss something?
and this is another question for the gradient looking in 3ds max viewport
the texture has very smooth gradient but when I assigned it into object
there is many cuts each level of the color
How can I fix it?
As for the gradient banding, I haven't seen that happen. What format are you saving the textures? Can you send me one of the maps? I notice some dithering too.
If you are using Max 2012/2013 you can try the Nitrous Texture Tweaker: http://www.scriptspot.com/3ds-max/scripts/nitrous-texture-tweaker
If you have 2014 you can just click on the viewport shading label in the top left, go to Configure > Display Performance, and set them to at least 2048 like your renders.