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 / Scaling Box - Clipping

Author
Message
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 8th Aug 2011 16:52
Hello,

I have made a box with dbMakeObjectBox, I scaled it up, and it seems that the box gets inside the frustrum culling (out of view hiding of objects) when the center point of the box is out of view, meaning a whole part of the box which should be visible aint visible because it is being hided.

Anybody has experience this before and has a fix?

Cheers,

Leo

Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 9th Aug 2011 21:27
Some ideas?

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 9th Aug 2011 22:13 Edited at: 9th Aug 2011 22:14
The only way the check whether the camera is inside the box is to set the back face culling to off, thus showing the other sides of each face. Apart from that, re-position your camera to view the object. If an object gets scaled and any faces cross the cameras view then those faces will not be displayed.

Warning! May contain Nuts!
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 10th Aug 2011 02:33 Edited at: 10th Aug 2011 02:38
If you create a box(non scaled) the same size as the scaled box, does that one work fine?

I have a feeling there is a command to update object bounds but not sure I could find it for GDK

EDIT: Just read that there is a command dbShowObjectBounds(), if that works then you can see if GDK has wrong bounding box data.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 10th Aug 2011 04:57
You can use dbCalculateObjectBounds( obj ) But you have to add it into the basic3d.h header file.

Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 10th Aug 2011 13:50
Quote: "If you create a box(non scaled) the same size as the scaled box, does that one work fine?

I have a feeling there is a command to update object bounds but not sure I could find it for GDK

EDIT: Just read that there is a command dbShowObjectBounds(), if that works then you can see if GDK has wrong bounding box data."


Yeah but that costs loads of cpu.

Quote: "You can use dbCalculateObjectBounds( obj ) But you have to add it into the basic3d.h header file.
"


Thanks it indeed compiled and run the program, altough still the same issue .

Thanks for your time guys! Really appreciate it. More ideas welcome.

Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 10th Aug 2011 20:13 Edited at: 10th Aug 2011 20:14
I am using instanced box objects, if that is valueable?

EDIT:
dbCalculateObjectBounds function on the main box did the job THANK YOU!

Login to post a reply

Server time is: 2024-11-19 08:23:56
Your offset time is: 2024-11-19 08:23:56