• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Regarding Gmax ground-polys

Status
Not open for further replies.

bpahe

Resource contributor
Hi there!

Got my first try at a Gmax Groundpoly to compile OK, using the FS2002 gamepack and ASM editing as instructed by the tutorial. I made a plane (no boxes or other stuff), which is quite large, along with a 8-bit BMP with Colorkey Alpha-channel for masking.

So, now, the scenery loads, no crashes (!), the aircraft casts shadows, BUT - the area is entirely white.

Have I made one of the following errors;

A) Wrong texture format
B) Too large poly (some 3x3 km!)
C) Too large bitmap - split it up, dude!

The reason for asking without really searching is that I really must get to bed, and I´d like to ponder the solution while at work tomorrow... so that I then can move on to seasonal variations! :D

Thanks!

/hans
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi Hans,

A. I always use DXT textures, so maybe that is the reason. Else, try to add mipmaps (you can also do that in the 8 bit texture), I have seen strange results without them.

B. I don't think your polygon is too large. When I made ground polygons they are usually 1x1 km, but as long as you don't make them 20x20 km or so, I don't expect trouble.

C. Up to 1024x1024 bitmaps I have never had trouble, I don't know how big yours is at the moment?
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Hi Hans.

Couldn't we use Gmax ( with FS9's MakeMDL ) to make a plane. Then clone it and convert that clone to a platform attachment, then link the platform to the plane? Then you'll have shadows for the groundpoly. The poly itself could be 99% opacity, or use the KillShadow technique to suppress the shadowing of the poly itself, if needed.

Dick
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi Dick,

I would not advice to do so. The new gamepack is not really suitable for ground polygons.

The platform option for example does not work correct when you plane is at ground altitude, it only works when it is raised above the ground.

When the polygon is on the ground you would not see the shadow, but it could indeed be removed.

But my tests showed that these polygons do not really work correct. Therefore I think it is better to use the Fs2002 gamepack for now. For the future we can only hope that the XML scenery will become a bit more suitable for this, as the future of GMax objects seems to be going into the direction of 3D objects only more and more.
 

bpahe

Resource contributor
Hi and thanks all...

...but oh, silly me. Not using square textures, once the image was scaled to 1024x1024 all went well. :duck:

Ok, but 1m/px is not really enough, at least not for runways and taxiways. Seems I need to open the wallet and buy a 0.5 (or even better .25) image. And redo the work of creating seasonal textures. Btw, how´s that done on these kind of objects - the "usual way"? Will they then follow the FS2004 seasons or will the change be the FS2000-style 4-season variation?

/hans
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi Hans,

I tried to make an airport with 0.16 meter resolution textures ones. And although it does look nice I would not advice you to do so, as the performance is bad :D. I my case it was 1 GB of textures for just the airport.

With any non mesh technique the seasons of the mesh are not followed automatically. But if you know the days at which the seasons change for your area you can use these to check the seasons, instead of the old 6F8 variable.
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Hi Hans and Arno.

I may have found the clues to making ground polys with the Gmax FS9 gamepack, and some tweaking.

Gmax allows us to use numbered ZBiasing, and it seems 4 is OK for the ZBIAS material name. The Zbiasing stops the ground flicker.

The attachment of a platform works for generating a shadow, but only if the MDL uses the Kill_Shadow tweak... you cannot have the aircraft show it's shadow over an object that already shows it's shadow.

I used TEXTURE_GROUND, rather than TEXTURE_BUILDING... but this may not be needed.

http://webpages.charter.net/ludowr/GroundPolyTest.zip

===========


Code:
; compile with BGLC /MDL C:\Documents and Settings\Dick\Desktop\GroundPolyTest\LakeLawnRunway.asm
    db  'R','I','F','F'				; RIFF file identifier
    dd  bgl_data_end - $ - 4		    ; size of RIFF data
    db  'M','D','L','9'				; file identifire (FS9 model)

    db  'M','D','L','H'
    dd  visual_model_header_end - $ - 4
    dd  visual_model_header_end - $ - 4
    dd  0
    dd  0
    dd  675
    dd  0
    dd  0
    dd  152
    db  'F','S','8','0'
    dd  2304
