Regarding Gmax ground-polys

Status
Not open for further replies.
#41
yea I found out just how impractable it was to have the building textures on the same bmp as the ground texture, just to do 1/4 of my airport took a massive 4096x4096 bmp.. - It worked, but at that size the texture degredation was too noticeable so I abandoned the idea.. :rotfl:

It was mentioned above about "Dick´s 2004-version of Gmax ground polygons" what is that?
 

bpahe

Resource contributor
#42
john1234 said:
It was mentioned above about "Dick´s 2004-version of Gmax ground polygons" what is that?
Hi!

This reference is to Rhumbaflappy´s findings in the beginning of this thread to an alternative way of doing Gmax ground polygons - his methods follows the FS2004 XML-style, rather than the FS2002/ASM-coding of previous methods.

/hans
 
#43
ohh, thanks for that...
Think I might give that a miss tho, I tend to get myself into as lot of trouble when I go poking around inside code :) :)

Anyway, I been plodding along slowly and am starting to get somewhere now :)

if you want a peek I uploaded several quick snaps to one of my servers...

they only small images so I left them as bmp's..

http://wanderer.jazweb.us/scenery/snap00525.bmp

http://wanderer.jazweb.us/scenery/snap00526.bmp

http://wanderer.jazweb.us/scenery/snap00527.bmp

http://wanderer.jazweb.us/scenery/snap00528.bmp

http://wanderer.jazweb.us/scenery/snap00529.bmp

http://wanderer.jazweb.us/scenery/snap00530.bmp

I still having a few problems with a couple of joins, but I think overall things are progressing nicely...
 
Last edited:
#44
Looks great John....is that Calgary's (CYYC) airport?

I've been working on a revamp of that terminal, but if you are doing one, I'll concentrate elsewhere, looks like you are way ahead of me.

Here's what I have so far.....
 

Attachments

#45
Your pictures look great, Keep working... :) :)

The airport I am working on is over the other side of the world.. - It is Christchurch International (NZCH) In New Zealand...

It is actually a re-vamp of the airport I started back in FS2002 days, and since we have just finished laying down a 3,600 sq Km area of scenery surrounding the airport we decided that a complete re-vamp of all the original airports in the area was badly needed as well...
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#47
Georg Aubele said:
Maybe we should have a thread where we state our projects so we don't work redundandly or can share parts of projects.
I think the showroom is a good place to show what you are working on? But else we could also start a thread in the general chat forum called "What are you working on" or something like that :).
 
#48
arno said:
But else we could also start a thread in the general chat forum called "What are you working on" or something like that :).
Full ACK - the showroom is maybe "too late", because there you see almost finished projects ...
 
#49
I think the showroom is a good place to show what you are working on? But else we could also start a thread in the general chat forum called "What are you working on" or something like that .
I think this would be a great idea.....it would be good to know if someone else has started a project, so we can either colaborate (I know I would appreciate some help from time to time) or move onto another project.

Thanks~
 
#51
Hi all.

I've just been trying the above method of creating ground polys and it's awesome.

I do however have one small problem. Buildings and other scenery objects are not casting shadows on the ground, but aircraft are.

I think I've followed the instructions correctly, but just incase I've gone wrong somewhere, please allow me to go through what I did so you guys can put me straight...


I started by creating a plane in gmax. Added textures to it making sure the material name had the prefix zbias_1_***. Next I selected the plane and made a clone of it and named this 'clone_plane'. With the clone_plane still selected I ran the AttachToolGmax script and added a platform. The platform surface type was concrete.

I then exported this, saving the .asm files during the export. Next I added the kill shadow code, as recommended by rhumbaflappy, to the .asm file and recompiled to get a new .mdl. Then using the standard xml procedure I got the bgl file.

This enabled aircraft to cast shadows, but not scenery objects. I also tried it without the kill shadow code, but that left me with no shadows.


Does anyone know what I might be doing wrong? :scratchch

Thanks,
Paul.
 

rhumbaflappy

Moderator
Staff member
Resource contributor
#52
Hi Paul.

I don't think you're doing anything wrong. The FS9 method will only show the airplane shadow.

There is another method ( ASM TWEAK ) that uses the ADDCAT command for FS2002-style ground polys... and that will show object shadows.

What I don't know, is if we can make an FS2002-style, and overlay a FS9 platform, in order to get both shadows... I suspect this will not work.

So my guess is that it's one or the other.... with FS2002-style probably being the best bet. ( Kill_Shadow works with FS2002 also ).

Dick
 
#53
Thanks,

at least I'm not doing anything wrong then :)

I guess it's just a question of which method to choose then. I do like having the buildings cast shadows, but I'm worried that the 2002 method may not work come FS2006, but then there's no guarentee the 2004 method will either I suppose.


Paul.
 

JonPatch

