Author Topic: Scripts! Moving Tex, Transparent, Glowy, Metallic and more!  (Read 96446 times)

Offline Tigg

  • Immortal Legend
  • *****
  • Posts: I am a geek!!
  • Country: at
  • Floof-O-Meter: 0
  • Your right hand on 3D-Meshes
    • t-i-g-g
    • channel/UCKuFJTwBJf94Tq07oVBNMrA
    • 76561198118876593
    • TiggDarkfury
    • View Profile
    • Isla Thanatos Gameserver
Scripts! Moving Tex, Transparent, Glowy, Metallic and more!
« on: April 25, 2011, 12:27:25 pm »
I will start soon a an Archieve with Scripts for your Presets.

But i want YOUR Help on this!

If you have a Code like Transparent-Texture, Moving Texture or what ever exists, write me a PM and i will insert the Code here so everyone can improove their Presets / Meshes with stunning Codes!

The Second Thread will be updated with the Codes, check every now and then.


Do NOT post the Codes in here! But feel free to write any Suggestions or Requests for Codes in here :)



Wanna learn more about Codings and share with us? Look here: http://www.ogre3d.org/docs/manual/manual_14.html

« Last Edit: June 23, 2012, 02:07:08 pm by Tigg »

Offline Tigg

  • Immortal Legend
  • *****
  • Posts: I am a geek!!
  • Country: at
  • Floof-O-Meter: 0
  • Your right hand on 3D-Meshes
    • t-i-g-g
    • channel/UCKuFJTwBJf94Tq07oVBNMrA
    • 76561198118876593
    • TiggDarkfury
    • View Profile
    • Isla Thanatos Gameserver
The Coding Archieve for Presets / Meshes.
« Reply #1 on: April 25, 2011, 12:28:26 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
}

}

}
}



Super Shiney Glow

Texture must be jpg, best working Color of the Marking is white, Background should be grey or black (no transparency), test other colors if you want ;)

Quote
material preset_4_bodyMatL
{
receive_shadows on
technique 1
{
pass
{
fragment_program_ref WingModColour_PS
{
param_named colorMod1 float4 0.50 0.50 0.75 0.25
}
texture_unit
{
texture Texture.jpg
tex_coord_set 0
}
cull_hardware none
cull_software none
depth_write off
scene_blend add
}
}
technique 2
{
pass
{
emissive 1.0 1.0 1.0 1.0
texture_unit
{
Texture.jpg
colour_op_ex modulate src_texture src_manual 0.105 0.175 0.135 0.25
}
cull_hardware none
cull_software none
depth_write off
scene_blend add
}
}
}

You can also test this Code, Same Effects (Background should be grey AND transparent):

material preset_4_bodyMatL
{
   receive_shadows off
   technique
   {
      pass
      {
         ambient 0 0 0 0
         diffuse 0 0 0 0
         specular 0 0 0 0
         emissive 1 1 1 1
         scene_blend add
         fog_override true
         depth_write off
         //cull_hardware none
         //cull_software none
         texture_unit
         {
            texture Texture.png
            tex_address_mode wrap
            filtering trilinear
         }
      }
   }
}

Semi Transparent Texture on completle Invisible

Quote
material preset_4_bodyMatL
{
    receive_shadows on
    technique
    {
        pass
        {
            scene_blend alpha_blend
            fog_override true
            ambient 1.000000 1.000000 1.000000 1.000000
            diffuse 1.000000 1.000000 1.000000 1.000000
            specular 0.050000 0.050000 0.050000 1.000000
            emissive 0.000000 0.000000 0.000000 1.000000
            alpha_rejection greater_equal 128
            cull_hardware none
            cull_software none
            texture_unit
            {
                texture Texture.png (make your texture slightly trasparent, the rest no texture at all)
                tex_address_mode wrap
                filtering trilinear
            }
        }
    }
}

Transparent Texture with Solidtexture combined (Draw Solid and Transparent on the Texture)

Quote
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.050000 0.050000 0.050000 1.000000 12.500000
emissive 0.000000 0.000000 0.000000 1.000000
cull_hardware none
cull_software none
alpha_rejection greater_equal 128
scene_blend alpha_blend
texture_unit
{
texture Texture.png
tex_address_mode wrap
filtering trilinear
}
}
}
}

Using Different Textures, like a GIF. ( You have to draw it like a movie-frame, single pieces)

Quote

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)
            }
        }
    }
}


Want a Animated Texture under a Solid one? Take this:

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
            {
                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 (if you want it to scroll, add a number instead a 0)
            }
        }
        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
            scene_blend alpha_blend
            texture_unit
            {
                texture Texture.png (This is a Texture where you should leave invisible/transparent parts, so the Animated texture can show up under it)
                tex_address_mode wrap
                filtering anisotropic
      max_anisotropy 16
            }
        }
    }
}

