It is currently 25 May 2013, 16:52

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Passing object data to a shader
PostPosted: 30 May 2012, 18:55 
Offline
User avatar

Joined: 19 Mar 2010, 00:38
Posts: 444
Location: St. Thomas, Ontario
Can somebody help me in understanding how to pass object information to a shader in Softimage?

Here is what I want to do:

I have an object in the scene (say a teapot).

I create a new geoshader primitive.
I connect a geoshader to the geoshader primitive.
I open the geoshader node.

Here is where i am stuck (like a bug on fly paper).....

I want to create a input field were a user could write in a field the name of the teapot object or pick it from the scene explorer and the field would be automatically filled. The shader would then automatically take some information from that object i.e

teapot.no_polygons->geoshader.no_polygons;
teapot.no_vertices->geoshader.no_vertices;
etc.

Most example I have are direct manipulation of the scene in Mental Ray standalone. I have no example on how to select an object and provide object attributes/parameters within Softimage Shader code (C++).

Can someone help me with an example (even partial ccp code is fine to show me the process)

Thanks!

_________________
$ifndef "Softimage"
set "Softimage" "true"
$endif


Top
 Profile  
 
 Post subject: Re: Passing object data to a shader
PostPosted: 31 May 2012, 00:03 
Offline

Joined: 11 Jun 2009, 20:52
Posts: 26
If I understand what you are trying to do, you will want to use a UserDataBlob to pass the information to your geoshader. Take a look at the Wireframe sample in the SDK.

Ben


Top
 Profile  
 
 Post subject: Re: Passing object data to a shader
PostPosted: 31 May 2012, 13:56 
Offline
User avatar

Joined: 19 Mar 2010, 00:38
Posts: 444
Location: St. Thomas, Ontario
Thanks BenR, I'll look into it. Cheers!

Dan

_________________
$ifndef "Softimage"
set "Softimage" "true"
$endif


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group