Skip to content
Learn MikuMikuDance – MMD Tutorials – Free 3D Animation Software

Learn MikuMikuDance – MMD Tutorials – Free 3D Animation Software

Download Free Animation Software – Let's Learn How to Do Everything!

  • Step-by-Step MMD instructions
  • DOWNLOADS
  • Troubleshoot, Fix MMD
  • Site Contents
  • Reggie Replies Q&A
  • Homework!
  • What IS MMD?
    • Download MikuMikuDance Newest Latest Version of MMD
  • “HOW TO”
    • Raycast RAY-MMD Effect Tutorials
  • BONUS PAGES
    • Why convert PMD models to PMX?
  • HALL of CHAMPIONS
  • Tutorial Categories
  • About
    • Privacy Policy
  • Toggle search form
  • With some practice, Rin can dance the sample dance as well as Miku!
    Let’s Play the Sample Dances and Learn About MikuMikuDance Intro to MikuMikuDance
  • Keyboard Shortcuts to the Menus Functions-Copy-Paste-Expand
  • Here is the plan for the ball tossing motion in MikuMikuDance 7.39
    Ball Toss Motion Hits Miku: MikuMikuDance! Dummy Bones
  • MMD Download Japanese Models for MikuMikuDance Downloading New Models
  • Animation Fade helps MMD scene transitions Animation Shortcuts
  • PMDE Q&A – Making clothes follow model motions Fixing Broken Models
  • Learn to translate models from Japanese with LearnMMD.com!
    Translate Japanese Models to English in PMDE… with Excel! Fixing Broken Models
  • Subtex slot for MMD models in PMXE Bandages

DropShadow_dual Creates Two DropShadow Effects at Once!

Posted on November 19, 2020April 7, 2021 By Chestnutscoop No Comments on DropShadow_dual Creates Two DropShadow Effects at Once!

Why can I only load one DropShadow effect at the same time? How does the accessory draw order work? DropShadow_dual creates two effects… why does it need a modification?

DropShadow_dual creates two effects!

A feature article by LearnMMD's Chestnutscoop

DropShadow, produced by BeammanP in 2015, is one of the most popular effects every produced for MMD. Its simple premise is easily manipulated to suit the artist’s needs, so much so that it is still in wide circulation 5 years later. I, personally, have modded this effect no less than 6 times now! However, one question comes up again and again amongst MMDers: why can you only load one DropShadow effect at a time? Is it possible to get more than one DropShadow effect to work properly?

I’ve asked myself this question many times before, especially when making the promotion image for my own DropShadow mods. Unfortunately, I rely on photoshop to present my effects as it’s impossible to show them all working properly at the same time.

However, earlier last month the issue was brought to my attention again by fellow effect-editor, Luna M., in the MikuMikuEffect Discord Server. After more thinking I realised that, if the conditions were right, it IS possible to get more than one DropShadow effect to load at a time. It just requires a little… illusion…

DropShadow_dual Creates Two DropShadow Effects at Once!

Firstly, we have to understand how DropShadow works in order to understand how to manipulate it for our personal projects. DropShadow requires 3 files to function: DropShadow.fx, DropShadow.x and Tex.png. DropShadow.fx is the effect code where all the effect information is stored. DropShadow.x is the file that loads into MMD, reads the .fx file and renders it in the engine. Tex.png is the texture file which the effect renders to create a visual image. To make DropShadow in dual colours, the Tex.png file is the most important file.  

Unlike many MMD effects, the DropShadow texture does not follow the model’s movement. Instead, when the shadow moves around the screen, it moves across the texture file. Think of it this way- if your body is casting a shadow on a large painting, as you move your body around, your shadow will cover different parts of the wall. DropShadow works in the same way. When the model moves left and right, it covers (and therefore, shows) different parts of the texture. This step is crucial to understanding how to manipulate DropShadow for dual colours.

So, why do we even need to manipulate DropShadow in the first place? Why can’t it do two colours already? The problem lies in the drawing order. In order for DropShadow to run behind the model as it is designed, it has to be above the model in the drawing order. However, if you add two DropShadows, you can’t have both of them drawn at the top, so one will always render incorrectly in front of the model. For example, this is what happens when I try to load DropShadow_pastelPink and DropShadow_pastelBlue at the same time…

