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.

Dark GDK .NET / transparency and a .X file

Author
Message
aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 6th Apr 2010 06:30
I'm trying to convert my DBPro project in Visual Basic 2008 Express edition using the DarkGDK.NET. However, I cannot find the equivalent function for the following DBPro command;

SET OBJECT TRANSPARENCY 1,4

I am loading an entire scene created with AC3D saved as a DirectX file. The textures appear correctly in AC3D, but once loaded into VB2008 using the DarkGDK.NET, even setting transparency to ON does not display correctly.

I have loaded this same scene in DBPro, and in PureBASIC and it has always appeared correctly. But, I cannot find the proper combination of commands to make this appear correctly using the DarkGDK.net.

Anyone?

Russell B. Davis/aerostudios
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 6th Apr 2010 10:00
Can I have a copy of the .X model file and any attached textures if possible?

Paul.

aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 6th Apr 2010 21:21
Well..I was going to send you just one of the objects that is appearing incorrectly. It's basically a billboard tree object. I saved it by itself and then loaded in the world demo of the DarkGDK. It appears fine by itself. I then reloaded the entire scene and the strange behavior appears. But one thing I did notice is if my camera view as at or below the central point of the treeline, the transparency of the object looks as it should. But once I move the camera above the objects, they start to appear funky.

I also have a different tree object I think I purchased from the Game creator's store, it doesn't act that way. It's fine. Maybe there is something strange in my billboard object. I think I created it using Tree Majik and some PNG textures. Does this offer you any insight?

Russell B. Davis/aerostudios
aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 6th Apr 2010 22:09 Edited at: 6th Apr 2010 22:11
Here is what is happening. The palm tree in front of the building was purchased from TGC store. The other trees, I created using Tree Majik. They do not show this black (or blue) outline in AC3D, nor in DBPro or PureBasic when the DirectX scene is loaded.



It appears the trees are transparent, but some kind of alpha-blending is happening?

Russell B. Davis/aerostudios
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 7th Apr 2010 18:07 Edited at: 7th Apr 2010 18:08
Can you try calling the:



[EDIT] This will be a property of your Object that you use to Instance or clone the trees.

Property and tell me if this makes any difference?

Paul.

aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 7th Apr 2010 18:21
Well, I tried that ZWriteEnabled function and every object outside of my terrain disappeared. All of the buildings and trees vanished. Here is another view a ground level showing this odd behavior. It appears to be anything below the horizon has an odd black outline about it. Very strange...



Russell B. Davis/aerostudios
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 7th Apr 2010 21:03
One other possibility, is to not use any kind of object modes except to call the GhostOn method and see if this has the correct effect.

It is a bit unusual because your card appears to only render the area where your ground polygon is being rendered also. Ahh wait, I know what it is.

You need to create a skysphere or sky box, and turn off the Camera background rendering. This should resolve the problem.



See if this resolves your problem?

Paul.


Paul.

aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 7th Apr 2010 21:19
I tried the Camera.BackdropOff() call and it had no effect. I'll try the other GhostOn method you speak of.

I know I had trouble in the past with AC3D with the rendering order. But I hadn't that problem in a while.

I really appreciate all your help.

Russell B. Davis/aerostudios
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 7th Apr 2010 21:30
Just curious, but turning the Camera Backdrop off, did this actually turn off the blue rendering surface? It should have had some visual effect of some sort?

Paul.

aerostudios
14
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 7th Apr 2010 21:35
I think the blue did go away. So, I moved the surface plane of the terrain to the bottom of the stack, and recreated the .X file. Now, the trees are much better. The black has gone away for the most part. So I think the rendering order is more important using .NET. I'm only having issues now with the buildings that are behind the trees in that the black is appearing only where those can be seen behind the trees. So, I'm getting there, will need to do some more rearranging. thanks for your help!

Russell B. Davis/aerostudios
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 7th Apr 2010 21:38
No Problem. You may still want to play with the Z Read/Write properties for objects with transparency, this tends to solve alot of the rendering issues.

Paul.

Login to post a reply

Server time is: 2024-04-19 08:07:31
Your offset time is: 2024-04-19 08:07:31