Jump to content
Sign in to follow this  
Guest cwright

TMF tools

Recommended Posts

Guest

Talking to myself !! It's not the first time !! :-)I got a big project waiting and once I'm into it I will have no time for fsregen. So I try to do as much as I can over the weekend.After a fair amount of sleep (I like Saturdays!) I got another version of FsRegen and a little howto for decals and flatten areas.Hope this helps people a bit with both design and hacking :-)Just follow the link from the main fsregen page : http://www.nhreas.com/fsregen.htmlCheers !George

Share this post


Link to post
Share on other sites

Hi George and W.We'll all be talking to ourselves before this is cracked! :-8 I'm sorry if I've been quiet, but the few minutes I've had this week are now devoted to cracking shorelines... Microsoft gave us a single road and a single shoreline example in the Oshgosh scenery... I think these guys just like teasing us. George, could you email me, or post the actual txt files of the pond and the beach? I'm suspecting the problem may be with the pond, not the sandy decal. Wouldn't their shapes be the same, just slightly larger for the sand area?My fear now is that the offsets are not as straight-forward as I first thought, and may have hidden variables that control the placement. Christian Stock used a different set of decal offsets to produce his Ryan's Creek airport background ( a TMF decal ). This research alone may take a few weeks to sort out, and we may have to settle for approximation, with hand-editing for the final bgl.We definitely need more minds to work on the problem... simply testing alterations in variables is horribly time consuming, as FS2002 takes so long to reset after a scenery library change... it takes much less time to play with the data or the structures, regenerate the bgl, delete the Scenery.DAT file, than it takes FS to reset! I'll bet Christian nearly went mad at times... and imagine, he was working all alone on this! We're trying to create a bgl in a manner M$ never used! Their tools are much different, I'm sure, and we can only hope to get close with this approach, as we have no clue what they used to get their data into the sim. For example, I'm sure they had digital data for coasts, roads, streams... and this data was crunched and made into bgls without human intervention, to produce perfectly matching lakes and shores. We may have to "adjust" the numbers by trial and error, because our understanding of the data-structures and variables is just a guess.

Share this post


Link to post
Share on other sites
Guest

I studied the textures from the Oshkosh scenery last night, and I don't think there is any technique used beyond simple custom photo-terrain applied via resample.exe.The only thing I noticed was that their master photo reminded me of a mix between terrascene data and the other default textures from the program. This makes for very distinct freeways and excellant merging into the default.The file names of the textures are identical to what u get when you run resample.exe on a photo. The water areas are an alpha channel, just like we do with resample.Bob Bernstein

Share this post


Link to post
Share on other sites
Guest

Hi Bob, Rhumba everybody..I'm downloading the Oshkosh now. You say there is only one river in it ? Actualy is there any bgl terrain that is very small and we know for sure there is a lake or a river in it ?Rhumba, during the tests I left the original gmax triangles in so I could see what was going on. Check the pic bellow. I have the feeling that you are too close and the proper placement is right under our noses. I 'll have a go as well since I don't think any more development in software is possible or wise without further knowledge.The pic below is next to NZRC and the values I used for the result you see are : Y and X offset 4082, and span 8160. As you say it takes for ever to restart fs and see any changes that's why I thought by making fsregen and let people tell us what they got we multiply our fire power. Of course the best thing to do is find the proper way to do it and to scrap this adhoc method.Anyway, guys have a nice weekend and happy huntingGeorgehttp://www.nhreas.com/fsregendocs/decal_check.jpg

Share this post


Link to post
Share on other sites

