Visit LearnMMD.com on Facebook!.
Keep the Faith-MMD... Learn to be a responsible MMDer! .

How to use Raycast MMD MME Shader Effect

A feature article by GloriaTheAnimator!

How do I use Raycast? Where can I download the latest version of the Raycast effect?


You: “Yea, but its so complicated I won’t be able to use it” :<

Hey, don’t worry. I know how to use Raycast
… I came to help

A Quick Glimpse of Raycast

Raycast is a powerful MME effect tool... so many variables!

So all ya have to know is 945+6854=Raycast

Editor’s Note: LearnMMD has several Ray-MMD and Raycast tutorials... some are more “learned” than others but you might review each of them so as to get of the tips and ideas they offer as you learn from the experiences of the various authors. CLICK this box to see them all.Just joking! Raycast is a powerful and sophisticated, complicated effect… but ya just need to know the basics to get started!

For this demo, I’m gonna use the new raycast 1.3.0 … a 47Mb download!
(When you follow that link, on the right is the Download button… and on the left is a drop-down that let’s you choose from all of the older versions… “Branch 1.3.0″… you will want the 1.3.0 or the 1.2.0… experiment to see which works the best on your system.)
EDITOR’S NOTE: I found that the version 1.3.0 worked well for me.


We need to load our beautiful model…

To try out Raycast, load your model... I used Cute Miku by LomiVoka.

… this model will work (Cute Miku by LomiVoka).

Now open MME>Effect Mapping and let’s apply the shader to the model; go to the “Raycast/Main” folder and load main.fx

Use Effect Mapping to load main.fx onto your model... Raycast>Main>main.fx

If you’re using the new Raycast 1.3 it should look like this:

When you apply Main.fx when using Raycast 1.3.0 your model will go black! ... not to worry... you can fix it.

with old Raycast 1.2, it should look like this:

When you apply Main.fx when using Raycast 1.2.0 your model will look like this.

When you load the main.fx it will look horrible!… and that’s why we MUST load ray.x in the main Raycast folder.

Load the MME effect Ray.x found inside the Raycast folder.

EDITOR’S NOTE: When I loaded ray.x, MMD seemed to lock-up because my system took a long time to open/process that file… and when it DID come back, the stage was SOLID Black. Go ahead to the next step and load a Skybox model to get your stage back.

I loaded the GrandCanyon.pmx Skybox model to see my Stage, again.


… but there are some weird spots!


Load a skybox as a model file from the Skybox folder inside your Raycast folder…

Loading the Skybox gets rid of all of those weird spots we saw in that image, above.


GREAT… now load a background image or your favorite skydome and probably hide the coordinate-axis.

(I have downloaded extra skydomes from this person: ignisdraconi on Deviant Art. Just put them into Raycast/Skybox.)

You can go to MME Effect Mapping and use Hide/Show to hide the Skybox. (If you use the Display checkbox to hide your Skybox, all of those weird spots will be back! … so use the Effect Mapping Hide/Show button, instead.)


OK… now we will make it even more beautiful

by loading the ray controller.pmx model.

When we load the controller we suddenly have control of allot of settings and effects!

This is the brow facials list…

these are the settings for my picture…
– BloomThreshold 0.45
– BloomIntensity- 0.40″

There is kind of a cheap-lens effect and a color-shift effect and using BloomThreshold we will make everything very pretty.

… but it is a little dark from the other sides!

Well, then, let’s load some lighting!

Load the DirectionalLight.pmx model.

LED.pmx does not work that easily and I don’t know how to make it work but I messaged the creator of Raycast and he said

“first, you need to download the (MMBG, avisynth) and install , then convert your avi to avs ,and loading the avs file into MMD… finally, put a Extension/DummyScreen.x and LED.pmx into MMD… MMBG AviSynth

… but, anyways…

You can change the position and swivel the light direction of the DirectionalLight using the XYZ rollers. Swivel the light to shine on the front, back or side of your model.

… and change the quality of the light with the facial sliders.

In my image, I loaded the DirectionalLight model three times so I could add light where I wanted it on my model!

On back light I like to make it a little blue and in “other” facials use “intensivity-”

… and little bit of light manipulation…

You can easily hide the lights model by going to MME and click “Hide/Show” in MME tabs Main, MaterialMap, Depthmap, PSSM.

The arrows show from what positions my lighting is coming as I lit her with the three DirectionalLighting models.



You can go to MME/MaterialMap and apply the effect to your model.

I will show you how they look when applied in the image, below.

*it’s a new version of Raycast, though, so there will be more materials and they will look better*

I recommend that you download these from my Deviant Art page…

link1  link2 … there should be instructions in the description.

Have fun with Raycast and MMD!


