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

Author Topic: Texture Transparency DDS  (Read 6808 times)

leviathanx

  • World Owners
  • ****
  • Posts: 14
    • View Profile
Texture Transparency DDS
« on: Jun 27, 14, 09:03:47 PM »

Haven't been able to find any clear explanation on this.  What is the best way to create a texture with transparency with dds format for HE?  This is for grass, tree branches, straw roof, etc.

I have tried creating a black and white texture in the alpha channel with the solid black parts representing the area that should be transparent, and saving as DXTC1,3, and 5. 
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Texture Transparency DDS
« Reply #1 on: Jun 27, 14, 09:13:00 PM »

You would create an image file in your program of choice. And set the areas you'd like to be transparent, deciding to use an alpha mask or an alpha blend/gradient. These steps would be specific to the program you are using. Then you export as a dds. The dxt settings should be listed in the exporter you are using, and they refer to "no alpha" "alpha mask/test" and "alpha blend/gradient". There's nothing heroengine specific about any if the steps, so any standard industry tutorial should get you where you need to go.
Logged

leviathanx

  • World Owners
  • ****
  • Posts: 14
    • View Profile
Re: Texture Transparency DDS
« Reply #2 on: Jun 27, 14, 10:58:00 PM »

I am using photoshop.   There are different ways to go about creating an alpha transparency and am looking for some specific advice for doing so with dds since that is what HE uses, and it's a new format for me.  When you say alpha mask, are you saying I should create a mask layer or create a mask for the alpha channel?  I have been spending lots of time browsing tutorials, enough to say that most are pretty worthless, which is why I am asking here.  If you can direct me to a source of standard industry tutorials well that would be awesome. 

And then as for the dtx settings, I know some say alpha and some not, but there are multiple options which is why I am asking what would typically be used for this kind of thing.  I am not sure whether it's my alpha mask being used in the wrong place or my dtx settings that are giving me trouble. 
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Texture Transparency DDS
« Reply #3 on: Jun 27, 14, 11:51:47 PM »

Alpha mask/test with regards to pixels refers to the pixel being binary, it has nothing to do with masking a layer in Photoshop. Alpha blend/gradient means a pixel can be treated as a range of values from 0 percent to 100 percent.
Logged

leviathanx

  • World Owners
  • ****
  • Posts: 14
    • View Profile
Re: Texture Transparency DDS
« Reply #4 on: Jun 28, 14, 12:10:46 AM »

Okay thanks for replying but none of this helps.  If anyone can quickly explain how to go about saving transparency in a texture in dds format with photoshop, would be appreciated.  Here is a pic one of the textures I am working with to give an example.  All I want to know is the proper way to save this file as a dds so that the non-grass part of the texture is transparent.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1155
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Texture Transparency DDS
« Reply #5 on: Jun 28, 14, 12:39:38 AM »

I use Paint.NET for my dds files. The settings are for DXT1(Opaque/1-bit alpha), compressor type is cluster fit, the error metric is perceptual. (that is all they have for settings on paint.net) Though we have not had any very small distances between transparent and non. It might be just a bleed over.
Logged

WorldWideZ

  • World Owners
  • ****
  • Posts: 524
    • View Profile
    • World Wide Zed
Re: Texture Transparency DDS
« Reply #6 on: Jun 28, 14, 12:51:29 AM »

you want dtx5 settings in the dds menu if you want the alpha map included. there is a couple of forum threads that explain the dds settings if you look around
Logged

leviathanx

  • World Owners
  • ****
  • Posts: 14
    • View Profile
Re: Texture Transparency DDS
« Reply #7 on: Jun 28, 14, 01:03:14 AM »

Thanks, been looking but tough to find.  Where do I need to have the alpha map though?  In an alpha channel or just leave the background transparent, or a mask layer?  I have been trying different combinations with no success.
Logged

WorldWideZ

  • World Owners
  • ****
  • Posts: 524
    • View Profile
    • World Wide Zed
Re: Texture Transparency DDS
« Reply #8 on: Jun 28, 14, 12:11:12 PM »

i just create a channel named Alpha from the inverted blue channel. If this texture is then assigned in 3d max using the hero shader , there is a tick box to enable the mask under where you set the texture location
Logged

leviathanx

  • World Owners
  • ****
  • Posts: 14
    • View Profile
Re: Texture Transparency DDS
« Reply #9 on: Jun 28, 14, 01:30:12 PM »

Thanks WorldWideZ, I use Maya, though I didn't realize was an alpha option within the shader, though I am still not seeing the texture as alpha. 

Here are the steps I am doing, maybe someone can let me know what I am missing...

1. Make a texture with the background transparent (as grass texture shown above)
2. Create an alpha channel with a black and white silhouette of texture (black = transparent area) which would be like copying the blue channel and inverting
3. Save file as dds set to dtx5
4. In Maya, set Hero Shader alpha mode to Gradient or Mask (neither seem to make a difference)

No matter what I do, I am ending up with a solid background.
Logged

Chromehound

  • General Accounts
  • *
  • Posts: 151
    • View Profile
Re: Texture Transparency DDS
« Reply #10 on: Jun 28, 14, 03:37:51 PM »

For dynamic details, you shouldn't have to use maya/max at all, just save as the dxt5, put in the proper folder and good to go. 

/Engine/YourGame/DynamicDetails/ or something of the sort.....proper folder is key though.

If a texture on a model, I'm pretty sure I used the Mask option.

I never did any of the black & white silhouette deal, nor messed with blue channel, but I also used Gimp, and its been a few months (more like 8 ) since I've messed with textures so can't say if anything has changed.
Logged

leviathanx

  • World Owners
  • ****
  • Posts: 14
    • View Profile
Re: Texture Transparency DDS
« Reply #11 on: Jun 28, 14, 10:55:42 PM »

Thanks for clarifying a few things Chromehound, but still can't get it to work.  I tried setting the alpha mask option for the hero shader.  I put the texture into the dynamicdetails folder (also tried in the old spot) I tried without a silhouette of the texture in the alpha channel in photoshop, but still just showing up as solid white where it's supposed to be transparent. 
Logged

leviathanx

  • World Owners
  • ****
  • Posts: 14
    • View Profile
Re: Texture Transparency DDS
« Reply #12 on: Jun 28, 14, 11:47:40 PM »

Update: I was frustrated and logged off, and then just logged back on and the alpha is working!  I am nto sure exactly which change I did fixed it, but thanks Chrome, finally working now.  :)
Logged

WorldWideZ

  • World Owners
  • ****
  • Posts: 524
    • View Profile
    • World Wide Zed
Re: Texture Transparency DDS
« Reply #13 on: Jun 29, 14, 12:33:19 AM »

It is important to remember if something does not work like it should 3 times in a row , try relogging , then restarting , then just to be sure restart the whole system :D
Logged

Chromehound

  • General Accounts
  • *
  • Posts: 151
    • View Profile
Re: Texture Transparency DDS
« Reply #14 on: Jun 29, 14, 02:52:51 AM »

It is important to remember if something does not work like it should 3 times in a row , try relogging , then restarting , then just to be sure restart the whole system :D

haha - totally this.  Just like issues with Windows........sometimes you just restart and it's a magical fix :P
Logged