Feral Heart

FeralHeart Creations => FeralHeart Addons & Mods => Presets & Markings => Topic started by: Sullivan on April 25, 2011, 06:10:07 pm

Title: Metallic Code for Presets
Post by: Sullivan on April 25, 2011, 06:10:07 pm
also works great for objects :]

(http://i591.photobucket.com/albums/ss356/sullivan1111/silversurfer.png)

you too can look like the Silver Surfer, easy peezy.

step one
Get a texture... it can be actual photo of metal (i got this one from cgtextures.com) or it can be anything, even a flat color looks ok if you want a super Terminator 2 type look lol...
Save the texture in your preset folder, i used "preset_9" so i'll be using that in the code but if you use a different folder, make sure to put in the proper number into the code.

step two
paste this code into your material file:
Code: [Select]
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
}
}
}
}
material preset_9_bodyMatR
{
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
}
}
}
}
material preset_9_headMatL
{
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
}
}
}
}
material preset_9_headMatR
{
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
}
}
}
}
material preset_9_eyeMatL
{
technique
{
pass
{
ambient 0.8 0.9 0.9
specular 1.0 1.0 1.0 128
cull_hardware none
cull_software none
texture_unit
{
texture Metal.jpg
env_map spherical
}
}
}
}
material preset_9_eyeMatR
{
technique
{
pass
{
ambient 0.8 0.9 0.9
specular 1.0 1.0 1.0 128
cull_hardware none
cull_software none
texture_unit
{
texture Metal.jpg
env_map spherical
}
}
}
}
material preset_9_tailMat
{
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
}
}
}
}
material preset_9_maneMat
{
technique
{
pass
{
ambient 0.8 0.9 0.9
specular 1.0 1.0 1.0 128
lighting off
cull_hardware none
cull_software none
scene_blend alpha_blend
depth_write off
texture_unit
{
texture Metal.jpg
env_map spherical
}
}
}
}

like i said, change the numbers to the appropriate one for your preset number.

in this code "Metal.jpg" should be replaced with whatever the file name of your metal texture is (or you can simply rename your texture "Metal.jpg" and you won't have to change the code)

step three
continue like any other preset creation! go to the preset maker and load up "preset 9" (or whatever number) and see if you like how it looks! if you don't, there are some ways to fix it...

- looks weird? try a different texture. on my first attempt i used a texture with tons of detail in it and it looked weird, try something simple. i also highly recommend using a texture that has a lot of shine in it so it looks really reflective, but hey there are tons of different textures to try--- experiment!

- looks too yellow? too blue? too whatever? try editing the code. find the "ambient 0.8 0.9 0.9" part of the code and plug in some different numbers (between 0.0 and 1.0).

- only want the metallic texture in one part of the body? then you'll only want to paste that area's code into your material file (ie: everything under "material preset_9_tailMat" for the tail, but nothing else)

done!
experiment with it and see if you can come up with some cool effects :] if you figure anything neat out, i hope you'll share it in this thread so others can try it out.

IMPORTANT:
this code does NOT actually make your preset reflective, it just gives it a metallic look... it won't make your body into a mirror that shows the environment around you. i have no idea how to do that haha...

tada :U
Title: Re: Metallic Code for Presets
Post by: Avani on April 25, 2011, 06:15:18 pm
oOooo Awesome! 0:
Must try! >:3

Thanks for posting <3
: D
Title: Re: Metallic Code for Presets
Post by: JazzForLife on April 27, 2011, 08:23:36 pm
LOL this is so cool! Very epic preset!
Title: Re: Metallic Code for Presets
Post by: Liekos on April 29, 2011, 12:29:07 pm
Wow! this looks epic xD
Title: Re: Metallic Code for Presets
Post by: GemWolf on May 02, 2011, 09:57:57 pm
 Oooh.. I wonder if there is a code that makes it reflective.. but anyway, I'm gonna try this. xP
Title: Re: Metallic Code for Presets
Post by: Zodiac on May 03, 2011, 12:43:29 am
Ooooooh it's silvery <3
Title: Re: Metallic Code for Presets
Post by: Grypwolf on May 03, 2011, 04:46:42 am
Hey! thanks sully :D I loved mane texture you made in feralistic 3 ^^
Title: Re: Metallic Code for Presets
Post by: TeddyLover on November 09, 2011, 08:13:36 pm
Oh wow, thanks for the code! I've already made a character, a simple one haha.

However I have a question: Is it possible to have multiple textures on a certain body part? Like for example, blue legs on a black body.  I tried and failed; is there something I'm missing or is it impossible? Thank you for any answers~

