misss_call_shader: Unexpected state->type case – fix

Last Updated on 12/01/2016

I was required re-render some parts of my animation with Veda character where it was used “EZ Fast Skin” by eman Mental Ray shader. So again I get error which was introduced in Mental Ray 3.9+:

Internal error: misss_call_shader: Unexpected state->type case.

I took some research and found solution to get it work without error in new versions of Mental Ray (3.9-3.11+) and 3ds max 2012-2014+.  What’s the problem, misss_call_shader not working properly because  “mode” parameter is wrong in .mi file. By default “mode” equal to 0 , where 0 is “automatic”. Forcing use miShader_type = 4 in “mode”  parameter fixes error. So you must edit .mi shader file and add something like this (fixed version of EZ Fast Skin attached at end of this post):

Example:

shader "env_shader" "misss_call_shader" (
"shader" = interface "s.environment"
)

Fix:

shader "env_shader" "misss_call_shader" (
"shader" = interface "s.environment",
"mode" 4

Download

Tags :

Comments ( 5 )

  • Hey

    Thanks for the fix. I’m having trouble getting it working? I tried to edit the .mi shader file but got some new warnings and the old ones. I can render ok in the render frame window, but with Backburner the log file becomes so big it causes a crash.

    Any suggestions would be a big help.

  • C:\Program Files\Autodesk\3ds Max 2016\NVIDIA\shaders_standard\mentalray\include\subsurface.mi

    2015/11/16 17:59:00 INF 3dsmax adapter : MENTAL RAY LOG: ***WARNING*** API 0.0 9 MB warn 302057: .\shaders_standard\mentalray\include/subsurface.mi, line 661: while defining phenomenon declaration “misss_fast_skin_phen”: value assignment to “misss_call_shader.shader” overrides earlier shader assignment.
    2015/11/16 17:59:00 INF 3dsmax adapter : MENTAL RAY LOG: ***WARNING*** API 0.0 9 MB error 301034: .\shaders_standard\mentalray\include/subsurface.mi, line 662: while defining phenomenon declaration “misss_fast_skin_phen”: too many values for arg “shader” (more than 1) in function call “misss_call_shader”.

    2015/11/16 18:02:32 INF 3dsmax adapter : MENTAL RAY LOG: RCLM 0.23 374 MB progr: lightmap vertex run, shader 0x510: misss_fast_skin_phen_d::lm_write on instance 18:3.
    2015/11/16 18:02:32 INF 3dsmax adapter : MENTAL RAY LOG: RCLM 0.23 374 MB progr: lightmap mesh run, shader 0x510: misss_fast_skin_phen_d::lm_write on instance 18:3.

    2015/11/16 18:02:32 INF 3dsmax adapter : MENTAL RAY LOG: ***WARNING*** SHDR 0.14 707 MB warn : Internal error: misss_call_shader: Unexpected state->type case..
    2015/11/16 18:02:32 INF 3dsmax adapter : MENTAL RAY LOG: ***WARNING*** SHDR 0.14 708 MB warn : Internal error: misss_call_shader: Unexpected state->type case..
    2015/11/16 18:02:32 INF 3dsmax adapter : MENTAL RAY LOG: ***WARNING*** SHDR 0.20 708 MB warn : Internal error:

  • TZ, do you have error when render in frame window? Sadly I can’t test in backburner. Can you test EZ Fast Skin material with Backburner and report it?

  • I’m not sure I’ve installed ez_sss_fast_skin.mi correctly (C:\Program Files\Autodesk\3ds Max 2016\NVIDIA\shaders_autoload\mentalray\include). In 3ds Max it renders black? No errors messages though. Do you think you could try and fix the subsurface.mi shader in the same way? Or is it not as simple as that.

    Thanks for you help.

    • TZ, No EZ Fast Skin must be mostly same as 3ds max’s Fast Skin, not black (subsurface.mi must be not changed)
      Because I’m not using backuburner I can’t reproduce error with original Fast Skin. So I can’t help you fix subsurface.mi to get it work with backurner 🙁

Leave a Reply