Regarding Gmax ground-polys

Status
Not open for further replies.
Nick, I can't tell in the photo what effect that is...is it a crack between polygons? I have had a "seam" appear, and I found a workaround, but it didn't look much like your screenshot.

Bob
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Is it due to transparancy in your textures? Or do you think that there is actually a crack between the polygons you use?
 

nickw

Administrator
Staff member
Maybe both...

Here is one of the textures... Unmipped and no Alpha channel at this point. (This issue occurs even with the bitmap layed without the alpha)
 

Attachments

nickw

Administrator
Staff member
OK, that issue is caused by the texture format. Fixed by doing the following

DXTBmp Alpha Channel created from black, then applied to the image. Saved as 32bit 888 Format and no more problem....
 
Hi NIck, glad you found an answer...my workaround fyi, was to add several pixels to my images, simply copied from the rows and columns at the edges, making the images bigger in pixel count, say 514x514.

Then resample back to 512x512. Tended to soften the borders.

Bob
 
For dummies (like me ;) ) who tried to follow instructions in this thread :

Please try to follow these extended instructions:

1)Apply to your PLANE a material named "zbias_4_nameyouwant"
2)Create a PLATFORM of your PLANE with GMAX Script Attachment to produce a shadow over PLANE
2a) Export your GMAX PLANE.
To create ASM and ASM_0 files just create in the GMAX/Plugins folder a file named MakeMDL.cfg with a section named [Options] and under this section a key like this >>>> Keep files=1
3) Tweak ASM for "Kill_Shadow" with this code
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
4)Tweak ASM_0 for use of TEXTURE_GROUND ( might not be needed ).
5) Recompile with BGLC_9 your ASM file (syntx: BGLC_9.EXE /BIN yourfile.ASM), then rename yourfile.BIN as yourfile.MDL
6) Recompile yourfile.XML (just drag 'n' drop XML file into BGLCOMP.EXE)
7) Try your own first Ground Polygons project in FS9.

Thanks to Dick-rhumbaflappy, Hans and Arno. :wave:

Hi, CLaudio Grassi
 
Hi Everyone...

Please excuse my ignorance, but I am having a great deal of trouble understanding the thread instructions....

I have been dabbling in Gmax and now Scenegenx with my airports, and have decided to lay down some extra details over top of my mesh...

Up until now I have always raised the piece of ground to stop the thing shimmering soo much, but from what I gather from this thread you guuys have found a way around it...

The trouble I am having is that I do not understand instructions 1 and 2 in the message above...
I can make a shape, apply my texture and export it as a MDL file, but I am not really experienced enough to understand what you getting at...

Can someone please help me out here (please be gentle tho, I not really up on all the correct ways of doing things in Gmax..)

Regards - John...
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi John,

Step 1 is that you need to add the prefix zbias_ to your material name. This will make sure that the polygon gets a higher priority in the drawing order. So not in the part name, but in the name of the material you use.

The second step is that you need to clone your ground polygon and run the attachtool script on this clone. You then select the platform option. This makes sure that shadows are displayed on your polygon.
 
Hi Arno, thank you for the reply....

I think I got number 1 figured out now after your message.. - I went into the properties of one of my ground areas and got the following



I see the "Material Name - Mtl #5" part, I presume thats where I put in the "zbias_" part and make it "zbias_#5' or something like that :) :) :)

Number 2 still eludes me tho.. - Yep, I know how to clone something, and I presume after cloning it I just leave it sitting where it is mixed in with the original.. (I think before I clone ithe original I better lower it back down to ground level again :) )
I have an "attachtoolgmax.ms" show up when I run "run script" in maxscript, however when I click on that it opens up a listing of my drives, and I wouldn't have a clue what to do there...
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi John,

john1234 said:
I see the "Material Name - Mtl #5" part, I presume thats where I put in the "zbias_" part and make it "zbias_#5' or something like that
Yes, but I don't think you can change it in this screen. In the material editor you are able to enter the names of materials.

john1234 said:
I have an "attachtoolgmax.ms" show up when I run "run script" in maxscript, however when I click on that it opens up a listing of my drives, and I wouldn't have a clue what to do there...
You need to select your effect folder of FS there. This is used when trying to attach effects. But when you want to make a platform it makes no difference which folder you select.
 
Hi there,
from memory the first time I tried to change the name in the material editor ages ago I got an error and gmax shut down, but will give it another go...

