Author Topic: How to make Glow in the Dark Markings on your Presets/Etc  (Read 97719 times)

Sullivan

  • Guest
How to make Glow in the Dark Markings on your Presets/Etc
« on: March 23, 2011, 05:29:46 pm »
thanks to *Kyugima* for being my guinea pig to learn how to do this ^_^
DO NOT USE ANY IMAGES FROM THIS TUTORIAL IN YOUR PRESETS, they were made for Kyu. you are free to use the script.

How to Make Glow in the Dark Markings

1. Make the "base" layer of your preset
This is all the parts of the preset that do not glow; simply follow the normal instructions for how to make a preset. Check the Documentation part of the website for tips! the UV maps are included in your "Reference" folder.
this includes the Head, Body, and Tail... (and Mane if you want)... but for now we'll just focus on the body.

example of base body texture:


2. Draw your glowing markings separate from the "base" layer
If you have Photoshop/etc you can draw them on a new layer above the base layer; you can also just draw them over the UV maps if that is easier. Do NOT draw them directly onto the "base", they need to be separate in order to glow!
Once you've drawn out your markings, save them as a .PNG file with a transparent background... get rid of the base layer or UV map first, you just want the markings alone on a transparent background.

example of markings on transparent background: (this example will make stripes on the legs)


3. Edit your material file!
Take all your preset textures and put them in one of the preset folders in the "my_presets" folder.
Then open up the material file in that folder, it will be something like "preset_10.material" - open it with Notepad.
Again we will just focus on the body for now:
You will see this at the top, these are the parts of the script that edit your body's appearance---
Code: [Select]
material preset_10_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_10body.jpg
}
}
}
}
material preset_10_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_10body.jpg
}
}
}
}

Now replace that code with this script:

Code: [Select]
material preset_10_bodyMatL
{
technique
{
pass
{
ambient 0.5 0.5 0.5
texture_unit
{
texture YOURBASELAYERBODYTEXTURE.png
}
}
pass
{
emissive 1.0 0.0 0.0
scene_blend alpha_blend
texture_unit
{
texture YOURGLOWINGMARKINGSTEXTURE.png
}
}
}
}
material preset_10_bodyMatR
{
technique
{
pass
{
ambient 0.5 0.5 0.5
texture_unit
{
texture YOURBASELAYERBODYTEXTURE.png
}
}
pass
{
emissive 1.0 0.0 0.0
scene_blend alpha_blend
texture_unit
{
texture YOURGLOWINGMARKINGSTEXTURE.png
}
}
}
}

(again we are just focusing on the body right now, full code will be available at the bottom of the post with information on how to customize it for your character, this is just an example!)

4. Test it out in the Preset Maker
Open up the Preset Maker and load up your preset, in this case Preset 10. Make sure everything looks good and the markings are where you want them to be. If it looks good, go ahead and export it so you can use it in-game!
If you want to test your glowing markings in game, try going into Ficho Tunnel where it is darker--- you'll see how your body gets dark, but your markings stay bright ^-^





and there you have it!

THE FULL CODE FOR GLOWING MARKINGS:
first some notes...

** "ambient 0.5 0.5 0.5" is what makes your base layer get darker and lighter depending on your surroundings. if you don't like this, simply delete it. if you want to have a more dramatic lighting effect, try "ambient 0.3 0.3 0.3"; for a softer lighting effect try "ambient 0.7 0.7 0.7" etc. you can play around with it until you find something you like.

** "emissive 1.0 1.0 1.0" is what makes your markings layer glow in the dark. in the code below it is set at full color; in the example above it is set to red (1.0 0.0 0.0). you can play around with the numbers until you find something you like; for starters, 1.0 0.0 0.0 is red, 0.0 1.0 0.0 is green, and 0.0 0.0 1.0 is blue; but either way you should get good results simply leaving it the way it is in the code below.

** don't forget to edit in your own file names and make sure the extensions are correct! if the preset doesn't show up in your Preset Maker, or if it crashes the game, that means you've made some kind of error in the script... always double check your work!

Code: [Select]
material preset_10_bodyMatL
{
technique
{
pass
{
ambient 0.5 0.5 0.5
texture_unit
{
texture YOURBODYTEXTURE.PNG
}
}
pass
{
emissive 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture YOURBODYGLOWTEXTURE.PNG
}
}
}
}
material preset_10_bodyMatR
{
technique
{
pass
{
ambient 0.5 0.5 0.5
texture_unit
{
texture YOURBODYTEXTURE.PNG
}
}
pass
{
emissive 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture YOURBODYGLOWTEXTURE.PNG
}
}
}
}
material preset_10_headMatL
{
technique
{
pass
{
ambient 0.5 0.5 0.5
texture_unit
{
texture YOURHEADTEXTURE.PNG
}
}
pass
{
emissive 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture YOURHEADGLOWTEXTURE.PNG
}
}
}
}
material preset_10_headMatR
{
technique
{
pass
{
ambient 0.5 0.5 0.5
texture_unit
{
texture YOURHEADTEXTURE.PNG
}
}
pass
{
emissive 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture YOURHEADGLOWTEXTURE.PNG
}
}

}
}
material preset_10_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture YOUREYETEXTURE.PNG
}
}
}
}
material preset_10_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture YOUREYETEXTURE.PNG
}
}
}
}
material preset_10_tailMat
{
technique
{
pass
{
ambient 0.5 0.5 0.5
texture_unit
{
texture YOURTAILTEXTURE.PNG
}
}
pass
{
emissive 1.0 1.0 1.0
scene_blend alpha_blend
texture_unit
{
texture YOURTAILGLOWTEXTURE.PNG
}
}
}
}
material preset_10_maneMat
{
technique
{
pass
{
ambient 0.5 0.5 0.5
cull_hardware none
cull_software none
scene_blend alpha_blend
alpha_rejection greater_equal 250
texture_unit
{
texture YOURMANETEXTURE.PNG
}
}
}
}