visual_model_header_end  label dword

    db  'I','S','F','T'   
    dd  ver_end - $ - 4  
    db  "MakeMDL - FS90 (9.00.030612.02)",0
ver_end label word       

bounding_box_riff_start	label	word
    db  'B','B','O','X'   
    dd  bounding_box_riff_end - $ - 4
    real4  -12.200, 0.000, -674.200  
    real4  12.200, 0.000, 674.200  
bounding_box_riff_end label word       


model_outside    label    BGLCODE
model_shadow label BGLCODE
model_inside  label    BGLCODE
exterior_riff_start_0 label BGLCODE
    db  'E','X','T','E'   
    dd  exterior_riff_end_0 - $ - 4
LOD_0L    label    BGLCODE
    include    C:\Documents and Settings\Dick\Desktop\GroundPolyTest\LakeLawnRunway_0.asm
exterior_riff_end_0	label	BGLCODE


shadow_riff_start_0 label BGLCODE
db 'S','H','A','D' 
dd shadow_riff_end_0 - $ - 4
SHADOW_0L label BGLCODE

Kill_Shadow_top label BGLCODE
bgl_riff_start_Kill_Shadow label BGLCODE
db 'B','G','L',' '
dd bgl_riff_end_Kill_Shadow - $ - 4

LOD_0_Kill_Shadow label BGLCODE
BGL_END
BGL_RETURN

bgl_riff_end_Kill_Shadow label BGLCODE
shadow_riff_end_0 label BGLCODE


bgl_data_end label     BGLCODE


Code:
LakeLawnRunway_top label BGLCODE
texture_riff_start_LakeLawnRunway	label	word
    db  'T','E','X','T'   
    dd  texture_riff_end_LakeLawnRunway - $ - 4  
    TEXTURE_LIST_BEGIN
    TEXTURE_DEF TEXTURE_GROUND    , <255,255,255,255>, 0.707107, "STONE256.BMP"	; 0
    TEXTURE_LIST_END
    BGL_RETURN
texture_riff_end_LakeLawnRunway label word

then later...

Code:
bgl_riff_start_LakeLawnRunway	label	BGLCODE
    db	'B','G','L',' '
    dd	bgl_riff_end_LakeLawnRunway - $ - 4
LOD_0_LakeLawnRunway	label	BGLCODE

; NonAlpha
LakeLawnRunway_NonAlpha label BGLCODE
    BGL_CALL_32 LakeLawnRunway_MasterScale_1        ; Node 1 - MasterScale
    BGL_END
    BGL_RETURN


LakeLawnRunway_MasterScale_1 label BGLCODE
    MATERIAL 0,0 ; <255,255,255,255> STONE256.BMP;;;
    BGL_ZBIAS 4
    DRAW_TRI_BEGIN 0, 4
    DRAW_TRI    3,   2,   1 ; poly=2 part=1
    DRAW_TRI    0,   1,   2 ; poly=1 part=1
    DRAW_TRI_END
    BGL_ZBIAS 0

==============

Here's the XML code:

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd">


	<SceneryObject lat="42.634131" lon="-88.601122" alt="0" pitch="0" bank="0" heading="184.830" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
		<LibraryObject name="B765966040903EC9AB22BF85C6FFD449" scale="1.0" />
	</SceneryObject>


	<ModelData name="B765966040903EC9AB22BF85C6FFD449" sourceFile="LakeLawnRunway.mdl" />
</FSData>

The MDL Ground poly is placed right on the runway... same altitude, and true heading. No flicker, or texture popping. No shadow issues.

Recap:
material name of "zbias_4_name"
use of platform attachment to produce a shadow
ASM tweaked for "Kill_Shadow"
ASM_0 tweaked for use of TEXTURE_GROUND ( might not be needed ).
MDL recompiled with BGLC_9, and renamed as .MDL
BGL recompiled as XML

Dick
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Thanks Dick, that is interesting news. I will have a look at it here. Until now I usually used zbias_ without a number. And I forgot to kill the shadow, I think that is the most important thing.

Another thing, I am working on a new version of MDL Tweaker, that will also include an option to kill the shadow (so without having to tweak the source). I might also add this fix to the tool, if it really works great :).
 

bpahe

