passing an object list to mental ray

Date : Tue, 21 Mar 2006 14:40:48 -0500
To : <XSI(at)Softimage.COM>
From : "Mathieu Leclaire" <mleclair(at)hybride.com>
Subject : passing an object list to mental ray

I’m having problems passing objects to mental ray. I’ve used the technique explained in the SDK (http://softimage.wiki.avid.com/sdkdocs/bf454745.htm#Rbf14868) but for every object I add to the list, when I call:

 

mi_query(miQ_INST_ITEM, NULL, objects[ k ], &objtag)

 

…objtag never equals miNULLTAG which makes the shader continue to the next item when it shouldn’t…

 

/* No primitive? Check the next one then */
if (objtag != miNULLTAG)
continue;

 

…so I figured it was an error with the example and that the doc meant to say:

 

/* No primitive? Check the next one then */
if (objtag == miNULLTAG)

continue;

 

…but now, when the shader calls:

 

/* Get the label id of the primitive */
if( !mi_query(miQ_OBJ_LABEL, NULL, objtag, &objlabel ) )
continue;

 

…my objlabel always has a value of 0. I just don’t understand!! Anyone has any idea why it does that? What am I doing wrong?

 

 

 

Mathieu Leclaire

R&D Programmer

Hybride Technologies


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.