Author Topic: Preset issue  (Read 1524 times)

PeaceLoveAndDoge

  • Guest
Preset issue
« on: October 06, 2016, 09:44:08 pm »
It's an animated one.
This was all I got:

Here's the material for the head, body, mane, and tail.

Here's the texture for the eyes:

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

ArcticGalaxy

  • Guest
Re: Preset issue
« Reply #1 on: October 06, 2016, 10:00:06 pm »
For your images, try using Imgur, that way they will show up. ^^;

Offline Morgra

  • I don't like sand...
  • Immortal Legend
  • *****
  • Posts: 5,718
  • Country: us
  • Floof-O-Meter: 347
  • Ever been killed by a spider? I was
    • DinksterDaily
    • View Profile
Re: Preset issue
« Reply #2 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.
« Last Edit: October 07, 2016, 01:04:25 am by MorgraWolf »
Profile pic by Edolicious

People don't think the universe be like it is, but it do.


Offline Shazadah

  • Dedicated Supporter
  • ***
  • Posts: 259
  • Country: us
  • Floof-O-Meter: 11
  • Call me NaruWolf
    • http://shay-wolf.deviantart.com
    • https://www.youtube.com/user/Mid
    • View Profile
Re: Preset issue
« Reply #3 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.

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