Resource contributor
#54
Hi Dick and Paul, working with Fern, I experimented with an FS2002 gamepack platform and FS2004 objects. We were able to get shadows, BUT there were two problems:

- the shadows appeared on the surface of the FS2002 object, but at a position that correlated with the underlying ground height, not the surface
- where I had objects blending into one another, the FS2004 object had priority, even if it was spatially behind the FS2002 platform

Jon
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#55
rhumbaflappy said:
What I don't know, is if we can make an FS2002-style, and overlay a FS9 platform, in order to get both shadows... I suspect this will not work.
Unless you are working on a platform above the ground (helipad or so), I still think using the Fs2002 code is better. Making a ground polygon with the Fs2004 code is a bit troubled (at least).

If you look at the structure of the Fs2004 MDL code it is clear that is was never meant for ground polygons (except a helipad maybe). Look at the default scenery, you will find no ground polygon as part of a 3D object. All ground polygons are placed with mesh or XML polygons.
 
#56
john1234 said:
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...
Hi there,

I get this also with my GMAX, FS24K Gamepack created polys. I've resorted to adding transparency under the default buildings and they seem to stay put! Did you find a solution?

I created a gmax object ontop of the poly and compiled, this object didn't disappear. Seems to affect any buildings not connected directly to the poly...

-Mitch
 
#57
hey guys ,
im a real pure newbie on doing ground polys.
can any of you give a 1 by 1 instruction?
I tried the dummies instruction , unfortunately when i export
i have alot of "assertion failed" errors .
is there any easier way or intruction to create ground poly with gmax using plane polys?
 
#58
Jouvarn said:
hey guys ,
im a real pure newbie on doing ground polys.
can any of you give a 1 by 1 instruction?
I tried the dummies instruction , unfortunately when i export
i have alot of "assertion failed" errors .
is there any easier way or intruction to create ground poly with gmax using plane polys?
Hi there,

Have you installed the GMAX gamepack? This will be required to export from GMAX. I use the FS2004 one available at, http://www.microsoft.com/games/flightsimulator/fs2004_downloads_sdk.asp

I followed the house tutorial that came with the gamepack except I used a "plane" instead of the box. I can try and help if you can let me know what you're stuck on.

-Mitch
 
#59
Greatings everybody!
I just want to create simple apron for LYTV and I am still a little confused with creatig ground polygons.
I just do not understand which lines of text do I need to add in which .asm that is created with FS2004 gamepack to kill the shadows. There are so much lines of text!!! :) The second question: Is it important where do I ading that text?

