Sign in to follow this  
jonpatch

Flickering object problem

Recommended Posts

Folks, i am having difficulty eliminating a flickering problem. It results from having a gmax-created flat-surfaced object that is the same height as the terrain. Here's a summary.- I want to represent an ocean terminal with large docks adjacent to a large flat surface that is partly both parking lot and helipad.- The surrounding terrain elevation is zero- I want the dock surfaces to appear to be 2.5m above the water- I want the dock surface and adjacent areas to be the same height, and smoothly blend in elevation down to 0m where it adjoins land, and be abrupt where it adjoins water- I want a hard surface so that folks slewing around won't go below the level of the objects- the helipad is a functioning AI AFCAD2 at the height of 2.5mTo do this, with Dick's help and others:- I created a large flat object in the shape of the dock, parking lot and apron- I extruded this 2.5m- I cloned this object, and made it a platform with AttachObject- I cloned the first object, flipped the normals, moved it down 5m, welded it to the 1st object, then attached these two objects to make a single object, deleted superfluous edges, then adjusted the height to 2.5m- I flattened the terrain in the area in question to 2.5m which gives a nice terrain roll-off- I adjusted the shorelines to match the object and real terrainI ended up with the flicker. I tried reducing the height of the flatten, but I still get flicker at a distance. It also appears I can still go below the surface, I'm not sure why my platform doesn't prevent that.Any ideas are welcome. If you are willing to dig into this, you can download the gmax, and a few of the BGLs and textures (they are incomplete) from:http://www.jonpatch.ca/flightsim/op14jan2005.zipJon

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Jon.The problem may be caused by shadows:http://forums.avsim.net/user_files/103663.jpgThe well-displayed object has had the KillShadow tweak applied. Both objects are 2.0 meters high.The *.asm file from gmax will give me the clue ( not the *_0.asm of the objects ).It could be a shadow of another object is causing the problem as well, but I would suspect your deck first.Edited============I can confirm that one object placed on another can also cause this problem, even it the base has a killshadow tweak. The object on top will cause a shadow "bleedthrough".The shadow problem would explain why this is only observed at certain angles, and even at certain times of the day.So, kill the shadows of these flat objects near the ground, and the shadows of all objects resting on them. Or just uncheck the groundshadowing in your FS9 Display menu.Dick

Share this post


Link to post
Share on other sites

Dick, here's the .asm. Does that give a clue? I get a flicker whether I use killshadow or not.Jon; compile with BGLC /MDL C:My Documents1_JonFlight simulatorDevelopment ProjectsVictoria Cruise Ships V1.0 (VICENH04)Scenerymaster_surface.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 362 dd 0 dd 0 dd 152 db 'F','S','8','0' dd 2304visual_model_header_end label dword db 'I','S','F','T' dd ver_end - $ - 4 db "MakeMDL - FS90 (9.00.030612.02)",0ver_end label word bounding_box_riff_start label word db 'B','B','O','X' dd bounding_box_riff_end - $ - 4 real4 -303.864, -2.500, -224.748 real4 300.136, 6.247, 225.252 bounding_box_riff_end label word model_outside label BGLCODEmodel_shadow label BGLCODEmodel_inside label BGLCODEcrash_riff_start label BGLCODE db 'C','R','A','S' dd crash_riff_end - $ - 4 BGL_CRASH_START model_crash_end, 362 BGL_CRASH_OCTTREE crash_end_1 dw CRASH_FLAG_BUILDING_PLANE ; crash type dw 15 ; nodes used real4 -303.863770,-2.499695,-224.747833 ; Box x,y,z real4 604.000122,201.333374,450.000092 ; Box w,h,d dw 1, 1, 1, 1, 1, 6, 15, 15 ; 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, 0, 0, 254, 254 ; node 0 OCTTREE_NODE 254, 254, 254, 254, 1, 254, 254, 254 ; node 1 OCTTREE_NODE 254, 2, 254, 254, 254, 254, 254, 254 ; node 2 OCTTREE_NODE 254, 254, 254, 254, 3, 4, 254, 254 ; node 3 OCTTREE_NODE 255, 255, 255, 255, 254, 255, 254, 255 ; node 4 OCTTREE_NODE 254, 254, 254, 254, 255, 254, 255, 254 ; node 5 OCTTREE_NODE 254, 1, 254, 254, 254, 254, 254, 254 ; node 6 OCTTREE_NODE 2, 3, 254, 254, 254, 254, 254, 254 ; node 7 OCTTREE_NODE 254, 4, 254, 254, 254, 5, 254, 254 ; node 8 OCTTREE_NODE 6, 254, 254, 254, 7, 8, 254, 254 ; node 9 OCTTREE_NODE 254, 254, 254, 254, 254, 255, 254, 254 ; node 10 OCTTREE_NODE 254, 255, 254, 254, 254, 254, 254, 254 ; node 11 OCTTREE_NODE 254, 254, 254, 254, 255, 255, 255, 255 ; node 12 OCTTREE_NODE 255, 255, 255, 255, 255, 254, 255, 254 ; node 13 OCTTREE_NODE 255, 254, 254, 254, 254, 254, 254, 254 ; node 14crash_end_1 label wordmodel_crash_end label word BGL_RETURNcrash_riff_end label BGLCODEexterior_riff_start_0 label BGLCODE db 'E','X','T','E' dd exterior_riff_end_0 - $ - 4LOD_0L label BGLCODE include C:My Documents1_JonFlight simulatorDevelopment ProjectsVictoria Cruise Ships V1.0 (VICENH04)Scenerymaster_surface_0.asmexterior_riff_end_0 label BGLCODEbgl_data_end label BGLCODE

