Author Topic: Moving texture question  (Read 1440 times)

Offline Cecilia~

  • Dedicated Supporter
  • ***
  • Posts: 441
  • Country: 00
  • Floof-O-Meter: 20
  • wwww
    • View Profile
Moving texture question
« on: August 10, 2012, 02:38:33 am »
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
}

}

}
}





I just need a simple answer. How exactly does this work? Would i make a section of the base texture (the fur and stuff) transparent, and the moving texture would replace that..? Or.. how does this work? lol, I know it's a noob question, but I just don't really understand.
i dont know anything ever at any time

Offline Nowe

  • Experienced Traveler
  • **
  • Posts: 190
  • Country: 00
  • Floof-O-Meter: 23
  • Turn forever Hand in Hand~
    • View Profile
    • Impressive Elements
Re: Moving texture question
« Reply #1 on: August 10, 2012, 02:48:36 am »
. And this is should be in Help section I could be wrong. And dont feel noobish. If no one teaches how can One learn?

Explanation:

Ok ill try to explain as best I can.

See this image?


The Black parts are actually transparent.

See this one?


This is the second part of the image that uses that exact code to get a Rave zebra with moving texture.

The Erased part of the first image will be wear the moving animated image such as the rainbow will show. Since the Zebras striped are ereased the rainbow image will appear only in the erased spaces and the colors and such will move.

material RaveHorseMat
{
   receive_shadows on
   technique
   {
      pass
      {
         texture_unit
         {
            texture nightmareTex5.png   <---The Image with transparent parts goes here
            env_map spherical
            scroll_anim 1.1 -1.1
            scale 1 1
         }
         texture_unit
         {
            texture nightmareTex6.png  <---image that shows up underneath
            colour_op alpha_blend
         }
         texture_unit
         {
            texture nightmareTex6.png   <----Image wanting to show up underneath
            colour_op_ex blend_current_alpha src_texture src_current
            tex_address_mode wrap
            filtering trilinear
         }
      }
   }
}
« Last Edit: August 10, 2012, 02:56:59 am by Nowe »

Offline Cecilia~

  • Dedicated Supporter
  • ***
  • Posts: 441
  • Country: 00
  • Floof-O-Meter: 20
  • wwww
    • View Profile
Re: Moving texture question
« Reply #2 on: August 10, 2012, 02:50:43 am »
Oh ok. Sorry. I thought maybe since its preset related it would go here. But any help is appreciated ^^
i dont know anything ever at any time

Offline Cecilia~

  • Dedicated Supporter
  • ***
  • Posts: 441
  • Country: 00
  • Floof-O-Meter: 20
  • wwww
    • View Profile
Re: Moving texture question
« Reply #3 on: August 10, 2012, 02:56:26 am »
Ah ok! Thanks so much for explaining! I guess I was right after all haha. So transparency on the base image = where the moving will go.. Alright, i got it now :)
i dont know anything ever at any time

Offline Nowe

  • Experienced Traveler
  • **
  • Posts: 190
  • Country: 00
  • Floof-O-Meter: 23
  • Turn forever Hand in Hand~
    • View Profile
    • Impressive Elements
Re: Moving texture question
« Reply #4 on: August 10, 2012, 02:57:30 am »
Ah ok! Thanks so much for explaining! I guess I was right after all haha. So transparency on the base image = where the moving will go.. Alright, i got it now :)

If you need anymore help with this feel free to Pm me.