I think I am going to have to start the base all over again as I used multu texturing on the base I playing with (bmp5 and bmp6), and when I just went into the editor it was showing another texture than what I used (wierd, it showed mdl #3 and not #5) so looks like I going to have to get out the instructions on how I had done the multi texture and re-do them, bit of a pain really as it took me 2 days last time to get both textures right on the 1 area :( (memory not as good as it used to be)

Regards - John...
 
Hi Arno,

arno said:
Hi John,
Yes, but I don't think you can change it in this screen. In the material editor you are able to enter the names of materials.
I did it :) :) - I created a test area to see what would happen, applied the zbias_4_test name to the material Name and it worked...

I saved and exported at that stage just to see what it would be like before I even attempted to insert code and stuff which I never done before...

All the flickering has now stopped :D :D

I did notice one really unexpected side effect tho, but I don't know if this has anything to do with the next stage (part 2) or not, but just thought I would mention it to see if anyone else come across it...

in cockpit view and in slew mode, I turned my plane so it was pointing directly down at the ground and then hit F3 to start going away form the ground...
Imagine my suprise when between 1500, and 3500 ft in the air all my gmax buildings and even a M$ building started disappearing if it was inside the ground I had made... (hehe one building was half on it and half off it and I ended up at 3500ft with only half a building showing...

Now, does this have something to do with the part I not done yet (cloning, platform, kill shadow part) or is this something different??

Regards - John...
 
Last edited:

JonPatch

Resource contributor
I found the same problem with zbais, objects disappear into the surface at a distance. But using a zbias of 1 minimizes this . . .

Jon
 
Thanks for that, will try changing it to "1" and see how that looks :)

Update: Tried setting it to "1" but it didn't seem to make any difference to setting it to "4" my Gmax buildings and M$ building still disappear :(

Update2: Done some more tests and you are right Jon.. - I didn't first notice it, but setting zbias_1 the range has increased by nearly 2000ft before everything within the ground area disappears...
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi John,

john1234 said:
from memory the first time I tried to change the name in the material editor ages ago I got an error and gmax shut down, but will give it another go...
Yes, that happens to me as well sometimes. I don't know what causes it, but it is always scary to change a material name. As sometimes GMax will crash. Reminds me of the days when we still used GMax 1.0, which crashed much more often.

john1234 said:
Imagine my suprise when between 1500, and 3500 ft in the air all my gmax buildings and even a M$ building started disappearing if it was inside the ground I had made... (hehe one building was half on it and half off it and I ended up at 3500ft with only half a building showing...
Jon indeed also had such problems (see his reply). Maybe it is because the mesh scenery is using a lower LOD at such a distance, causing the altitude to change slightly (just a guess).

I think this is once more something that makes clear the GMax is not meant for big ground polygons.
 
Originally Posted by Arno
Yes, that happens to me as well sometimes. I don't know what causes it, but it is always scary to change a material name. As sometimes GMax will crash. Reminds me of the days when we still used GMax 1.0, which crashed much more often.
Hi Arno,
Dunno if it has been noted before or not, but while I was playing around tonight, I found that Gmax only seems to crash in the material editor if you try to change the material name AFTER you have hit the "apply" button.
In my testing, I found if I named the material name before hitting apply it didn't crash, but if I hit apply before trying to change the name it crashed...

Originally Posted by Arno
Jon indeed also had such problems (see his reply). Maybe it is because the mesh scenery is using a lower LOD at such a distance, causing the altitude to change slightly (just a guess).
I think this is once more something that makes clear the GMax is not meant for big ground polygons.
Yea, I'm not sure what I going to do now, I may finish texturing the buildings within the area concerned and then see if them disappearing is going to be a problem or not as when they are textured they seem to take longer to disappear than the plain non-textured buildings..
If it looks like it is still going to be a problem I might just go back to using my flat boxes and raising them a tiny bit above groun and putting a wall (or if I can figure out how to do them, a fence) where-ever I can't hide the raised bit by buildings. :)

One other thing, you mention about Gmax not being good for big ground polygons, to your knowledge has anyone experimented in making a series of small polygons and butting them up against each other?? (Just a thought)

Somerthing else I just discovered, was that if I view the ground and buildings in "top down" mode they do not disappear like in normal panel mode..

Regards - John...
 
Last edited:
Just found something interesting out....

If I put the building textures into the same BMP as the ground textures, and texture the buildings after the ground, then the buildings do not disappear at all...
 

bpahe

Resource contributor
Hi!

Just for the record, I´ve also tried Dick´s 2004-version of Gmax ground polygons, and am so far very pleased with the result. It might be that Gmax is not the prime tool for making ground polys, but in a way it feels quite satisfying to have your entire airport visible in this very powerful tool. The future´s so bright, I gotta wear shades...

/hans
 

JonPatch

Resource contributor
Good find, John. I don't think I'll try that, I have dozens of objects and it would somewhat impractical. But this is very useful to know, thanks!

Jon
 
Status
Not open for further replies.
Top