XSML shaders


#1

Hey guys (and girl) :slight_smile: I’ve been trying this whole XSML material workflow, but not having much luck for software rendering. if I create a new phong node with a checker generator or something in the diffuse and save it, it shows fine in the max viewport, but renders black with the error:

MSG 0.0 error: Custom translation interface for mtl/tex ‘08 - Default ( DirectX Shader )’: Shader declaration “Illumination_phong” not found.
API 0.0 warn 302080: while defining metasl “Illumination_phong”: redefinition of MetaSL shader library “Illumination_phong”
MSG 0.0 error: Custom translation interface for mtl/tex ‘08 - Default ( DirectX Shader )’: Shader declaration “Illumination_phong” not found.

so I go to the max help which says “Important - For a MetaSL shader to work with mental ray, you must save it as a phenomenon. Phenomena are described in the mental mill Artist Edition User Guide.”

so I pop on over to the mental mill Artist Edition User Guide which says to create a phenomonimuim I can select my nodes, right click and go create phimomimumm from selected nodes. I do that, then save it and bring the shader into max again… still shows fine in the viewport, but the new error message for software (mr) rendering is:

PHEN 0.3 error 051011: shader “Phenomenon” not found
PHEN 0.3 error 051011: shader “Phenomenon” not found

arg! So, my question is: why cant I spell phimonimium? :smiley:

no, really, has anyone managed viewport/software rendering with XSML shaders? :shrug:

p.s. this is the trial 32bit version and the mental mill from autodesks help, in case it matters…


#2

Yes, it works:

Attached a super basic example shader for reference. Some more tips can be found in this existing thread: http://forums.cgsociety.org/showthread.php?f=6&t=749239


#3

Cheers for that Jeff, taking apart that file in m-mill makes everything a lot clearer! :slight_smile:

I still don’t get any result from using generators for some reason though (brick, noise etc) are they maybe not compatable? I opened your basic scene and wired up a brick generator to the diffuse slot on the phong node, it shows in the viewport, but doesnt render. Oddly enough, if I leave the ‘texture map’ input to your phemonia :smiley: in there, but not connected to anything, then assign a bitmap texture to the slot in Max, it renders with the bitmap in the diffuse channel, while still displaying the brick-generator in the viewport. :curious: I think I’m not getting something here :banghead:


#4

Out of curiosity Chris, does the shader I attached above work properly for you? Meaning does it show up in the viewport, MEDIT, & render as I have shown once you assign a texture map to it?


#5

Chris…what graphics card do you have?


#6

@Jeff - yes, that one works perfectly, viewport and render. Also if I open it in mental mill and re-save it it works too… I’ve attached a sample shader that doesnt render in the ‘mental mill’ thread. I’m wondering if it is maybe some naming thing for the phenominom? I had a quick look through the xml, but nothing popped out as obvious to me, but I dont understand how it should be formatted too well.

@CerberusC - I’m running a Geforce 8800 GTS on Vista 64bit, mental mill initially told me my graphics card drivers were a bit old, so I updated to the latest.


#7

I was asking you that because with an ati 4870 there was some nodes that where not working (like the noise generator), but clearly that’s not your problem :slight_smile:

Cheers.


#8

looks like it was stuffing up because I was piping my illumination node (with 4 outputs) into my phenominom result, which doesnt work, pipe it into another pass-through node with 1 output and it works… :wip:


#9

Cool beans, glad you got it sorted out. :thumbsup:


#10

Thanks for your help - this whole metaSL thing is looking like a dream come true for my workflow here! woo hoo! :bounce:


#11

Post some viewport images if you get it all working. Curious as to how you’re using mental mill.


#12

I had some problems getting bump (or normals) working on my test shaders. Thanks to Ruediger there’s now a thread at the mental images forum that helped me resolve my issues:

Link to thread:
http://forum.mentalimages.com/showthread.php?t=5333

EDIT: :wink:


#13

Can’t believe you didn’t turn on the shadows! You’re banned from all future betas!

Nice image, thanks for posting and for the references to the MI forum - seems lots of people are struggling with this right now.


#14

[stealth edit mode on]Why I don’t know what you’re talking about![/stealth edit mode off] :wink:


#15

Having a go here with Environment maps :arteest:


#16

BTW, we’re working with nvidia to produce some new training materials for the 3ds Max/mental mill workflow. My guess we’ll have them out in a few weeks if not sooner.


#17

I’ve tried it in both Quadcore 6600 8gb ram Vistax64…
and it works in the one that have 7950gt, but not in the one with 8800gt either the Material Ball and render gets black (in viewport it seems to be ok) Any clues?

Edit: of course using DirectX given from Autodesk and lastest Nvidia drivers.


#18

Don’t know if you heard it yet or not, but Ken said elsewhere to stick with DX 9 for now, as all these features are not yet compatible with DX10.


#19

I was trying in both modes Dx10 and Dx9. Using Dx10 the shader is not shown in the viewport neither.

Yesterday i was looking at Mental Images forum and Zap Anderson says that is a known bug:

We don’t know exactly, yet. This is very hard to track down, because it seems machine dependent. It seems some default values aren’t getting fed in correctly (which is why exposing them as a parameter works)

/Z

And posted by the petition of some users of that forum, the only shader that has been working for me in this topic:
http://forum.mentalimages.com/showthread.php?t=5335&page=3


#20

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.