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 / Problem with ghosted planes

Author
Message
asdronin
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 2nd Aug 2009 15:04 Edited at: 2nd Aug 2009 18:20
Hi all,
I know ghost command has been broken in the past and I think its not fixed yet, but just wondering if there is a workaround for this problem I have.

So the scenario is like this, I have 2 plane objects textured and ghosted and placed them at certain distance (so that when they are rotated they will overlap at certain angle), then I have my camera that moves in circular trayectory around them, and the planes are set to the camera orientation, the problem is that when the planes reach a certain angle (when they are close to overlapping or doing it already) they dissapear, of course that is just for a certain angular margin but somehow enough to break the effect, can someone please tell me if there is a workaround or a fix for this?

Im currently running latest update under visual c++ 9 express edition (dont know if that could affect though)

Many thanks in advance for any ideas or suggestions
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 3rd Aug 2009 15:57 Edited at: 3rd Aug 2009 15:58
Are your objects two-sided? Set that with dbSetObjectCull...

If your objects have two sides, does that happens when the center of the object is outside the screen?

Best thing to do is to post the code so we can try to replicate the problem. Also which DGDK version are you using?
asdronin
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 4th Aug 2009 00:42 Edited at: 4th Aug 2009 03:55
Thanks Morcilla, and sorry I think I should have posted this from the beginning, here is the code, the problem happens if you let this run for a couple of seconds (when they line up) and so they are overlapping or close to do that, you might see them dissapear and reapear on a certain progression, setting the cull and other effects wont fix this, do you have any other idea, and if this is a bug.... is this already reported?



Edit: I forgot, Im using Nov'08 update, never found a good reason to swap to 7.3, maybe is this already fixed there?

Attachments

Login to view attachments
asdronin
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 5th Aug 2009 00:02
Sorry, I forgot to say that this same effect could be seen if you apply transparency to the planes, as its png image with alpha you can easily try and see for yourself it behaves oddly when doing this
mortar
15
Years of Service
User Offline
Joined: 5th Aug 2009
Location:
Posted: 6th Aug 2009 00:39
yeah I noticed same effect, I think its related to the Z depth at some point, but ghosted objects placed very close to each other seem to not work yet
asdronin
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 6th Aug 2009 13:11
Anyone tried the code? Im just wondering since Im not using latest update, so maybe all this was solved in last released patch, or maybe not...
mortar
15
Years of Service
User Offline
Joined: 5th Aug 2009
Location:
Posted: 7th Aug 2009 13:31
I tried and the effect is wrong (in my eyes) but Im not expert to know how to fix this if there is a way, sorry
asdronin
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 8th Aug 2009 06:11
Well, Im still trying to figure this out, anyone else tried this code or has same trouble? just wondering since I have this code that works wrong here and maybe its me or my system or my update.... who knows
mortar
15
Years of Service
User Offline
Joined: 5th Aug 2009
Location:
Posted: 10th Aug 2009 04:52
I think (cant try now) that maybe disabling the z depth could make any change?
asdronin
16
Years of Service
User Offline
Joined: 10th Apr 2008
Location:
Posted: 27th Aug 2009 13:05 Edited at: 27th Aug 2009 13:07
Sorry I didnt notice that last post, disabling zdepth didnt work, anyone could bring out any other idea? shall I asume its a bug? by the way, anyone tried the above code with latest update? thanks in advance for any ideas in relation to this, I find myself fighting particles in many aspects
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 4th Sep 2009 19:52
I'm chasing a transparency/ghosting bug, and although I thought that this could be a good example, I actually fixed your problem.

Add this to the object setup:



And use dbPointObject instead of dbSetObjectToCameraOrientation:



It seems to me that the rotation of the objects didn't work fine for some angles when using dbSetObjectToCameraOrientation.

Here is the full source:



I will have to look somewhere else to see if someone reproduced my bug

Just in case anyone reads:
I have a ghosted plain (the sun halo), and then lots of ghosted instanced objects (the sun particles).
When the particles go thru the halo, they miss the ghosting:


Wrong with DGDK 7.3, pending to test with 7.4.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 5th Sep 2009 02:55
Try using 'disable object zwrite'

sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 5th Sep 2009 06:05 Edited at: 5th Sep 2009 06:16
@ Morcilla,

Have you tried moving the near camera plain way out to try and get more linear Z buffer resolution over the area that is having the problem.
If you can determine the problem to be a Z buffer resolution problem, then maybe we can convince DarkGDK developers to also include "W Buffer" support into the SDK, rather than only "Z Buffer".

EDIT: after looking at your video, it is looking like a DarkGDK problem in the later releases, rather than a Z buffer problem.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 5th Sep 2009 14:03
Diggsey, sydbod, thanks for trying to help.
Yes indeed it looks like a DGDK problem. I have tried with DGDK 7.4 and the error persist.
I think it is some kind of internal interaction due to the complexity of the project. That makes it very hard to reproduce the bug.
So maybe you don't have to worry unless your project gets really big.
I'm, on my side, reverting to DGDK Nov 08, the latest working version for me, and probably will be releasing with DGDK 120307/VS2005. The performance is better with the old DX SDKs, and some other things, like the shadows, are more robust.

Login to post a reply

Server time is: 2024-10-06 05:27:07
Your offset time is: 2024-10-06 05:27:07