PDA

View Full Version : m:Studio Shader API


tjnyc
05-04-2004, 03:33 PM
Hi,

I thought it would a good idea to start a separate thread on the discussion of the Shader API, mainly to ask and answer question on the soon to be release messiah:Studio 2.0. If Lyle and some of the other guys are so wiling. :)

Here are my questions;

1. Is (renderman)RSL experience applicable to m:s Shader API?
2. Are there common grounds structurally and/or conceptually to shader writing to that of renderman?
3. Would I be able to translate RSL shaders into m:S Shader API?
4. Are shaders text/xml formatted, or can they be also compiled version?


Cheers,

FB_Turbine
05-05-2004, 01:39 PM
tjnyc,
Shaders can be text based scripts or compiled C/C++ There's some information in and examples in the current documentation for both approaches. The basic properties for shaders are consistent with renderman, but I really haven't delved into messiah shaders yet to really offer any comparisons.

lmilton
05-05-2004, 04:03 PM
Originally posted by tjnyc
Hi,

I thought it would a good idea to start a separate thread on the discussion of the Shader API, mainly to ask and answer question on the soon to be release messiah:Studio 2.0. If Lyle and some of the other guys are so wiling. :)

Here are my questions;

1. Is (renderman)RSL experience applicable to m:s Shader API?
2. Are there common grounds structurally and/or conceptually to shader writing to that of renderman?
3. Would I be able to translate RSL shaders into m:S Shader API?
4. Are shaders text/xml formatted, or can they be also compiled version?


Cheers,

1. While RSL is "C-like", messiah's API is *all* C. This means that you'll miss some constructs and conciseness of RSL. However, your basic shading knowledge can be applied to messiah's API.

2. To make life a *little* easier for those coming from RSL, we've included "RSL-like" defines for getting/setting shader global data. Again, because RSL is not C, you will miss some things. However much of the same functionality exists. For example, you might make have "specular" calls or an "illuminate" block in RSL. In messiah these calls would be fxShaderSpecular and fxIlluminate* (fxIlluminate* exists only in m:s 2.0). Of course there's more to it, but the basic idea is the same.

3. See 1 & 2

4. messiah shaders can be in messiah:script or compiled C code plugins. While scripting can be used for simple testing, I recommend going with compiled plugins. They're much faster and can be a good deal more functional.

If you don't have studio you can still get the messiah:studio 1.5 SDK (http://www.projectmessiah.com/x2/sdk.htm) from our site. Take a look at messiah_shader.h. To see an example, you can download BasicFog from www.zoogono.com or from the Files section of the pmGmessiah Yahoo group.

When you see the example it may appear intimidating at first because it may seem so foreign. However, after you write your first shader, you'll see just how easy it is. Those who have actually written shaders and other module types with our SDK/API have given it very high marks for ease of use and power.

I hope that was helpful:)

Take care,

-lyle

ps: take note that the coming messiah:studio 2.0 SDK release has a good deal more shader-specific functions/functionality than is available in the 1.5 messiah_shader.h header.

tjnyc
05-05-2004, 06:00 PM
Lyle,

Yes, that was very helpful, I'll take a look at the header file and the fog example. I'll be particularly anxious for m:s 2.0 SDK.:thumbsup:


Cheers,

chikega
05-30-2004, 02:47 AM
Hey Tony,

Just caught this thread.

Since you're interested in shader programming. You may want to keep in touch with Thomas_Helzle. He's developing some pretty awesome shaders for messiah. I wasn't sure whether you saw this thread or not:

http://www.cgtalk.com/showthread.php?s=&threadid=140506

CGTalk Moderation
01-18-2006, 05:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.