Loading two DropShadow effects means fighting over the 1st position in the drawing order

Yeah… not ideal. _pastelPink works just fine, but because _pastelBlue isn’t at the top spot in the drawing order, it covers the models. And so, the only way to have different coloured DropShadows at the same times is to editing the texture file. 

Now, you’ll need to work out exactly where your models are going to be on the MMD screen, and how they are going to be posed. Placement is very important when using this method, as moving the models later may mean editing the effect again. Load up your project and finalise the poses. You will also need to finalise the screen size, as this data should carry over in the canvas size of the texture, to make things as easy as possible. In this image, there is a fairly big gap between both models, and I’m going to render at 2000×1000.

Showing the raw image before adding DropShadow_dual

Load up your photo editing software. Make sure your canvas size is equal your screen size in MMD. I’m making my canvas size 2000×1000.

editing the texture to create DropShadow_dual

Now, I want Luka to have a light blue shadow and Miku to have a light pink one. To make this a reality, I’m going to draw a line down the centre of the texture, and fill in the left side blue and the right side pink. Then, I’m going to save over Tex.png in my DropShadow folder and make sure it overwrites the original texture. Alternatively, you can save this texture as any name and any file type, but this requires going into the code of DropShadow.fx and changing the directory. You can do this on line 21 by replacing “”Tex.png”” with the full name of your texture.

editing the code replaces the texture directory

Load up your effect, and there we go! That’s how DropShadow_dual creates two effects! Super easy right?

DropShadow_dual Creates Two Effects

…not so easy depending on the circumstanced. As we saw when I was editing the texture, there’s a black boundary down the very middle of the texture. If the DropShadow effect passes over that boundary as it passes over the texture, it’s going to show the boundary. This unfortunately destroys the whole illusion of two DropShadow effects, and ends up looking like this:passing the DropShadow_dual boundary breaks the illusion of two effects

See how Miku’s hand in the DropShadow has turned pink? This is a difficult area to work around, especially in videos where the camera and models change position so frequently (remember, DropShadow always stays behind the model when used correctly, which means as the camera turns, the DropShadow changes position). However, if it is just an awkward positioning in a still image, you can still fix it! We just need to edit the texture so that the boundary bends around the hand.

editing the texture further helps to avoid breaking boundaries

Open your texture in your photo editor again and edit the boundary to fit around the hand. For this example, I have chosen to warp the image, however you could also cover the hand area with a full colour shape, or move the whole boundary to the left. Save the texture as before, and test it in MMD once more.

editing the texture further helps to avoid breaking boundaries

And there you go! With the boundary bent around the hand, the illusion of DropShadow_dual is not broken!

If you would prefer not to edit the texture, you can also manually move the boundary using the DropShadow.fx code. This method is much quicker, as it only takes a few seconds to edit parameter code. Open up the .fx file in any code editor (I use VSCode, but MS Notepad works just fine) and navigate to line 15, which reads “static float TexLoop = Scale*0.1;”. This parameter technically changes the loop number of the texture, however changing the *0.1; number within around a tenth decimal place will allow you to move the texture left and right.

editing the code of DropShadow allows you to move the boundary out of the model's way

In this example, increasing the TexLoop scale by a mere 0.009 will move the texture to the left by a considerable amount. Increasing it to 0.12 will move the boundary entirely to the left, and decreasing the value to -0.12 will move the boundary entirely to the right.

And that’s it! It’s really that easy! Obviously, this technique will have limits depending upon the art you’re making with DropShadow, especially if the models are very close together. The camera also affects the effect. If the camera rotates too far around the models, the boundary will appear again. However, for renders where the models are very far apart, there’s no way you can go wrong! Why not try experimenting with two, three or even four boundaries to get even more colours! I hope this tutorial on how DropShadow_dual creates two effects helps you get the most out of DropShadow! ᕕ( ՞ ᗜ ՞ )ᕗ

If, for whatever reason, you find editing the texture of DropShadow or if you are unable to edit the code parameters, you can download the ready-made DropShadow_dual mod I made for this tutorial! You can download it HERE!

 

Credits:

Hatsune Miku and Megurine Luka by Sour

DropShadow by BeammanP, _dual mod and _pastel mods by Chestnutscoop

Motion: 1,2 Fanclub by Hime Hina

 

