Feral Heart

Help & Guidance => Game Help => Topic started by: PayThePiedPiper on January 09, 2015, 07:28:59 pm

Title: Making an object partially transparent?
Post by: PayThePiedPiper on January 09, 2015, 07:28:59 pm
I downloaded some awesome sign and picture meshes but I'm looking to make a rectangular type of sign. Is there anyway to do so?

I was under the thought that with a cube mesh and a half transparent image created in gimp that it could work but that was a very bad fail. Is there anyway to make a writable sign that's rectangular? Any help appreciated. I just hope I explained what I'm trying to do correctly.
Title: Re: Making an object partially transparent?
Post by: Ingredient on January 10, 2015, 01:00:40 am
For a transparent or partially transparent material make sure you're using a code such as below in the .material file:

Code: [Select]
material NAMEMat
{
transparency_casts_shadows off
receive_shadows off
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 128

texture_unit
{
texture IMAGE.png
}
}
}
}

What kind of sign are you trying to make? Did you want the rectangular sign to have a transparent background or something? I'm not sure how you want your sign to look, if you would be able to provide a brief description or image I would be able to provide more assistance :)
Title: Re: Making an object partially transparent?
Post by: PayThePiedPiper on January 10, 2015, 01:47:53 am
Things are just never as easy as I anticipate xD

I was definably not using any type of code in my mat files so now I feel silly. What I'm trying to achieve though is something along the lines of this;

So the image against the wall is the file I was attempting to edit. Everything below the Red line I was trying to make transparent so I could achieve a plaque-like image if that makes any sense.
(http://img42.com/EIcxl+)

I don't know. Maybe I'm just way over-thinking this.
Title: Re: Making an object partially transparent?
Post by: Ingredient on January 10, 2015, 02:06:28 am
Alright, I think I know what you mean -although I'm not sure what you mean by "plaque-like" ^^"

Well, I would open that image in your art program. For example GIMP or Photoshop. Open the Layers window and create a transparent layer underneath the image, so when you use the eraser tool it shows a transparent background.

For semi transparent you would change the opacity of the eraser tool to 30%. Select a soft brush, something that looks like this:

(http://i.imgur.com/8ENAHPK.jpg)

(I'd suggest the soft brush for a "fading effect")

Change the size so it's nearly as big as half the image and work upwards towards the line.

When you save the image remember to save it as a .png image so it matches the code in the .material file.

I hope this is what you meant xD
Title: Re: Making an object partially transparent?
Post by: PayThePiedPiper on January 10, 2015, 04:11:36 am
Thanks so much for the help Ingredient! I will be trying this out immediately.
Title: Re: Making an object partially transparent?
Post by: Ingredient on January 10, 2015, 07:56:10 am
No worries! Let me know how it goes :3
Title: Re: Making an object partially transparent?
Post by: PayThePiedPiper on January 14, 2015, 01:21:10 am
Super late on posting this but your advice worked beautifully! Thank you so so much for all your help Ingredient!
Title: Re: Making an object partially transparent?
Post by: Ingredient on January 14, 2015, 04:45:45 am
You're very welcome! Glad I was able to help :)