And finaly: Can somebody explain me , step by step procedure, how to make new .mdl from those . tweaked .asm with BGLC_9? And please be more precise with your answers becouse I am totaly new with this code editing. :(

This is what I have created:
..._0.asm

__________________________________________________________________________________________________________________________________
;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
;
; This file was automatically generated from C:\gmax\meshes\ground1
; using the MakeMDL tool. Do not edit by hand, re-run the
; tool instead.
;
; generated on 04/18/05 23:20:38
;
;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
; BGL model for C:\gmax\meshes\ground1
;
; $Header:$
;
;----------------------------------------------------------------------------
;
; Final Status: 4 polys
; Alpha Status: 0 polys
; Light Status: 0 polys
; Library Status: 0 polys
;
; Start Time: 04/18/05 23:20:38
; Stop Time : 04/18/05 23:20:38
;
; Modeling units = 1.0000
; Radius = 246.2215
; Radius in meters = 246.2215
; Radius in modeling units = 247
;
ground1_top label BGLCODE
texture_riff_start_ground1 label word
db 'T','E','X','T'
dd texture_riff_end_ground1 - $ - 4
TEXTURE_LIST_BEGIN
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 187.955643, "PLATFORMA.BMP" ; 0
TEXTURE_LIST_END
BGL_RETURN
texture_riff_end_ground1 label word


material_riff_start_ground1 label word
db 'M','A','T','E'
dd material_riff_end_ground1 - $ - 4
MATERIAL_LIST_BEGIN
MATERIAL_DEF 1.000000,1.000000,1.000000,1.000000, 0.392157,0.392157,0.392157, 0.000000,0.000000,0.000000, 0.000000,0.000000,0.000000, 0.000000 ; 0
MATERIAL_LIST_END
BGL_RETURN
material_riff_end_ground1 label word


vertex_riff_start_ground1 label word
db 'V','E','R','T'
dd vertex_riff_end_ground1 - $ - 4
VERTEX_LIST_BEGIN
VERTEX_DEF -240.000015, 0.000000, 55.000004, 0.000000, 1.000000, 0.000000, -0.000559,0.873897 ; 0 part= 1 prim=0
VERTEX_DEF -240.000015, 0.000000, -55.000004, 0.000000, 1.000000, 0.000000, -0.000559,0.499031 ; 1 part= 1 prim=0
VERTEX_DEF 0.000000, 0.000000, 55.000004, 0.000000, 1.000000, 0.000000, -0.001663,0.372489 ; 2 part= 1 prim=0
VERTEX_DEF 0.000000, 0.000000, 55.000004, 0.000000, 1.000000, 0.000000, 0.998442,0.873896 ; 3 part= 1 prim=0
VERTEX_DEF 0.000000, 0.000000, -55.000004, 0.000000, 1.000000, 0.000000, -0.001663,-0.000455 ; 4 part= 1 prim=0
VERTEX_DEF 0.000000, 0.000000, -55.000004, 0.000000, 1.000000, 0.000000, 0.998442,0.499031 ; 5 part= 1 prim=0
VERTEX_DEF 240.000015, 0.000000, 55.000004, 0.000000, 1.000000, 0.000000, 0.998996,0.372489 ; 6 part= 1 prim=0
VERTEX_DEF 240.000015, 0.000000, -55.000004, 0.000000, 1.000000, 0.000000, 0.999500,0.000500 ; 7 part= 1 prim=0
VERTEX_LIST_END
BGL_RETURN
vertex_riff_end_ground1 label word


bgl_riff_start_ground1 label BGLCODE
db 'B','G','L',' '
dd bgl_riff_end_ground1 - $ - 4
LOD_0_ground1 label BGLCODE

; NonAlpha
ground1_NonAlpha label BGLCODE
BGL_CALL_32 ground1_MasterScale_1 ; Node 1 - MasterScale
BGL_END
BGL_RETURN


ground1_MasterScale_1 label BGLCODE
MATERIAL 0,0 ; <255,255,255,255> PLATFORMA.BMP;;;
BGL_ZBIAS 4
DRAW_TRI_BEGIN 0, 8
DRAW_TRI 5, 3, 1 ; poly=2 part=1
DRAW_TRI 2, 4, 6 ; poly=3 part=1
DRAW_TRI 7, 6, 4 ; poly=4 part=1
DRAW_TRI 0, 1, 3 ; poly=1 part=1
DRAW_TRI_END
BGL_ZBIAS 0
BGL_RETURN


bgl_riff_end_ground1 label BGLCODE

;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
;
; This file was automatically generated from C:\gmax\meshes\ground1
; using the MakeMDL tool. Do not edit by hand, re-run the
; tool instead.
;
; generated on 04/18/05 23:20:38
;
;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
__________________________________________________________________________________________________________________________________







AND .asm

__________________________________________________________________________________________________________________________________

; compile with BGLC /MDL C:\gmax\meshes\ground1.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 247
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 -240.000, 0.000, -55.000
real4 240.000, 0.000, 55.000
bounding_box_riff_end label word


model_outside label BGLCODE
model_shadow label BGLCODE
model_inside label BGLCODE
crash_riff_start label BGLCODE
db 'C','R','A','S'
dd crash_riff_end - $ - 4
BGL_CRASH_START model_crash_end, 247
BGL_CRASH_OCTTREE crash_end_1
dw CRASH_FLAG_BUILDING_PLANE ; crash type
dw 1 ; nodes used
real4 -240.000000,0.000000,-55.000000 ; Box x,y,z
real4 480.000092,160.000031,160.000031 ; Box w,h,d
dw 1, 1, 1, 1, 1, 1, 1, 1 ; base offset into node table, one for each top-level branch
; So if you take branch 2 (count from 0), you add 1 to indices you encounter on that branch
; Nodes (254=empty 255=full, else an index into branch)
OCTTREE_NODE 254, 254, 254, 254, 254, 254, 254, 254 ; node 0
crash_end_1 label word
model_crash_end label word
BGL_RETURN
crash_riff_end 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:\gmax\meshes\ground1_0.asm
exterior_riff_end_0 label BGLCODE



bgl_data_end label BGLCODE
__________________________________________________________________________________________________________________________________
 
#60
Overlapping ground polys - problem

The method explained by Rhumbaflappy in post #7 mostly works fine. But currently I have a problem with overlapping ground polys (runway, taxiways, turning areas). I have been trying to use different zbias values for the different parts to make them draw correctly, but I still have a problem with some flicker, sharp edges and bleed-through of the Landclass textures from below the polygons where the different polys meet.

The different parts should fade smoothly into each other, but now it seems that the one with a higher zbias value 'cuts away' the covered part of the one below so the ground texture underneath the polys bleeds through. All textures have alpha channels for transparency along all edges of the asphalt and they are saved in DXT3 format. The transparency is used to blend the edges of the asphalt smoothly with the rest of the ground.

Any ideas/suggestons on what could be the problem and how to avoid it? I suppose it has something to do with the combination of zbias and alpha and texture format, maybe the order of the different parts, but I cannot figure out how...

Bamce
 
Last edited:
Status
Not open for further replies.
Top