Author Topic: Preset Animation Code?  (Read 2414 times)

Offline hugrf2

  • Purple Derple
  • Honored Hero
  • *****
  • Posts: 5,314
  • Country: us
  • Floof-O-Meter: 120
  • wrow
    • hugrf
    • channel/UChLphw5s3-hS8EFAgnNv6FQ
    • hugrf
    • hugrf
    • Ain't nobody got time fo' dat
    • View Profile
Preset Animation Code?
« on: October 27, 2015, 02:21:01 pm »
I've seen this on Dragon's Den before and I was wondering if it might be possible on FeralHeart as well to create an animation on a preset. My friend wants me to make him a preset and he said he wanted me to at least make it seem like his character would be glitching, so if I can't find it I believe I can find another way to do it, but I'm wondering if it's possible to try the first idea I had.

His idea was mentioned to me as "error codes" and all that, scrolling and occasionally showing up on her. So basically I want to attempt at creating that. Does anyone know a code that is perhaps like this?

Offline Edolicious

  • Luck o' the Irish
  • Pack & Pride Representative
  • ****
  • Posts: 1,241
  • Country: us
  • Floof-O-Meter: 108
  • Luck O' the Irish
    • Edolicious
    • Edolicious
    • View Profile
Re: Preset Animation Code?
« Reply #1 on: October 27, 2015, 02:47:31 pm »
Codes

Moving Texture (Alo makes a Fixed Layer of Texture over a Moving Texture)

Quote
material preset_1_bodyL (This Code can use 2 Moving Textures)
{
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
{
texture Textur.png
tex_address_mode wrap
scroll_anim 0.0 0.1 (If you dont want that Texture to move, remove the scroll_anim 0.0 0.1)
filtering trilinear
}
texture_unit
{
texture Textur.png
tex_address_mode wrap
filtering trilinear
colour_op alpha_blend
scroll_anim 0.0 0.1 (<- play with the numbers. you will see the Moving Speed will change, and depending where you change the Number, it will also change moving direction)
}
}
}
}

Single Moving Texture:

material preset_1_bodyL
{
   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
         {
            texture Texture.jpg
            scroll_anim -0.02 -0.08 (Change Numbers for the Speed and Directiong of the Scrolling Texture)
            tex_address_mode wrap
            filtering trilinear
         }
      }
   }
}


If you want this Code to make your Preset having a Moving Texture under a fixed one, make it this way:

material preset_4_bodyMatL
{
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
{
texture PresteBody1.jpg (IMPORTANT for Texture being jpg! This one is the Moving one, cant be transparent!)
tex_address_mode wrap
filtering trilinear
colour_op replace
scroll_anim 0.0 0.1
}
texture_unit
{
texture PresetBody.png (IMPORTANT for Texture being png! This one is the fixed, not moving. Can be transparent also!)
tex_address_mode wrap
filtering trilinear
colour_op alpha_blend
}

}

}
}



Is this a code you could use?
It's an animation code, for moving textures, so I guess you could make error codes and use 'em with this.
I've also got the invisibility code, if you'd like certain parts of the preset to turn invisible, as if they ere loading, or something similar.

I'm not an expert on presets, so tell me if I'm wrong on this.

This thread is helpful in general: http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=5665.msg80079#msg80079
« Last Edit: October 27, 2015, 02:50:11 pm by ShadeyTeeth »
Sig by https://twitter.com/limesquares
Avatar by https://deviantart.com/atachi00
Always do the right thing, even if no one is watching.

Offline PrettyReckless

  • Elder Grey Pelt
  • ****
  • Posts: 3,285
  • Country: england
  • Floof-O-Meter: 218
    • RecklessAce
    • View Profile
Re: Preset Animation Code?
« Reply #2 on: October 27, 2015, 03:08:32 pm »
The code Tooth provided does indeed scroll. I found it a tad awkward to use but I suppose it is more for markings.
When I made my animated halloween head I used another code to simply make it fade.
Thus. All you need to do is make the precet files you want to use as "frames", like in an animated film.
Where it says "images here" is where you place the files.
Example "eye.png eye1.png eye2.png" and so on.
After you have done so, add a number to decide how fast you want the animation to move.

{
 technique
 {
  pass
  {
   scene_blend alpha_blend
   texture_unit
   {
    anim_texture (IMAGES HERE) (Insert number here)
   }
  }
 }
}
RETIRED.

