Author Topic: Oh boy.. {Preset Coding}  (Read 2026 times)

Offline hellbent

  • Curious Wanderer
  • *
  • Posts: 22
  • Country: us
  • Floof-O-Meter: 1
  • formerly XxMidnightX
    • heilbent
    • View Profile
Oh boy.. {Preset Coding}
« on: February 27, 2015, 09:27:00 am »
So, I've recently began to make a preset for a new character of mine.
It's made to be a GIF type of preset {AKA Animated}, where the images flash by. I already have the head of the preset done, but I can't seem to get the coding correct because every time I try to use the preset, the whole body comes out with the bumblebee colors. This is what I have for the coding:
Code: [Select]
material preset_5_headMatR
{
    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.010000 0.010000 0.010000 1.000000
            emissive 0.000000 0.000000 0.000000 1.000000
            texture_unit
            {
                anim_texture body1.png body2.png body3.png body4.png body5.png body6.png body7.png 1
                tex_address_mode wrap
                filtering trilinear
                rotate_anim 0.02
            }
        }
    }
}
        pass
        {
            ambient 1.000000 1.000000 1.000000 1.000000
            diffuse 1.000000 1.000000 1.000000 1.000000
            specular 0.010000 0.010000 0.010000 1.000000
            emissive 0.000000 0.000000 0.000000 1.000000
            scene_blend alpha_blend
            texture_unit
            {
                texture Texture.png
                tex_address_mode wrap
                filtering anisotropic
      max_anisotropy 16
            }
        }
    }
}
material preset_5_headMatR
{
    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.010000 0.010000 0.010000 1.000000
            emissive 0.000000 0.000000 0.000000 1.000000
            texture_unit
            {
                anim_texture body1.png body2.png body3.png body4.png body5.png body6.png body7.png 1
                tex_address_mode wrap
                filtering trilinear
                rotate_anim 0.02
            }
        }
    }
}
        pass
        {
            ambient 1.000000 1.000000 1.000000 1.000000
            diffuse 1.000000 1.000000 1.000000 1.000000
            specular 0.010000 0.010000 0.010000 1.000000
            emissive 0.000000 0.000000 0.000000 1.000000
            scene_blend alpha_blend
            texture_unit
            {
                texture Texture.png
                tex_address_mode wrap
                filtering anisotropic
      max_anisotropy 16
            }
        }
    }
}

All the files are saved as .png as well.

Offline Spottedbears

  • Dedicated Supporter
  • ***
  • Posts: 464
  • Country: 00
  • Floof-O-Meter: 41
  • mister sandman, bring me a dream
    • View Profile
Re: Oh boy.. {Preset Coding}
« Reply #1 on: February 27, 2015, 12:00:50 pm »
I don't think you need this part of your code:

  tex_address_mode wrap
                filtering trilinear
                rotate_anim 0.02

it's not in any of my animated presets and it could be the reason FH can't read your texture files.

here's an example of one of my body codes:
Code: [Select]
material preset_12_bodyMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
texture_unit
{
anim_texture preset_12body.png preset_12body1.png preset_12body2.png preset_12body3.png 0.5
}
}
}
}

