Converting .spdl to .mi

Discussions regarding Materials, Material-Compounds or Shaders, etc.
User avatar
Maximus
Posts: 1121
Joined: 09 Jun 2009, 13:45

Converting .spdl to .mi

Post by Maximus » 12 Jun 2012, 10:57

Hey guys, i was wondering if it was possible to convert a .spdl shader to .mi to use in Maya.
I have a Subsurface shader wich is made from a .dll and a .spdl file installed in softimage and working fine, i was thinking to copy the .dll into maya but i need a .mi file so it can work there.

anyone knows how to do this? I took a quick look at the shader wizard but it produces mostly .spdl files. I was wondering how to convert this .spdl into a .mi

Thank you

Kzin
Posts: 432
Joined: 09 Jun 2009, 09:36

Re: Converting .spdl to .mi

Post by Kzin » 12 Jun 2012, 11:08

spdl is not a mi shader or a shader in general. its xsi specific to tell xsi what it has to do with the dll and/or what shader it has to call.

if you have a dll then you would need to know to which shaders it points. then it should be possible to call this shader in maya thru their string options system.
but i think its a good question for the mi forum.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 22:38
Location: St. Thomas, Ontario

Re: Converting .spdl to .mi

Post by Daniel Brassard » 13 Jun 2012, 01:52

Is the spdl mostly parameters or are there any script in it? If they are mainly parameters, yes it can be done.

Example compare the spdl file of the userIBL and the mi file and you will get very quickly how they compare.

Can you share the spdl (or is it native to Softimage)?

Dan

P.S

for more info on the mi file check the mental ray manual on your softimage installation, ther is some good stuff inside

C:\Program Files\Autodesk\Softimage 2013\Doc\mental_ray\manual\node60.html
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Maximus
Posts: 1121
Joined: 09 Jun 2009, 13:45

Re: Converting .spdl to .mi

Post by Maximus » 13 Jun 2012, 05:31

i'm just tryin to convert this shader

http://animus.brinkster.net/downloads/Diffusion.zip

into a .mi so it can be used in maya, ineed the x64 bit

Its the Diffusion from Daniel Rind

thanks for help

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Converting .spdl to .mi

Post by Mathaeus » 13 Jun 2012, 09:01

Maximus wrote:i'm just tryin to convert this shader

http://animus.brinkster.net/downloads/Diffusion.zip

into a .mi so it can be used in maya, ineed the x64 bit

Its the Diffusion from Daniel Rind

thanks for help
Daniel Rind's shaders already are converted to... everything, long time ago. You can find a lot of "mi" definitions at
max plugins.de, under "Mental Ray shaders" . Even if it doesn't work automatically, you'll be closer to workable shader in, let's say, Maya.

User avatar
Hirazi Blue
Administrator
Posts: 5113
Joined: 04 Jun 2009, 10:15

Re: Converting .spdl to .mi

Post by Hirazi Blue » 13 Jun 2012, 09:37

Silly question, no doubt, but does the mi-file of a shader have to change, when the dll is ported to x64?
If not this attachment over at the CGTalk (login required, don't forget to go to a CGTalk page afterwards to log out again as this doesn't redirect you) contains a mi file for Maya...
And the x64 dlls were of course once done by Ben Rogall, you can download them from here
;)
Stay safe, sane & healthy!

User avatar
Maximus
Posts: 1121
Joined: 09 Jun 2009, 13:45

Re: Converting .spdl to .mi

Post by Maximus » 13 Jun 2012, 16:05

Mathaeus wrote:
Maximus wrote:i'm just tryin to convert this shader

http://animus.brinkster.net/downloads/Diffusion.zip

into a .mi so it can be used in maya, ineed the x64 bit

Its the Diffusion from Daniel Rind

thanks for help
Daniel Rind's shaders already are converted to... everything, long time ago. You can find a lot of "mi" definitions at
max plugins.de, under "Mental Ray shaders" . Even if it doesn't work automatically, you'll be closer to workable shader in, let's say, Maya.

Thanks a lot, that worked :D

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 22:38
Location: St. Thomas, Ontario

Re: Converting .spdl to .mi

Post by Daniel Brassard » 13 Jun 2012, 19:20

I see that you got it working. Did you have to modify the mi file much or did it work as is, gui declaration and all?

I did make the mi file until I saw you had it working using one from another website!

Here what I had!

Code: Select all

#----------------------------------------------------------------------------
#
# Daniel Rind's Diffusion Mental Ray shader MI declarations
#
#----------------------------------------------------------------------------