Share this post


Link to post
Share on other sites

Right! I'd taken the killshadow in and out to see if there was a difference, here's the _1.Asm. The behaviour seemed no differeent.Jon;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------;; This file was automatically generated from C:My Documents1_JonFlight simulatorDevelopment ProjectsVictoria Cruise Ships V1.0 (VICENH04)SceneryKillShadow_shadow.x; using the MakeMDL tool. Do not edit by hand, re-run the; tool instead.;; generated on 01/17/05 12:01:49;;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------; BGL model for C:My Documents1_JonFlight simulatorDevelopment ProjectsVictoria Cruise Ships V1.0 (VICENH04)SceneryKillShadow_shadow.x;; $Header:$;;----------------------------------------------------------------------------;; Final Status: 0 polys; Alpha Status: 0 polys; Light Status: 0 polys; Library Status: 0 polys;; Start Time: 01/17/05 12:01:49; Stop Time : 01/17/05 12:01:49;; Modeling units = 1.0000; Radius = 361.2016; Radius in meters = 361.2016; Radius in modeling units = 362;KillShadow_shadow_top label BGLCODEbgl_riff_start_KillShadow_shadow label BGLCODE db 'B','G','L',' ' dd bgl_riff_end_KillShadow_shadow - $ - 4LOD_0_KillShadow_shadow label BGLCODE BGL_END BGL_RETURNbgl_riff_end_KillShadow_shadow label BGLCODE;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------;; This file was automatically generated from C:My Documents1_JonFlight simulatorDevelopment ProjectsVictoria Cruise Ships V1.0 (VICENH04)SceneryKillShadow_shadow.x; using the MakeMDL tool. Do not edit by hand, re-run the; tool instead.;; generated on 01/17/05 12:01:49;;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------

Share this post


Link to post
Share on other sites

Hi Jon.Suppressing the shadow will be needed to avoid flickering. But, you still need to zbias the object's material to prevent the interference with the flatten you made. All objects on the terminal need to have their shados killed, and zbiasing them all may also be needed.I used a zbias of 1. Previously, we had discussed this, and I had recommended 4... that's too strong, and causes it's own problems. But 1 seems to work.Dick

Share this post


Link to post
Share on other sites

OK, Dick, thanks, I'll reduce the zbias to 1, and play with your other suggestions, thanks.Jon

Share this post


Link to post
Share on other sites

Perhaps a Clue at last! Dick, even though I name my material zbias_1_xxx or 4 or whatever my 0_asm file does not have this code that yours does.; Node 1 - MasterScale transform: BGL_SET_MATRIX_INDIRECT 0BGL_ZBIAS 1 BGL_CALL_32 mastersurface39_MasterScale_1 ; Node 1 - MasterScaleBGL_ZBIAS 0 BGL_END BGL_RETURNWhy would that be?Jon

Share this post


Link to post
Share on other sites

Guilty as charged: major brain ####! (Hey, can I say that here?!) I do not what possessed me to rename the object rather than the material. Thanks for your patience.Anyhow, at first look, that appears to have done the trick! I will do more experiments, and let you know.Thanks again, Dick!JonEDIT: apparently I can't say f*rt, another lesson learned . . . ;)

Share this post


Link to post
Share on other sites

So adding zbias in PROPERLY brings back the problem we had earlier, objects disappearing into the surface when viewing at a distance. But it is greatly mitigated with zbias=1 as opposed to 4. Even if an object also has a zbias and has killshadow applied, the effect is the same. I verified the asm files.So it's improved, but not fixed. Jon

Share this post


Link to post
Share on other sites

Thanks for your help with this Dick. I'm going to assume that with zbias=1 that is the best that I can do at this time, unless anyone has any idea how I can fix this. My objects still sink into the platform, but at a greater distance.It's kludgy, but I want to get this released at some point!Jon

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