Sign in to follow this  
Guest luissa

Drawing the Same Structure Several Times

Recommended Posts

I am using FSDS to design an airfield for fs2004. The airfield contains a lot of little identical buildings, sometimes in rows of 10 or more. It's getting to the point that my relatively high performance computer is starting to stutter under the load. What is the best way to draw all these little buildings?These structures are currently textured. I assume that it would help to remove the texture. Or does fs2004 do this automatically? Is there a way to create less detailed versions of the structures for distance shots? (Similar to multi-resolution aircraft?)I am attaching a picture of the densest part of the airfield, so you can see what I am up against.Thanks,Philhttp://forums.avsim.net/user_files/76611.jpg

Share this post


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

For the performance you could do a few things I think.The first thing is that you can use a object library. Then you can place a lot of copies of the same object by just calling it from the library. You only have to draw and design it once then.This method also allows you to give each building it's own distance (and v2 range) so the performance is also better.Another option to increase the performance is indeed to use LOD models, but this will only help if the object you are making is rather complex of course. I don't know if FSDS can do this LOD model directly for you. Otherwise you could do that with some SCASM tuning or maybe by calling different LOD models from a library.

Share this post


Link to post
Share on other sites

It looks like a solution of sorts may have been forced on me. I am using FSDS to design the runway and the buildings and saving the entire thing as a macro. I am using FSSC to put the macro in the right location. I just got an error message indicating that my macro is too big.So I have split the project into two macros, the runway and the service center area shown below. I guess this gives me the opportunity to use different LOD models for this area alone and, eventually, to convert it to a gmax model. Almost like building a diorama.Does that make sense, or am I headed down a dead-end?Philhttp://forums.avsim.net/user_files/76671.jpg

Share this post


Link to post
Share on other sites

I would say making the entire project as one macro is a very bad idea. This is because for each macro (reference point) it is check if it is visible and then the object is shown. In your case this means that all objects will always be shown. Even if you are at the corner of your field and most buildings are not in your view they still need to be drawn because they are part of an object that is visible.So for the performance it is a lot better to make each object (hangar, tower, etc) as its own macro. There are programs like Airport or FSSC that you can then use to place all these macros. For each macro you can set the distance on which it should be visible and also the radius of the object. This way FS can check which objects do not have to be drawn. In this article I described a bit better how these v1 and v2 values work.http://www.scenerydesign.org/modules.php?n...=article&sid=48As I wrote in my earlier reply I don't know if FSDS allows you to make LOD models (I haven't used FSDS for ages), but with one big macro as complex as the one you show here it would also be very hard to make the LOD models manual by some source tweaking. It's just too complex for that.I hope this helps a bit, although it probably means a lot of work for you :).

Share this post


Link to post
Share on other sites

As Arno mentioned, to create the whole scenery as a macro would not be practicle. For the Runway i would suggest you use Ground 2K4 or SBuilder and use VTP2 polygons for your RWY and Apron surfaces aswell as your airport background or use AFCAD for FS9 ( i believe your building this for FS9 ) and for the Buildings, i would create a Library File and place them as individual Macro calls.This will result in a smaller Scenery to Download yet preserve the level of objects you wish to display and allso preserve the FPS that you desire.Good Luck: Jeff

Share this post


Link to post
Share on other sites

In order to retain my sanity and to avoid having to use separate macros to position a bunch of little hangars, I will probably have to stick with some macros. The good news is that, in most cases, these macros will be seen from a distance and will be either seen entirely or not at all. And the macro is probably not much more complex than an aircraft model.Back when I was designing a flight simulator, I used something similar to macros (that I called objects). For each object I would:A. Determine the location of the object center and estimate whether the object is visible. (Which is apparently what the V1 and V2 values are for.)B. If the object is visible, process all the points in the object:1. Compute the rotation of the object by adding my rotation to the object rotation.2. Rotate each point in the object.3. Add the object center to each point in the object.4. For each point, compute the screen value of the point.C. Process the planes, using routines to determine if they were visible, etc.If I had lots of identical objects rotated by the same amount, I could save time by using the values computed in #2 over and over again. I was hoping that fs2004 does the same thing.If not, I wonder if it is quicker to call the same building macro 100 times (since that will involve some redunancies) or to incorporate 100 instances of the same building in a single macro.Sounds like the consensus is that it is quicker to do the former. But, even if I don't get rid of all the macros, it certainly seems that I should at least keep separate macros for "scenes" that are in different quadrants on the airfield.Thanks for all the advice,Phil

Share this post


Link to post
Share on other sites

