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 Studio Chat / [SOLVED] png files not displaying transparency areas

Author
Message
Grumpydlw
10
Years of Service
User Offline
Joined: 2nd Nov 2013
Location: Las Vegas, Nevada
Posted: 21st Aug 2022 02:38
I have tried finding help here and failed.
When I load an .x file and apply the converted .dds to .png file I cannot get any image or object transparency commands to get rid of the Alpha or Color parts to become transparent.
I am learning AppGameKit Studio and VR. Everything I am using worked just fine in DBPro.
The transparent areas are in the form of a plane with an image on them and the areas around the image deleted and should be invisible.
I've been trying everything I've been able to find and nothing is helping.

LoadObject(21, "World/Tree 5.x")
SetObjectScale(21,0.02,0.02,0.02)
SetObjectPosition( 21, 80, 0, -95 )
LoadImage(21,"World/Tree 5.png",1)
setimagewrapU(21,1)
setimagewrapV(21,1)
SetObjectTransparency(21,6)
SetObjectImage(21,21,0)

I tried Load Image without the 1 also
I've tried transparency 0-6

I'm ready for some input now.

The author of this post has marked a post as an answer.

Go to answer

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 21st Aug 2022 03:08 Edited at: 21st Aug 2022 03:36
your code is similar to the example below minus the Min/Mag filters which shouldn't matter (and i don't think 6 is a valid transparency mode in your code so it'll read it as 0?) :


otherwise, it might have something to do with your object or image (regardless of it working fine in DBPro) so if it's legal for you to post it, do and we can look at it?
Grumpydlw
10
Years of Service
User Offline
Joined: 2nd Nov 2013
Location: Las Vegas, Nevada
Posted: 21st Aug 2022 18:46
Thank You. Changing to 1 set the transparency. Having tried all the image and object transparency commands I must have overlooked this one.
I notice that now there are parts of the model that are "see through" that shouldn't be.
I'll try to send a screen shot.
Grumpydlw
10
Years of Service
User Offline
Joined: 2nd Nov 2013
Location: Las Vegas, Nevada
Posted: 21st Aug 2022 21:31
Here are screenshots.
the first shows 2 trees with branches causing the trunk to disappear.
The second shows closeup of nearest tree.
The 3rd shows a branch on the far side of the tree showing through.



smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 22nd Aug 2022 04:39
Set object cull mode to zero and or set the min camera distance to a smaller range. Some models have normals facing inward instead of outward they get culled or hidden by default because there facing the wrong way.

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd Aug 2022 21:43
This post has been marked by the post author as the answer.
Maybe take a look at this thread
Using SetObjectAlphaMask() instead of SetObjectTransparency() worked for me
Grumpydlw
10
Years of Service
User Offline
Joined: 2nd Nov 2013
Location: Las Vegas, Nevada
Posted: 24th Aug 2022 23:14
Cull did not provide the results I needed. Alpha mask did. Thank You

Login to post a reply

Server time is: 2024-04-20 13:10:32
Your offset time is: 2024-04-20 13:10:32