[-new to fancy preset things hurr-]
Title: Re: Metallic Code for Presets
Post by: SilverTW on February 27, 2012, 12:15:30 am
Look what I made with it!

(http://fc01.deviantart.net/fs70/i/2012/057/3/f/metal_preset_by_rashanon-d4r3jjb.png)
Is what I made with this script!
and download is here: http://www.deviantart.com/download/287379623/metal_preset_by_rashanon-d4r3jjb.zip (http://www.deviantart.com/download/287379623/metal_preset_by_rashanon-d4r3jjb.zip)
Title: Re: Metallic Code for Presets
Post by: imtoots2 on March 24, 2012, 05:22:36 pm
Thanks! I loves meh preset. Thanks again <3
Title: Re: Metallic Code for Presets
Post by: SteampunkWolfdog on December 13, 2012, 12:24:16 pm
Is it possible to make this work for just the markings on a preset rather than the whole body?
Title: Re: Metallic Code for Presets
Post by: Wolflover87 on December 15, 2012, 01:30:16 am
 I love this idea Sully! Indeed a great code for presets! ^_^
Title: Re: Metallic Code for Presets
Post by: SenseiRei on November 26, 2017, 06:34:07 am
okay. for the metallic Script. I want to make it metallic for the teeth, but not the eyes
Title: Re: Metallic Code for Presets
Post by: FlyingGrass on November 26, 2017, 08:00:49 am
okay. for the metallic Script. I want to make it metallic for the teeth, but not the eyes
Please don't necro old threads.

To make only the teeth shiny, you'll need to put the teeth(And only the teeth) on a different layer, then add the metallic code to the layer with the teeth.
Here's code that'll help you with layers:
Click button to see code
Code: [Select]
material preset_1_eyeMatL
{
 technique
 {
  pass
  {
     ambient 0.2 0.2 0.2 1.0
     diffuse 1.000000 1.000000 1.000000 1.000000
     specular 0.100 0.100 0.100 4
     emissive 0.000000 0.000000 0.000000 1.000000
     cull_hardware none
     cull_software none
     scene_blend alpha_blend
     alpha_rejection greater_equal 120
     texture_unit
    {
     texture EyeTexture.png
     env_map spherical
    }
   }
  pass
  {
     ambient 0.8 0.9 0.9
     specular 1.0 1.0 1.0 128
     emissive 1.0 1.0 1.0
     cull_hardware none
     cull_software none
     scene_blend alpha_blend
     alpha_rejection greater_equal 120
     texture_unit
   {
    texture OnlyTeeth.png
    env_map spherical
   }
 }
  }
}
Title: Re: Metallic Code for Presets
Post by: SenseiRei on November 26, 2017, 08:18:02 pm
okay. for the metallic Script. I want to make it metallic for the teeth, but not the eyes
Please don't necro old threads.

To make only the teeth shiny, you'll need to put the teeth(And only the teeth) on a different layer, then add the metallic code to the layer with the teeth.
Here's code that'll help you with layers:
Click button to see code
Code: [Select]
material preset_1_eyeMatL
{
 technique
 {
  pass
  {
     ambient 0.2 0.2 0.2 1.0
     diffuse 1.000000 1.000000 1.000000 1.000000
     specular 0.100 0.100 0.100 4
     emissive 0.000000 0.000000 0.000000 1.000000
     cull_hardware none
     cull_software none
     scene_blend alpha_blend
     alpha_rejection greater_equal 120
     texture_unit
    {
     texture EyeTexture.png
     env_map spherical
    }
   }
  pass
  {
     ambient 0.8 0.9 0.9
     specular 1.0 1.0 1.0 128
     emissive 1.0 1.0 1.0
     cull_hardware none
     cull_software none
     scene_blend alpha_blend
     alpha_rejection greater_equal 120
     texture_unit
   {
    texture OnlyTeeth.png
    env_map spherical
   }
 }
  }
}

Okay, i figured it out. that second row wasn't the right code, instead i used a transparency code
Title: Re: Metallic Code for Presets
Post by: SenseiRei on November 26, 2017, 08:44:05 pm
Heres the repaired code.
Click button to see code
Code: [Select]
material preset_#_eyeMat
{
 technique
 {
  pass
  {
     ambient 0.2 0.2 0.2 1.0
     diffuse 1.000000 1.000000 1.000000 1.000000
     specular 0.100 0.100 0.100 4
     emissive 0.000000 0.000000 0.000000 1.000000
     cull_hardware none
     cull_software none
     scene_blend alpha_blend
     alpha_rejection greater_equal 120
     texture_unit
    {
     texture MetalTexture.png
     env_map spherical
    }

   }
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 EyeTexture.png
tex_address_mode wrap
filtering trilinear
}
   }
 }
  }
}