[Closed] Max Maps to Mental Ray
Are there any procedural maps for max which support mental ray aside from the ones that come with max?
I’ve gotten multiple request to make my procedural maps work with mental ray but when I took a look at the documentation I didn’t get the slightest clue how I’d get the stuff working.
Basicly there are at least 3 parts I don’t get.
- How do I make the Coordinate rollout work with mental ray?
- How do I make the Output rollout work with mental ray?
- How do I make other custom controls, such as Curve control work with mental ray?
It’d be great help if somebody had source codes of some map that has normal max implenentation, the translation to mental ray and the mental ray implementation of the map.
Here is a link to the procedurals (and their source code) I’d like to implement for mental ray http://www.niksula.cs.hut.fi/~jylilamm/BerconMaps.shtml
I think you should pm masterZapp on this one, he did the miA&D shader in max, I think he can help you out or give some pointers.
-Johan
Why PM? I’d prefer a public discussion so others can benefit. The SDK documentation sucks enough as is.
I just meant PM to invite him to this thread… I should’ve stated that more clearly… I have invited other people via PM too on occasion, cause not everybody reads all threads…
I’m all for public discussion too!
Back to the discussion.
-Johan
I have little help to offer, but from what I picked up, you first need a native mental ray shader that can reproduce what your 3ds Max map does. The you need code in your map to translate the parameters.
Regarding texture coordinate and output rollout, I would create a very simple test scene and render that to an .mi file and take a look at that in a text editor.
If you find a definite answer, please keep us posted.
– MartinB
I’ve done this the other way round (mental ray shader to Max plugin) but I’ve got no idea how to do it this way…
I’ll have a hunt through all of the source code I’ve got lying around, maybe I can find something useful.
Dave
Bercon, have you looked in MAXSDK{HowTo,Samples}\mentalray\ ? There seems to be a number of samples available.
I’ve never actually looked at them, having little interest in MR development, but I’m sure they could help.
Yeah I’ve checked the samples but none of them are normal texture maps which would use Coordinate or Output stuff.
The guys at autodesk must have made some sort of automatic translation and mental ray implementation of those controls but for some reason they decided it aint worth the trouble to include those with SDK, I guess it would have made making mental ray compatible stuff too easy.
The only procedural that I know of which supports both max and mental ray is Simbiont from Darksim, but even they dropped it at some point and its no longer available afaik.
- Jerry
@scorpion007: The samples in the SDK are for the other way round: taking a mental ray shader and making a Max front end for it. That’s what I used for my ctrl_colors plugin. What Jerry needs to do is write a mental ray shader containing all of the procedural materials in his plugin, and then find a way to let Max know to use that shader if Max is rendering with mental ray.
Dave
Ah, well, in that case it seems he’d need to write a mental ray shader using the MR api, and then follow those samples to provide a front-end for max.
Since you essentially have the shader algorithms written, it shouldn’t be too much of an issue porting to a mr compatible shader, and you can (hopefully) re-use most parts of the UI you programmed for your native shaders (dialog resources, dlg procs, etc).
Of course, I’ve never actually tried doing that, so I’m sure it’s easier said than done :P.
Anyhow, good luck. Hopefully MasterZap or someone else can assist further.
Jerry, take a look at the NormalBump texture map code (SDK/samples\materials\NormalBump). It’s set up for automatic translation to a mental ray shader. Then take a look at the 3dsmax2008.mi file in your Max/mentalray/shaders_standard/include folder and find the declaration for max_Gnormal. That is the declaration for the equivalent mental ray shader.
I suppose the first thing you need to do is write a mental ray shader with the same settings you use in the plugin. If I get the time, I’ll pick out one of the simpler textures and have a go.
Take a look at this page: http://www.pixero.com/downloads_mr.html
Jan has written a wood shader for mental ray, and you can download the source code. Maybe you could use that as a starting point.
Dave