Re: [Plib-users] Newbie question
Brought to you by:
sjbaker
From: David M. <da...@me...> - 2002-10-11 11:39:27
|
Marco Bancale writes: > Sure, changing the far plane was my first idea, but in that way > all the objects would not be culled (by the far plane) anymore! > Isn't it? So, if I have 100 spaceships around the solar system, > I should see all of them... always. I think this is not much > optimized :). You can put the planets in a separate scene graph: ssgSetNearFar(1, 100000); ssgCullAndDraw(ships_root); ssgSetNearFar(1000, 100000000000000); ssgCullAndDraw(planets_root); The problem is that when the ships get close to planets or the sun, they might not be drawn properly (i.e. the planet will block the ship when it shouldn't). As long as you have only 100 ships, you can just put each one under an ssgRangeSelector to make sure it's not draw when it's too far away. With ssgRangeSelector, you can use the same near/far plane for everything and avoid the z-buffer strangeness. All the best, David -- David Megginson, da...@me..., http://www.megginson.com/ |