[Closed] mr shader translation problems
Hi all,
I’ve been playing around with writing plugins to add a proper GUI to mental ray shaders (based on the SDK howto\mentalray\mrSampleShaders example). It works great, and finally allows UI stuff like dropdowns, which aren’t possible with the standard Max translation of the .mi files.
I’ve got 2 problems that I can’t seem to solve:
1 – I’ve been trying to enable/disable UI controls (eg. when Checkbox1 is enabled, Spinner2 should be disabled). This isn’t normally a problem, but with mr shader translation all of the DlgProc stuff is handled automatically by imrShaderTranslation.h, and I’m having trouble getting it to do what I want.
2 – I’m also having a problem with adding rollups. The reason for the problem is the same as above. The automatic shader translation adds one rollup with everything in it, but I need to be able to split one shader up into 2 or more rollups.
If anyone has already done this, I’d be grateful for a few tips. If it’s not difficult at all, maybe someone could adapt the howto\mentalray\mrSampleShaders example to show how it’s done…
Thanks in advance,
Dave
Hi,
Do you know this forum ? http://forum.lamrug.org/
There’s very experienced mr programmers inside.
Hi Yannick,
yes, I know that forum very well, but this is a Max problem, and has nothing to do with the mental ray shader itself. In the Max SDK there is an example of writing a plugin that acts like a normal Max texture map (in ‘maxsdk\howto\mentalray\mrSampleShaders’), but is basically just a front end for a mental ray shader. I’ve already got the mr shader, now I need to sort out the Max side of things.
Dave
Ok, I know a mr programmer for 3ds Max but unfortunatly it cannot be contacted these days.
OK, I’ve solved the problem with adding rollups, I had a typo in my P_MULTIMAP setup…
But I am still having problems with the UI enable/disable stuff.
Dave
Hi David!
Great news someone F:bounce:I :bounce:N:bounce:A:bounce:L:bounce:L:bounce:Y is taking on this.
I’m no good with the Max SDK, but I’ve come as far as compiling a dummy plugin and got it to load without errors.
When you’re finished it would be great if I could have a look at the code.
Or if you like, feel free to contact me if you want to make GUI’s for some of my shaders.
Hi Jan,
don’t worry, I will be definitely be doing your shaders
I’m still wrapping up a test with Francescas ctrlColor shaders, and if that works out OK, I’ll get started on yours, if you want.
If you want to know details, send me a mail, we can talk about it…
Dave
Edit: Oh yeah, I forgot to mention that I also sort of solved the Enable/Disable problem mentioned in the first post.
Right, now I’ve got 2 new problems…
mr texture shaders can return a colour, a float or a vector. The trouble is that Max doesn’t seem to realise this, and allows you to put a float texture in a color texture slot instead of restricting you to float texture slots. This only happens with the plugin versions of the shaders. The shaders straight from the .mi file don’t have this problem.
I’m also having problems with drag and drop for texture maps in the shaders. The problem is that it doesn’t work :shrug:
Dave