Jump to content
Sign in to follow this  
rhumbaflappy

Mesh-clinging Water using Christian Stock's TMFmacros

Recommended Posts

Hi all.If hand-coding TMF water for BGLC compilation, or using FSRegen to create the code, all water is flattened.I was asked if Christian's TMFmacros.inc could be used to create mesh-clinging water... Yes, it can:

include TMFmacros.inc; NZRC - Ryans Creek aerodrome; Mesh-Clinging Waterdata_base	label	word; DATABASE HEADER	dw	1			; world set number	dd	LAT32_S46:50:00		; North Bound	dd	LAT32_S47:00:00		; South Bound	dd	LON32_E168:10:00	; East Bound	dd	LON32_E168:00:00	; West Bound	dd	0			; VOR data	dw	0			; lowest VOR freq	dw	0			; highest VOR freq	dd	0			; seeds level 8 data	dd	0			; seeds level 9 data	dd	0			; seeds level 10 data	dd	0			; seeds level 11 data	dd	0			; seeds level 12 data	dd	0			; traffic data	dd	0			; minimum safe altitude data	dd	terrain_data - data_base; terrain mesh data	dd	0			; object data	dd	0			; library data	dd	0			; facilities data	dd	0			; anchor point data	dd	0			; ATIS data	dd	0			; NDB data	dd	0			; dynamic object paths data	dd	0h,0h			; minimum library id	dd	0h,0h			; maximum library id	dd	0			; miscellaneous data	dd	0			; title and description data	dd	0			; magnetic variation data	dd	0			; exception and exclusion data	dd	87654321h		; magic number	dd	0			; compression switch	dw	0			; spare	dd	0h,0h,0h,0h		; GUID	dd	0			; product id	dd	0			; product build number	dd	0			; new facility data pointers	dd	0			; new facility name list data	dd	0			; new facility band list data	dd	0			; new facility data; TERRAIN MESH DATABASEterrain_data	label	word; TERRAIN MESH HEADER	dd	terrain_header_end - terrain_data; end of terrain header	dd	514				; version	dd	0				; unknown entry	dd	0				; unknown entry	dd	0				; elevation header	dd	0				; land class header	dd	0				; unknown header	dd	0				; class lookup header	dd	0				; season header	dd	0				; class lookup list	dd	0				; water class header	dd	0				; elevation index	dd	0				; land cover index	dd	0				; unknown index	dd	flatten_header - terrain_data	; flatten polygon header	dd	0				; decal header	dd	0				; reserved	dd	0				; reserved	dd	0				; main terrain data	dd	0				; reserved	dd	0				; reserved	dd	0				; reserved	dd	0				; regions header	dd	0				; reserved	dd	0				; reservedterrain_header_end	label	word; TERRAIN FLATTEN POLYGON HEADERflatten_header	label	word	FLATTEN_HEADER [b]256[/b], flatten_list, flatten_data, flatten_end;	FLATTEN_HEADER [i]513[/i], flatten_list, flatten_data, flatten_end; TERRAIN FLATTEN POLYGON DATAflatten_data	label	worddata_start_0	label	word	FLATTEN_DATA 1, 4, 3, 12, 1, 1, 0	[b]DECAL_POINTS 4[/b];	[i]FLATTEN_POLYGON 4, 88, 0[/i]	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	[b]DECAL_POINTS 4[/b];	[i]FLATTEN_POLYGON 4, 88, 0[/i]	FLATTEN_POINT 105, 0	FLATTEN_POINT 151, 0	FLATTEN_POINT 82, 28	FLATTEN_POINT 75, 13data_end_0	label	word; TERRAIN FLATTEN POLYGON LISTflatten_list	label	word	FLATTEN_LIST 1, flatten_groupsflatten_groups	label	word	FLATTEN_GROUP 389, 742, flatten_data, data_start_0, data_end_0flatten_end		label	word

This code will work in CFS2 as well as FS2002.

Share this post


Link to post
Share on other sites
Guest

Could you maybe post the code for putting a decal over the default airport layout polygon/decal thing? I do not understand all this code, so a dumb user explanation would help. I have the Ryan's Creek scenery and have read (tried to) the design stuff, but I lack so much knowledge in hand coding that it doesn't make much sense. I would like to replace the default airport decal at KRDU with one of my own or something better.Thanks in advance!

Share this post


Link to post
Share on other sites

Hi tlassiter.I noticed in another post you stated you were comfortable with GMAX, and familiar with fsregen.Your best bet is to go to George Ioannu's fsregen site ( ). georgio has done a great job with this so far. You'll need to download 0.029ctest version. His html covers the creation of water, and links to a short tutorial on creating decals. I could do no better for you. The link for [link:www.nhreas.com/fsregendocs/decals.html]Creating decals describes a process of placing a slightly larger decal under a TMF pond, in order to create a type of shoreline. ( TMF water always overlies decals... that's how coastlines are made over the rough landclass tiles, and why LC tiles must extend into the ocean a ways ). But the decal process is the same for laying down an airport background, or altering a small section of a landclass tile, or faking a road ( with a skinny polygon ). At this point, I suggest you use George's fsregen along with Gmax, as it avoids the BGLC hand-coding. I hand code with my experiments, but I usually use George's tool to properly locate the LOD8 Group and LOD13 offsets. As far as covering an airport background goes, you can slew over the area you want to change. Use a top-down view and Shift-z to get to coordinates. Use those coordinates with Gmax and fsregen to create the decal. The Scenery library order will place the decal's BGL on top of the ABP*.bgl ( airport background polygon ). The runway ( and any TMF water or lines ) will automatically lie over the decal.

Share this post


Link to post
Share on other sites

Here's what I'm taking about:First, it's Ryan's Creek, by Christian Stock.Then, it's the same scenery, but I made a new ABP decal, and placed it in it's own scenery folder structure. This new decal overrides the Ryan's Creek NZRC_ABP.bgl, as the Scenery Library places the new scenery after the Ryan's Creek default:

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