If you have any constructive feedback or a request to write an article on anything on the subject of MMD, please:

1. Leave a comment below

OR

2. Contact me directly at any of these places: https://www.rhiannonford.com/contact-and-platforms

 

Have fun with MikuMikuDance!


– SEE BELOW for MORE MMD TUTORIALS…


— — —


– _ — –


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

 

More MMD Tutorials...

966_ Otogibanashi Toon "Fairy Tale" shader effect recolors your models

What is the 966_ Otogibanashi Toon shader? How can I recolor my models without using ...read more

ALMorphMaker Adds AutoLuminous Morphs to your Model!

What is the ALMorphMaker plugin? How can I put AutoLuminous morphs on a model? How can ...read more

Beamman's SimpleMagic creates Explosions, Fire-Balls and Swirling Flames!

What is SimpleMagic? Why can't I see anything when I load it into MMD? Why ...read more

Editing Effect Textures Creates Brand New Effects!

Can editing effect textures change the look of my MME effects? What is an effect ...read more

Culling unseen MMD model parts optimises computer assets (PART 2)

How can I make my MMD run faster? What if removing parts using Subset-Extract isn’t ...read more

Optimise computer assets by culling unseen MMD model parts

How can I make my MMD run faster? How can I optimise computer assets as ...read more

Chestnutscoop, Customize MME effects, Edit Effects .fx files, MME Effects Tutorials Tags:effects, MikuMikuEffect, MME, MME Effects Tutorials

Post navigation

Previous Post: Older MME Shaders rival Ray-MMD Raycast results and are easy to use!
Next Post: Recoloring MMD’s Control Panel GUI Interface

Related Posts

  • MME ExcellentShadow2 effect smooths ugly Self-Shadows ExcellentShadow2
  • The Rule of Thirds.
    Use the Rule of Thirds Effect to Create Camera Motion Data in MMD! ARIZONA
  • Use the Silhouette Effect to create White Silhouettes!
    Creating White Silhouette Models in MikuMikuEffects ARIZONA
  • Beamman’s MME SelfBurning Effect Sets your MMD models Ablaze! MME Effects Tutorials
  • Kasane Teto with Beamman's Simple Magic Explosion2 positioned behind her
    Beamman’s SimpleMagic creates Explosions, Fire-Balls and Swirling Flames! Beamman's SimpleMagic
  • Optimise computer assets by culling unseen MMD model parts Chestnutscoop

More Related Articles

Beamman’s Water v5 Effect needs Editing before you can use it! Beamman's Water v5
Ghost Effect for MME How to Use the Ghost Effect for MME! ARIZONA
Kaito and the SpotLight Effect. Using the SpotLight Effect in MikuMikuEffects ARIZONA
Creating Black Model Silhouettes in MikuMikuDance ARIZONA
Subset-Extracts make for some interesting effects! Using the Subset-Extract in MikuMikuEffects. ARIZONA
New Reggie’s Evil Eye demo video posted to YouTube "the making of" my video

Leave a Reply Cancel reply

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

Download the latest version of MikuMikuDance!
See the MMD Step-by-Step instructions page!
Learn how to make your own MMD motions!
LearnMMD.com
  • "Say cheese!" Setting up the camera moves in MMD 7.39 takes some thought. Credits: MMD Little Town by Harner Productions, Chibi Miku Yamato Style 1.35 by Koshitsuki, Chibi NC DT SeeU by HousekineMinto, Video Camera by Dark Konata
    Camera Motion Instructions 1 – MMD Basics ARIZONA
  • Graphic Design Skills enhance MMD Pictures MMD Basics
  • Understanding PMXE Materials: Ambient, Diffuse, Specular, Reflect and More! Bandages
  • Get the LearnMMDMmetronome. It is a real help!
    LearnMMD’s METRONOME is Ready to Download! Animation Lag
  • Animate MMD ballet pirouette motion Creating Motions
  • Assemble your stages from .x type components Accessory Manipulation/Adjust
  • Win 7 Virtual Machine Runs MMD on MAC and Linux Kazuki Matsuoka
  • RAY-MMD: Creating your own custom sky box MMD Tutorials

Copyright © 2022 Learn MikuMikuDance – MMD Tutorials – Free 3D Animation Software and Instructions..

Powered by PressBook Premium theme

Go to mobile version