Author Topic: Preset Question (Solved)  (Read 175 times)

Offline Lady_Alizarin

  • The Duchess of Foxes
  • Elder Member
  • ****
  • Posts: 1,133
  • Country: us
  • Floof-O-Meter: 110
  • ~Speak for yourself, and no one else
    • littleFernanda
    • View Profile
Preset Question (Solved)
« 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?
« Last Edit: August 14, 2018, 02:38:24 am by Lady_Alizarin »


Offline Lucius

  • ⛧ Fᴇᴀᴛᴜʀɪɴɢ Dᴀɴᴛᴇ Fʀᴏᴍ Tʜᴇ Dᴇᴠɪʟ Mᴀʏ Cʀʏ Sᴇʀɪᴇs
  • Moderator
  • Experienced Member
  • *****
  • Posts: 187
  • Country: ca
  • Floof-O-Meter: 73
  • ⛧ Aᴠᴀᴛᴀʀ ᴅʀᴀᴡɴ ʙʏ: Eᴅᴏʟɪᴄɪᴏᴜs
    • RoyalNarcissist
    • Cruuxis
    • View Profile
    • Withered Woods
Re: Preset Question
« Reply #1 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
}
}
}
}

Offline Lady_Alizarin

  • The Duchess of Foxes
  • Elder Member
  • ****
  • Posts: 1,133
  • Country: us
  • Floof-O-Meter: 110
  • ~Speak for yourself, and no one else
    • littleFernanda
    • View Profile
Re: Preset Question
« Reply #2 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.



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



Is there a way I can fix that?

Offline Lucius

  • ⛧ Fᴇᴀᴛᴜʀɪɴɢ Dᴀɴᴛᴇ Fʀᴏᴍ Tʜᴇ Dᴇᴠɪʟ Mᴀʏ Cʀʏ Sᴇʀɪᴇs
  • Moderator
  • Experienced Member
  • *****
  • Posts: 187
  • Country: ca
  • Floof-O-Meter: 73
  • ⛧ Aᴠᴀᴛᴀʀ ᴅʀᴀᴡɴ ʙʏ: Eᴅᴏʟɪᴄɪᴏᴜs
    • RoyalNarcissist
    • Cruuxis
    • View Profile
    • Withered Woods
Re: Preset Question
« Reply #3 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.

Offline Lady_Alizarin

  • The Duchess of Foxes
  • Elder Member
  • ****
  • Posts: 1,133
  • Country: us
  • Floof-O-Meter: 110
  • ~Speak for yourself, and no one else
    • littleFernanda
    • View Profile
Re: Preset Question
« Reply #4 on: August 14, 2018, 02:37:34 am »
Thank you for the codes and the help, Lucius. That helped with my preset project.