Feral Heart

Help & Guidance => Game Help => Topic started by: PeaceLoveAndDoge on October 06, 2016, 09:44:08 pm

Title: Preset issue
Post by: PeaceLoveAndDoge on October 06, 2016, 09:44:08 pm
It's an animated one.
This was all I got:
(http://i63BannedImageSite/2pqkl8p.jpg)
Here's the material for the head, body, mane, and tail.
(http://i65BannedImageSite/x2nyur.gif)
Here's the texture for the eyes:
(http://i65BannedImageSite/24mb505.png)
Here's my code:
Code: [Select]
material preset_11_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_11body.gif
}
}
}
}
material preset_11_bodyMatR
{
technique
{
pass
{
texture_unit
{
texture preset_11body.gif
}
}
}
}
material preset_11_headMatL
{
technique
{
pass
{
texture_unit
{
texture preset_11head.gif
}
}
}
}
material preset_11_headMatR
{
technique
{
pass
{
texture_unit
{
texture preset_11head.gif
}
}
}
}
material preset_11_eyeMatL
{
technique
{
pass
{
cull_hardware none
cull_software none
texture_unit
{
texture preset_11eyes.gif
}
}
}
}
material preset_11_eyeMatR
Title: Re: Preset issue
Post by: ArcticGalaxy on October 06, 2016, 10:00:06 pm
For your images, try using Imgur, that way they will show up. ^^;
Title: Re: Preset issue
Post by: Morgra on October 07, 2016, 01:02:25 am
I may be wrong on this, but I don't think a .gif format is compatible. (I can't tell what the problem is yet though because of the image uploads not working yet). I think you'll need to extract the frames and use the animated texture code here:
Code: [Select]
material preset_11_bodyMatL
{
 technique
 {
  pass
  {
   texture_unit
   {
    anim_texture preset_11body1.png preset_11body2.png preset_11body3.png 1
   }
  }
 }
}
material preset_11_bodyMatR
{
 technique
 {
  pass
  {
   texture_unit
   {
    anim_texture preset_11body1.png preset_11body2.png preset_11body3.png 1
   }
  }
 }
}
material preset_11_headMatL
{
 technique
 {
  pass
  {
   texture_unit
   {
    anim_texture preset_11head1.png preset_11head2.png preset_11head3.png 1
   }
  }
 }
}
material preset_11_headMatR
{
 technique
 {
  pass
  {
   texture_unit
   {
     anim_texture preset_11head1.png preset_11head2.png preset_11head3.png 1
   }
  }
 }
}
material preset_11_eyeMatL
{
 technique
 {
  pass
  {
   cull_hardware none
   cull_software none
   texture_unit
   {
     anim_texture preset_11eye1.png preset_11eye2.png preset_11eye3.png 1
   }
  }
 }
}
material preset_11_eyeMatR

There will obviously be more than 3 frames. Each frame will be an image and the number "1" I put at the end is the number of seconds it takes to complete the animation cycle. Change that as needed. There needs to be a number at the end, or it will not work. And I used .png format, I believe .jpg will work just the same unless you have transparent portions of your preset.
Title: Re: Preset issue
Post by: Shazadah on October 07, 2016, 02:48:26 am
You may also try the scrolling code method:
Code: [Select]
material preset_#_bodyMatL
{
 technique
 {
  pass
  {
   texture_unit
   {
    texture preset_#scroll.png
    scroll_anim 1.0 1.0
   }
  }
  pass
  {
   scene_blend alpha_blend
   texture_unit
   {
    texture preset_#body.png
   }
  }
 }
}
material preset_#_bodyMatR
{
 technique
 {
  pass
  {
   texture_unit
   {
    texture preset_#scroll.png
    scroll_anim 1.0 1.0
   }
  }
  pass
  {
   scene_blend alpha_blend
   texture_unit
   {
    texture preset_#body.png
   }
  }
 }
}
material preset_#_headMatL
{
 technique
 {
  pass
  {
   texture_unit
   {
    texture preset_#scroll.png
    scroll_anim 1.0 1.0
   }
  }
  pass
  {
   scene_blend alpha_blend
   texture_unit
   {
    texture preset_#head.png
   }
  }
 }
}
material preset_#_headMatR
{
 technique
 {
  pass
  {
   texture_unit
   {
    texture preset_#scroll.png
    scroll_anim 1.0 1.0
   }
  }
  pass
  {
   scene_blend alpha_blend
   texture_unit
   {
    texture preset_#head.png
   }
  }
 }
}
material preset_#_eyeMatL
{
 technique
 {
  pass
  {
   texture_unit
   {
    texture preset_#scroll.png
    scroll_anim 1.0 1.0
   }
  }
  pass
  {
   scene_blend alpha_blend
   texture_unit
   {
    texture preset_#eye.png
   }
  }
 }
}
material preset_#_eyeMatR
{
 technique
 {
  pass
  {
   texture_unit
   {
    texture preset_#scroll.png
    scroll_anim 1.0 1.0
   }
  }
  pass
  {
   scene_blend alpha_blend
   texture_unit
   {
    texture preset_#eye.png
   }
  }
 }
}
material preset_#_tailMat
{
 technique
 {
  pass
  {
   texture_unit
   {
    texture preset_#scroll.png
    scroll_anim 1.0 1.0
   }
  }
  pass
  {
   scene_blend alpha_blend
   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
    scroll_anim 1.0 1.0
   }
  }
 }
}

The number values in the scroll_anim line can be altered even into the negatives. One I think controls speed while the other controls direction, negative numbers give opposite effects.

More on that is in this Book of Codes (http://www.feral-heart.com/smf/index.php?topic=26062.0).

.gif images do not work with the game, you can only use .png or .jpg.