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 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.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!



Visit the Homepage! Plenty of Mikumikudance instruction and info!