HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] Making glass/see through object  (Read 2032 times)

Prometheus2012

  • General Accounts
  • *
  • Posts: 664
    • View Profile
    • Exile-Online
[Resolved] Making glass/see through object
« on: Sep 03, 12, 06:54:07 AM »

Yo, ive been trying to make a see-through pane of glass recently. I made a new material in max, made it a hero material, added a blue bitmap texture, and put the translucency up to 100%. I then applied the "translucent" texture to a 5x5 meter block, saved and exported to game.

I loaded the mesh up ingame and the translucency doesnt seem to have applied. I went back into max and tried 90,80,70,60% on the translucency setting with similar results.

Is there something that im missing to make a hero material be translucent?

Any help would be kind of you :)
« Last Edit: Sep 26, 12, 07:40:56 AM by HE-Cooper »
Logged

MsSarrene

  • General Accounts
  • *
  • Posts: 107
    • View Profile
    • Triad Game Studios, LLC.
Re: Making glass/see through object
« Reply #1 on: Sep 03, 12, 08:42:59 AM »

this seems to get a lot of people, including myself at first. First images must be dds. You can make them in several different programs using nvidia's dds plugins. I use adobe photoshop, so those are the plugins i get.

Once you have your image, you have to have an alpha layer. This is done under 'Channels' in adobe photoshop, not sure what it is labeled under other programs.  I usually just copy the image onto the alpha once i have my transparency level where I want it.. then adjust it from there.

White is solid, black is totally transparent.

If you turn on the alpha on (clicing the view icon to the left of the layer) you will see it show up as a red to pink mask over your primary image channels. Clear is equal to black, red is equal to white.. pink is in the middle of course.

I am sure you can find several tutorials about dds channels and layers on the web, i am just not sure where.

As far as your models goes...
All material right now must be applied as a HeroMaterial. If not, then you will find some glitches once you export your asset.
http://hewiki.heroengine.com/wiki/Creating_a_HeroMaterial

That link should help you.

For windows and the likes, you must select the material's alpha mode to be "gradient". This is where it first got me. I was sure mask is what i wanted, but it did not work, so I tried Gradient. That seems to work.

Once you have the material made, added to your Material editor as a HeroMaterial and select "gradient" you can then go back and adjust the transparency in photoshop (or other program) to where you like it :)

I hope that helps out some.

One other note, we cannot have double sided meshes in HE. So if your window will be double sided, then you will have to clone the window pain (either clone and transform or mirror. Just make sure that you go to properties and remove the "LastPose" else you will have errors popping up in HE.

Good luck,
Sarrene'

Prometheus2012

  • General Accounts
  • *
  • Posts: 664
    • View Profile
    • Exile-Online
Re: Making glass/see through object
« Reply #2 on: Sep 03, 12, 10:18:09 AM »

Why is it better to use a dds over a PNG or JPG?

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Making glass/see through object
« Reply #3 on: Sep 03, 12, 10:37:06 AM »

DDS textures are an industry standard that include mip maps and allow the engine to do procedural work. Just make sure you are following the instructions in the wiki for textures and modeling. We try to say everywhere we can find to make sure you are using DDS format for textures. :-)
Logged