CodesMoving Texture (Alo makes a Fixed Layer of Texture over a Moving Texture)
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 GlowTexture 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
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
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)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)
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)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!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.
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.0Metallic Texture
http://feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=5676.0material 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.0Another 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