Author Topic: Help with transparency needed  (Read 1963 times)

-WhereSunRises-

  • Guest
Help with transparency needed
« on: March 29, 2016, 05:58:22 am »
Hi, I found out that I don't know how to make mesh looking like a glass or at least semi- transparent. I need to make a  glass mesh but If I make texture it always ends up white :/ Anyone could help me with coding for a semi- transparent mesh please?

ola232

  • Guest
Re: Help with transparency needed
« Reply #1 on: March 29, 2016, 09:22:15 am »
Hi, if you want to make something semi transparent or glass like here is ghost coding for that

-WhereSunRises-

  • Guest
Re: Help with transparency needed
« Reply #2 on: March 29, 2016, 03:48:19 pm »
Thanks but this is for presets  :/ And I need mesh.... Thanks anyway :) You are very kind.

Offline D-ead7Dog

  • AFK NPC
  • Member Of The Season
  • Pack & Pride Representative
  • ***
  • Posts: 1,464
  • Country: us
  • Floof-O-Meter: 98
  • BUMPY SNOW
    • D-ead7Dog
    • d-ead7dog
    • View Profile
Re: Help with transparency needed
« Reply #3 on: March 29, 2016, 03:50:40 pm »
If you need the transparent code for a preset here it is!
http://www.feral-heart.com/index.php?option=com_jfusion&Itemid=2&jfile=index.php&topic=12075.0

Please be more specific in your title such as "Transparent Code Preset/Mesh Help" or something along that line so it's easier to figure out what it is exactly that you need just by looking at the title and we can get it solved quicker! ;)

Have a great day!
« Last Edit: March 29, 2016, 03:59:26 pm by Pkf7 »
WORK IN PROGRESS
Artwork (c) LynxBrush & Majorest

Originally registered January 15, 2011

Offline Ruby1234

  • Mean Tutorial Queen
  • Elder Grey Pelt
  • ****
  • Posts: 2,794
  • Country: us
  • Floof-O-Meter: 297
  • aka Phloxenfree.
    • View Profile
Re: Help with transparency needed
« Reply #4 on: March 29, 2016, 04:49:44 pm »
Thanks but this is for presets  :/ And I need mesh.... Thanks anyway :) You are very kind.

Coding works regardless of what it's for.
However, this is how I, personally, make the appearance of glass ingame.
Just looks the best to me, but there's some other ways too.

Take a medium blue and make it semi-transparent in GIMP.
Just a 512x512 square or whatever, could even be smaller. Any size.



I use opacity of 50:


Save that as glassTex.png

Open notepad, paste this in:
Code: [Select]
material GlassMat
{
technique
{
pass
{
cull_hardware none
cull_software none
depth_write off
scene_blend add
texture_unit
{
texture glassTex.png
}
}
}
}

Go to Save As... and then select All Files from the dropdown:


And save it as Glass.material in the line above that.

Take all that crap and toss it into:

(the place where your FH folder is might be different but you get the idea)

Then I go ingame to Object Maker, and load up my mesh I want to use. For giggles I just used BasicCube.mesh, which comes with the game. Then change the material to GlassMat which we just made.


Boom.
Done.

Annnnnd, as a bonus, here's more realistic glass.

Bump opacity down to 15.


Change code to:
Code: [Select]
material GlassMat
{
technique
{
pass
{
cull_hardware none
cull_software none
depth_write off
scene_blend alpha_blend
texture_unit
{
texture glassTex.png
}
}
}
}

Result:
« Last Edit: March 29, 2016, 04:56:44 pm by Phloxenfree »

-WhereSunRises-

  • Guest
Re: Help with transparency needed
« Reply #5 on: March 29, 2016, 06:25:05 pm »
Oh my! Thanks a ton! Surely gonna do it myself now that I know how to do it :D I just can't thank you enough :D

Offline Warriorstrike

  • . "The truth is often what we make of it; you heard what you wanted to hear, believed what you wanted to believe."
  • Ancient Silver Mane
  • *****
  • Posts: 4,221
  • Country: us
  • Floof-O-Meter: 346
  • . Remember… the Force will be with you. Always.
    • warriorstrike
    • warriorstrike
    • View Profile
    • My Tumblr
Re: Help with transparency needed
« Reply #6 on: March 29, 2016, 06:30:07 pm »
I'll lock this up since you seem to have found what you were looking for. Good luck with your preset!

If you define yourself by the power to take life, the desire to dominate, to possess… then you have nothing.