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

Modifying model texture color compensates Raycast color desaturation


A Feature Article by Reggie Dentmore on LearnMMD.comI love Raycast but how do I compensate for the Raycast color desaturation? My model’s skin goes white when I use the Raycast effect. How can I bring color back into my model when I use the Raycast effect?

Modifying model texture color to
Compensate for Raycast color Desaturation

I am learning how to use the Raycast Effect.

Raycast takes your “ink and paint”-looking model and transforms it into an almost photographic image of a 3D object. I often experiment with my Crimrose model (CyberStep, Inc. )… and, when I subject her to Raycast, her already pale skin gets even lighter… she looks like a porcelain figure.

Today I experimented with the idea of modifying my model’s texture file images so as to compensate for that Raycast color desaturation… and had great success!

How do I use Raycast?

LearnMMD’s GloriaTheAnimator, GTA, for short, wrote an article to introduce us to the Raycast effect. I find that Raycast is a complicated effect with “more than one way to skin a cat”… so these are the steps I go through to invoke Raycast:

  • Open MMD and create your entire animation, saving Raycast as a final step. (Raycast is “computer intensive” and your machine will hardly be able to crawl once you load Raycast. If you load it early in your project, you will go crazy waiting for your computer to do every little step. Save Raycast for last.)
  • Load a Skybox model… and ignore it, for now… just let it be there, in the way.
  • In the 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, as an Accessory, load the ray.x included in your Raycast folder. Your computer, at least MY computer, will lock up for several minutes as it crunches the numbers for you. When it comes back to life, you will see your model is now enhanced; dark, but enhanced.
  • Load the ray_controller.pmx model. Fiddle with the many morph-slider options. Build the light on the stage and model… no “tutorial” here for that… you just need to try everything and see what you like.
  • From inside the Lighting folder, load the DirectionalLight.pmx model. Before you do anything else, turn up the R+, G+, and B+ morph sliders to mid range. You will see nothing on-screen… until you use the Y-Rotate bone control to swing the light around so that it shines on your model. Use the XYZ rollers to aim and position the light on your model… and now go back to those R+, G+, and B+ sliders to get the color of light you desire… go back to the Ray_Controller model adjustments to modify what you see… keep working both ends against the middle until you like what you see. Remember to go back into Camera mode to see the REAL look of your project. You will be striking a balance between the Camera view and your Ray_Controller view. Keep at it… this is the “fun”… yes?
  • Load a second DirectionalLight.pmx model to light the OTHER side of your model… and go through all of those adjustments, again… Looking good, right?
  • See the GTA tutorial for a method to hide from sight the Skybox model, the Raycast_Controller and the DirectionalLight models.

After doing all that…

My image was looking good… but, poor Crimrose, she had a deathly complexion… as I said: porcelain-like.

The more I tweaked the brightness and color of the many lights that illuminate my model and scene, the more it became clear that I didn’t want to distort ALL of my colors just to give my model tanned skin. I decided to re-color the model’s texture files to give her that tan.

Photoshop or GIMP those textures…

My Crimrose  is a simple model… she has one PNG image for her entire body and another image for her face colors.

I have the original image, above, and three tests that I made as I progressed from naked-white skin to nice, realistic color and shading.

I first started with the FACE.PNG… in the First test, I simply adjusted the midtone levels (Photoshop Control-L… GIMP Tools>Color Tools>Levels)… sliding things for a darker, more saturated look. … and… That wasn’t enough!… better color, yes… but still too light.

I next adjusted the levels a little darker and shifted the color to a more tanned-skin color… tried again… and found the skin looking good… but those strong red shadow areas were, indeed, glowing red on the model! … So, for the final adjustment, I desaturated just those glowing colors without shifting the open face colors, at all. … … Perfect!

Color shifts on the body, too!

You can see that Crimrose has pale skin… and the transition into Raycast turns it white … So, in that first test, I simply adjusted levels to make it darker, and then shifted the  over-all shade of the color to a more natural skin-tone. … The result in the First Test was still too pale. … So, I went overboard and REALLY darkened that body.png image… and in the Second Test, it looked great! … except that the bit of texture on her neck was glowing red… so, for the Final Test, I desaturated the color for that neck shadow. … Perfecto!

Aaahh… so nice!

My final image shows that I was able to compensate for that Raycast color desaturation.

CLICK to see the full size 845 x 480px image.

Keep the Faith!

So, what do you think? Does modifying your model so as to “look good” in Raycast count as Editing your model? … Not an issue with my Crimrose… I am allowed to edit as long as I credit… but in this instance, I do not think ANY model creator would mind that I altered her model so it can look its best in my animation.

I collected all the final files together and SAVED my model in its own folder as Crimrose-Raycast.

Have fun with Raycast and MikuMikuDance!

 


– SEE BELOW for MORE MMD TUTORIALS…




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

4 Comments

  1. August 15, 2017    

    Hmm, I don’t see how this is an issue related to sorting. However, I can answer some of that if you’re curious.

    MMD doesn’t do any vertex sorting. It relies on manual sorting of materials and models. Materials are sorted by material order. Models are sorted via background->accessories edit and background->model draw order. (Why it handles .x files differently than .pmx files I’ll never know, nor why it uses .x files at all.)

    There’s no way to change the draw order via MME and HLSL (short of writing everything to its own buffer and then sorting them, a ridiculously maddening task for which nobody has the video memory.) And since neither MMD or MME are open source, there’s no way to modify the code to implement vertex sorting.

  2. Tanerl Lam Tanerl Lam
    July 24, 2017    

    You can always
    – turn down the direct sunlight using (-) instead of (+)
    – increase temperature
    – decrease gamma (-)

    also an easy way for environmental lighting is go to that tab in MME and set the environment lighting instead of putting directionallight.pmx

    then adjust environmental diffusion and ssao and shadow and stuff

    if it’s too porcelain like, go to material tab and select different materials, like skin and glass and metal
    choosing beige option for skin helps the desaturation a lot and makes skin much redder

    • Reggie_Dentmore Reggie_Dentmore
      July 24, 2017    

      That’s awesome… Thanks!

      • KingmanEric KingmanEric
        July 25, 2017    

        I have also found that the light I was using, DirectionalLight, is the biggest offender. SphereLight, RectangleLight and TubeLight are less severe… nicer light.

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!

MMD Tutorials:


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

Visit LearnMMD.com on Facebook!