Author Topic: Partly invisible presets in FH  (Read 1511 times)

Offline ScribbleKibble

  • Forum Newcomer
  • *
  • Posts: 2
  • Floof-O-Meter: 0
    • View Profile
Partly invisible presets in FH
« on: October 04, 2016, 03:14:26 am »
I just started preset making and I've been wondering, how would you make a preset partially invisible? I want to make a preset with a stump leg. I've seen it done before but I can't find any tutorials on it. Anyone know the magical secret of invisible presets? XD

Offline Vwang

  • Finest Floof
  • ***
  • Posts: 937
  • Country: 00
  • Floof-O-Meter: 38
    • View Profile
Re: Partly invisible presets in FH
« Reply #1 on: October 04, 2016, 03:17:08 am »

Offline D-ead7Dog

  • AFK NPC
  • Member Of The Season
  • Pack & Pride Representative
  • ***
  • Posts: 1,462
  • Country: us
  • Floof-O-Meter: 98
  • BUMPY SNOW
    • D-ead7Dog
    • d-ead7dog
    • View Profile
Re: Partly invisible presets in FH
« Reply #2 on: October 04, 2016, 03:20:55 am »
Now that you've been given the code here is a tutorial to finish it off!
https://www.youtube.com/watch?v=F1KzhPtCg5M

-OR-
written up.
Transparent
-Oh, the wonders of making body parts disappear!

Start with your preset/object.

(This is preset 2 for the purpose of this tutorial, but I repeat, IT'S NOT MINE. Kay? Kay. c:)

Now, all you do is open your preset in Photoshop or GIMP, like you would any other time.
But this time, we need to make sure you have an alpha channel of transparency enabled. To do this, simply go to Layers >> Transparency >> Add Alpha Channel, like so for GIMP;

Fullsize Image
If the option is not available, it usually means you already have it enabled, so you should be all good!
Now just erase the part(s) you want to be gone. I'm going to erase the midsection.

Now, and this is important, save your image, AS A .PNG. Why, you might ask? First of all, I always use .png just because .jpg doesn't always look as well on presets, but second, .jpg DOES NOT support transparency. And look at that, we just used transparency! So guess what, we need a .png. c:
Once you've saved as a .png, open your material code, which should look something like this as default;
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.jpg
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.jpg
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.jpg
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.jpg
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}
Now, you need to change whatever part is using transparency to .png instead of .jpg, but for me, all my stuff is in .png anyway, so I'm going to go ahead and switch it all.
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_#tail.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}
Now, before we save and test, we should make sure that we have the actual transparency code in there, which is this simple line;
alpha_rejection greater_equal 128
which gets placed above all the texture_unit lines. Or at least all the ones you're using transparency on.
So, you can do that manually if you're only doing a few body parts, but if you're doing them all, then take it from me;
Code: [Select]
material preset_#_bodyMatL
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_bodyMatR
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#body.png
}
}
}
}
material preset_#_headMatL
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_headMatR
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#head.png
}
}
}
}
material preset_#_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#eye.png
}
}
}
}
material preset_#_tailMat
{
technique
{
pass
{
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#tail.png
}
}
}
}
material preset_#_maneMat
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
texture preset_#mane.png
}
}
}
}
Quote from: Me
Now press Ctrl+H, or go to Edit->Replace...
And type _# in the "Find what:" section.
Then in the "Replace with:" section, put an underscore:
_
and then put your preset's actual number after that. Then click Replace all.
^ Only if you're using the code I just gave you, because I use # signs in it where your actual preset's number should be.
So since I'm using preset 2, this is what I'd be doing;

But you'd be using whatever number preset you're doing.

Now, make sure you SAVE your material file, then go ahead and close it. Once we take a look ingame, you should have something like this! - Eep!

Have fun with it!

-OR- [simple version]
When you get to the part you want "invisible" make sure you put all the layers into one bundle is it's just one layer.
Right click and click "Alpha Channel".
Erase the part you want gone.
Save and Export it.
Go into the material file and replace what you have with this
Quote
material preset_#_bodyMatL
{
   technique
   {
      pass
      {
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture preset_#body.png
         }
      }
   }
}
material preset_#_bodyMatR
{
   technique
   {
      pass
      {
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture preset_#body.png
         }
      }
   }
}
material preset_#_headMatL
{
   technique
   {
      pass
      {
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture preset_#head.png
         }
      }
   }
}
material preset_#_headMatR
{
   technique
   {
      pass
      {
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture preset_#head.png
         }
      }
   }
}
material preset_#_eyeMatL
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture preset_#eye.png
         }
      }
   }
}
material preset_#_eyeMatR
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture preset_#eye.png
         }
      }
   }
}
material preset_#_tailMat
{
   technique
   {
      pass
      {
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture preset_#tail.png
         }
      }
   }
}
material preset_#_maneMat
{
   technique
   {
      pass
      {
         cull_hardware none
         cull_software none
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture preset_#mane.png
         }
      }
   }
}
[/quote][/spoiler]
[DO NOT FORGET TO GO INTO THE MATERIAL FILE AND CHANGE THE CODE TO TRANSPARENT OTHERWISE IT WON'T WORK AND YOU WILL HAVE A WHITE AREA WHERE IT SHOULD BE INVISIBLE.]
« Last Edit: October 04, 2016, 03:35:38 am by Pkf7 »
WORK IN PROGRESS
Artwork (c) LynxBrush & Majorest

Originally registered January 15, 2011

Offline Kerriki

  • Band Geek
  • Immortal Legend
  • *****
  • Posts: 5,670
  • Country: us
  • Floof-O-Meter: 371
  • Who needs furniture when you have the floor?
    • Kikiorylandia
    • View Profile
    • DeviantART
Re: Partly invisible presets in FH
« Reply #3 on: October 04, 2016, 03:33:10 am »
Moving this to the game help board ^^
Farewell everyone<3

Offline ScribbleKibble

  • Forum Newcomer
  • *
  • Posts: 2
  • Floof-O-Meter: 0
    • View Profile
Re: Partly invisible presets in FH
« Reply #4 on: October 05, 2016, 12:36:21 am »
Thanks for the help!
« Last Edit: October 05, 2016, 12:41:53 am by Sasha03 »