Jump to content
Sign in to follow this  
Guest christian

Bgl / Api crash detection

Recommended Posts

Guest

Hi Dick,I was in the process of doing what you suggested with the settings and have just downloaded the latest drivers (13Mb+ ouch!), still the same problem.This is on a homebuilt Athlon XP1900+ with a geforce 2. I also have a laptop, 1.6 pentium 4 mobile with geforce 4 go graphics. I just transferred the files over to that machine and have exactly the same problem, I think that is too much of a coincidence and the problem is in the files somewhere. I also find it odd that this only happens when the crash detection code is introduced into the file.After looking closely at the graphic corruption it seems that the sky is being overdrawn when panning, does that make sense?David

Share this post


Link to post
Share on other sites

Hi David,Strange, I can't get it to work either.Also tried to make a simple test object with GMax. Put it into a library and added the crash detection code to the library. Same effects and the crash does not work.Dick (I hope you know, I can't remember) did we actually test it in the earlier thread? I didn't test it on my machine then, did everything work fine?Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Arno and David.I put together a package that contains a large cube from Gmax. I hope the documentation ( html file ) is enough to explain just how I added the Crash code to the object.I can place this Library object and crash into it just fine.LargeCube.zipDick

Share this post


Link to post
Share on other sites

Hi Dick,Strange, that's the same I did (without the include, I added the crash code at the same place though). Only I had made the object a bit more complex and the crash code was thus also longer. Maybe that confused FS....But at least this one works :).Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi Arno.I'm glad we got something working. :)Hopefully, Dave gets it working as well. Then we could rule out his computer being at fault.I just updated the zip file to include a large cube placed just to the west. That was placed with fsregen's API through FSSC.. no problem. You can fly between the objects with a small airplane, and not crash... so Gmax's OctTree seems pretty tight to the 'skin'.I like the idea of using the 'include' code to add the crash detection, as it is more modular, and less 'invasive' to the Cube_0.asm code.It's really a shame the crash detection isn't part of the object in Gmax. I don't know if that's Gmax's fault , or MakeMDL.Dick

Share this post


Link to post
Share on other sites
Guest

Hi Dick & Arno,Dick, I placed your precompiled LargeCube.bgl and placed it in my scenery folder, placed LargeCube.api in my FSSC macro folder and removed all the other scenery from this project, to just leave the cube. Still no problem crashing, but take a cessna within a planes length of the cube and pan the view and the I have the same graphics corruption. Clutching at straws, I left the aircraft in position and thought I would try a different plane, but when the selection screen appears with the revolving aircraft, that screen also has the same corruption.I as mentioned in an earlier post, I have the same problem on my laptop. The only thing they have in common is one has a geforce 2 and the other a geforce 4. If you could confirm the experiment above, I can only assume that this is an nvidia graphics problem.David.

Share this post


Link to post
Share on other sites

>It's really a shame the crash detection isn't part of the >object in Gmax. I don't know if that's Gmax's fault , or >MakeMDL. MakeMDL of course, that's the exporter from GMax. GMAx doesn't know anything about crashing (apart from its own bugs of course :D).I agree that it would be more logical if MS had put the crash code into the _0.asm file, as it belongs to the object and not to the placement of it.Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Hi David.I can stop the Cessna about a plane's length away with pause, then switchto slew and rotate the heading... and I see visual artifacts ( trailing ), until I stop the rotation... then the view 'snaps' to a corrected view, with no trailing.I'm assuming your system doesn't 'snap' to the corrected view. That could be the videocard, drivers, or the version of Directx. ( probably a video card quirk ). Thankfully, it only happens on crashes(?)Dick

Share this post


Link to post
Share on other sites
Guest

Hi Dick,That is exactly the effect that I have been trying to describe, and the graphics on my system also return to normal after a second or two.The problem is, I am placing a large number of hedgerow macros, the airfield I am recreating has hedgerows at either end of the runway and close to the taxi and parking areas. So when you taxi the aircraft close to the hedgerows the effect is awful.I could omit the crash detection, but would much prefer to find a solution. It is not really practical to place them individually from gmax, but that would cure the problem.Thanks for your time, David

Share this post


Link to post
Share on other sites

