Jim Wilson wrote: > Frederic Bouvier said: > > > Jim Wilson wrote: > > > > > We first ran into this problem with the old back to front scheme when > > David > > > did the first trees. But I'm wondering now why the prop disks are a > > problem. > > > Shouldn't the aircraft model be on the bottom of the stack anyway? > > Generally > > > there's nothing between it and the camera. > > > > The plane is in the same scenegraph than the terrain or other objects, > > except > > clouds. You have to draw them either before ( with terrain clipped or no > > clouds > > between the viewer and the terrain ), or after ( with prop disc problem ), > > or > > both like in the current situation. > > > > We could do it in a separate sg, the only issue would be noticed taxiing > behind a building, etc. With the triple rendering option it might be good to > do the ac model that way in the default rendering mode. I don't know, maybe > it is better to just deselect the transparent aircraft components in the > external view.
In fact, I already render the scene 3 times, but for different objects : * 1st time, only terrain (OBJECT_BASE and OBJECT kind of scene objects ). To do that, I added a cull callback that returns the value of a boolean. * 2nd time, only 3d models except the aircraft ( another cull callback ) * 3rd time the aircraft ( using the already existing ssgSelector ) in between, I draw clouds layers with depth update disabled ( but with depth test enabled ). Thinking mode about it, I will test if I can remove one pass of cloud rendering. It will become : 0. draw sky without clouds. 1. draw terrain ( depth test, depth updated ) 2. draw all clouds ( depth test, no depth update ) 3. draw static objects ( stencil buffer updated with 1, depth test and depth updated ) 4. draw all clouds ( depth test, stencil test, no depth update ) 5. draw the aircraft. That way, all semi transparent surface from objects or main aircraft will appear correctly without the need to discard them Cheers, -Fred _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
