MaxScript: Gradient Map

2
Polycount Sponsor
Offline / Send Message
Pinned
monster Polycount Sponsor

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.
GradientMap2png

GradientMappng

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

2
Sign In or Register to comment.