Jump to content
Sign in to follow this  
Guest cwright

TMF tools

Recommended Posts

Hi George.I've reposted my TMF calculator with the corrections:You are right, the LOD13x is 0-7 and LOD13xx is 0-3, with LOD13y is 0-31. ( Those terms correspond to Christian Stock's subrow, subsubrow, and subcolumn ). 0, 0, 0 = the northwest corner of the LOD8 group area.The numbering of the LOD13 points is 0-255 X 0-255, as we suspected.I'm going to experiment with the calculations for the decal polygons, as I'm not sure of my math... it's a point in a 8192 X 8192 LOD8 grid, offset by 4056 in the "X" value and 4072 in the "Y" value( I think ). Christian said it was offset by 4080, and ranged from 4080 to 12240 ( for 8160 points each way ) ? So either he's right, I'm right, or neither of us is right. :-lolGetting the math right on the polygon placement will be important. Also, switch #3 of the data structure is a tranparency switch according to Christian. I'm going to play with thatI like your tool.

Share this post


Link to post
Share on other sites
Guest christian

You may be right. I played with these values, and found that I couldn't see any change with 4080 and 12240. (I used top view and placed the plane/cross on the edges and found those values). I'm not sure if these values differ regionally, nor where these values come from. My values are found with experiments, I can't explain them...One thing I never understood is how LOD works in the first place. It seems the LOD quadrant stay constant over the earth, although they are mapped on a globe. This means the textures at the equator most be bloated and really compressed at the poles (never checked for that).I'd be interested if someone can put this all together...Yes, I'm reading the post here still sometimes :)Cheers, Christian

Share this post


Link to post
Share on other sites
Guest

Hi friends.Christian. nice to c u too....I checked the calculator and it is fine.I will upload a newer version as I found a small bug. It gives out all the numbers, including the x/y offsets of a point on the LOD13 quad.I used slew mode, got the points in fs and it worked.I have also made the first lake (real one thanks to u guys) by creating a polygon (with as many sides as you like )in gmax.As Christian said, the problem is when it overlaps two or more different LOD13 quads.I'm working on it.I'll write some quick notes on how to do it so you can check it.It's really nice since it produces code you just compile.C u later guys.George

Share this post


Link to post
Share on other sites
Guest

One question:The fs2000 sdk defines the span in meters and the samples distance of the different LOD quads.Isn't this wrong ?In my mind, the horizontal span in meters of any quad, depends on it's latitude. On the equator should be maximum decreasing as you go north or south.Do I get something wrong here or it's just another example of perfect documentation ?? :-)CheersGeorge

Share this post


Link to post
Share on other sites

Hi George and Christian.The span in meters should be for the equator only... the W-E span would have to shrink as it moves towards a pole. N-S span should stay the same. So, a lake 2000 meters long is difficult to size as you move away from the equator, if based on pixels!Christian! Hello!I made a slight change in your macro as follows:TEXTURE_DATA MACRO number, unknown, type, size LOCAL number_start, number_endnumber_start LABEL BYTE DB numbernumber_end LABEL BYTE; IF NOT ( ( OFFSET number_end ) - ( OFFSET number_start ) ) EQ 4; %OUT texture number has wrong length!; .ERR; ENDIF DB unknown DB type DB size ENDMNote that I commented out the length check of the Texture number... That now allows this: TEXTURE_GROUP texture_data, texture_start_0, texture_end_0texture_data label wordtexture_start_0 label word; TEXTURE_DATA "1206", 0, 1, 4 ; [Texture.1206] // Tan Sand Beach Park TEXTURE_DATA "056b2su6.bmp", 0, 1, 4texture_end_0 label word:-eek Yes. You can now have a texture named to the polygon. It probably won't change with the seasons, but can be unique, and reside in a local or global texture folder... here we go again!:-lol

Share this post


Link to post
Share on other sites