Hi David.OKMy view 'snaps' much quicker than than your system.. but the artifacts are there... seem to be only in the sky space ( above the visual horizon ).I can see where this would be a problem when taxiing about.Now I'm wondering if our tricks with transform calls might work.I went to O'hare to see how their crash dectection was working... and found there is very little detection! But some objects do have it.Got me thinking. What if your Hedges had no detection, but you could place some detection slightly behind the hedges? SCASM has a variety of crash codes that might work.. from the SCASM docs:Crash( :Lab1 rad :Lab2 :Lab3 dens ) Test for crash detection.This command should be used before using the PerspectiveCall command.Do not use it in library objects.:Lab1 Points to the end of the following crash code. rad the objects ground radius :Lab2 Points to the RefPoint() instruction used with this object. This must be a normal refpoint with an scale factor. :Lab3 Points to the RotatedCall() used with this object. Set it to :[0] if not used. dens Note that it says "Do not use it in library objects." Well, you wouldn't put it in the library, but use it instead of the library crashing. And, as I said, you could place it behind the hedge slightly.. although that might not be needed if the crash routine is not part of the object! There might be no visual artifacts at all.I'll play with these commands a bit... and there should be a way to make an API of them.Dick

Share this post


Link to post
Share on other sites

Hi David.I'm bumping this post forward, here.I have been playing with adding the Gmax crashcode to the object code, then compiling library objects via fsregen.Although I understand your problems with visual artifacts, I had no real issues with these, that I couldn't live with. :)But...I've now been playing with placing invisible Advanced Building roofs over objects, for use as hardener for helipads.These can be placed on top of objects.. even the gmax-library objects we make with fsregen. This is fine.But, adding the crashcode, to the library object, and then using these newer helipads... I get horrible visual artifacts, and 'trailing' of objects.My conclusion:Do not add the crashcode of Gmaxed objects to the fsregen library object code! It just doesn't work right.I know Gerrish Gray, Arno , and I have all thought the damage octtree should be in the library object, but either it just doesn't work properly, or there is something wrong with fsregen's method, or the code from MakeMDl is wrong.I can place an fsregen library object with a pad on top, and it's fine w/o the crashcode. I can do the same with the object, and it's crashcode, placed as Gmax does it.. and it's fine. It just affects fsregen-derived library objects with crashcode hacked in.This does relate to your problem, in that we need a way to add crash code ( and hopefully an API to place it, and the library object as well ).We also need a convertor to make placeable SCASM API's of Gmax-bglc code... That would cure a lot of problems.================================This hasn't really come up before, because everyone just used fsregen's library object generation, and didn't pay attention to the missing crashcode. It seems evident now, why MakeMDL didn't place the crash detection with the object, but with it's placercode. It doesn't work right. It also seems evident why MakeMDl doesn't directly make Library objects from Gmax code... the crash detection is wrong.Dick

Share this post


Link to post
Share on other sites

Hi Dick,>We also need a convertor to make placeable SCASM API's of >Gmax-bglc code... That would cure a lot of problems.Converter is on its way :), but as I am rather busy I don't know how long it will take for me to finish it. If you are interested I'll send you a beta copy (just drop me a mail).>This hasn't really come up before, because everyone just >used fsregen's library object generation, and didn't pay >attention to the missing crashcode. I ussually make my objects without crash detection. It gives better frames (especially for complex objects) and I think a unneeded crash is more frustrating then riding into a building without crashing.>It seems evident now, why MakeMDL didn't place the crash >detection with the object, but with it's placercode. It >doesn't work right. I think if you place it in a BGL it works fine, so it must be something in combination with a library.Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest

Hi,Thanks for the update on the state of play. I can understand the points you are both making, but from a personal point of view, it would be nice to have the option of adding the crash code. Its just that I would like to have crash detection on the hedges at the ends of the runway I am recreating, so that you pay real attention to the papi etc, rather than getting it near enough and slam on the anchors.Maybe the converter will be the solution Arno.Thank you both again, David

Share this post


Link to post
Share on other sites

Hi Arno.It does appear to be a problem only when we try to hack the crashcode into the object code... then try to make it a library object.Christian Stock, and his ASM decompiler might help here. We should look at default MS library objects and see how their crashcode is made. This actually could be something simple we're missing.Dick

Share this post


Link to post
Share on other sites
Guest christian

I just briefly skimmed over this, don't have the time to read it all... Maybe I'm missing the point, if I do maybe someone can summarise what the problem is...If you put the octree crash into the library it's basically the same. It's the lines before the octtree that need changing, so there really is no difference if the crashcode is in the object or in the library. M$ usually puts it into the lib and so do I.Dunno if this works together with elevated platforms, still have to do some testing...Cheers, Christian

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