mental mill (Shaders, Tips, Tricks, etc)...


#1

Lets start this off with some basic tips on using mental mill shaders in 3ds Max 2010:

Q: Where is Mental Mill in 2010 ?
A: It is on your install DVD, it can be accessed from the install UI > Install Tools or Utilities > mental mill Artist Edition. Or you can manually navigate to the Support > Partners > MentalMill folder. It can also be downloaded from the Autodesk Support site here.

Q: Anyone figure out how to get shaders from Mental Mill to Max?
A: File > Save As > .XMSL. This is then loaded into the 3ds Max DirectX Shader.

Q: One question…if you do a meta Sl shader, when you render it inside mental ray, can you get real reflections and refractions?
A: Yes you can. You will need to add a Component_Reflection and/or Component_Refraction node into your Phenomenon network. It is these Component nodes that instruct mental ray to do raytracing at render time. See my post on the mental mill forum here.

Tips: Some helpful tips from JeffPatton*:
*You must make your custom shader a phenomena.
*You must end the phenomena with a node that has a single output.
[i]*If using texture nodes, you’ll need to add a state_uv input to the texture node.
Your phenomenon can only have a single output result.

[/i]Official mental mill pages:
mental mill forums
mental mill product page
Difference between mental mill Artist Edition and Standard Edition
Exising mental mill threads:
XSML shaders
Mental Mill
mental mill :: Software Feature

So lets start sharing our shaders, tips, tricks, questions, and .xmsl shaders.
-Eric


#2

Hello,

i played around with mental mill a little bit and i got everything to work, but neither in the viewport nor in mental ray i get the alpha channel to work. I tried it with the alpha value in illuminate_phong node and over a texture mask with the comp_set_alpha node but none of both work.

How do i get the alpha channel to work?

Thanks in advance


#3

Hi

ask the 3D-Guru Ruediger on the mental images Forum, he knows all about mental mill. :thumbsup:

german mental ray Treads about mental mill: http://www.germanmentalray.de/viewforum.php?f=55

PS: In 3dsmax2010 is a bug, when you want render the DirectX Shader. Change in Windows from “.” to “,”… than works fine …

control panel => Regional and Language Options => Number : 123,456,789.00

mfg
hot chip


#4

From Zap Andersson on Mental Images forum:

“Go to your windows Control Panel => Regional and Language Settings => Regional Options tab, the “number format” button, and make sure the “Decimal Separator” is a dot, not a comma, I.e. that decimals are written 1.0 not 1,0”


#5

Holy crap, it works! Thanks for the help.


#6

By default the shipping version of mental mill Artist Edition has the ability to add 3rd party .msl files disabled, however you can manually add them yourself.

  1. Navigate to: \mental images\mental mill Artist Edition\shaders folder.
  2. Open the mill_toolbox.xml file in a text editor.
  3. At the end of the document add a new entry similar to:

<metasl_code file_name=“my_new_shader.msl”/>
You need to include the full path, or make sure the file is in the shaders folder.

  1. Save the modified mill_toolbox.xml and open mental mill Artist Edition.

Adding new shaders to the Toolbox.

  1. Search for the shader in search box at the bottom of the toolbox.
  2. a) Create a New Folder by right-click > New Folder on the Root folder.
    b) Unlock an existing folder by right-click > Unlock Folder.
  3. Drag your new shader to the desired folder.

**NOTE 1: for .xmsl files using any non-default shaders to work in 3ds Max 2010 you need to use the full path to the file in the mill_toolbox.msl file, or copy the .msl to the: \3ds Max 2010\hardwareshaders\MetaSL folder. Or you can modify the entries to the file in the .xmsl file in a text editor to add the full path.

**NOTE 2: when renaming folders from the UI they must start with non-numeric characters. For example, you can rename a folder “Third_Party”, but not “3rd_Party”. To do it manually search your user folder for the mill_treeview.tvx file. Open it in a text editor, find the desired folder entry, and rename it. Example, using this method I can rename “Third_Party” to “3rd_Party” and save the document. The next time I open mental mill the folder will be named properly.

**NOTE 3:
for shaders written by 3rd parties to work, you need to have all the shaders it references in the shader folder and added to the mill_toolbox.msl file. Some shaders found on the mental images forums may reference shaders that are only available in the Standard Edition.

-Eric


#7

This is the step I was missing. Thanks for that.


#8

Using the full path, I’m able to get the shader to work in the viewport in max, but not when rendering. It throws a “shader not found” error. Any thoughts?


#9

Without having the exact .msl and .xmsl file it would be hard to diagnose. Since I have no idea if its a shader the .msl is trying to load, or Max not liking it because its not in the hardwareshaders folder, or what.

-Eric


#10

I tried again using a relative path and putting the shader in the hardware shaders folder, but I still have the same problem. It works in mental mill and the viewport, but errors out when rendering. Is there another place I might need to put it?


#11

The problem is probably in the .xmsl shader, but can’t do anything but guess without seeing the shaders.

-Eric


#12

If you have the time, here’s the .xmsl and the .msl zipped up. I just copied the code from Generator_brick.msl as a template. It works fine in mental mill and fine in the viewports, but not when rendering.

Thanks for all your help on this.


#13

I have no idea. I would go post it to the actual mental mill forums.

-Eric


#14

I’ll give it a shot, but I suspect they might not be too excited about questions on how to work around the limitations deliberately built into their software.


#15

That shouldn’t be an issue since the Standard Edition does allow you to load custom .msl files. The problem is in Max or the .xmsl file.

-Eric


#16

Can we make a volume shader?


#17

Heh that’d be great but I doubt it :slight_smile: I think the next big hope for volumetrics is the Krakatoa voxels, that with some cool coloring can look magnificent!


#18

http://www.binaryalchemy.de/index_dev.htm

ah anything is possible… :slight_smile:

I really cant wait to get my hands dirty with mental mill


#19

Yeah people have been asking for binary alchemy to come to max for a long time now, it would be awesome if it happens :slight_smile:


#20

There are some basic volume fog .msl files that come with it, so maybe you could hack that to do what you want. Or find some existing volume .fx code and convert it to .msl.

-Eric