How do you use the Half-Lambert Shader in MMD? Where do you get the Half-Lambert Shader? How do you use the Half-Lambert Shader in MikuMikuDance? I got this error message when I tried to use the Half-Lambert Shader in MMD?
How to Download and Use the Half-Lambert Shader.
Earlier this month, we here at Learnmmd Labs had a question from a reader regarding the Half-Lambert Shader (HL). Late last year, I had started to write about the Half-Lambert but life happens, and it was tabled until this time.
The Half-Lambert isn’t really a shader as we normally use them. It is a lighting technique developed for gaming. I found my version of the Half-Lambert at Kyaami’s YouTube Channel here: https://www.youtube.com/watch?v=DQGLdMznwZk . As usual, make sure you have the latest version of MME correctly installed. Please see Noko2’s article (https://learnmmd.com/http:/learnmmd.com/download-mme-install-mikimikueffects-add-effects-mmd-7-39/ ) regarding downloading and installing MME. Make sure that after you have downloaded this and renamed this in English, you place it into your effects folder
After you have loaded all your data (models, motion, and accessories and load a Dummy Bone at this point), click on your MMEffects button, at the top left corner. Select the name of your model and double-click. Another window will open up and then you need to go to your effects folder and select the HL folder. Now select the Cook-Torrance.fx (there are other versions available in that file, but let’s stick with basics for now). Your model will now become very dark.
You now need to go to the Model Manipulation Panel (MMP) and make sure it reads camera/light/accessory. Next you click the load button in Accessory Manipulation Panel (AMP) and load the Shadowmap.fx . (Note: Every time I have loaded this I have gotten this error message, I also got a white rectangle. I just uncheck the display box in the AMP and register this change. Honestly, I have skipped this step and everything seems to work out just fine-your results may vary).
EDITOR’S NOTE: There’s another step that you need in case you want to use Half-Lambert to illuminate not only .pmd models but also .x accessories (for example, stages). For every item you apply the effect to, shadows must be turned on. All newly loaded .pmd models have shadows turned on by default; accessories do not, though. If you applied the effect to a stage and wonder why does it not work, check its shadow option in AMP. |
Let There be Light.
PointLight.x is the next step for the Half-Lambert Shader. This is loaded through the AMP’s load button. There are several to choose from but let’s just use PointLight1.x for now. You can explore the other options on your own time. A white globe will now appear between you model’s ankles. Remember the Dummy Bone you loaded earlier? This would be the time to attach it to the PointLight sphere.
I’m sure you’re thinking the Half-Lambert Shader is something of a disappointment. Just bear with me, this is because you haven’t turned on the lights yet. If you look at the AMP’s Rx, Ry and Rz fields, they all read 0.0000 that means no color or off. By assigning positive numeric values to these fields you can change the color, hue and intensity of the light. Here’s a little chart to get you started.
Color Chart:
Rx: 0 Ry: 0 Rz: 0 = No color
Rx: 1 Ry: 1 Rz: 1 = White
Rx: 1 Ry: 0 Rz: 0 = Red
Rx: 0 Ry: 1 Rz: 0 = Green
Rx: 0 Ry: 0 Rz: 1 = Blue
Rx: 1 Ry: 0 Rz: 1 = Magenta
Rx: 1 Ry: 1 Rz: 0 = Yellow
Rx: 0 Ry: 1 Rz: 1 = Cyan/Aqua
The dummy bone you have attached gives you options for position and movement. Once you have finalized your PointLight’s position and/or motion. You may uncheck and register the display box. This will leave just the light remaining. The size of the sphere can be tailored with the Si field of the AMP.
I have uploaded a quirky little video using this effect to our YouTube Channel at: http://youtu.be/MpoAuquLmx0
Have fun with this.
MCL Len by MMD_MCL is apparently stunned by The Half-Lambert as it goes through him!
– SEE BELOW for MORE MMD TUTORIALS…
— — —
– _ — –