Hi all.As for Oshgosh:hyposh.bgl is a pond.hylosh.bgl is the shoreline of the pond.rr91IG1.bgl is a line decal... a road that will look like a rail-line, as explained in the docs. ( FS2002 doesn't have actual railroad tracks.)As I said, they did it on purpose.:-xxrotflmao The hylosh is the key to solving the line decals.

Share this post


Link to post
Share on other sites
Guest cwright

George, I was very interested in trying it. But there seemed to be a problem. After exporting makemdl generated a file called lake.asm. There was no lake_0.asm. However, when trying to load it in the first step, fsregen seemed to insist on the presence of lake_0.asm, so the process failed. The material I had applied as per the instructions did not appear in the slot. I am particularly interested as this could possible be adapted for making coastlines - is this possible? Many thanks for all your great work. Best regards, Chris

Share this post


Link to post
Share on other sites
Guest

Hi Chris.Check that you have the latest makemdl.exe.If you export the file "lake.bgl" and you see the files "lake.asm" and "lake.azm" then you have the older version.MS changed the generated files to "lake.asm" and "lake_0.asm" with the new makemdl.Hope this helps.Regarding the coastlines I think is is possible, apart from the waves effect that we do not know yet how to do it.The other guys here are working on it.CheersGeorge

Share this post


Link to post
Share on other sites
Guest cwright

George, that was quick! I posted an hour ago, then found the problem was exactly as you said. I still use the old makemdl due to a bug that causes a problem in the virtual cockpit. I thought of using the newer makemdl - but copied the old one right back in mistake! With the new makemdl that part works fine now. I returned to update my post and saw you had got in there already. What excellent service! Problem is now that bglc generates loads of errors when trying to compile tempLake.asm. (tried with old and new bglc). Still checking that.... Many thanks, Chris

Share this post


Link to post
Share on other sites
Guest cwright

Hi, George, fsregen creates the tmpLake.asm file okay now, but sadly bglc doesn't seem to like it. Here's tmpLake.asm:********************************************************; ========= FSregen v0.29a - test. TMF Know How and macros by Christian Stockheader label BGLCODE dw 1 dd 0393AFh dd 02FB12h dd 01DAAAAAAh dd 01E000000h dd 9 dup(0) dd (offset terrain_data) - (offset header) dd 15 dup(0) dd 87654321h dw 3 dup(0) dd 10 dup(0)terrain_data label BGLCODE dd (offset terrain_header_end) - (offset terrain_data) dd 0202h dd 12 dup(0) dd (offset flatten_header) - (offset terrain_data) dd 10 dup(0)terrain_header_end label BGLCODEflatten_header label BGLCODE FLATTEN_HEADER 513, flatten_list, flatten_data, flatten_endflatten_data label BGLCODEdata_start_0 label BGLCODE FLATTEN_DATA 1,2, 0, 25, 1, 1, 1 FLATTEN_POLYGON 11, 0, 0 FLATTEN_POINT 247, 29 FLATTEN_POINT 240, 24 FLATTEN_POINT 233, 21 FLATTEN_POINT 228, 21 FLATTEN_POINT 227, 23 FLATTEN_POINT 225, 26 FLATTEN_POINT 220, 34 FLATTEN_POINT 224, 40 FLATTEN_POINT 233, 45 FLATTEN_POINT 244, 45 FLATTEN_POINT 251, 39data_end_0 label BGLCODEflatten_list Label BGLCODE FLATTEN_LIST 1, flatten_groupsflatten_groups Label BGLCODE FLATTEN_GROUP 250, 473, flatten_data, data_start_0, data_end_0flatten_end label BGLCODE***************************************************** and here's part of the error report in the DOS window:*******************************************************c:temptmpLake.asm(28) : error A2008: syntax error : FLATTEN_Dc:temptmpLake.asm(29) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(30) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(31) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(32) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(33) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(34) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(35) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(36) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(37) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(38) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(39) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(40) : error A2008: syntax error : FLATTEN_Pc:temptmpLake.asm(41) : error A2006: undefined symbol : BGLCOc:temptmpLake.asm(41) : error A2175: invalid qualified typec:temptmpLake.asm(43) : error A2006: undefined symbol : BGLCOc:temptmpLake.asm(43) : error A2175: invalid qualified typec:temptmpLake.asm(44) : error A2008: syntax error : FLATTEN_Lc:temptmpLake.asm(46) : error A2006: undefined symbol : BGLCOc:temptmpLake.asm(46) : error A2175: invalid qualified typec:temptmpLake.asm(47) : error A2008: syntax error : FLATTEN_Gc:temptmpLake.asm(48) : error A2006: undefined symbol : BGLCOc:temptmpLake.asm(48) : error A2175: invalid qualified type************************************************************ I was careful to choose lat/long coordinates to put it in the centre of the LOD13 quadrant. I'm using the original FS2000 SDK bglc (also tried the new version). The lake is about 200 meters across in Gmax. Many thanks, Chris

Share this post


Link to post
Share on other sites
Guest

Hi Chris.I just copied/pasted your code to a file and compiled straight away.Make sure you have the grginc.inc and tmfmacros.inc in the bglc folder along with the other inc files. Ideally they should be placed in your fsregen folder.I have uploaded this package http://www.nhreas.com/download/bglc+inc.zipthat will solve the problem. Another friend complained about the same problem, so I do not know if the two above mentioned files in the 0.29 distribution are wrong (my mistake).Anyway, I have also uploaded v0.29b_test that has a couple of bug fixes and most important, will let you get the quad details next to the one you are designing. You can then place helping rectangles in gmax with the given dimensions and design more quads in parts. Then export to each quad's center position and you should be set for more complex terrain modifications.I hope all this makes sense. If anyone's feeling like writing any HowTo's I will be greatfull and I'll put them on line will all credit given and many many thanks.That's it for now, hope you have fun.All the bestGeorge

Share this post


Link to post
Share on other sites
Guest

Here I am talking to me again... never mind :-OIf you downloaded v0.29b throw it away and use 0.29c.Has a nasty bug fix that was throwing the center of the quads off place.George

Share this post


Link to post
Share on other sites

Hi George.Just when you thought the water was safe.....The Oshgosh scenery has a file hyposh.bgl, which I assumed to be a pond. It's actually an island, with hylosh.bgl as it's shoreline!N43* 53.83'W88* 27.26'

Share this post


Link to post
Share on other sites
Guest

I think you are right.They MUST have done it on purpose...I got a complex project to complete, but since it's too hot over here to sleep, I'll find (hopefuly) some time :-)Cherrs Rhumba.