Hi Phil,>If not, I wonder if it is quicker to call the same building>macro 100 times (since that will involve some redunancies) or>to incorporate 100 instances of the same building in a single>macro.In FS every macro has only one reference point. So if you put multiple objects in one macro they will all share the same reference point. This means the radius (v2) of this collection of objects must be bigger than the radius of one single object, which can have a negative influence on the framerate. So this means it is in most cases better to use single objects in a macro only (if you have a collection of small objects that are located close to each other you could group them in one macro of course, but bigger objects can better have their own).If you are planning to use the same object again and again it is also better to place it in a object library. The only thing the macro then contains is the position and rotation of the object. For the rest a reference is made to the library object.>Sounds like the consensus is that it is quicker to do the>former. But, even if I don't get rid of all the macros, it>certainly seems that I should at least keep separate macros>for "scenes" that are in different quadrants on the airfield.No that is not needed. A macro does not have a position in it. So when you place a macro it will get a position. If you place a macro twice at other ends of the field the Area/RefPoint commands will end up in the BGL file. One for each macro, they both have their own center coordinate, range and radius.

Share this post


Link to post
Share on other sites

Hi everyone, for this situation,Wouldn't it be possible to design a row, or even rows of evenly spaced buildings (in GMAX at least) as a single object, and have roof, front and back textures tiled with DXT1 textures so that only the spaces between buildings were the 100% transparent parts of the textures, and 2D polygons could be used to cap the ends and inner sides ...the polygon count would go down some, and one would have a single object....just a thought at 6 in the morning.

Share this post


Link to post
Share on other sites

Hi!I would agree with Arno. Okay, maybe it is better to create groundpoly for apron, RWY etc in FSDS2.2x because it supports new commands but otherwise if You have 100 barracks, that are exactly the same, then You can use only one texture for this barrack but if You multiply it 100 times, You will notice a drop of only few FPS. If You would make a set of one row of barracks, let's say 25 in one row, You could also use one texture (no need to tile it!) but you will:1. increase polygon count of an object2. produce large object and thus3. You will need higher v2 valueIf You have one object in library (and this IS THE MUST here), FS will know, it has already drwan this object and FS will tile this object as many times as You need. Each object will1. have same amount of polygons2. it will be small object thus3. it will have small v2 value and thus4. while overflying the airfield FS will free up memory and resources as it is required.So Arno's way is tested and FPS efficient. For example, I have made a car in library, an Audi A4 with bitmap 512x512pix, DXT1 and put it on my airport approx 120 times. Before I put it I had on a monitoring spot around 22FPS, later I had around 19. If this isn't effective then... And yes, I design objects with FSDS 2.24 and compile them with FSSC 1.5.11 and SCASM 2.90.Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

I don't think using a transparant texture that way would give a very nice result, but it is certainly possible.But still you have one big object for the entire scene and that is not best from performance point of view.

Share this post


Link to post
Share on other sites

Sounds like this will be a good excuse to start creating some simple objects using GMAX?I understand that GMAX does not use macros, but that I would effectively be creating temporary library objects that can be "called" by fs2004.What would be the easiest way to place all these objects on the map? To place macros, I use FSSC. I there something similar that I can use to place the individual GMAX objects?Can I make GMAX objects into multi-resolution objects?Phil

Share this post


Link to post
Share on other sites

<>clearly so, these kind of ideas always look bad from certain angles.<>...however I'm skeptical of this comment, Arno...you do have a larger v2 for the object, but polygon count goes down by a factor of 100, so that must trade off positively.B

Share this post


Link to post
Share on other sites

Hi!The way objects that are created in GMAX to be placed into FS is by using them in object library. If You have FS2002 style export, then You can produce a code, that will be placed into library, and of course an API, that can be used by FSSC/Airport for Windows etc.If You have FS2004 style export in GMAX, then objects should be placed using XML code. Arno will tell You more on this topic. And as far as I know, GMAX does support multi LOD objects.Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

If you win really a lot of polygons you might be right Bob that here the very big object is no real problem. But it will probably not look nice anyway :D.

Share this post


Link to post
Share on other sites

Goran is right here.Btw, if you want you can also do this while still using FSDS. You can also make an object library with the source code generated by FSDS.For the placing it depends a bit on which sim you are designing for. If you are making it for Fs2002 you will probably use FSSC again. From GMax (or FSDS) keep the sources and create an object library with them. After that you can call these objects with a simple API in FSSC.If you are working for Fs2004 only and using the new GMax gamepack you get some XML code and an MDL. This MDL is already your library object and with the XML code you can easily create the object library. Then you could for example use SceneGenX to place all the object on the airport. Or you could also do this by writing a small piece of XML code yourself.

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