Game Development Community

Object view distance

by Alexander B · in Torque Game Engine · 02/20/2009 (2:04 am) · 8 replies

My 3d modeller has made some planets for my game and for some reason when i am on the free look mode and i go out a bit the planet starts to have no texture then i go a little more out and it dissapears completely. How do i make it so it can always bee seen?

#1
02/20/2009 (8:22 am)
Take a look at terrain/sky.cc, there's a constant MAXVISIBLEDISTANCE right at the top, with some comments that explain what to do with it. Sounds like you're doing a space game, so you can turn this up (probably) safely, if you don't have a terrain in your game.

What I haven't played with yet is how to control the detail level steps for models at large distances, so you should see the planets from way far away, but the texture will start to blur fairly quickly.
#2
02/20/2009 (2:57 pm)
Where is the FrameAllocator::init() I have looked in the main.cs but its not there. Thanks for yuor answer.
#3
02/21/2009 (12:58 am)
Anyone?
#4
02/21/2009 (1:23 pm)
It's on line 132 of main.cc, at least in 1.5.2. I changed mine from:

FrameAllocator::init(3 << 20); // 3 meg frame allocator buffer

To:

FrameAllocator::init(8 << 20);
#5
02/21/2009 (3:03 pm)
Oh i thought it was main.cs. Anyway thanks. I will try now.
#6
02/21/2009 (3:19 pm)
Nope. Doesn't make the slightest difference. Any other way? Can't i jsut edit the objects view distance ingame?
#7
02/21/2009 (3:47 pm)
Only other thing I can think of is your fog distance. Check your Sky object in the script file (usually .mis for this one), and look at the fogDistance setting, and crank it up.
#8
03/06/2009 (7:36 pm)
Yep. That solved it thanks.