Hi George. I think I have the decal poly math.; TERRAIN DECALS DATAdecal_data label worddata_start_0 label word DECAL_DATA 1, 0, 0, 0, 1, 0, 0 DECAL_GEOMETRY 1, DECAL_POLYGON, 1, 0 DECAL_POINTS 4 DECAL_POINT 0 + 4096 - 40 , 0 + 4096 - 24 DECAL_POINT 0 + 4096 - 40 , 255 + 4096 - 24 DECAL_POINT 255 + 4096 - 40 , 255 + 4096 - 24 DECAL_POINT 255 + 4096 - 40 , 0 + 4096 - 24 DECAL_DATA 1, 7, 3, 31, 1, 0, 0 DECAL_GEOMETRY 1, DECAL_POLYGON, 1, 0 DECAL_POINTS 4 DECAL_POINT 0 + ( ( ( 7 * 4 ) + 3 ) * 256 ) + 4096 - 40, 0 + ( 31 * 256 ) + 4096 - 24 DECAL_POINT 0 + ( ( ( 7 * 4 ) + 3 ) * 256 ) + 4096 - 40, 255 + ( 31 * 256 ) + 4096 - 24 DECAL_POINT 255 + ( ( ( 7 * 4 ) + 3 ) * 256 ) + 4096 - 40, 255 + ( 31 * 256 ) + 4096 - 24 DECAL_POINT 255 + ( ( ( 7 * 4 ) + 3 ) * 256 ) + 4096 - 40, 0 + ( 31 * 256 ) + 4096 - 24data_end_0 label wordThat's the NorthWest ( 0, 0 ) of the 8192 X 8192 decal poly grid, and the SouthWest ( 8191, 8191 ). ( 7 * 4 ) + 3 = 31 so... you should understand why I wrote the example this way.The decal polygons don't have the visual distance range of the water polygons! They snap into view abruptly, and at fairly close range.I'll enclose the "PolyBnds.asm", "Waterbnds.asm", and the "RhumbaTMFMacro.inc"( use them with BGLC )The approximate location is N43* 14' 31.5" by W88* 35' 37" in Wisconsin, USA.

Share this post


Link to post
Share on other sites

Hi all.Here's the results of a crude mesh experiment:The land was very flat, and had no rock surface. The area seems restricted to the LOD13 area... you can almost make out the border. I used 3 3-point flatten sets.; TERRAIN FLATTEN POLYGON DATAflatten_data label worddata_start_0 label word FLATTEN_DATA 3, 0, 0, 0, 1, 1, 0 FLATTEN_POLYGON 3, 500, 0 FLATTEN_POINT 20, 74 FLATTEN_POINT 21, 74 FLATTEN_POINT 21, 75 FLATTEN_POLYGON 3, 520, 0 FLATTEN_POINT 28, 110 FLATTEN_POINT 28, 113 FLATTEN_POINT 29, 113 FLATTEN_POLYGON 3, 350, 0 FLATTEN_POINT 253, 253 FLATTEN_POINT 254, 253 FLATTEN_POINT 254, 255data_end_0 label word

Share this post


Link to post
Share on other sites

Here's a single, diagonal, 2-point flatten. Note the top plateau seems to be the original mesh... just raised. It may take a while to establish rules for the flatten polygons used in this manner.

Share this post


Link to post
Share on other sites
Guest

Looks like u'r rocking Rhumba !! :-)I have very limited time the last 4-5 days and the forcast remains the same.I have so far played with the flatten (and lake as it's the same) commands. They work just fine. I'll put on line for testing the latest fsregen.I'll study the above posts and ask more...Cheers for now..

Share this post


Link to post
Share on other sites

Hi George.I'll check out the tool and Gmax tomorrow. Hopefully, some others will become involved in the experiments, so we can speed the learning process. Also, to all interested, a newer version of BGLC was given in the FS2002 Special Effects SDK.

Share this post


Link to post
Share on other sites
Guest

George, I don't know if this is a petty error, or perhaps a significant one. LOD 0 is defined as a set of 6 divisions of the globe, not 4 as you state. Refer to page 9 of the fs2000 terrainsdk.the divisions for lod 0 are at the equator, and at longitude 0, 120, and -120.Bob B

Share this post


Link to post
Share on other sites
Guest

Thanks Bob.I'll correct it. It's only in the docs.I wrote it for people that have no idea about the whole concept.Cheers.

Share this post


Link to post
Share on other sites
Guest

Hi all.I got Friday night (all night) finishing the decals.Rhumba, I got a problem and I'm too tired to go bug hunting.I have not studied your math yet, appart from the suggested offsets for the x-y axis.I seem to get an offset error though. The picture bellow is a flatten-lake area on top of a decal area, both automatically created. Why do I get such an offset I do not know. In gmax they are cocentric.What I do is get for every point the x-y coordinates of an LOD 8 quad in the range of 0-8192. Then I add the offsets you mention (4056 and 4072) and use the results in the DECAL_POINT.The exported scenery test in centered at n38* 7.68 e20* 30.029.If you spot a mistake in my method please tell me.Thanks.Georgehttp://www.nhreas.com/fsregendocs/decalerror.jpg

Share this post


Link to post
Share on other sites

George,You need to take some time off, look at the lists of above posts. You have been talking to yourself!!:-lol

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...