PDA

View Full Version : MR shader compatibility


Rockin
02-26-2007, 02:56 PM
Hi,

I'm having some trouble using some materials with MR

I'm using oFusion, a plugin for 3dsMax wich exports to Ogre game engine. oFusion comes with its specific material. An oFusion material has a slot which lets you choose the material to be used for the renderer, here's a screengrab:

http://img103.imageshack.us/img103/6615/untitled1kt2.th.jpg (http://img103.imageshack.us/my.php?image=untitled1kt2.jpg)


I've tested it, and it actually works.. with scanline. How can I set mental ray to use that material, instead of giving me an errror that it doesn't understand the oFusion material?



I know this could be tough, but if anyone has ANY ideas .. thanks!

"MSG 0.0 error: Material "Standard_19 ( oFusion Material )" not supported by the translator. Will render black.
MSG 0.0 error: Material "technique_0 ( oFusion Techniqe )" not supported by the translator. Will render black.
MSG 0.0 error: Material "pass_0 ( oFusion Pass )" not supported by the translator. Will render black.

"

Dodgeas3d
02-28-2007, 05:46 AM
You have to write the translator for that shader. Not all plugins coming with max works with mentalray.

Rockin
02-28-2007, 03:00 PM
Hi,
thanks for the answer. I was thinking along those lines. I'm a student at a computer science faculty, so maybe I could do that myself:). But as of yet I don't really know what that means, gonna google it.

Any other ideas/approaches for the issue I'm having?

Also, does anybody have a tutorial for writing a translator? I'll search for one myself, but if anyone knows a really good one, or some advice on this, please share:)

Thanks!

Rockin
02-28-2007, 04:04 PM
Ok, after searching this site, some other links and the MR docs, I pretty much got the idea about how to write my own custom shader. But I have no clue what I should do to 'translate' an already existing material. Any hints?:D

dlanier
03-01-2007, 01:48 AM
Hi Rockin,

You need to have the source code of the OFusion material plugin.
If so, you have to follow the doc "SDK - mental ray for Max .pdf" located in your help folder of Max.
BAsically, look at :

Headers for mental ray compatibility for 3dsmax 7+ : maxsdk\include\mentalray

Classes :
imrMaterialPhenomenonTranslation for Material plug-ins

Your plug-in should be a subclass of imrMaterialPhenomenonTranslation.
Regards,

Rockin
03-01-2007, 02:04 AM
You need to have the source code of the OFusion material plugin.


Hello,
That's exactly what I was fearing. Unfortunately the source code is not released. I guess this means the end of the story, huh?

I was thinking that since it has that 'Render Material' (which actually works with scanline) it shouldn't be so difficult to make it work with MR.. Maybe it's time I talked to the author again

Thanks everyone!