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 / SetObjectImage() with semitransparent images not working?

Author
Message
MucMac
8
Years of Service
User Offline
Joined: 13th Sep 2015
Location: Munich, Germany
Posted: 26th Dec 2015 18:44 Edited at: 26th Dec 2015 18:49
Hi!

I have an image with a transparent area in PNG format. when i apply this image to an object, the "transparent" area becomes a black area?!?!?
when i apply this image to a sprite, everything looks fine. only on meshes/objects the transparent areas are getting black. bug or missing feature?
--
Mac
Lead Programmer (Tier 1, AGK2) - MacOSX - want to go 3D with agk2!
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 26th Dec 2015 18:50


Try mode 1.
MucMac
8
Years of Service
User Offline
Joined: 13th Sep 2015
Location: Munich, Germany
Posted: 26th Dec 2015 18:58
this is alpha'ed. does take serious rendering time and gives you nice z-ordering problems. simple masking would be nice!
--
Mac
Lead Programmer (Tier 1, AGK2) - MacOSX - want to go 3D with agk2!
MucMac
8
Years of Service
User Offline
Joined: 13th Sep 2015
Location: Munich, Germany
Posted: 19th Jan 2016 21:28
any news on this? maybe in the next update?
--
Mac
Lead Programmer (Tier 1, AGK2) - MacOSX - want to go 3D with agk2!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 20th Jan 2016 07:37
Quote: "gives you nice z-ordering problems"


Agreed, I have objects jumping backwards and forwards through the Z-order as I move around. It really messes with your head
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th Jan 2016 19:18 Edited at: 20th Jan 2016 19:19
I hate that transparent objects make other transparent objects behind them disappear. Not good at all.

See attached pictures for an example. You can see the fence makes the wall disappear, and the top of the wall has UV issues too.

Attachments

Login to view attachments
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 21st Jan 2016 23:08
I'll see if I can get alpha masking into the next version, for now you can do it manually by creating a shader using the "discard" command and setting transparency off.
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 22nd Jan 2016 08:38
Hi

Paul, thank you for the idea of the discard, I have tried to write a little shader which seem to work great (yes, AppGameKit rocks !)

Mask.vs :


Mask.ps :


How to use it :



I will post this shader on the shader thread.
AGK2 tier1 - http://www.dracaena-studio.com
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 22nd Jan 2016 12:56
Nice work Blendman, can we get this to work by using the images own alpha channel? That way we don't have to possibly change our textures if they need black bits.
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 22nd Jan 2016 14:32 Edited at: 22nd Jan 2016 14:33
@Mobiuus :
of course, you can use your own image alpha channel.

in Mask.ps, replace :


by


AGK2 tier1 - http://www.dracaena-studio.com
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 23rd Jan 2016 16:50

Login to post a reply

Server time is: 2024-05-05 13:35:52
Your offset time is: 2024-05-05 13:35:52