Author Topic: Scrolling mane (Transparent tips)  (Read 1994 times)

Offline SoftMoon

  • Experienced Traveler
  • **
  • Posts: 235
  • Country: fr
  • Floof-O-Meter: 46
    • https://missdiealot.deviantart.c
    • https://twitter.com/diealotmiss
    • View Profile
Scrolling mane (Transparent tips)
« on: April 17, 2015, 10:21:49 pm »
Hello floofs!
Here I have an issue with a requested preset..
I need to give the preset's a scrolling mane, wich isn't much of a problem.
But I want the tip of the mane to be transparent (A normal mane, just like the default ones).
But.. It doesn't want to be the way I want.

The tips are basically squares etc.
Here is my current code:
Code: [Select]
material preset_2_maneMat
{
 technique
 {
  pass
  {
   cull_hardware none
   cull_software none
   alpha_rejection greater_equal 128
   texture_unit
   {
    texture preset_2scroll.png
    scroll_anim 1.0 1.0
   }
  }
 }
I have a transparent texture (preset_2mane)
And the scrolling texture (preset_2scroll)

Help would be greatly appreciated.
Regards,
Softie.
« Last Edit: April 24, 2015, 06:18:12 am by Softie »
Ingame username~ SoftMoon

Offline SoftMoon

  • Experienced Traveler
  • **
  • Posts: 235
  • Country: fr
  • Floof-O-Meter: 46
    • https://missdiealot.deviantart.c
    • https://twitter.com/diealotmiss
    • View Profile
Re: Scrolling mane (Transparent tips)
« Reply #1 on: April 18, 2015, 07:05:42 am »
Bump? Anyone?
Ingame username~ SoftMoon

Offline ObsidianBlade

  • Curious Wanderer
  • *
  • Posts: 16
  • Country: 00
  • Floof-O-Meter: 1
    • View Profile
Re: Scrolling mane (Transparent tips)
« Reply #2 on: April 24, 2015, 02:19:04 am »
The scrolling fills in the transparency, and you can't achieve both transparency and scrolling together through conventional means. If you place a very translucent scrolling image or texture on top of a solid base with some transparent areas, you can still make it appear as if there are transparent areas while the rest of the preset appears to be scrolling. Though in the case of the preset you're making, I don't think this will work well, as your scroll image appears to be multicolored. It works better if the scrolling image is the same color of the base, only slightly lighter or darker - so you can make it as transparent as possible (so it's unnoticable when it scrolls over the transparent areas), with still showing up on the 'base'. The coding I used looked like this (With the 'wings.png' being the solid base with some transparent areas, and 'fire1.png' being the scrolling image ontop of it):
material preset_4_equipMatL
{
   technique
   {
      pass
      {
                        alpha_rejection greater_equal 128
                        ambient 0.5 0.5 0.5 1.0
         texture_unit
         {
            texture wing.png
         }
      }
                pass
                {
                         scene_blend alpha_blend
                         texture_unit
                         {
                                 texture fire1.png
                                 scroll_anim 0.2 0.2
                         }
                }
   }
}

Hopefully that helps, sorry if it's a little confusing.