Feral Heart

Help & Guidance => Game Help => Topic started by: Lady_Alizarin on August 11, 2018, 09:51:39 pm

Title: Preset Question (Solved)
Post by: Lady_Alizarin on August 11, 2018, 09:51:39 pm
I have a question regarding presets.
I am trying to make a preset where some parts of the preset are invisible (example: The character is missing a leg, so that part of the preset is invisible to make it look like the leg is missing). I've tried a few times, but the parts that are supposed to be invisible show up black. Do I need to save the preset as a specific file type, or do I need to put in a code?
Title: Re: Preset Question
Post by: Lucius on August 11, 2018, 09:56:21 pm
You must save the image file with the alpha channel as a PNG file and then modify the material code for that section to allow for transparency.

Here's a sample code:

Code: [Select]
material preset_1_bodyMatL
{
technique
{
pass
{
scene_blend alpha_blend
alpha_rejection greater 128
texture_unit
{
texture preset_1body.png
}
}
}
}
Title: Re: Preset Question
Post by: Lady_Alizarin on August 13, 2018, 02:33:14 am
That sample code did help. There is just one more thing I need to fix and I'm wondering if I need to do another change to the code for it.

(https://i.imgur.com/9wwLLEs.png)

The inside of the head seems to have disappeared. I want my preset effect to look similar to the picture sample down below.

(https://orig00.deviantart.net/91e0/f/2013/008/4/f/feralheart_preset_gryphon_by_wingedwolf94-d5qwjk1.png)

Is there a way I can fix that?
Title: Re: Preset Question
Post by: Lucius on August 13, 2018, 04:51:10 am
Yep, another change to the code will be needed. All you have to do is to add cull_hardware none before the texture_unit of the section where you want to have the double-sided textures.

So your code will look like this now:

Code: [Select]
material preset_1_bodyMatL
{
technique
{
pass
{
scene_blend alpha_blend
alpha_rejection greater 128
cull_hardware none
texture_unit
{
texture preset_1body.png
}
}
}
}

With larger open areas, it's usually wiser to add the cull_hardware none to every body section, lest you see-through your character's body and tail.
Title: Re: Preset Question
Post by: Lady_Alizarin on August 14, 2018, 02:37:34 am
Thank you for the codes and the help, Lucius. That helped with my preset project.