Jump to content
Sign in to follow this  
Guest Marky Parky

FS2002 Autogen Annotation Tool

Recommended Posts

Guest artmartin

Glad I hadn't started coding that part yet. I sure read it wrong. Understand the first point X and Y. Next two 4 byte pairs are the X and Y vectors to the 2nd point? Why not just the actual positions or the angle and distance? Sheesh. What is an X and Y vector anyway? Isn't a vector an angle? Why would you need two of them? For that matter, if you're simply drawing a box and have data storage room (6 4 byte sections) for three full points, it would seem that would define the box completely if you simply stored the X and Y positions directly. Since we know the house definition is in the form of a rectangle that can be angled from the horizontal, the best utilization of the file space would be:1st 4 byte space - x position of 1st point2nd 4 byte space - y position of 1st point3rd 4 byte space - vector (angle) to 2nd point4th 4 byte space - distance to 2nd point5th 4 byte space - length of line from 1st to 3rd point.The 3rd and 4th spaces could also simply be the actual X and Y positions of the 2nd point. The angle is easily derived from the offsets of the 1st and 2nd.This all leaves one space open for other info. No need to define the angle to the third. It's going to be 90 degrees off from the vector to the 2nd.I still would love to know what tool the Microsoft programmers use to create their autogen files. Have this feeling it's not Annotator.Art

Share this post


Link to post
Share on other sites
Guest luissa

Hello Art,I have been reading your posts with great interest. I remember this thread as, in the past, I thought of adding to Sbuilder something similar to what you are doing. One think that would be nice was the ability to anotate the raw (whole) bitmap that we use to produce the photo scenery instead of working on individual slices. The programme could generate the agns where annotations have been done (where annotations exist).Regards, Luis

Share this post


Link to post
Share on other sites

Art,A vector is a line at an angle and has a length. The X/Y values are the components in the directions of the x and y axes.Why are you suggesting a different format for the file? The file format exists so you will need to use it.George

Share this post


Link to post
Share on other sites
Guest Murmur2k

This most definately is a great resource, thanks George for pointing me over here! Hope I can be successful working on it!Will

Share this post


Link to post
Share on other sites
Guest artmartin

George, I wasn't suggesting that at all. I was just really confused by what seemed to be a very strange format that Microsoft chose. Obviously I have to work with what they've established. I'm simply wondering, given that there's no place in the above decoded format for the code that identifies the style of building, if maybe that decoding might not be in error and that the info does exist within each house record. Never hurts to take a second look at something. I guess you could say too I was poking a bit of fun at the complexity of nerdiness. Just thought it was strange that Microsoft would go through so much trouble to compress this info into binary format when very few of the values would ever get above integer levels and the picture you're setting up autogen for is only 256 X 256 pixels in the first place. It's always amusing to me in programming what true nerds go through to save a byte here and there when the file could've been a simple tab delimited or fixed length field file of actual numbers that very clearly showed someone opening it what it contained. Take the first four byte groups for example. They describe 4 numbers with ranges of 0 - 20 and yet in their zeal to put everything in hex, they've managed to take up 16 bytes of the file. Even saving the text "20" followed by a tab character 4 times, only requires 12 bytes and were someone to go into the file, it'd be immediately readable. We know the picture is going to be 256 X 256 pixels across so why do we need this obscure way of representing X and Y locations with a -0.5 to 0.5 scale? Why not simply save the actual pixel positions as a number between 0 and 256 in text format?If fully understand data compression when it's truly needed but in my own daily programming I also live by my own rule of thumb - Don't make anything too complex that should it break it takes you a day to remember how you did it.I'm not worried. I'm sure I'll solve this all on my own with some true experimentation that involves creating a brand new .agn file with annotator, drawing one house at a time, saving the file, and using a hex editor, watch the exact changes to the file. I hope the Microsoft programmer that designed this stuff has trouble helping his son with his math homework just as I hope the inventor of the necktie died a slow strangulation death.

Share this post


Link to post
Share on other sites
Guest artmartin

Annotating the entire bitmap would be cool although, in the scenery I was creating, my original files were often 40mb in size and when zoomed out to fit on a single computer screen no details could be seen. Facing the task of setting up 10,000 houses at a time would've been a bit daunting. Maybe Microsoft had it right there by breaking up the chore into the individual tiles. They just didn't make the program user friendly. My first programming task has been a much simpler user interface for deciding what file you want to work on, allowing you to see each tile and know which ones already had autogen assigned to them. Next step is to put patches of color on those selection images so you can get a general idea of the level of editing you've completed already. Next programming step will be the editing page. First of all, I don't know about the rest of you, but the first steps I always did on Annotator were to expand the window size, zoom in, and pan the zoomed image back to the center of the window. Man, make the image as big as you possibly can right from the start. Who wants to draw tiny little boxes on a tiny little thumbnail print? Then, give the user some preset house buttons. I find that the majority of my houses are square to the image. Why in the world do I have to draw the first line and expand it out if I don't want the house angled? The classic (mouse down to set the first corner, drag to the opposite corner, and release) seems a bit easier on the hands. If I click back inside the box I just drew, I select the object for deleting, moving, or resizing. Most angled houses I've found are at a 45 degree angle. Why not a button for that drawing style using the same logic? A freehand tool then makes up any other angled styles.Another button lets you define a rectangle as a row of individual houses as you'd find in a housing development. This is where either AI logic comes in for the computer to decide the spacing based on patterns it finds in the underlying picture or you simply let the user decide the house size and the amount of space between them. Annotator gives you the option after the fact of seeing if you've overlapped any of your defined houses. Duh! Don't let the user overdraw another house in the first place. I've heard many complaints about the vegetation tool. Annotator only allows you to define rectangular areas. Mine will allow freehand drawing of an area and, once defined, will fill in the appropriate boxes required by the output file. All the defaults (building heights, vegetation choices, etc) will be saveable and will be the default for each new agn file you create unless the user intentionally changes it. I can't tell you how many times I've gone into Annotator and forgotten to change those defaults and ended up with 10 story buildings in a residential neighborhood. When I'm done with this program, the EULA is going to state: "This software is free for use for any private scenery design user. Should any employee of Microsoft wish to make use of it, open your wallets suckas....."

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...