there you go! hope that helps y'all

Themiles

  • Guest
Re: How to make Glow in the Dark Markings on your Presets/Etc
« Reply #1 on: March 23, 2011, 05:32:06 pm »
THANKS! I was fiddeling around with this to make a preset for someone with glowing markings. This was exactly what I needed!

Offline Avani

  • Slytherin
  • Elder Grey Pelt
  • ****
  • Posts: 2,647
  • Country: no
  • Floof-O-Meter: 241
  • Avatar © Rizzla ☆゚
    • View Profile
Re: How to make Glow in the Dark Markings on your Presets/Etc
« Reply #2 on: March 23, 2011, 06:30:33 pm »
Thanks for posting this! <33

Liekos

  • Guest
Re: How to make Glow in the Dark Markings on your Presets/Etc
« Reply #3 on: March 24, 2011, 06:24:54 am »
Wow, awesome!
love your work Sully :3

Offline Kamaete

  • Finest Floof
  • ***
  • Posts: 951
  • Country: 00
  • Floof-O-Meter: 25
  • Wings would be good if I weren't afraid of heights
    • View Profile
    • Kama-ItaeteXIII @ DeviantART
Re: How to make Glow in the Dark Markings on your Presets/Etc
« Reply #4 on: March 24, 2011, 06:38:41 am »
THANK YOU.  TESTING NOW.  /caps abuse.

I was trying to figure out how to make markings glow, and now I know because you are awesome.  And that texture is really beautiful, too.  I hope you consider making more tutorials, because this is awesome.
...In my pants.

Offline GemWolf

  • Avani's Ninja Agent
  • Community Champion
  • ****
  • Posts: 2,072
  • Country: 00
  • Floof-O-Meter: 191
  • play rain world
    • View Profile
Re: How to make Glow in the Dark Markings on your Presets/Etc
« Reply #5 on: March 25, 2011, 12:57:37 am »
THIS IS JUST WHAT I NEEDED. <3
I love you Sully. xD

JazzForLife

  • Guest
Re: How to make Glow in the Dark Markings on your Presets/Etc
« Reply #6 on: March 25, 2011, 01:00:19 am »
This is awesome! Really great tutorial. Thanks <33

Offline Octayvia

  • Experienced Traveler
  • **
  • Posts: 114
  • Floof-O-Meter: 2
  • You wanna be a looser like me <3
    • View Profile
Re: How to make Glow in the Dark Markings on your Presets/Etc
« Reply #7 on: March 25, 2011, 09:05:23 pm »
Um, below is my code thing, but when i put it on the body, only the markings show and the rest of the body is just blank black... What did I do wrong?


material preset_5_bodyMatL
{
   technique
   {
      pass
      {
         ambient 0.3 0.3 0.3
         texture_unit
         {
            texture glow.png
         }
      }
      pass
      {
         emissive 1.0 0.0 0.0
         scene_blend alpha_blend
         texture_unit
         {
            texture glow.png
         }
      }
   }
}
material preset_5_bodyMatR
{
   technique
   {
      pass
      {
         ambient 0.3 0.3 0.3
         texture_unit
         {
            texture glow.png
         }
      }
pass
      {
         emissive 1.0 0.0 0.0
         scene_blend alpha_blend
         texture_unit
         {
            texture glow.png
         }
      }
   }
}
}
material preset_5_headMatL
{
   technique
   {
      pass
      {
         texture_unit
         {
            texture preset_5head.jpg
         }
      }
   }
}
material preset_5_headMatR
{
   technique
   {
      pass
      {
         texture_unit
         {
            texture preset_5head.jpg
         }
      }
   }
}
material preset_5_eyeMatL
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         texture_unit
         {
            texture preset_5eye.jpg
         }
      }
   }
}
material preset_5_eyeMatR
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         texture_unit
         {
            texture preset_5eye.jpg
         }
      }
   }
}
material preset_5_tailMat
{
   technique
   {
      pass
      {
         texture_unit
         {
            texture preset_5tail.jpg
         }
      }
   }
}
material preset_5_maneMat
{
   technique
   {
      pass
      {
         lighting off
         cull_hardware none
         cull_software none
         scene_blend alpha_blend
         depth_write off
         texture_unit
         {
            texture preset_5mane.png
         }
      }
   }
}

Please click :D

Offline Kamaete

  • Finest Floof
  • ***
  • Posts: 951
  • Country: 00
  • Floof-O-Meter: 25
  • Wings would be good if I weren't afraid of heights
    • View Profile
    • Kama-ItaeteXIII @ DeviantART
Re: How to make Glow in the Dark Markings on your Presets/Etc
« Reply #8 on: March 26, 2011, 02:25:16 am »
Your body texture is the same as the marking texture. >.>
...In my pants.

Offline Octayvia

  • Experienced Traveler
  • **
  • Posts: 114
  • Floof-O-Meter: 2
  • You wanna be a looser like me <3
    • View Profile
Re: How to make Glow in the Dark Markings on your Presets/Etc
« Reply #9 on: March 26, 2011, 02:53:32 am »
Your body texture is the same as the marking texture. >.>

I'm sorry, what does that mean?

Please click :D