Feral Heart

Help & Guidance => Game Help => Topic started by: Hydraulis on July 31, 2011, 11:26:41 pm

Title: Preset Help- Moving Textures?
Post by: Hydraulis on July 31, 2011, 11:26:41 pm
So, I wanted to make a preset with animation on the legs.
 I got all the frames done, and got a code for moving texture.
When I plugged in the 10 frame names and checked the preset on the Preset Maker, the whole body was white and didn't show the texture.

 Am I using the wrong code, or saving the frames in the wrong format (.png)? Or is having the .jpg and .riff copies in the same folder screwing it up? Please help.
Title: Re: Preset Help- Moving Textures?
Post by: Ruby1234 on July 31, 2011, 11:41:25 pm
I'd need to see the code, and tell me what format your image is saved in. ;)
Title: Re: Preset Help- Moving Textures?
Post by: Hydraulis on August 01, 2011, 12:18:24 pm
The code I used is here: http://feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=5665.0 (http://feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=5665.0)

The first code under "Using Different Textures, like a GIF."

I saved the files in .jpgs, but changed them to .pngs for use in the codes.
Title: Re: Preset Help- Moving Textures?
Post by: Ruby1234 on August 01, 2011, 12:47:55 pm
Okay, yes they should be .png files. Now, you got this:
Code: [Select]
material preset_9_eyeMatL
{
    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 Texture1.png Texture2.png Texture3.png 2.5 (the 2.5 is the Time the Texture is shown. The bigger the Time, the longer the Texture stays)
                tex_address_mode wrap
                filtering trilinear
                rotate_anim 0.00 (add a number if you want it to be scrolled)
            }
        }
    }
}
And changed the names to your images and got rid of the extra text, no?
Title: Re: Preset Help- Moving Textures?
Post by: Hydraulis on August 01, 2011, 05:44:57 pm
Yes I did. And maybe it's because all the animation part includes the whole body? Like, Y'know how when you're doing glowing marks, the glowing stuff has to be on a separate layer by itself... did I have to do that with the animation?
Title: Re: Preset Help- Moving Textures?
Post by: Ruby1234 on August 01, 2011, 08:23:30 pm
Yes, all need to be separate images. ;)
Title: Re: Preset Help- Moving Textures?
Post by: Hydraulis on August 02, 2011, 11:50:22 am
Oh, ok. Thanks! I'll reply again if it works.
Title: Re: Preset Help- Moving Textures?
Post by: Hydraulis on August 02, 2011, 12:40:26 pm
It didn't work. :\ The body is still pure white, like it's unfinished.

I made sure the animation part was separate with a transparent background, saved it as a .png, and made sure the code had the correct names. Maybe I'm using the wrong code?
Title: Re: Preset Help- Moving Textures?
Post by: Ruby1234 on August 02, 2011, 03:29:53 pm
Are you trying to just make the texture scroll/move?
Title: Re: Preset Help- Moving Textures?
Post by: Hydraulis on August 02, 2011, 10:11:53 pm
Yeah. I want a little 10-frame animation on just the legs, nothing else moving. And I don't want it scrolling.
Title: Re: Preset Help- Moving Textures?
Post by: Ruby1234 on August 02, 2011, 10:52:43 pm
Ah, okay. Try this code:
Code: [Select]
material preset_(FOLDER NUMBER)_tailMat
{
technique
{
pass
{
texture_unit
{
animtexture IMAGENAMEHERE.png IMAGENAMEHERE.png 1
}
}
}
}
Change IMAGENAMEHERE.png to your image's names. (And yes, you can add more.) Then change the 1 to how many seconds before it switches to the next image.
Title: Re: Preset Help- Moving Textures?
Post by: Hydraulis on August 03, 2011, 08:09:14 pm
Ok, I'll try it once I can get on my desktop. I'll reply again to say if it works or not.
Title: Re: Preset Help- Moving Textures?
Post by: Hydraulis on August 04, 2011, 12:24:03 am
Again, it didn't work. This time, the preset number didn't even show up in the Maker. Here is the code I used:

