Page 2 of 6

Re: userIbl shader from mr 3.10

Posted: 08 May 2012, 21:32
by Saturn
Hirazi Blue wrote:Slightly OT:
So now I am wondering if the new mr 3.10 Ptex stuff could be "unlocked"
as "easily" as this as well (using Maya/Max dlls, I mean) or not...
:-\
Doing the spdl and copy the dll across have been done. But for some reason I could see the node once installed.
Something is probably missing somewhere.
but I could copy the spdl over here and let someone else to dig it. I don't have much time to figure out what is wrong.

Code: Select all

# SPDL Generated by Softimage Shader Wizard
SPDL
Version = "2.0.0.0";
Reference = "{6B72FF8A-333D-43D3-995A-0A43C2A2CF86}";
PropertySet "mib_ptex_lookup_pset"
{
	Parameter "out" output
	{
		GUID = "{CECA2270-177A-4032-A932-9C06E2E6250E}";
		Type = color;
	}
	Parameter "filename" input
	{
		GUID = "{0EF48CFE-8E59-429D-A27A-32CDEB461F15}";
		Type = string;
		Value = "";
	}
	Parameter "width" input
	{
		GUID = "{02C6DEB0-F4C2-46C9-967E-596D70D7AD62}";
		Type = scalar;
		Value = 1.0;
	}
	Parameter "blur" input
	{
		GUID = "{C6505413-F73F-4DAE-B427-8C0ECFB3D5B0}";
		Type = scalar;
		Value = 0.0;
	}
	Parameter "filtertype" input
	{
		GUID = "{7918BDD2-4C72-438A-9852-48210F80DDF5}";
		Type = integer;
		Value = 4;
		Value Maximum = 7;
	}
	Parameter "interpolate_level" input
	{
		GUID = "{56AB051F-E3C9-45C6-91A2-437877EED09B}";
		Type = boolean;
		Value = off;
	}
	Parameter "filter_sharpness" input
	{
		GUID = "{8D2A032E-2FF0-4825-9825-93D47B7ECBF0}";
		Type = scalar;
		Value = 1.0;
	}
}

MetaShader "mib_ptex_lookup_meta"
{
	Name = "My New Shader";
	Type = texture;
	Renderer "mental ray"
	{
		Name = "mib_ptex_lookup";
		FileName = "ptex";
		Options
		{
			"version" = 1;
		}
	}
}

Defaults
{
	filename
	{
		Name = "filename";
	}
	width
	{
		Name = "width";
	}
	blur
	{
		Name = "blur";
	}
	filtertype
	{
		Name = "filtertype";
	}
	interpolate_level
	{
		Name = "interpolate_level";
	}
	filter_sharpness
	{
		Name = "filter_sharpness";
	}
}

Layout "Default"
{
	filename;
	width;
	blur;
	filtertype;
	interpolate_level;
	filter_sharpness;
}

Plugin = Shader
{
	FileName = "ptex";
}

Re: userIbl shader from mr 3.10

