Author Topic: The Code for Two-Sided Transparent Presets  (Read 3712 times)

Offline Callistis

  • Experienced Traveler
  • **
  • Posts: 139
  • Floof-O-Meter: 31
  • One muffin, two muffin, red muffin, blue muffin
    • View Profile
The Code for Two-Sided Transparent Presets
« on: January 21, 2013, 11:08:27 pm »
I know how some people may be having trouble with two-sided transparent stuff,
so I put a code together myself that is two sided. Of course you'll need all the right files, but
for now I'm here with the code.

To Make it work, just change the numbers in the code to the ones of your preset, use the
eraser with the alpha channel on -- So when you erase it's a gray checkerboard background --
and there you go, it'll work.


Code: [Select]
material preset_3_bodyMatL
{
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 12.500000
                     emissive 0.000000 0.000000 0.000000 1.000000
                    cull_hardware none
                     cull_software none
                     scene_blend alpha_blend
             alpha_rejection greater_equal 128
texture_unit
{
texture preset_3bodyL.png
}
}
}
}
material preset_3_bodyMatR
{
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 12.500000
                     emissive 0.000000 0.000000 0.000000 1.000000
                    cull_hardware none
                     cull_software none
                     scene_blend alpha_blend
             alpha_rejection greater_equal 128
texture_unit
{
texture preset_3bodyR.png
}
}
}
}
material preset_3_headMatL
{
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 12.500000
                     emissive 0.000000 0.000000 0.000000 1.000000
                    cull_hardware none
                     cull_software none
                     scene_blend alpha_blend
             alpha_rejection greater_equal 128
texture_unit
{
texture preset_3headL.png
}
}
}
}
material preset_3_headMatR
{
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 12.500000
                     emissive 0.000000 0.000000 0.000000 1.000000
                    cull_hardware none
                     cull_software none
                     scene_blend alpha_blend
             alpha_rejection greater_equal 128
texture_unit
{
texture preset_3headR.png
}
}
}
}
material preset_3_eyeMatL
{
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 12.500000
                     emissive 0.000000 0.000000 0.000000 1.000000
                    cull_hardware none
                     cull_software none
                     scene_blend alpha_blend
             alpha_rejection greater_equal 128
cull_hardware none
cull_software none
texture_unit
{
texture preset_3eyeL.png
}
}
}
}
material preset_3_eyeMatR
{
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 12.500000
                     emissive 0.000000 0.000000 0.000000 1.000000
                    cull_hardware none
                     cull_software none
                     scene_blend alpha_blend
             alpha_rejection greater_equal 128
cull_hardware none
cull_software none
texture_unit
{
texture preset_3eyeR.png
}
}
}
}
material preset_3_tailMat
{
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 12.500000
                     emissive 0.000000 0.000000 0.000000 1.000000
                    cull_hardware none
                     cull_software none
                     scene_blend alpha_blend
             alpha_rejection greater_equal 128
texture_unit
{
texture preset_3tail.png
}
}
}
}
material preset_3_maneMat
{
        technique
        {
                pass
                {
                       cull_hardware none
                       cull_software none
                       alpha_rejection greater_equal 128
                       texture_unit
                       {
                                texture preset_3mane.png
                }
          }
     }
}

 Here is how I used it:

« Last Edit: January 21, 2013, 11:11:26 pm by Pale_Wolf »

*snap@apples?*

  • Guest
Re: The Code for Two-Sided Transparent Presets
« Reply #1 on: February 05, 2013, 11:42:09 pm »
Got a quick question, actually two, >.<  Ok, so what happens if you have a preset that doesn't show up the picture or something? I mean, what do you do to fix it?  Question 2: . . . . . . . . .  Are the ears only transparent? ._.

Offline Callistis

  • Experienced Traveler
  • **
  • Posts: 139
  • Floof-O-Meter: 31
  • One muffin, two muffin, red muffin, blue muffin
    • View Profile
Re: The Code for Two-Sided Transparent Presets
« Reply #2 on: February 07, 2013, 04:11:47 pm »
I'm not sure about your first question.. and no the whole body can have transparency, even
the eyes and the tail

Offline LordSuragaha

  • The Karen Slayer
  • Immortal Legend
  • *****
  • Posts: 11,027
  • Country: 00
  • Floof-O-Meter: 1052
    • View Profile
Re: The Code for Two-Sided Transparent Presets
« Reply #3 on: February 07, 2013, 04:13:47 pm »
Very helpful Pale :3! Thanks for sharing. I want to try this out one day ^_^