$ifndef "Diffusion"
set "Diffusion" "true"

	declare shader
		color "Diffusion" (
			color "surface" 			default 0.9 0.8 0.7,
			color "absorption" 			default 0.6 0.2 0.1,
			scalar "diffusion" 			default 0.1,
			scalar "intensity" 			default 1.0,
			integer "samples" 			default 8,
			scalar "direct" 			default 0.5,
			scalar "indirect" 			default 0.5,
			boolean "textured_scatter" 	default off,
			scalar "scatter" 			default 1.0 1.0 1.0,
			boolean "use_irradiance" 	default false,
			color "radiance" 			default 0.7 0.7 0.7,
			integer "area_samples" 		default 0,
			color "illum" 				default 0.0 0.0 0.0,
			scalar "illum_amount" 		default 0.5,
			scalar "spread" 			default 1.0,
			scalar "IOR" 				default 1.5,
			scalar "refractiveness" 	default 0.0,
			array light "lights"
		)
		version 1
		apply material
	end declare
	
$endif
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Maximus
Posts: 1121
Joined: 09 Jun 2009, 13:45

Re: Converting .spdl to .mi

Post by Maximus » 14 Jun 2012, 00:44

Daniel Brassard wrote:I see that you got it working. Did you have to modify the mi file much or did it work as is, gui declaration and all?

I did make the mi file until I saw you had it working using one from another website!

Here what I had!

Code: Select all

#----------------------------------------------------------------------------
#
# Daniel Rind's Diffusion Mental Ray shader MI declarations
#
#----------------------------------------------------------------------------

$ifndef "Diffusion"
set "Diffusion" "true"

	declare shader
		color "Diffusion" (
			color "surface" 			default 0.9 0.8 0.7,
			color "absorption" 			default 0.6 0.2 0.1,
			scalar "diffusion" 			default 0.1,
			scalar "intensity" 			default 1.0,
			integer "samples" 			default 8,
			scalar "direct" 			default 0.5,
			scalar "indirect" 			default 0.5,
			boolean "textured_scatter" 	default off,
			scalar "scatter" 			default 1.0 1.0 1.0,
			boolean "use_irradiance" 	default false,
			color "radiance" 			default 0.7 0.7 0.7,
			integer "area_samples" 		default 0,
			color "illum" 				default 0.0 0.0 0.0,
			scalar "illum_amount" 		default 0.5,
			scalar "spread" 			default 1.0,
			scalar "IOR" 				default 1.5,
			scalar "refractiveness" 	default 0.0,
			array light "lights"
		)
		version 1
		apply material
	end declare
	
$endif
Nope i just downloaded the 3ds max include file, and copy pasted the .mi from there, using the .dll and it worked.
Lots of shaders work in the 3 packages having the .mi and the .dll if you're lucky :)

User avatar
Hirazi Blue
Administrator
Posts: 5113
Joined: 04 Jun 2009, 10:15

Re: Converting .spdl to .mi

Post by Hirazi Blue » 14 Jun 2012, 07:18

Well, I guess that (and more importantly checking it elsewhere) answers my "silly question" 8-} :
mi files are the same for x32 & x64... #:-s
Stay safe, sane & healthy!

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 22:38
Location: St. Thomas, Ontario

Re: Converting .spdl to .mi

Post by Daniel Brassard » 14 Jun 2012, 13:21

Lots of shaders work in the 3 packages having the .mi and the .dll if you're lucky
I'm glad it worked. Unfortunately the PTEX solution is an unlucky one. Mental Ray inplemented PTEX on the ccmesh (Catmull-Clark mesh) which Softimage does not have native.

Softimage does not recognize the PTEX mi file either so no luck without an SPDL file. I am working on a geoshader to access the ccmesh but that require the use of the "userdatablob" to pass info from Softimage to Mental ray, more code ... 8-}

Anyway, that is the subject of an other thread!

Cheers!
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Converting .spdl to .mi

Post by Mathaeus » 14 Jun 2012, 20:40

just for info, not everything worked exactly in same way, of these XSI to 3dsMax Mental Ray translations from link I've posted. At least in time when I've tried, around 2005 or 2006 ) For example there was problem with interface of T2S Illumination. I think drop-down menus in 3DsMax, wants some additional scripting in order to display string instead of just ID, so on. There were problems with "faceted distribution" of Dirtmap too.

I have impression that Daniel Rind made his stuff really 'by the book", or, he was playing with essential features, so that's a main reason why these shaders are still resistant.

As Max already said, "if you're lucky"

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 22:38
Location: St. Thomas, Ontario

Re: Converting .spdl to .mi

Post by Daniel Brassard » 14 Jun 2012, 21:04

So true Mathaeus, nothing beats a proper solution in Softimage, always risky when taking a shader from another package.

Dan

:D
Last edited by Daniel Brassard on 15 Jun 2012, 12:03, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Converting .spdl to .mi

Post by Mathaeus » 15 Jun 2012, 08:47

well I hate to say this, but I *had* to go in this translation experience, because of broken rasterizer in XSI 5... 01, I think, it was somehow fixed to default sampling, nothing more. It took a good time to fix, more than half of year. Finally I went without fancy shaders from XSI, but rasterizer in Max worked..... And this was my last serious work with MR.

Well that's just me...