Author Topic: Billboards help?  (Read 1300 times)

Offline Flamesparky

  • Dedicated Supporter
  • ***
  • Posts: 340
  • Floof-O-Meter: 8
  • Sweet dreams everyone <3
    • View Profile
Billboards help?
« on: December 04, 2014, 12:24:46 pm »
Well, title says everything. I need billboard help. I want to make stars for my map, but when I try it always look like this:


What I did wrong? I typed this:
material BlueStar
{
   technique
   {
      pass
      {
         ambient 0.588235 0.588235 0.588235 1
         diffuse 0.588235 0.588235 0.588235 1
         specular 0 0 0 10 0

         texture_unit
         {
            texture BStar.png
         }
      }

   }
}

I tried whit .jpg to.
Please help!
My Presets :)

Avatar and Sigy by me :)
Being less active until school wont finish.
In-Game: FlameSparky
DA: FlameSparky
YT: FeralHeartersTeam

Offline Redlinelies

  • The FeralHeart Guru
  • Immortal Legend
  • *****
  • Posts: 7,077
  • Country: 00
  • Floof-O-Meter: 792
  • Modoru Pride
    • redlinelies
    • redlinelies
    • redlinelies
    • redlinelies
    • View Profile
Re: Billboards help?
« Reply #1 on: December 04, 2014, 03:32:42 pm »
Jpeg images(.jpg) doesn't really support or work with transparency that I believe you're looking for?

What you need to do is to make the images use something like .png format, make sure it has transparency before saving it, and then adding a code in the material file for alpha rejection.

Try some thing like:
alpha_rejection greater_equal 128

By adding it into the code like this:
Code: [Select]
material BlueStar
{
   technique
   {
      pass
      {
         ambient 0.588235 0.588235 0.588235 1
         diffuse 0.588235 0.588235 0.588235 1
         specular 0 0 0 10 0

alpha_rejection greater_equal 128

         texture_unit
         {
            texture BStar.png
         }
      }

   }
}

Now I usually don't diddle around with materials, but I believe it's what you're missing since grass and other stuff use this too. You might need to modify the value of the alpha rejection to suit your needs however, and make sure the source image actually has transparency in it.
Former community manager of FeralHeart

Offline Flamesparky

  • Dedicated Supporter
  • ***
  • Posts: 340
  • Floof-O-Meter: 8
  • Sweet dreams everyone <3
    • View Profile
Re: Billboards help?
« Reply #2 on: December 04, 2014, 03:44:52 pm »
Thx very much! Now it works!

<3
My Presets :)

Avatar and Sigy by me :)
Being less active until school wont finish.
In-Game: FlameSparky
DA: FlameSparky
YT: FeralHeartersTeam

Offline Canon

  • Dedicated Supporter
  • ***
  • Posts: 348
  • Country: 00
  • Floof-O-Meter: 4
  • (????)? ? ???
    • View Profile
    • My DeviantART
Re: Billboards help?
« Reply #3 on: December 04, 2014, 07:05:52 pm »
I bet the stars looks awesome now when it works! ouo


DeviantART: CreepyCanon - Youtube: Ken the Derp

Offline Flamesparky

  • Dedicated Supporter
  • ***
  • Posts: 340
  • Floof-O-Meter: 8
  • Sweet dreams everyone <3
    • View Profile
Re: Billboards help?
« Reply #4 on: December 04, 2014, 08:10:54 pm »
Yes they does :)
My Presets :)

Avatar and Sigy by me :)
Being less active until school wont finish.
In-Game: FlameSparky
DA: FlameSparky
YT: FeralHeartersTeam