Resource contributor
arno said:
I tried to make an airport with 0.16 meter resolution textures ones. And although it does look nice I would not advice you to do so, as the performance is bad :D. I my case it was 1 GB of textures for just the airport.

Hi!

Well, I got that figured! ;)
But as you can tell from the pic below, the area is not very large, should it be only the area around the club that gets hi-res imagery. Also, the pic shows that the current resolution is really not enough. And the image need to be worked on.

Dick´s solution seems interesting, but I´ll have to see if I can get it working...



/hans
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi Hans,

From your image it seems that mainly the color is a problem. The apron seems too much greenish if you ask me.

From the tests I made I found that 1 meter resolution is enough, if you place the taximarkings, runwaymarkings, etc on top of your photo, as such details are never clear enough in the photo.

The area I tested the 16 cm photos in was Schiphol airport. So that was rougly an aera of 7x7 km or so. If you only use it very local it should not influence the performance that much.
 
Hans,
maybe if You put over Your polygons the VTP style roads, aprons and so on using custom texture? Maybe this would work it out?

Best regards,
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
I don't know how Hans placed them now, but when they are placed with GMax (or SCASM code) it is not possible to get VTP elements on top of them. Also the XML elements of the airport (like aprons, etc) will be hidden by the photo.

So then the only option is to place the apron with old style polygons as well (AFW, FSSC).
 

bpahe

Resource contributor
arno said:
From your image it seems that mainly the color is a problem. The apron seems too much greenish if you ask me.

Hi again!

Well, yes, much work still to be done on those, should I follow this work through. There should not be any traces left of 3D buildings or objects, as you can see there is a flattened Cessna parked on the right... :D

Right now the scenery consists of a background placed with SBuilder, and the apron area have a higher resolution gmax-polygon edited so that it covers only the areas that I desire. It appears that some playing with an alpha-mask can reveal the underlying AFCAD, of which the edges can be softened somewhat with a little work.
So there is potential in this. But as Arno wrote, VTP roads and such are excluded by the polygon, as is the Autogen. Too bad, but not "fatal".

/hans
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
bpahe said:
There should not be any traces left of 3D buildings or objects, as you can see there is a flattened Cessna parked on the right... :D

True, you need to remove all aircraft and vehicles visible. The buildings you can probably keep there, as you will cover them with your 3D objects.

Small side note, on the 16 cm photos I tested, I even could see birds flying around over the airport, these also should be removed then :D.

bpahe said:
It appears that some playing with an alpha-mask can reveal the underlying AFCAD, of which the edges can be softened somewhat with a little work.
So there is potential in this. But as Arno wrote, VTP roads and such are excluded by the polygon, as is the Autogen. Too bad, but not "fatal".

That is interesting. Yes, with a proper alpha channel you can probably make the scenery underneed visible again. This should work for both VTP and XML elements. The VTP elements are not excluded, only covered. Only the autogen is really excluded.

Sounds like an interesting approach to me. By making the taxiways transparant for example, you could make visible the XML taxiway or apron below. I should remember this :D.
 
Hey, nice finding there, Dick!!

Didn't know there is a TEXTURE_GROUND definition...


Gotta try this out

Thx
Jeff
 

bpahe

Resource contributor
arno said:
That is interesting. Yes, with a proper alpha channel you can probably make the scenery underneed visible again.

Hi, yet again!

I made a quick test of the blending possibilities, and I think the picture below speaks for itself...



In the lower part of the image, on the left of the RWY, is the SBuilder photo-texture, the RWY is an XML/Afcad-RWY, and the upper part is my FS2002 polygon textured with the DXT3 w. alpha bitmap. This is a "quick n´ dirty" example, but if you work with it the result should be quite good.

/hans
 
My question then is.....

with the alpha showing the AFCAD runway and taxiways underneath, do the runway lights and taxiway lights show through the alpha?

I ask this because I have tried this alpha blend technique in the past and it does work. the problem arises at night, because the FS lights will not show through the overlaying texture. Even with the alpha allowing the texture to show through.

Sean E.
 

nickw

Administrator
Staff member
Is anyone else getting this effect when using this method? I cannot seem to resolve it. It looks just fine in GMAX. :banghead:
 

Attachments

  • Capture.jpg
    Capture.jpg
    13.1 KB · Views: 941
Status
Not open for further replies.
Top