Offline hugrf2

  • Purple Derple
  • Honored Hero
  • *****
  • Posts: 5,314
  • Country: us
  • Floof-O-Meter: 120
  • wrow
    • hugrf
    • channel/UChLphw5s3-hS8EFAgnNv6FQ
    • hugrf
    • hugrf
    • Ain't nobody got time fo' dat
    • View Profile
Re: Preset Animation Code?
« Reply #3 on: October 27, 2015, 04:44:47 pm »
Thank you you two, I really appreciate your help. I'll be sure to try them out when I start, which is soon but I need a screenshot of the guy's character first. (I'll likely get one tonight, though.)

But yes, once more thank you. ^^

Offline hugrf2

  • Purple Derple
  • Honored Hero
  • *****
  • Posts: 5,314
  • Country: us
  • Floof-O-Meter: 120
  • wrow
    • hugrf
    • channel/UChLphw5s3-hS8EFAgnNv6FQ
    • hugrf
    • hugrf
    • Ain't nobody got time fo' dat
    • View Profile
Re: Preset Animation Code?
« Reply #4 on: October 28, 2015, 01:55:57 am »
Apologies for double post, but I have to bump this thread because of this:

Coding seems all funky... I don't think it'll work like this, so perhaps you could present it in a different way? Sorry to bother you further.

Offline TullileIsHere

  • Finest Floof
  • ***
  • Posts: 751
  • Country: 00
  • Floof-O-Meter: 17
    • plonke
    • View Profile
Re: Preset Animation Code?
« Reply #5 on: October 28, 2015, 02:02:28 am »
Copy the following. Open up the preset code, highlight the already existing one, then press ctrl + v to paste over it. Don't worry about changing the font so it matches with the rest of the code, since it won't matter.
Replace the "scrolltexture" with the name of the texture you want animated. Make sure the texture is in your preset's folder, too. Also, change the main textures of your preset to .pngs instead of jpgs, so that it will be easier to work with. And make sure that the scrolling texture is a .png image!

material preset_1_bodyMatL
{
 technique
 {
  pass
  {
   texture_unit
   {
    texture scrolltexture.png
    scroll_anim 0.0 0.1
   }
  }
  pass
  {
   scene_blend alpha_blend
   texture_unit
   {
    texture preset_1Lbody.png
   }
  }
 }
}
material preset_1_bodyMatR
{
 technique
 {
  pass
  {
   texture_unit
   {
    texture scrolltexture.png
    scroll_anim 0.0 0.1
   }
  }
  pass
  {
   scene_blend alpha_blend
   texture_unit
   {
    texture preset_1Rbody.png
   }
  }
 }
}
Note: this is just for scrolling textures.
« Last Edit: October 28, 2015, 02:15:11 am by Tullile »

Offline PrettyReckless

  • Elder Grey Pelt
  • ****
  • Posts: 3,285
  • Country: england
  • Floof-O-Meter: 218
    • RecklessAce
    • View Profile
Re: Preset Animation Code?
« Reply #6 on: October 28, 2015, 02:08:54 am »
The code I provided you is one for multiple frames. Meaning you'd have to make several images and draw things on as the frames would move.. Imagine it like a gif compared to an image.
However. It does not scroll. But you could make the character "glitch" in the way of making it flash and go transparent etc.
RETIRED.

Offline hugrf2

  • Purple Derple
  • Honored Hero
  • *****
  • Posts: 5,314
  • Country: us
  • Floof-O-Meter: 120
  • wrow
    • hugrf
    • channel/UChLphw5s3-hS8EFAgnNv6FQ
    • hugrf
    • hugrf
    • Ain't nobody got time fo' dat
    • View Profile
Re: Preset Animation Code?
« Reply #7 on: October 28, 2015, 03:17:06 am »
Yeah, I know ^^' I just mean the code is showing up incorrectly. Look under "bodyMatR" in the image I provided. Is that normal exactly?

Offline PrettyReckless

  • Elder Grey Pelt
  • ****
  • Posts: 3,285
  • Country: england
  • Floof-O-Meter: 218
    • RecklessAce
    • View Profile
Re: Preset Animation Code?
« Reply #8 on: October 28, 2015, 04:37:26 am »
Did you replace "image here" and "number" with the files for the body? And a random number like 4. The number being the speed.
RETIRED.