tonyg
Junior Member
Posts: 73
|
Post by tonyg on Mar 17, 2005 21:08:07 GMT
Is it possible to draw an object in a mode other than Alpha such as add, multiply, multiply*2 etc? If not, how easy would it be to add them?
|
|
Ed-2D
Junior Member
Posts: 59
|
Post by Ed-2D on Mar 17, 2005 21:57:30 GMT
change your layer mode
|
|
tonyg
Junior Member
Posts: 73
|
Post by tonyg on Mar 17, 2005 22:12:35 GMT
thanks for that. Still getting to grips with the number of commands. Is there a way to do a 'shade' mode (think it's 'subtractive') other than a dropshadow?
|
|
|
Post by Xpressive on Mar 18, 2005 7:34:58 GMT
HUD_SetLayerBlend LayerID, 1 <- normal HUD_SetLayerBlend LayerID, 2 <- substractive (dark) HUD_SetLayerBlend LayerID, 3 <- additive (bright) etc..
|
|
tonyg
Junior Member
Posts: 73
|
Post by tonyg on Mar 18, 2005 9:48:30 GMT
Manual states for SetLayerBlend 1 - Alpha (normal) 2 - Multiply 3 - Bright
|
|
tonyg
Junior Member
Posts: 73
|
Post by tonyg on May 4, 2005 14:21:37 GMT
Sorry to reply on my own post. The layer modes are fine and I notice they use EntityBlend. However, Textureblend has been updated to have dot3 and Mod2x blend modes. Is it possible to use textureblend rather than entityblend? Thanks <EDIT> I've tried using it like this...
Function HUD_SetLayerBlend2 (LayerID%, blendmode%) tg_texture1 = HUD_GetLayerTexture (layerid) tg_texture2 = HUD_GetTextureHandle (tg_texture1) TextureBlend tg_texture2, blendmode End Function
but blend mode 2 (multiply) doesn't seem to work anymore. <edit2> I couldn't quite get this to work for all modes so had to do the following...
; ------------------------------------------------------------------------ ; PUBLIC FUNCTION: SET LAYER BLEND MODE ; ------------------------------------------------------------------------ Function HUD_SetLayerBlend (LayerID%, blendmode%) Local Layer.SC_Layer = Object.SC_Layer(LayerID) : If Layer = Null Then RuntimeError SC_BreakText("HUD_SetLayerBlend||You specified an invalid layer ID. Make sure, this layer exists.",50)
tg_texture1 = HUD_GetLayerTexture (layerid) tg_texture2 = HUD_GetTextureHandle (tg_texture1) TextureBlend tg_texture2, 1 EntityBlend Layer\Mesh, blendmode ; TextureBlend layer\textureID, blendmode End Function
; ------------------------------------------------------------------------ ; PUBLIC FUNCTION: SET LAYER BLEND 2 MODE : TGCHANGE ; ------------------------------------------------------------------------ Function HUD_SetLayerBlend2 (LayerID%, blendmode%) Local Layer.SC_Layer = Object.SC_Layer(LayerID) : If Layer = Null Then RuntimeError SC_BreakText("HUD_SetLayerBlend||You specified an invalid layer ID. Make sure, this layer exists.",50) EntityBlend Layer\Mesh, 1
tg_texture1 = HUD_GetLayerTexture (layerid) tg_texture2 = HUD_GetTextureHandle (tg_texture1) TextureBlend tg_texture2, 1 TextureBlend tg_texture2, blendmode End Function
Multiply mode didn't seem to work with textureblend so I had to use entityblend and reset it each call or else the multiplied texture disappeared. Not sure why.
|
|