Share this post


Link to post
Share on other sites
Guest cwright

George, you were right about the INC files! I tried both versions of bglc - when I used the old version it was in a different directory - without the INC's! It certainly looks like the newer bglc doesn't work. Now it works just fine. Now to add some beaches.... As I understand it the lake must be smaller than one LOD 13 quadrant, which means it can't be very large. Also it wouldn't be very practical for coastlines. Do you think it will be possible to remove that size restriction? Once again, many thanks! Best regards, Chris Here's a pic of my very first lake. Some of the buildings are default library objects, so they were also made possible by fsregen! http://www.kline.demon.co.uk/lake.jpg

Share this post


Link to post
Share on other sites

Hi Chris.I've been routinely using the newer BGLC with no problems... but I have not been using fsregen. I drag'n'drop the ASM file onto the BGLC icon. I'll use the command line if I have a problem compiling, to read the error code.All flattens, and all water (whether FS2002-style flattened water or CFS2 style mesh-clinging water ) need to be defined within the LOD8 group area. But you can use more than one LOD13 quadrant. Christian Stock's Ryan's Creek had a flatten that used 2 adjacent LOD13 areas:; TERRAIN FLATTEN POLYGON DATAflatten_data label worddata_start_0 label word FLATTEN_DATA 1, 4, 3, 12, 1, 1, 0 FLATTEN_POLYGON 4, 88, 0 FLATTEN_POINT 243, 198 FLATTEN_POINT 248, 211 FLATTEN_POINT 151, 255 FLATTEN_POINT 105, 255 FLATTEN_DATA 1, 4, 3, 13, 1, 1, 0 FLATTEN_POLYGON 4, 88, 0 FLATTEN_POINT 105, 0 FLATTEN_POINT 151, 0 FLATTEN_POINT 82, 28 FLATTEN_POINT 75, 13data_end_0 label wordNote this must reside in the same LOD8 group, but you define the LOD13 area with the flatten_data... just string together as many flatten_data structures as you need, between the data_start_0 and data_end_0 labels. Here, Christian used 2, but I believe you may use as many as you want. As we get more proficient, we should be able to define more than one LOD8 group area as well.Also Chris, try a skinny polygon as a stream... you span over one LOD13 area with that as well! If you don't like the water color, make it a DECAL, with the texture of your choice.Like Christian, I now understand 90% of the TMF line structure, but the last 10% has me stumped so far. The good news is, we can use thin polys for roads, streams, etc.On another note, Bob Bernstein has been leaning towards the idea of going with a photoreal approach if you're going to remodel a whole LOD13 area... something to consider. "Schampi" had discovered a way to do as small as a single LOD13 tile ( same as tranparent landclass ), but you need to know the texture naming convention... I believe someone has already posted that somewhere. You could use the default ground-texture, paint roads, streams, etc... in all seasons, and use the alpha channel for water... I think that could all be done as well. The Oshgosh scenery was a good example of that approach.

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