Is it possible to combine 2 textures to create a single texture?
by Ryan Mick · in Torque 3D Professional · 12/31/2009 (3:25 pm) · 2 replies
Basically what I am interested in doing is using a texture with transparent areas and combining that with another texture in the engine so the the resulting texture has the transparent areas applied to it. Basically using the first texture as a texture mask.
I see that GBitmap has a combine method with the an operation parameter for adding or subtracting but without more information on its use I am not sure if this will work.
Any help is appreciated.
Thanks
I see that GBitmap has a combine method with the an operation parameter for adding or subtracting but without more information on its use I am not sure if this will work.
Any help is appreciated.
Thanks
#2
If you want to keep things simple, you could instead use Material stages as Stadi recommends. setting the background for stage 0 diffuse and the texture with alpha for stage 1 diffuse will give you the desired effect - unless you physically need the two textures to be combined.
01/02/2010 (4:23 am)
If you want to use GBitmap's combine, pay special attention to where your textures are. If there are no special flags set for the texture profile, it will be in the graphic card's memory. Combine will be reading from there, which will be extremely slow! Having the textures in the same format and dimensions also helps a lot.If you want to keep things simple, you could instead use Material stages as Stadi recommends. setting the background for stage 0 diffuse and the texture with alpha for stage 1 diffuse will give you the desired effect - unless you physically need the two textures to be combined.
Torque 3D Owner Stadi Thompson