Sign in to follow this  
Guest christian

Has anyone solved the

Recommended Posts

I just finished building a few trees to use in my scenery designs, and I noticed that although I can remove the shadow from the trees in the BGL file, I can't seem to eliminate the modeling of light and shadow on the tree itself. That is, if I make some standard cruciform trees, there is a definite light side and shadow side. This has the unfortunate side effect of really highlighting the fact that they're cruciform. Has anyone figured out the switch in BGLC that turns this sort of thing off? I know I can make them self-illuminated to kill the effect, but I'm not keen on neon glowing trees at night.Any help would be greatly appreciated.thanks,

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I don't have a solution either, but what do you mean with "highlighting the fact that they're cruciform"?I agree that the lighting effect is not always very nice, but I have no big problems with it on my trees.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

I just meant that, depending on the position of the sun, there's a sharp line dividing light/shadow that runs perfetly up the trunk of the tree, making them look much more like two perpendicular planes, which of course they are.

Share this post


Link to post
Share on other sites

Aah, that's the problem then :), I have no two perpendicular planes, my trees are made of one plane that rotates to the direction of the user. That why they look better.The only thing you can still see is that they are a lot darker in the shadow then in the sun, but there are no line or so on it.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Arno,I have been trying to find a way to change my trees from 2 intersecting planes to a single rotating plane.I cannot seem to find anything in the SDK regarding this. Would you mind pointing me in the right direction (i.e. which instruction set and/or parameters) ? I am familiar with both the BGLC and SCASM commands, but I am currently using BGLC, so I am particularly interested in this.Thanks !Allen

Share this post


Link to post
Share on other sites

Just to throw something completly wacky into here. Has anyone heard of a program called SpeedTree (http://www.idvinc.com/speedtree/)?Using reasonable LOD models this may be a new milestone in scenery design. Unfortunately, I don't really have time to look into this myself. I dunno if this approach would be reasonable at all, it just may be too many polys even with good LOD models...Cheers, Christian

Share this post


Link to post
Share on other sites

I can't remember the BGLC command (I am at work, have no SDK etc here), but the SCASM command is RotateToAircraft, if you put this at the place of the RotatedCall then it should work fine.For BGLC it would required finding the equivalent command (I have done it already at home) and then placing it in the BGLC file (made by GMax for example).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Humm, demo is not that usefull, only shows nice pictures.Also bit expensive to buy ($400 or so) and I haven't found an example tree in AutoCAD or 3DS format so I can test it with GMax and FS.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Hmmmm ...Several hundred to 25,000+ polygons per tree (and only costs $400 or so) - not quite the ideal solution for FS, methinks! Nice thought though.CheersGerrishBTW, the BGLC version of RotateToAircraft() is SPRITE_VICALL.

Share this post


Link to post
Share on other sites

Yeah, after my first enthousiast reaction I have been thinking a bit and although the lowest detail model should "only" have a few hundreds of polygons, I think they can never win from the one rotating polygon with a good texture.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Hi BillI agree with you 100% about the unsightly effect that the differential shading has on the traditional 'cruciform' model for trees when used in recent versions of FS. This was one of the reasons why I and others adopted the alternative RotateToAircraft() method.There is no way in FS2002 (as far as I know) of curing the problem with the cruciform model, because all of the available texture-rendering commands produce a similar effect. I suppose that this is an essential feature of the scenery engine in order to create a correctly-shaded 3D world. But it's a pity that there is no way of turning this light-source dependant shading off for the special case of trees. The separate code for the Autogen trees appears to do exactly that - they don't seem to suffer from the same problem - but the rendering technique that Autogen uses doesn't seem to be accessible to us in BGL code. I'm just praying that RotateToAircraft() (SPRITE_VICALL) will still be there in FS2004 when they are seemingly going to strip out a lot of the older BGL commands ...CheersGerrish

Share this post


Link to post
Share on other sites

Hmm, I only had a quick look, and thought they have 3ds trees, but they are in the spt format. So the demo is only movies then? That's useless.I was thinking having quite an aggressive LOD sceme, with still having billboard / crossmapped trees from further away. A GF3 should be able to handle about 10 trees without noticeable performance drop at small airstrips.As to billboards, they also drain CPU power, that's why those crossmapped trees are still around (ie if the autogen trees would be billboards, that would be noticable in framerates). Imposters is what we need.The only thing I don't like about billboards / cross trees is that they look stupid from above and can't cast real shadows. I've seen demos with more highly detailed vegetation (100-1000 polys per plant, and I'm talking free roaming realtime landscape simulation here) and GF3 and up are certainly able to handle that sort of detail. Hopefully MS will optimise MSFS eventually (I thing FS2004 will be unlikely though), so we can include 1000 poly trees for autogen...Ahh, I'm dreaming again...Cheers, Christian

Share this post


Link to post
Share on other sites

Actually the Autogen trees do have an appreciable drain on frame rates - try turning up their size and density with the Annotator and you'll see what I mean!Quite apart from the shading problem, any model with intersecting planes is a pain to draw, even if your name is DirectX, because it needs more than the simple 'painters algorithm' to resolve the hidden surface issue. For every pair of intersecting triangles, the line of intersection has to be calculated and the two original triangles clipped/divided into smaller ones. That's why gMax has the 'weld' facility and recommends its use in preference to allowing parts/planes to intersect. This way, the calculation of the intersection line and splitting the triangles is done as a one-off calculation at design time.So the cruciform model for trees is far from ideal unless one welds the intersecting planes and turns them into at least 16 triangles rathen than 8 intersecting ones. The single plane rotating towards the viewer has many theoretical advantages, including the fact that it reduces to just two triangles, but its drawback is the considerable overhead of the rotation mechanism. I have no idea whether DirectX has a 'primitive' for this, but even if it does it hasn't been implemented in FS yet. I've got some ideas of my own for optimising frame rates in the next version of my trees library ... Another way of modelling trees in future might be through the octtree-based volumetric texture format implemented in DirectX, but whether this will be suitable for realistic-looking trees I wouldn't yet know (its obvious use is for clouds and, perhaps, water).CheersGerrish

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this