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 / [3D] Z-Order changes for some objects

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 31st Dec 2015 13:11
In the video below you will see that the hoop z-order jumps forwards as the camera moves towards it. I don't know if I have done something wrong, or it is a bug.

1. Hoops are standard planes with a transparent PNG texture.
2. Hoop plains dissect the track. i.e they are supposed to look like the track travels through them.
3. Track is a mesh made from a memblock. The hoops represent the start/end of each track section (object)
4. If I break each track section up into 100 smaller sections, the result is the same.
5. The track objects datum point is the start of each section (where the hoops are)
6. Sometimes the track in from of the hoop drops behind, but tracks further back are seen in front of the hoop!
7. I have tried both Cull modes of the track, with the same result.
8. I have tried untextured plains for the hoops, with the same result.

Any ideas???

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 31st Dec 2015 14:42
Happy new year to everyone

This is the same problem:
https://forum.thegamecreators.com/thread/214368

You can try to play with the SetObjectDepthWrite and see if it helps , otherwise you need to convert your hoops to 3d objects.

As i remember i changed the SetObjectDepthWrite depending of the distance from the camera to the object . and tried to avoid transparent object getting behind or infront of other transparent object. so you could also try to make the track to non transparent and see it that solve it.




best regards Preben Eriksen,
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 31st Dec 2015 16:37
Thanks for your suggestions.

Quote: "You can try to play with the SetObjectDepthWrite and see if it helps"


I just tried this on the hoops, track and then both. I got different variations on the same problem.

Quote: " otherwise you need to convert your hoops to 3d objects."


I tried this earlier, but it didn't work. But does this mean that Plains aren't like normal 3D obects?

Quote: " you could also try to make the track to non transparent and see it that solve it"

I have tried this now, and this also didn't fix the problem.

Changing the SetObjectDepthWrite based on camera distance would be too difficult to implement in my scenario.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 31st Dec 2015 18:56
You can try to change the pivot of your object, Paul has told me it can work for alpha issues, in some case.
(FixObjectPivot())
AGK2 tier1 - http://www.dracaena-studio.com
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Jan 2016 12:32
I tried your suggestion, but I seem to have found a bug in FixObjectPivot()
When you use this command, it sets the 0,0,0,point of the object to 0,0,0 in 3D space!
Because I am using the position of the object to locate the hoops, they all shift back to 0,0,0.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Jan 2016 14:56
Intersecting transparent objects are a pain to get right as they don't write to the Z buffer. Could you send me the project so I can see if there is a way to make this better?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 11th Jan 2016 14:12
@BatVink: Did you ever get this problem resolved? Also, what video editor did you use? I have fraps for capture, but would be nice to add some simple text. Thanks!
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Jan 2016 11:32
I missed the updates to this thread

I've sent Paul the project to look at this morning.
I tried various things (FixObjectPivot, one object with multiple meshes) but no luck so far.)

Video: I use Open Broadcast to record because it can capture OpenGL canvases and standard windows in the same video. then I use Serif MoviePlus to add text. There is a free version that will do everything you need for simple videos like this.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 29th Jan 2016 17:18
Great! Thanks. Free is good
V2 T1 (Mostly)
Phone Tap!
Uzmadesign

Login to post a reply

Server time is: 2024-11-25 11:32:05
Your offset time is: 2024-11-25 11:32:05