Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to go about using alphas?
JonnyAnomaly Offline
Member

Posts: 179
Threads: 20
Joined: Nov 2012
Reputation: 14
#1
How to go about using alphas?

Hi,

I'm making some trees in Maya at the moment but I'm stumped with how to use alphas for branches and things in the engine. I understand how to use alpha channels in Photoshop and use them on planes in Maya to create the branches, but when I had finished I realised I was using two textures - One for the bark, and a targa for the branches. I loaded up the pine.dds from the actual game and saw that they used the alpha in the bark texture, but when I do that and save as a .dds, the alpha doesn't work in Maya and is just black.

Can anyone help clear this up for me please?
03-18-2013, 10:14 AM
Find
xxxxxxxxxxxxxxxx Away
Posting Freak

Posts: 935
Threads: 0
Joined: Jun 2012
Reputation: 54
#2
RE: How to go about using alphas?

Well, what you wanna do is, first you put both your branch texture and your bark texture in one square texture. (You might have to scale them or crop them a bit to make it fit) Then you adjust the UV map of your model so that the branches are lying on the part with the branch and the barky parts on the bark-part. Now for the alpha, you make it so that the barky part of your texture is white on the alpha and your branches have the alpha they had before - a black rectangle with the white branch shape on it. That way your model is using one texture instead of two.

I don't think Maya can use the alpha channel of a .dds, and neither can hpl, so what you do is, you save the diffuse (= color texture) as dds and the alpha as a separate tga image instead of leaving it in the alpha channel. (You can select the whole canvas in the alpha channel and copy whats inside into a normal layer) You can then use it in Maya (transparency slot in the material) and in the material editor to create your opaque trunk and half-transparent branches. Smile
(This post was last modified: 03-18-2013, 11:16 AM by xxxxxxxxxxxxxxxx.)
03-18-2013, 11:15 AM
Find
JonnyAnomaly Offline
Member

Posts: 179
Threads: 20
Joined: Nov 2012
Reputation: 14
#3
RE: How to go about using alphas?

(03-18-2013, 11:15 AM)Hirnwirbel Wrote: Well, what you wanna do is, first you put both your branch texture and your bark texture in one square texture. (You might have to scale them or crop them a bit to make it fit) Then you adjust the UV map of your model so that the branches are lying on the part with the branch and the barky parts on the bark-part. Now for the alpha, you make it so that the barky part of your texture is white on the alpha and your branches have the alpha they had before - a black rectangle with the white branch shape on it. That way your model is using one texture instead of two.

I don't think Maya can use the alpha channel of a .dds, and neither can hpl, so what you do is, you save the diffuse (= color texture) as dds and the alpha as a separate tga image instead of leaving it in the alpha channel. (You can select the whole canvas in the alpha channel and copy whats inside into a normal layer) You can then use it in Maya (transparency slot in the material) and in the material editor to create your opaque trunk and half-transparent branches. Smile

Great, thanks for the reply, I'll let you know how I get on!
03-18-2013, 11:27 AM
Find
JonnyAnomaly Offline
Member

Posts: 179
Threads: 20
Joined: Nov 2012
Reputation: 14
#4
RE: How to go about using alphas?

Got my tree made finally, couple of shots of it in game

http://postimage.org/image/tkz463lj9/
http://postimage.org/image/hzgupwy07/full/
http://postimage.org/image/qg5pijbkv/


The alpha branches turned out a bit blocky so I'll clean them up at some point, now for some ground foliage Smile Thanks again for the help!
(This post was last modified: 03-18-2013, 05:33 PM by JonnyAnomaly.)
03-18-2013, 05:32 PM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#5
RE: How to go about using alphas?

(03-18-2013, 05:32 PM)JonnyAnomaly Wrote: Got my tree made finally, couple of shots of it in game

http://postimage.org/image/tkz463lj9/
http://postimage.org/image/hzgupwy07/full/
http://postimage.org/image/qg5pijbkv/


The alpha branches turned out a bit blocky so I'll clean them up at some point, now for some ground foliage Smile Thanks again for the help!
Awesome trees you got there!
03-18-2013, 05:48 PM
Find




Users browsing this thread: 1 Guest(s)