Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How to set textures transparent?

Author
Message
Zigi
14
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 23rd Nov 2015 17:41
Hi. I'm new to AGK2 and I have a problem with the textures on 3D objects.
My problem is that, when I use an image as a texture of a 3D object, the transparent areas of the images are black in my game, I can't make them transparent.

This is the code I'm using:



I have also tried to use:



and also:



But nothing works, the transparent areas of the image looks black and I don't know what to do about it.
In other tools normally I just need to set the alpha color (black) and make alpha transparent but in AGK2 I just can't make the alpha (black) to be transparent


Anybody could help me with this please?
Thanks

Attachments

Login to view attachments
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 23rd Nov 2015 18:36
You have to use :
SetObjectTransparency(obj, 1)
0 = opaque
1 = transparent
2 = additive (not functionnal in the actual version, but should be ok in the next version)
Your image mmust be a png with transparency of course .
http://www.dracaena-studio.com
Zigi
14
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 23rd Nov 2015 21:38
LOL
I overlooked this command instead I tried to deal with alpha channel (color) and transparency of the image itself
Thanks a lot

Login to post a reply

Server time is: 2024-04-25 01:08:57
Your offset time is: 2024-04-25 01:08:57