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.

DarkBASIC Discussion / Help with camera clipping<

Author
Message
Captain D Falcon
16
Years of Service
User Offline
Joined: 14th Jul 2007
Location:
Posted: 16th Jul 2007 19:08
Everytime an object gets to far from my camera, it is clipped by the system and just disappears. What it I want to make a world were there is vast space and distant objects need to be seen? can I set the distance of this feature?

Please help.

These signatures always confuse me in forum messages
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 16th Jul 2007 20:13
You can use Set Camera Distance, but clipping occurs if this distance is too great.

The trick is to scale your universe right down so it's very small. That way, even the furthest objects are not that far away - they just look it.

To start with, if you are moving around your current world in whole units, then divide everything by 100 - including the movement. It's perfectly OK for your character in a game to be moving .001 units at a time.

Likewise, many people create a matrix 500000x500000 units in size, while a 5000x5000 will still look the same, but avoid clipping.

And don't forget to use fog to hide drawing in the distance that you don't want to see...

TDK_Man

Serge Adjo
17
Years of Service
User Offline
Joined: 3rd Aug 2006
Location:
Posted: 17th Jul 2007 17:24
Yes! Good advice TDK! I think TDK means: Three-D King...
I'am SERDJO, I'am a good programmer, author of DemoTeknic showcased in the DarkBasic Classic graphicals Demo!
I know DBC since 2002 ! Please, I'am new in to this forum but I would like to see my own posts there.
Tired to wait the moment when the post will be accepted!!!!!
RHAAAAAAA!!!!


De la part de SerDjo
http://perso.orange.fr/Serdjo.L/
Serge Adjo
17
Years of Service
User Offline
Joined: 3rd Aug 2006
Location:
Posted: 17th Jul 2007 17:25
I'am a new member, I'am SERDJO! The best, please read my messages.
I have the greatest project ever.

De la part de SerDjo
http://perso.orange.fr/Serdjo.L/
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 20th Jul 2007 04:56 Edited at: 20th Jul 2007 04:58
Oh my goodness. Serge Adjo... You... Not to be rude, but... You disgust me.


@TDK: Isn't the command called SET CAMERA RANGE, not "Set Camera Distance"?

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 20th Jul 2007 07:02
Quote: "Isn't the command called SET CAMERA RANGE, not "Set Camera Distance"?"


Yes - my mistake!

Just testing to see if you were all paying attention...

TDK_Man

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Jul 2007 19:03
@Serdjo
you only need about 10-15 posts before they are immediately posted.
It has nothing to do with your programming ability, just to test that you can be trusted to post relevant and inoffensive messages on the forum. Everyone has to go through it .

I am king of the noobs!
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 21st Jul 2007 07:29
And if you don't behave, the moderators have a weapon called the 'noob slap' which bans you from posting for a certain amount of time.

But unfortunately, by now you already know this...

TDK_Man

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 21st Jul 2007 09:58 Edited at: 21st Jul 2007 09:59
Ohh, the noob slap is an actual thing. I thought it was just an insult .

@Serdjo
You are kinda insane?

I am king of the noobs!
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 21st Jul 2007 10:20
Actually, I've discovered he's not been noob slapped after all - he's been banned until January 2008!

TDK_Man

Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 22nd Jul 2007 10:54
It was because his "greatest project ever" turned out to be a screenshot of Sim City of something. ("you fly above the skycrappers")
BOOK? I HATE BOOK. BOOK IS STUPID.

I never tell the truth.
That ain't a paradox.
I always tell lies is though.
Hangar18
17
Years of Service
User Offline
Joined: 13th Mar 2007
Location:
Posted: 24th Jul 2007 06:50 Edited at: 24th Jul 2007 06:52
@ TDK: Ah something really important may have dawned on me from this post which could really help me with performance issues. I have a large universe but havent made any attempt to scale things down. Can you confirm if my understanding is correct. Lets say I import Ship1 and scale it up by 300%, then place it at point X,Y,Z. Now say I do the same thing again but dont scale it up and place it at point X,Y,Z/300. Ok lets say it should now "look" the same size to the player in both cases but having it closer and smaller makes the performance better (Higher FPS) and avoids clipping?

Is this true - I really hope it is
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 24th Jul 2007 08:22
Sort of...

I would be tempted to load the ship and not scale it up 300%. Instead, place it closer to the camera so it looks the right size.

Then, instead of moving a huge model ten units of 3D space per move, you could move it units 300 times smaller.

This means you can have your universe 300 times smaller and still take the same amount of time to cover the same distance.

Being that much smaller, you don't suffer from so much clipping and the viewing distance appears to be a lot further.

It's all relative you see!

TDK_Man

Hangar18
17
Years of Service
User Offline
Joined: 13th Mar 2007
Location:
Posted: 24th Jul 2007 09:22
Thanks. Or maybe even better, import an object and shrink it by 300 %! and move the camera even closer and scale movement increments by 1/300!
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 24th Jul 2007 11:41
Shouldn't that be 1/3 as 300% is actually scaling up to 3 times the size?

I never tell the truth.
That ain't a paradox.
I always tell lies is though.
Hangar18
17
Years of Service
User Offline
Joined: 13th Mar 2007
Location:
Posted: 24th Jul 2007 12:53
Yes you're quite right! 1/3 it is
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 24th Jul 2007 19:53
@Hangar
You play Oolite don't you?
If you press SHIFT+F then some info comes up about FPS number of objects etc that may be of use to you.
It doesn't seem to be scaled down though

I am king of the noobs!
Hangar18
17
Years of Service
User Offline
Joined: 13th Mar 2007
Location:
Posted: 25th Jul 2007 02:47
@Obese87
Yes I do, I tend to play Oolite and switch to DB when waiting for my ship to get out of a "mass locked" range. Thats interesting, I will certainly give "Shift-F" a bash next time I load it up.

@TDK
I quickly scaled things down by 1/20 this morning before work and low and behold the FPS improved by about 5-10! Will try scaling even further tonight to see if further FPS improvements can be obtained. I can see my universe shrinking from from a football to a pinhead but to the player, it will still look and feel exactly the same (apart from the improvement in FPS of course). Thank you for your help.

Login to post a reply

Server time is: 2024-05-19 12:43:56
Your offset time is: 2024-05-19 12:43:56