Hi guys,
I’m setting up this ShaderTalk thread so you all can get more indepth, without clogging up the renders/gallery section.

Have Fun :buttrock:


Very good thinking. And to lessen thread congestion even further, for those who haven’t read the m:Studio docs yet, shaders are under :

-> Interface
—> Render Tab
-----> Materials
-------> Introduction



I have alots of questions. First how do you process color variables in shader writing.

Here is a test shder script, but I am not sure how to get the input of the color input and output the color.


#include <messiah_render.h>


int IN_CLR = 0;

int OUT_CLR = 0;

int ShaderObjectCreate(object obj)


IN_CLR = fxShaderCreateInput(obj, “COLOR”, TYPE_COLOR, 0);

OUT_CLR = fxShaderCreateOutput(obj, “COLOR”, TYPE_COLOR, 0);

return (1);


int ShaderEvaluate(object obj, void shader_globals, void input, void output)


color inColor;

// Not sure this works, or if there is a GetInputColor function
inColor = GetInputFloat(obj, input, IN_CLR); <—

//Output 0 value,

SetOutput(obj, output, OUT_CLR, inColor);

return (1);



You should just take a look at the scripts that are included with messiah, wood and grid etc.

But be aware that scripting shaders is currently extremely “suboptimal” in messiah:

  • You don’t have an interface for the shaders.
  • It doesn’t work with multithreading.
  • There are not much prebuilt noises or other needed functions that you can use in scripts like in Cinema4D or Renderman. Those systems allow you to do usefull shaders as scripts since the core noises and stuff are implemented in C and are therefore fast.
  • So your scripts will render very slowly…


Hey Thomas,

I already checked out the other shader scripts, but none of them actually dealt with Color as an input or output. Scripting shaders are just a good way to test stuff out, before going to compiling it. I want to work on coding over some useful renderman shader, I got a couple already done, like a brick and velvet shader, but I’m stuck getting the color variable working with mSL(messiah shader language) like the way they do in RSL.



For an example on using color, check “Spot2Color.msa”.




There is a problem with that shader. I get black bands(no Color) and it sometimes the black band changes where it is on the surface.


As I said - shaderscripts don’t work with multithreading.



Damn, then that explains the problem I was having with some of my scripts.



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.