Re: shader writing: Array picking menu question

Date : Wed, 07 Nov 2007 12:52:25 +0100
To : XSI(at)Softimage.COM
From : Rob Wuijster <rob(at)glassworksamsterdam.nl>
Subject : Re: shader writing: Array picking menu question
Ok,

I have some more reading up to do into this shader writing thing I guess.... But I'm having a hard time to find some proper examples in the SDK and Wiki.

I more or less build the mip_render_subset.spdl file, but I'm still unsure about the referencewidget options. Or I'm misunderstanding the explanation of this shader in the production pdf....

I've attached the spdl file, maybe someone can have a look and see where it has to be finished to work. Thoughts on this are marked behind the #...

cheers,

Rob Wuijster
Glassworks Amsterdam


Rob Wuijster wrote:
Ah... Thanks for that :-)

vr.gr.,

Rob Wuijster
Glassworks Amsterdam

Stephen Blair wrote:

http://softimage.wiki.avid.com/index.php/SPDL:_ReferenceWidget_for_Materials


-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Rob Wuijster
Sent: Tue 06 November 2007 11:42 AM
To: XSI(at)Softimage.COM
Subject: Re: shader writing: Array picking menu question


Hi,

Back at some SPDL writing....

I have been browsing the SDK after this reply, but not sure about some things yet. I found the "type = reference", "UIType" and "mode" entries, but am still unsure about the "filter = {GUID}" line.

I assume this GUID is somehow linked to each objectgroup in XSI, so the PPG wntry looks at the correct entry in the selectionwindow. I couldn't find a list linking the XSI object family constant strings. Or am I looking in the wrong direction, or at the wrong place in the SDK??

Also, how does one "pick" the material for this "mip_render_subset" shader anyway?
(mia entry:
array geometry "objects",
array integer "instance_label",
material "material",
)


I don't assume a regular connection slot in the RT node will do..

cheers,

Rob Wuijster
Glassworks Amsterdam


Halfdan Ingvarsson wrote:
In the propertyset section:
Parameter "objects" input
{
guid = "{CD693DF1-2B99-4E20-9807-4C5457EF7D33}";
type = reference;
}
In the Defaults section:


objects
{
UIType = "ReferenceWidget.ReferenceWidget.1"
{
filter = "{6B579D20-3DC5-11D0-9449-00AA006D3165}"; # 3DObjects
mode = "multi";
}
}
Check out the sib_lightning.spdl for an example usage of it.
- ½



---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi




--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi


SPDL
Version = "2.0.0.0";
Reference = "{357B68F0-7423-452C-AED2-7B0A5AF46424}";
PropertySet "mip_render_subset_pset"
{
	Parameter "out" output
	{
		GUID = "{160CE4F5-2390-45F0-9740-75161BC1F5DE}";
		Type = color;
	}
	Parameter "enabled" input
	{
		GUID = "{37C92E3C-8FF1-41F8-92F4-09E156FE18B7}";
		Type = boolean;
		Value = on;
	}
	Parameter "objects" input
	{
		title = "objects";
    		guid = "{CD693DF1-2B99-4E20-9807-4C5457EF7D33}";
    		type = reference;
	}
	Parameter "instance_label" input
	{
		title = "instance_label";
    		guid = "{AEE3E9F6-DC7F-4C9B-BC30-A805764D24C6}";
    		type = reference;
	}
	Parameter "material" input
	{
		title = "material"
		guid = "{B221B97B-F93F-4E09-82D2-91284566FAE8}"; #spdlcheck stops here with a parse error: invalid parameter definition.....
		type = reference;
		UI "hierarchy" = true; #or something alike to be able to select a material from the list instead of just geometry....
	}
	Parameter "mask_only" input
	{
		GUID = "{FD6B4BDB-5EB4-4D94-8B29-A59EF9524E4E}";
		Type = boolean;
		Value = off;
	}
	Parameter "mask_color" input
	{
		GUID = "{FCF4B73F-6D34-438D-806E-D831D6BCBB8D}";
		Type = color;
		Value = 1.0 1.0 1.0 1.0;
	}
	Parameter "background" input
	{
		GUID = "{16185DAC-3A7C-493F-B4FF-2298961A4F8F}";
		Type = color;
		Value = 0.0 0.0 0.0 0.0;
	}
	Parameter "other_objects" input
	{
		GUID = "{99C0A737-DCD0-4200-BCC7-1B15B8FAEAA5}";
		Type = color;
		Value = 0.0 0.0 0.0 0.0;
	}
	Parameter "full_screen_fg" input
	{
		GUID = "{232859A1-166E-4AF8-8912-A883E17D0F30}";
		Type = boolean;
		Value = on;
	}
}

MetaShader "mip_render_subset_meta"
{
	Name = "mip_render_subset";
	Type = lens;
	Renderer "mental ray"
	{
		Name = "mip_render_subset";
		FileName = "production.dll";
		Options
		{
			"version" = 5;
		}
	}
}

Defaults
{
	enabled
	{
		Name = "Enabled";
	}
	objects
	{
		Name = "Objects";
    		UIType = "ReferenceWidget.ReferenceWidget.1"
    		{
        		filter = "{6B579D20-3DC5-11D0-9449-00AA006D3165}";    # Select the 3D Objects to rerender
       		 mode   = "multi";
    		}
	}
	instance_label
	{
		Name = "GBuf.IDs";
    		UIType = "ReferenceWidget.ReferenceWidget.1"
    		{
        		filter = "{new_GUID_here for ID's}";    # Select the instance_label as well to rerender the selected objects
       		 mode   = "single";
    		}
	}
	material
	{
		Name = "Material";
       	UIType = "ReferenceWidget.ReferenceWidget.1"
       	{
         		filter = "{FB607CD0-5207-11d0-854E-00A02417D029}";	# Select the new material to rerender the selected objects with this material assigned
      		 mode   = "single";
       	}
	}
	mask_only
	{
		Name = "Mask_Only";
	}
	mask_color
	{
		Name = "Mask_Color";
		UIType = "rgba";
	}
	background
	{
		Name = "Background";
		UIType = "rgba";
	}
	other_objects
	{
		Name = "Other_Objects";
		UIType = "rgba";
	}
	full_screen_fg
	{
		Name = "Calculate_FG_Full_Screen_(All Objects)";
	}
}

Layout "Default"
{
	enabled;
	objects;
	instance_label;
	material;
	mask_only;
	mask_color;
	background;
	other_Objects;
	full_screen_fg;
}

Plugin = Shader
{
	FileName = "production";
}

Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.