Twosidet Texture (Have a Flat Plain Mesh? Then you can put a Texture at the Topside, and another at the Bottom. For a Body Mesh it turns you lay the TExture outside the Body, and the Second on the Inside)

Quote
material preset_4_bodyMatL
{
   receive_shadows off
   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
         cull_hardware none
         cull_software none
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture BottomTexture.png
            tex_address_mode wrap
            filtering trilinear
         }
      }
      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
         alpha_rejection greater_equal 128
         texture_unit
         {
            texture TopsideTexture.png
            tex_address_mode wrap
            filtering trilinear
         }
      }
   }
}

Transparent Texture Vanishing to be completely invisible and comming back!


Quote
material preset_4_bodyMatL
{
   technique
   {
      pass
      {
      lighting off
      scene_blend colour_blend
      depth_write off
      cull_hardware none
      cull_software none
         texture_unit
         {
           texture InvisibleTex.png
           tex_address_mode wrap
           filtering trilinear
         }
         texture_unit
         {
            texture TransparentMarkingTex.png
      scroll_anim 0.01 0.02
      tex_address_mode wrap
      rotate_anim -0.01
      wave_xform scale_x sine 3 0.1 0 3
      wave_xform scale_y sine 3 0.1 0 3           
            colour_op alpha_blend
         }
         texture_unit
         {
            texture InvisibleTex.png
            colour_op_ex blend_current_alpha src_texture src_current
         }
      }
   }
}


Waving Textures. Most likely work best on plain flat meshes, not too much on presets.

Quote
material acaciaLeafMat
{
   technique
   {
      pass
      {
         ambient 0.75 0.75 0.75 1
         diffuse 0.1 0.1 0.1 1
         cull_hardware none
         cull_software none
         alpha_rejection greater_equal 64
         texture_unit
         {
            texture acaciaLeaf.jpg
                          tex_address_mode clamp
                      wave_xform scroll_x sine -0.15 0.17 0.0 0.02
                           wave_xform rotate sine -0.05 0.17 0.0 0.007
         }
      }
   }
}



Transparent Textures
http://feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=5656.0

Metallic Texture
http://feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=5676.0

Quote
material preset_9_bodyMatL
{
   technique
   {
      pass
      {
         ambient 0.8 0.9 0.9
         specular 1.0 1.0 1.0 128
         texture_unit
         {
            texture Metal.jpg
            env_map spherical
         }
      }
   }
}

Glowing Texture
http://feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=4246.0

Another Thread with usefull Codings and Help for Scripts/Codes/Materials.
http://feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=6078.0
« Last Edit: June 20, 2017, 05:14:54 pm by Tigg »

Hiccupby

  • Guest
fluffy mane custom texture fix perhaps? (I want my curly mane bob saggit!)

slycan

  • Guest
@Higby
transparent code + fmaneMask2.png in media>textures

Hiccupby

  • Guest
oooh I was missing the transparent code XD that was it! haha I'm dumb- thanks

Hiccupby

  • Guest
nah it still doesn't work- probably because of my customized shape of the hairs :(

Offline Tigg

  • Immortal Legend
  • *****
  • Posts: I am a geek!!
  • Country: at
  • Floof-O-Meter: 0
  • Your right hand on 3D-Meshes
    • t-i-g-g
    • channel/UCKuFJTwBJf94Tq07oVBNMrA
    • 76561198118876593
    • TiggDarkfury
    • View Profile
    • Isla Thanatos Gameserver
nah it still doesn't work- probably because of my customized shape of the hairs :(

Presets with the Fluff-Mane dont work, no matter what code or Texture. I already tried everything out, Texture plus different codings, this is a error in the Gamecoding, needs to get fixed by Kov thou.

Hiccupby

  • Guest
oooooooh ok then I shall wait for the fixing of the error then

Offline Ouuka

  • Ramine's Nuudel
  • Community Champion
  • ****
  • Posts: 1,870
  • Country: ca
  • Floof-O-Meter: 76
  • Burp
    • Blue-Rakuen
    • SliferBeau
    • View Profile
    • Blue-Rakuen DA
How can u have Moving texture, and then some markings as well on body that dont move :3 ive been trying to work on doing it myself but im lousy at codes

Offline DimensionGal

  • The Poison Dragon's Tainted Lily
  • Finest Floof
  • ***
  • Posts: 653
  • Floof-O-Meter: 80
  • aka Kerrigan the Mapmaker
    • View Profile
    • My Deviant Art page
@ Missy - You need different layers for each effect you want, each saved as a different .png. Depending on what you want, the non-moving markings would almost always need to be at the top of the layer list.
?Mapmaker serving 16,700+ Feral Heart users?