Posted: 08 May 2012, 22:43
by Hirazi Blue
@Mathaeus & @Saturn
Thanks, I already was afraid it would turn out more complicated than just the dll-switch.
Would obviously still be very interested in hearing from anyone
who is able to get this to work somehow...
:(

Re: userIbl shader from mr 3.10

Posted: 09 May 2012, 00:57
by Mathaeus
Hirazi Blue wrote:@Mathaeus & @Saturn
Thanks, I already was afraid it would turn out more complicated than just the dll-switch.
Would obviously still be very interested in hearing from anyone
who is able to get this to work somehow...
:(
from my understanding, requirements are :
1: 'per face' UV mapping
2: 'per face' assignment of texture that match the order in ptex file, because each piece spreads from 0 to 1 of UV space
3: image loader

theoretically, 3 has some chance, maybe it's possible to type the path manually, SI won't display texture of unknown format, but there is a chance MR will 'understand'

for 1 and especially 2, I have no idea.

Re: userIbl shader from mr 3.10

Posted: 09 May 2012, 01:56
by Maximus
I didnt manage to get this shader working, it seems mostly some error in the shader declaration, Softimage gives me error that couldnt find shader library, have no idea how to fix this.
Reading on the forums i saw that even in maya is kinda tricky to activate, you have to play with the system environment variables.

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 04:02
by Daniel Brassard
I've been trying to download the Maya trial all night, the AD downloader is just messed up.

I got that same message, but I don't have the shader mib_ptex_lookup. If I could get the dll shader, I'd be able to test it, the spdl and mi file is ready for testing!

Anybody compiled the newest PTEX API for 32 bit Window?

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 04:12
by Maximus
those are the 2 dlls for ptex and useribl.

x64bit only, i dont have 32bit.

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 04:14
by Daniel Brassard
Thanks Maximus, I'll try my end see what comes up and let you know.

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 06:40
by Daniel Brassard
Maximus,

How do you determine that PTEX is working. I installed the ptex.dll, ptex.mi and mib_ptex_lookup.spdl using the plugin manager. Then tested the scene with the bunny test from the PTEX website and got no errors. Does it mean I have it working.

See attached result!

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 10:08
by Saturn
I can't see any texture on your bunny.
So I guess it doesn't work

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 14:09
by Daniel Brassard
The next step is to turn on ccmesh_ptex in mental ray for Softimage.

This is how the Maya people do it:
Since AD hasn't integrated this process, I thought I would give you all a heads up on how to use PTex textures in Maya 2013:

Set PTex registry value for mental ray for Maya:

Create/edit file maya.rayrc in the user Maya directory 2013/prefs/ (or 2013-x64/prefs/ or /Maya2013/mentalray/) and add the new registry setting below.

Example (Maya2013 64bit on Windows Vista/7):
Edit the file:
C:\Program Files\Autodesk\Maya2013-x64\prefs\maya.rayrc

add the following line:
registry "{_MI_REG_CCMESH_PTEX}" value "on" end registry
Now to find out how it is done in Softimage so that the texture can be rendered.

From the MR Manual:
In order to enable Ptex per-face assignment the ccmesh surfaces need to carry additional data when computed. This can be enabled globally using a registry key, or per object with a new optional bary attribute.
The Maya people do it globally using the registry key, but is it the best way to do it if only one ore two object in your scene have a ptex texture?

more info in the manual at:
http://docs.autodesk.com/MENTALRAY/2013 ... ml#mi:bary

Global or per object ..... what to do.... :-?

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 16:48
by Hirazi Blue
As a first "proof of concept" trying to get it to work on a global level would seem the logical next step. :-?
Getting it to work "per object" might be nice "little" follow-up project
(probably involving a lot more work)...

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 17:19
by Daniel Brassard
My thought exactly Hirazi Blue . Test globally as a proof of concept first. If it works then we can figure the process to do it locally later.

Can we do the same registry change as in Maya? Do you know if this is faisible with Soft? (I am not in front of Soft right now so I can't confirm)

edit: Yes, it can be done. The mental ray initialization file .ray3rc is under %SI\Application\rsrc\

Now to test tonight. If everything work well, we will have confirmation that PTEX rendering is faisible in Softimage.

Then a quick modification to the spdl and I'll provide detailed instructions to activate ptex rendering.

More tonight! :D

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 19:55
by Maximus
Daniel Brassard wrote:Maximus,

How do you determine that PTEX is working. I installed the ptex.dll, ptex.mi and mib_ptex_lookup.spdl using the plugin manager. Then tested the scene with the bunny test from the PTEX website and got no errors. Does it mean I have it working.

See attached result!
can you share please the ptex.mi and mib_ptex_lookup.spdl?
i'll double check

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 21:42
by Kzin
Saturn wrote: - Shadow mode transparent seams to not work in XSI ( it works in maya ) I guess the version of MR are slightly different and something must be broken
first, thanks for your effort, its good to see some people that are not that lazy then the ad dev's.


but now to the bad thing, the transparency problem.
the shader is useless for all scenes containing some sort of glas or other transparent surfaces.
i tryed to render a car model and i am not able to get any kind of good transparent effect. i tryed various overrides with transp visible, invisible, same for refractions and also for shadows but without success.

so since 2011 we have ibl but only thru a geoshader so its not possible to render over network.
2 years later we have a lightshader for this, again not implemented by ad, but transp is not working. in these two cases we have a implementation that is useless by default (and no offense to you saturn or to max, its going into ad's direction).

i dont know what i should say, i am tyred of thinking about these things, but wait, we have a great hq viewport in 2013, so thanks autodesk and also thanks to all the betatesters, great work, again...

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 21:51
by ActionArt
Saturn wrote:You must use the "light relative scale" string option with a value of 0.318 (1/pi)
Anyone know where this can be set?

Re: userIbl shader from mr 3.10

Posted: 10 May 2012, 21:55
by Kzin
ActionArt wrote:
Saturn wrote:You must use the "light relative scale" string option with a value of 0.318 (1/pi)
Anyone know where this can be set?
set the diffuse weight of the mia_mat to 0,318.