Help & Information > Tutorials

Preset Scroll/Transparency/Glow tutorial

(1/2) > >>

Jenxie13:
Seeing as this has been a bit of popular demand recently with preset submissions being opened, I have whipped up a fairly simple "advanced preset" tutorial!

TRANSPARENCY/SCROLL

1) First, you need to have your basic preset files all finished and working!
For example, I will use a preset I have created myself for this tutorial.
Spoiler for Hiden:
2)Open your MATERIAL file that has your coding so far.
Spoiler for Hiden:
3) Next, you will add THIS code:Spoiler for Hiden:
--- Code: ---material PS_CharacterMat/BodyMat
{
receive_shadows on
technique
{
pass
{
         ambient 1.000000 1.000000 1.000000 1.000000
         diffuse 1.000000 1.000000 1.000000 1.000000
         specular 0.050000 0.050000 0.050000 1.000000
         emissive 0.000000 0.000000 0.000000 1.000000
         cull_hardware none
         cull_software none
         alpha_rejection greater_equal 128
         texture_unit
{
texture presets\CharacterBodyTex.png
tex_address_mode wrap
filtering trilinear
}
}
}
}
--- End code ---
This code is for the transparency of a preset. If you are planning on having a preset that scrolls, you MUST have this; it will not work otherwise!
Note: You can change the coding to fit to the Head, Tail, Mane, or any other file you want.
Note2: It is probably advised you check to make sure the coding is working correctly and that you named it right BEFORE you continue on with this step, because as I stated above, the scrolling will not work correctly otherwise.
4)After testing your preset and seeing that it works, you are now able to add the scroll texture and coding! The coding for this is: Spoiler for Hiden:
--- Code: ---material PS_CharacterMat/BodyMat
{
   technique
   {
      pass
      {
ambient 1 1 1 0.5
diffuse 1 1 1 0.5
specular 0.05 0.05 0.05 0.5
emissive 0 0 0 0.5
cull_hardware none
cull_software none
                                        scene_blend alpha_blend

texture_unit
         {
            texture presets\CharacterScrollTex.png
            scroll_anim 0.1 0.1
         }
      }
      pass
      {
         scene_blend alpha_blend
         texture_unit   
         {
            texture presets\CharacterBodyTex.png
         }
      }
   }
}
--- End code ---
After adding this and adjusting it so it matches your texture file names, you can adjust the speed by switching up the numbers found next to the scroll_anim option. By default, the speed is 0.1 0.1 but you can change these so they can go faster or slower! The bigger the number, the slower it goes. And if you're wondering about the whole "ambient" and "diffuse" and what the numbers next to those are for, those actually can alter the transparency of your scroll itself! It can make it semi-transparent to a non-transparent state. Feel free to mess around with the numbers until you reach a state where you feel it is satisfactory!

That is about it for scrolling and transparency! The preset should end up like Spoiler for Hiden: This preset has the scroll on the character's belly, and it goes from a light blue to a dark blue and back.Note: You can ALSO change the scroll to rotate. Simply replace the "scroll" in the scroll_anim section with rotate so it will show as rotate_anim and it should work!

Jenxie13:
GLOWS
1) Like for transparency/scrolls, you will need to have your preset that already works.Spoiler for Hiden: Note: For glow markings, you do NOT need transparency, it is optional! Like in that preset, I didn't use it.
2) Next, you will need the coding for glow!
Spoiler for Hiden:
--- Code: ---material PS_CharacterMat/HeadMat
{
   receive_shadows on
   technique
   {
      pass
      {
         ambient 1.000000 1.000000 1.000000 1.000000
         diffuse 1.000000 1.000000 1.000000 1.000000
         specular 0.050000 0.050000 0.050000 1.000000
         emissive 0.000000 0.000000 0.000000 1.000000
         cull_hardware none
         cull_software none
         texture_unit
         {
            texture presets\CharacterHeadTex.png
              }
      }
      pass
      {
         emissive 0.0 0.0 1.0
         scene_blend alpha_blend
         texture_unit
         {
            texture presets\CharacterHeadTexGlow.png
         }
      }
   }
}
--- End code ---
3) Add this code to your MATERIAL file, and it should work!
Spoiler for Hiden: In this preset, you can see a faint glow coming off of the ear markings and cheek markings. GLOW MARKINGS ARE MOST VISIBLE IN A DARKER MAP!!

Divinejackal:
bless you for making this thread.

Jenxie13:

--- Quote from: MaliciousMavis on November 04, 2015, 11:02:52 PM ---bless you for making this thread.

--- End quote ---
u is welcome, fam.

Cookee:
Thank you Jenxie! ^^

Navigation

[0] Message Index

[#] Next page

Go to full version