note -- you can add things like ambient on top of it (and the cull_hardware/cull_software none are to make sure my preset isn't see-through from the inside because there are transparent parts and you can actually see the other side of the body) and it will work just fine, I'm pretty sure it's just that one section of your code that's messing it up.

if you need any other help with the animated preset, let me know! I've done tons of robo/eyes blinking, etc. kinds of presets c;
« Last Edit: February 27, 2015, 12:04:15 pm by Spottedbears »

Art by me!
DA: Chrome-domey
Tumblr: Cassiopirate
Need preset, animating, or map help? PM me!

Offline AmarisMingan

  • Experienced Traveler
  • **
  • Posts: 118
  • Country: nl
  • Floof-O-Meter: 7
  • Luck is a shimmer in the darkness.
    • https://steamcommunity.com/profi
    • View Profile
Re: Oh boy.. {Preset Coding}
« Reply #2 on: February 27, 2015, 04:31:46 pm »
Best to refer to how Spottedbears mentioned the transparency in alpha_rejection greater_equal 128. However, I seem to notice double coding in there. Is it supposed to be headMatR twice? If not, look closely and make one headMatL, this could also be the case it shows up like a bumblebee as you say it. Or change rotate_anim to scroll_anim. Try whatever you like, many other tricks should work!
Av - AzureHowlShliach

Offline hellbent

  • Curious Wanderer
  • *
  • Posts: 22
  • Country: us
  • Floof-O-Meter: 1
  • formerly XxMidnightX
    • heilbent
    • View Profile
Re: Oh boy.. {Preset Coding}
« Reply #3 on: February 27, 2015, 07:21:32 pm »
Okay, so I started with a completely fresh coding layer. I pasted the coding you gave and changed it all to match the preset, and it still came out as the same old, black and yellow colored preset as if the files didn't exist.

Code: [Select]
material preset_5_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_5body.jpg
}
}
}
}
material preset_5_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_5body.jpg
}
}
}
}
material preset_5_headMatL
{
 technique
 {
  pass
  {
   cull_hardware none
   cull_software none
   alpha_rejection greater_equal 128
   texture_unit
   {
    anim_texture body1.png body2.png body3.png body4.png body5.png body6.png body7.png 0.5
   }
  }
 }
}
material preset_5_headMatR
{
 technique
 {
  pass
  {
   cull_hardware none
   cull_software none
   alpha_rejection greater_equal 128
   texture_unit
   {
    anim_texture body1.png body2.png body3.png body4.png body5.png body6.png body7.png 0.5
   }
  }
 }
}
material preset_5_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_5eye.jpg
}
}
}
}
material preset_5_eyeMatR
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_5eye.jpg
}
}
}
}
material preset_5_tailMat
{
technique
{
pass
{
texture_unit
{
texture preset_5tail.jpg
}
}
}
}
material preset_5_maneMat
{
technique
{
pass
{
lighting off
cull_hardware none
cull_software none
scene_blend alpha_blend
depth_write off
texture_unit
{
texture preset_5mane.png
}
}
}
}

Offline Spottedbears

  • Dedicated Supporter
  • ***
  • Posts: 464
  • Country: 00
  • Floof-O-Meter: 41
  • mister sandman, bring me a dream
    • View Profile
Re: Oh boy.. {Preset Coding}
« Reply #4 on: February 27, 2015, 08:57:19 pm »
hm, this could be a simple mistake of file names.

are you sure all your file names match the names mentioned in the code, as well as their extension?

Art by me!
DA: Chrome-domey
Tumblr: Cassiopirate
Need preset, animating, or map help? PM me!

Offline hellbent

  • Curious Wanderer
  • *
  • Posts: 22
  • Country: us
  • Floof-O-Meter: 1
  • formerly XxMidnightX
    • heilbent
    • View Profile
Re: Oh boy.. {Preset Coding}
« Reply #5 on: February 27, 2015, 09:09:06 pm »
Positive. I double checked, all the files are saved as .png, do you think it could be an issue with the preset 5 folder itself?

Thierry

  • Guest
Re: Oh boy.. {Preset Coding}
« Reply #6 on: February 28, 2015, 10:17:09 pm »
I checked the coding and is all correct, no problems with preset_5 before.

This may sound silly but actually worked for a friend.
On the login screen, untick the checkbox for remember your username, then close your game and open it again, then type your usename as you usually do taking care of your caps, and go to export your preset again.

For the moment i don't have any other ideas of what it could be.

Offline hellbent

  • Curious Wanderer
  • *
  • Posts: 22
  • Country: us
  • Floof-O-Meter: 1
  • formerly XxMidnightX
    • heilbent
    • View Profile
Re: Oh boy.. {Preset Coding}
« Reply #7 on: March 01, 2015, 10:49:06 pm »
I tested this out, still didn't work.
Is it possible to send the files to someone and have them code it/test it out?
It won't show up in the Preset maker, actually. xD

Thierry

  • Guest
Re: Oh boy.. {Preset Coding}
« Reply #8 on: March 02, 2015, 08:37:32 pm »
I could test them if you want.

Offline hellbent

  • Curious Wanderer
  • *
  • Posts: 22
  • Country: us
  • Floof-O-Meter: 1
  • formerly XxMidnightX
    • heilbent
    • View Profile
Re: Oh boy.. {Preset Coding}
« Reply #9 on: March 07, 2015, 03:19:12 am »
That's fine. I can send over the files in a moment.