Author Topic: Preset Texture Help  (Read 808 times)

Offline StarWarsWolf7

  • Experienced Traveler
  • **
  • Posts: 136
  • Country: 00
  • Floof-O-Meter: 8
    • View Profile
Preset Texture Help
« on: January 18, 2020, 10:45:19 pm »
Hello! Trying to achieve a certain effect with my preset has left me quite puzzled. I've drawn a necklace onto my character that I want to be iridescent/shimmery. I've messed around with coding a bit, but instead of just making the necklace iridescent, her whole body ends up getting a rainbow shimmer/oil slick effect. That, or no effect is visible at all.

Does anyone know how to isolate the texture so it's just on her necklace/wherever I want it, instead of covering her whole body? I'd really appreciate it!

This is the code I was attempting to mess with. I know dealing with textures on presets is all about layering, but I'm just not 100% sure on how to successfully pull that off lol!
Code: [Select]
material preset_1_bodyMatL
{
 technique
 {
  pass
  {
   texture_unit
   {
    texture preset_1body.png
   }
  }
  pass
  {
   ambient 0.5 0.5 0.5
   diffuse 1.0 1.0 1.0 0.5
   scene_blend alpha_blend
   texture_unit
   {
    env_map spherical
    texture Rainbow.png
   }
  }
 }
}

Offline LadySigyn

  • Let me guess... someone stole your sweetroll?
  • Moderator
  • Community Champion
  • *****
  • Posts: 2,197
  • Country: au
  • Floof-O-Meter: 105
    • View Profile
Re: Preset Texture Help
« Reply #1 on: January 19, 2020, 05:36:13 am »
No way am I an expert in preset making, but I did a little digging and found this. It's for making a marking (such as the necklace you're implementing into the preset a metallic/iridescent.

Hey, just spent a while fighting with this thing so I thought I'd spare the rest of you the trouble... This is for metallic markings under a normal, partially transparent texture.

Quote
material preset_1_headMatL
{
   technique
   {

      pass
      {
         texture_unit
         {
            texture Metal.jpg (This is where your solid, metallic texture goes, no transparency)
            tex_address_mode wrap
            filtering trilinear
            colour_op replace
            env_map spherical
         }
         texture_unit
         {
            texture preset1_head.png (This is your main preset, should be transparent where you want the markings)
            tex_address_mode wrap
            filtering trilinear
            colour_op alpha_blend
         }

      }

   }

}

TJust make a copy of your body texture (and name them something along the lines of 'preset_bodyLeft.jpg' and 'preset_bodyRight.png')and make the leg you want transparent. Then put both in the preset folder you're using and type the names into the .material accordingly. You only need to put the transparency code into the side the missing leg is on.

I also found these threads

Preset Tips and Scripts || Updated with Iridescence by Lucius
Mo'Material Codes : |Shading | Lighting | Shine | by Slycan
Scripts! Moving Tex, Transparent, Glowy, Metallic and more! by Tigg

Hope these are helpful! Good luck with your preset making.

Offline Kuri

  • Immortal Legend
  • *****
  • Posts: 8,168
  • Country: nz
  • Floof-O-Meter: 136
  • Foreboding evil harmless kitten.
    • dumbstuff4friends
    • channel/UCo42jgbLvEzkofpOin0_a4A
    • View Profile
Re: Preset Texture Help
« Reply #2 on: January 19, 2020, 08:39:10 am »
You need a mask layer.  The mask layer should probably be a .png with transparency where you don't want the shine, and alpha_rejection 128 or something.


For some reason i didn't use the alpha rejection code here but you'll see the 'buckles' image is drawn with a transparency, this acts as both the texture & the mask.   The "dirty metal sheen" image is the 'oil slick shine' effect on top.

This is how i do it, putting the metal on top.
« Last Edit: January 19, 2020, 08:44:57 am by Kuri »
The Japanese concept of wabisabi:
The closest concept in english would be 'rustic'
They might have an old thing, one example is a favourite bowl or dish, it's broken, pieces are missing, why fix it?  With gold and pieces from other dishes?
"Because it was my favourite & I like it"