Visit the LearnMMD.com Homepage! Plenty of Mikumikudance instruction and info!


  1. Nat-Chan Nat-Chan
    July 6, 2019    

    Hello! for whatever reason, it doesn’t seem that main.fx will load up. This is my first time using MME.

    • Reggie_Dentmore Reggie_Dentmore
      July 9, 2019    

      “First time using MME”… please try some of the other MME effects… read some of the many tutorials for the other effects… RAYCAST is a whole new environmental control for MMD, is NOT a great place to learn about basic MME effects. Start simple and work your way up.

  2. Leah Leah
    June 2, 2019    

    Hello, I do have the same problem. I have a Windows 10 64-bit, and I get the same error whenever I try to load Ray.x or Ray.fx after loading Main.fx. If there is no solution to fixing this problem, what is a good shader replacement for Raycast?

    • Reggie_Dentmore Reggie_Dentmore
      June 2, 2019    

      You are looking at the most basic Raycast article… take a look at the list of ALL the raycast articles and see if one of them helps you… MINE is the next in line and may be more clear than the one you are reading…

      — Reggie

      • Leah Leah
        June 5, 2019    

        I followed the instructions, but once I click on Ray.fx, (I even changed the name to Ray.x) I get the error “Post Effect cannot be specified” every time. Even with different Raycast downloads.

        • Reggie_Dentmore Reggie_Dentmore
          June 5, 2019    

          Don’t rename the files… they work as-is. LOAD your dancer model. LOAD the Raycast .PMX controller model. LOAD a skybox. … all from the MMP panel on the lower left.

          Go to MME menu (upper right of MMD screen) Select Effect Mapping, select your model, and Set Effect by navigating to your Raycast folder and inside the Main folder, choose main.fx. Your chosen model turns black. Close the MME menu.

          Now go and load accessory ray.x … after a moment?… two minutes?… you should see the effect.

          NOTE: the newest Versions of Ray-MMD / Raycast REQUIRE Windows 10 64-bit. … without THAT, some of the effect MAY work for you, but do not expect to use all the effect has to offer.

          AND: Do not rename .fx files as .x and expect something “good” to happen.

          • Leah Leah
            June 6, 2019    

            Thank you so much! I finally got it to load! That’s 1 thing out 3 things that I need a solution to.

            • Reggie_Dentmore Reggie_Dentmore
              June 6, 2019    

              That’s a miracle… “64 bit Windows 10 and I run it on a Macbook”… I didn’t know you could do that.. ALL of the modern MMD stuff is meant for a DirectX environment on a Windows PC. Amazing that you can run it on your Macbook.

    • Reggie_Dentmore Reggie_Dentmore
      June 2, 2019    

      Part B of your question: What is a good shader to replace Raycast… Raycast is NOT a shader… Raycast is full-blown lighting and rendering environment. … But there are MANY shaders that work well with MMD. Under our Category of Shaders, we have THESE articles… and see the orange list of Shader tutorials, right there in about the vertical middle of any of our pages… plenty of Shader tutorials… good luck… best wishes!

  3. May 17, 2019    

    When I load material_hair.fx to my model’s hair, nothing changes, it keeps the same
    What should I do?

    • May 19, 2019    

      Hi Julia. You need to load material_hair.fx to the model’s hair in the correct render target (“MaterialMap”) and you need to load main.fx onto the Main render target. Check that these are both loaded, and loaded in the correct place.

      • Julia Julia
        May 23, 2019    

        Hi, I did what you said and it still keeps the same :(
        I loaded material_hair.fx to the model’s hair in MaterialMap target and loaded main.fx to render target, I also loaded them in the correct place
        what is wrong with my mmd?

        • May 23, 2019    

          Is any part of raycast working, or is it just your hair that’s not working?

          • Julia Julia
            June 20, 2019    

            I can not apply the ”material” (hair material, cloth material..) to hair and clothes :(

  4. Tan Ying Liang Tan Ying Liang
    March 28, 2019    

    Hi, parts of my model’s hair turns dark when i tried to load ray.x into the scene. Could it due to the model’s hair being transparent underneath? It looks as if the hair does not reflect the shader properly because the hair is transparent.

    • Reggie_Dentmore Reggie_Dentmore
      March 28, 2019    

      Have we talked about this, before? … very familiar… I think I mentioned on Facebook that you might lave a comment here to ask for assistance… Yes? We will need more info… Does this happen with all, any of your models? or just this one you have an issue with? Have you ever gotten Raycast to work for you? Have you gone through the proper steps of setting-up Raycast?… it is NOT simple, you must load the controller, load a skybox… there is a lot to it… complicated stuff. … Please see the articles/tutorials we have posted… see if you can learn to set it up… and then see if you still have the same problems.

    • March 29, 2019    

      It definitely could be. Alpha (transparency) is Raycast’s weak spot. Especially in multiple layers of transparency, like you see with the way that a lot of game models do hair (thinking DOA models.)

  5. nokum nokum
    February 20, 2019    

    when i load ray.x i get weird green spots on my model’s hair…why is that?

    • Reggie_Dentmore Reggie_Dentmore
      February 20, 2019    

      Ray-MMD / Raycast is strange and wonderful… did you load a Skybox model yet? … That will get rid of the odd artifacts. Read about Raycast with these articles… read them CAREFULLY to get all of the info. Raycast is powerful and complicated… you must do it correctly.

      • Vedette Vedette
        February 26, 2019    

        When I load the skybox I get green spots in her hair… This happens with every model, how do I fix it?

        • Reggie_Dentmore Reggie_Dentmore
          February 26, 2019    

          Ray-MMD / Raycast is strange and wonderful… Read about Raycast with these articles… read them CAREFULLY to get all of the info. Raycast is powerful and complicated… you must do it correctly.

  6. Mickymoky Mickymoky
    December 12, 2018    

    Hi I have a problem every time I try to add effect it said “failed to add it ” and some people say update graphics I update my graphics but error still appear .

    • December 12, 2018    

      Does it happen to every effect or just to this one?

      Make sure you have DirectX 9.0c installed.

      Make sure you load effects in a correct way. For those that have a corresponding .x file, you load .x file as an accessory. For those that only have .fx script, you load them through MME window

      • Mickymoky Mickymoky
        December 17, 2018    

        yes it happens to every effect some people said it is because my pc is 32 bit so i want to ask you if there any software can i use to make my effect

        • December 18, 2018    

          So do the check for DirectX 9.0c.

        • December 18, 2018    

          Raycast requires a 64 bit machine

          • Alexia Alexia
            January 10, 2019    

            My machine is 64bits and still glitches, every effect glitch in his way, I don’t know why, but sometimes I think I’m not lucky with this

            • January 11, 2019    

              Is this every raycast effect or every effect? What is the glitch that occurs? Is there a pop-up message, and if so, what does it say?

  7. Freaky Lulu Freaky Lulu
    October 20, 2018    

    Hello, i have a error message with the ray.x data -> failed to load effect file -> error x3000: syntax error: unexpected integer constant <-
    can someone help me? thank you :)

    • Reggie_Dentmore Reggie_Dentmore
      October 20, 2018    

      I Googled your error… seems to be encountered by DirectX gamers and game-developers. I did not see any simple fix. … I DO know that Raycast 1.3 is written for Windows 10 64-bit. If you are not running 64-bit, that could be the issue.
      … that’s all I’ve got. So, if you ARE running 64-bit, I don’t know what to tell you. You are the first MMDer to ask that question of us.

      • FreakyLulu FreakyLulu
        October 21, 2018    

        humm, thank you, i have a idea to fix it. I’m not a programer so i don’t undersdtand some answers. But you gave me a good idea. I work with Win 7 and 64 Bit system (some of my programmes where i need don’t work with 10 correct) so i must use a older raycast version.
        Thank you for help.

    • November 16, 2018    

      Effects (like Raycast) can have bugs, and it’s pretty much impossible to test them on every single target machine– and yeah, target machines can behave very differently from each other. I know for a fact that there are some bugs with the current dev-test build of Raycast. The error you’re describing should be associated with a particular file and line number, and if you feel like playing, you can inspect that file and line number and see if you can figure out what’s causing the “unexpected integer constant” (which is just an integer, like “5”, someplace where the compiler doesn’t know what it’s expected to do with it.)

      Or, yeah, you could try out a different version of Raycast.

  8. Queen Queen
    October 9, 2018    

    i need help because when i load ray.fx in it says “failed to load texture (parimeter: PSSM) out of memory” and it loads to the skybox but not the model

    • Reggie_Dentmore Reggie_Dentmore
      October 11, 2018    

      I’ve got no answer for you. Raycast is a powerful “system” that needs a strong computer… needs 64-bit Windows 10 and a powerful dedicated graphics card, not an on-board integrated graphics chip. We just have to face it: there is no substitute for a powerful computer when you want to run Raycast.

  9. Nenna Nenna
    June 28, 2018    

    For some reason parts of my model glow when i follow these steps, are there things I need to check to remedy that?

    • June 29, 2018    

      Do you use other effects than Raycast in this particular scene? In particular, do you use AutoLuminous? If so, you may try to open MME’s Effect Mapping panel, select AL_Emitter panel, and uncheck the model in it (*not* remove AL_Object.fxsub effect from it – that will do rather the opposite result). Some of glowing parts may stop to glow. Still, the intensity of lightning may remain increased – in this case try to replace AutoLuminous with AutoLuminousBasic (the look will be different from the regular one, though).

      If there’s no AutoLuminous. but there are other effects, try to disable/remove them one by one to see if one of them in particular produces this side effect in conjunction with Raycast. If you find the culprit, write back to us, so we can develop the necessary procedure for your case.

      If you use no other effects in the scene, and the model still glows, you will need to edit it in PMDE/PMXE. Find the material that produces unnecessary glow and reduce its Reflect (“Refl.int.”) parameter. Always keep the backup, of course.

Leave a Reply

Your email address will not be published. Required fields are marked *

Download the latest version of MMD MikuMikuDance! Step-by-step instructions to help you make an MMD Music Video! bo-beep-bo-beep! LearnMMD's Step-by-Step MMD instructions for MikuMikuDance! LearnMMD Video Dojo Expo is an MMD contest open to all MMDers!

MMD Tutorials:

Really Learn MMD as you face the 15-second Animation Challenge!

Visit LearnMMD.com on Facebook!