Author Topic: Can you Make PNG files for Presets?  (Read 904 times)

Offline Monol

  • Forum Newcomer
  • *
  • Posts: 9
  • Floof-O-Meter: 0
  • Phoenix Dragon is Best Dragon.
    • View Profile
Can you Make PNG files for Presets?
« on: October 29, 2014, 11:18:59 pm »
Lately, I've been working on a Pantheron from FF13, and I can't get rid of the ears. It always has to be in JPG, or it will not work. I tried scripts and they messed the head up completely.  :'( IS there any way to make a png file for a preset?

AlphaEclipse

  • Guest
Re: Can you Make PNG files for Presets?
« Reply #1 on: October 29, 2014, 11:37:51 pm »
If I understand correctly, yes! You can change the default .jpg script to .png simply to allow for transparency. Here's an example:
Quote
material preset_#bodyMatR
{
   technique
   {
      pass
      {
         texture_unit   
         {
            texture preset_8body2.jpg
         }
      }
   }
}
To...
Quote
material preset_#_bodyMatR
{
   technique
   {
      pass
      {
         texture_unit   
         {
            texture preset_8body2.png
         }
      }
   }
}
As for the transparency to actually appear, you'll need a completely new script for that. Here's part of it from one of my .material files. Whatever is marked red, you'll want to change to match what body part and number your preset is for it to function.
Quote
material preset_#_bodyMatR
{
    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 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_#BODY.png
                         tex_address_mode wrap
                         filtering trilinear
          }
             texture preset_#BODY.png
          }
       }
    }
}
Here's a great tutorial by Feareh that is very helpful when it comes to transparent presets. http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=34786.0

Offline Monol

  • Forum Newcomer
  • *
  • Posts: 9
  • Floof-O-Meter: 0
  • Phoenix Dragon is Best Dragon.
    • View Profile
Re: Can you Make PNG files for Presets?
« Reply #2 on: October 30, 2014, 11:47:12 pm »
Do you know where exactly to put that stuff? Like, under "head", do you put the png script first and then the script that makes transparency appear after?