material preset_7_BodyMat
{
   technique
   {
      pass
      {
         texture_unit
         {
            animtexture preset_7body1.png preset_7body2.png 1
         }
      }
   }
}

Is there something I'm doing wrong? Maybe the animated part isn't supposed to be on a transparent background...?
Title: Re: Preset Help- Moving Textures?
Post by: Ruby1234 on August 04, 2011, 05:15:04 am
All of them need to be flat images, no layers.
Title: Re: Preset Help- Moving Textures?
Post by: Toxikk on August 04, 2011, 02:03:13 pm
Check out the administrator "Tigg"'s tutorial or her presets. c:
Look in the tutorial section for more if her's doesn't help. If all fails, just tell me.
Title: Re: Preset Help- Moving Textures?
Post by: Ruby1234 on August 04, 2011, 03:35:13 pm
They were using Tigg's thread.
Title: Re: Preset Help- Moving Textures?
Post by: Hydraulis on August 04, 2011, 07:56:37 pm
They're all flat images; I made sure of that. But the number 7, the preset I'm using for this, isn't showing up in the Preset Maker so I can't see if anything's working. How do I get it back?

And Coony, what tutorial? Can you link me?
Title: Re: Preset Help- Moving Textures?
Post by: Thunderheart on August 05, 2011, 02:22:44 pm
If the preset doesn't show up ingame, there must be something wrong with the mat code names.
In the code you posted at last you forgot the side the mat should be on; left or right. If you want both sides to show the same mat, just copy the code for one side and rename it for the other side. Hope this is understandable, I confused myself with it...
Title: Re: Preset Help- Moving Textures?
Post by: Hydraulis on August 08, 2011, 12:43:34 pm
I know what you mean, Thunder. I changed it. xD
Buuuut I think I've found the real source of the problem: I think You gave me the wrong code, Ruby. ^^' Well, that or I didn't specify well enough what I was trying to do. Let me explain it like this: I'm trying to get an animated texture (with transparency) over a solid texture.
Title: Re: Preset Help- Moving Textures?
Post by: Ruby1234 on August 08, 2011, 03:40:14 pm
Oh, now I see. You want a layered preset... okay. Lemme find my code.

-Edit-
Lol, sorry for derpin' xD
Try this one.
Code: [Select]
material preset_7_bodyMatL
{
receive_shadows on
technique
{
pass
{
texture_unit
{
texture (base layer here)
scale 1 1
}
texture_unit
{
texture (mask layer here)
colour_op alpha_blend
}
texture_unit
{
anim_texture (textures you want to be animated here) 1
colour_op_ex blend_current_alpha src_texture src_current
tex_address_mode wrap
filtering trilinear
}
}
}
}
Now let me explain this.
"base layer here" Is where the main texture goes. The texture of your lion/wolf's body, legs colored, everything colored.
"mask layer here" is where you put a transparent image with just the legs colored in white. (The area colored in white will be where the animation is.)
"textures you want to be animated here" is where you name all the textures for the animation. And that 1 tells you how long until it switches frames.

Okay, provided I understand what you want, that should work.
Title: Re: Preset Help- Moving Textures?
Post by: Hydraulis on August 09, 2011, 10:34:06 pm
Ok, so... for the mask layer. I color the area where the animation will be, in this case the legs, in white? And it won't be white when I look at the preset, right?
Title: Re: Preset Help- Moving Textures?
Post by: Hydraulis on August 28, 2011, 09:02:55 pm
It worked! Thanks for the code. But there's one final problem... (Epicsigh)
The mask layer. It makes it so that you can't see the fur texture under it... so it's the color of my preset but with no texture. Is there a way to fix that?
Title: Re: Preset Help- Moving Textures?
Post by: Toxikk on September 05, 2011, 02:32:25 pm
Make sure that the layer you drew the fur on is transparent. ;)
Title: Re: Preset Help- Moving Textures?
Post by: rianE909 on September 03, 2012, 05:04:51 pm
Would it work if you used scroll_anim?