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
It's like it combines smaller slices of the gradient into larger chunks making the steps much more noticeable.
anyway you can make it so that the gradient is spherical?
I tried rendering the gradient map in 4096x4096 for my model but all it gave me was the uv map rendered on the red channel and g and b channels black. Any idea what's going on?
Also, I updated the script to make sure Projection Mapping is off before rendering out the Gradient Map. You can download the script again, drag and drop it into the viewport to update. Make sure to close/open the Gradient Map tool to refresh.
I've got a script.
this is what im getting
these are my UVs.
Clicking on the link opens a webpage of code. Copy that to notepad and save it as GradientMap.mcr wont let me save the file to the scripts folder in 3dsMax 2015 even when its in admin mode. Saving to the desktop wont let me drag the script into the viewport. Run script from max does nothing.
I am doing something wrong I think
Any help appreciated.
You can always find the category for the unencrypted script by opening it in maxscript editor and looking at "Category". If you need a better explanation you can watch the first 3 1/2 minutes of this video to explain better.
[ame]https://www.youtube.com/watch?v=FZ-SR0C0-tc[/ame]
Also for anyone else with the same problem I found out you cant drag and drop content into the max viewport if it is disabled or if like me you are running max in admin mode. Who knew ?
What version of Max are you using? Try turning on (or off) "Use Wide Texture Hack". There was a bug in Render to Texture that wasn't rendering wide textures correctly. If they fixed that bug, then that option needs to be turned off.
It works for me. Try right clicking and using Save As.
Any help is greatly appreciated! Seems like a cool script though if I could get it to work.
Let me know if that doesn't work.
3dsmax2013X64 user.
Thanks! I was trying to attach it yesterday, but I wasn't allowing me to attach MS file type. Didn't think of zipping it up.