  | | | phenomena in Metashader portion of SPDL | phenomena in Metashader portion of SPDL 2005-04-05 - By Haarm-Pieter Duiker
Back Thought I'd throw in a somewhat late response to my own issue. That's always fun.
I've been working on a couple of geometry shaders that create geometry and shaders within the scene at render time. This has lead to a problem in that shader declarations are only part of your scene in XSI if an instance of a shader's SPDL is executed which then generates the shader declaration and an instance of the shader. A geometry shader trying to create an instance of a shader will be out of luck unless a shader declaration is present in the scene. Geometry shader's can declare shaders but doing so is pretty consistently locking up XSI 4.2.
One option to create in your scene an instance of the shader that the geometry shader is looking to create an instance of. This may be the exact thing that you're looking to avoid though. In the case that that is impractical or not preferable, to declare a shader for the purposes of use by a geometry shader you'll want to modify the ray3rc pointed to by the MI_ROOT variable to link and include the .mi declarations for your shaders. This issue comes up because the SPDLs are used in place of the .mi include definitions used in other mental ray integrations. In other integrations, as the .mi shader declarations are sourced at scene startup the shader declarations are read and declared and can be assumed to be present. In XSI, only the shaders used in a scene are given declarations. Adding links and includes into your ray3rc file will cause mental ray to throw some "ignoring redeclaration" errors, but those should be safe to ignore.
Anyways, thought I'd share the results of a little investigation, Haarm-Pieter Duiker
-- --Original Message-- -- From: owner-xsi@(protected) [mailto:owner-xsi@(protected)]On Behalf Of Jim Rothrock Sent: Wednesday, March 09, 2005 12:03 PM To: XSI@(protected) Subject: Re: phenomena in Metashader portion of SPDL
Haarm-Pieter Duiker wrote:
>The second question still stands. Is there a way to make a shader accessible for use within a phenomenon but not accessible from the interface? You could always put the shader you don't want people to see into some obscure location, but I was hoping that there would be a cleaner solution to the problem. > > No. Within a SPDL phenomenon, only installed shaders can be referenced. All installed shaders are visible to users.
-- Jim Rothrock | Stan Winston Digital | jimr@(protected)
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|
 |