Sign in to follow this  
Guest Claviateur

Object Library droping the frame rate below 0!

Recommended Posts

Hi,Using Architect2002 3.10 I placed ILS antenas (4 to 5 of them) wish are from the object library. However in FS the frame rate gets down to below zero and the animatoin moves 1 frame each 1 second or so. I disabled their BGL and everything came back to smooth again. I tried the scale 1 and 0.5 no clue. Anyone knows please why the fps droped that low?Here is the code of the SCA with the objects compiled with FreeSC; -----------------------------------------------------------------------------; MACRO: R18 G/SArea( b 33:50:7.753636 35:29:20.333310 20 ) RefPoint( rel :noObj 0.500000 33:50:7.753636 35:29:20.333310 v1= 37040 v2= 32767 ) RotatedCall( :rot 0 0 0.00 ) Jump( : ):rot CallLibObj( 0 C545A270 11D2E2EC 1000849C 2AE60C5A ) EndA; -----------------------------------------------------------------------------; MACRO: R17 G/S Area( b 33:50:10.489882 35:28:54.638012 20 ) RefPoint( rel :noObj 0.500000 33:50:10.489882 35:28:54.638012 v1= 37040 v2= 32767 ) RotatedCall( :rot 0 0 0.00 ) Jump( : ):rot CallLibObj( 0 C545A270 11D2E2EC 1000849C 2AE60C5A ) EndA; -----------------------------------------------------------------------------; MACRO: R21 G/S Area( b 33:48:58.004695 35:29:36.668964 20 ) RefPoint( rel :noObj 0.500000 33:48:58.004695 35:29:36.668964 v1= 37040 v2= 32767 ) RotatedCall( :rot 0 0 30.00 ) Jump( : ):rot CallLibObj( 0 C545A270 11D2E2EC 1000849C 2AE60C5A ) EndA; -----------------------------------------------------------------------------; MACRO: R03 G/S Area( b 33:48:13.971106 35:29:1.364181 20 ) RefPoint( rel :noObj 0.500000 33:48:13.971106 35:29:1.364181 v1= 37040 v2= 32767 ) RotatedCall( :rot 0 0 30.00 ) Jump( : ):rot CallLibObj( 0 C545A270 11D2E2EC 1000849C 2AE60C5A ) EndA; -----------------------------------------------------------------------------; MACRO: R18 LOC Area( b 33:48:23.476664 35:29:18.314310 20 ) RefPoint( rel :noObj 0.500000 33:48:23.476664 35:29:18.314310 v1= 37040 v2= 32767 ) RotatedCall( :rot 0 0 0.00 ) Jump( : ):rot CallLibObj( 0 73286269 11D30380 1000859C 2AE60C5A ) EndA; -----------------------------------------------------------------------------; MACRO: R17 LOC Area( b 33:48:28.778710 35:29:11.020366 20 ) RefPoint( rel :noObj 0.500000 33:48:28.778710 35:29:11.020366 v1= 37040 v2= 32767 ) RotatedCall( :rot 0 0 350.00 ) Jump( : ):rot CallLibObj( 0 73286269 11D30380 1000859C 2AE60C5A ) EndA; -----------------------------------------------------------------------------; MACRO: R21 LOC Area( b 33:47:38.876152 35:28:40.210701 20 ) RefPoint( rel :noObj 0.500000 33:47:38.876152 35:28:40.210701 v1= 37040 v2= 32767 ) RotatedCall( :rot 0 0 32.00 ) Jump( : ):rot CallLibObj( 0 73286269 11D30380 1000859C 2AE60C5A ) EndA; -----------------------------------------------------------------------------; MACRO: R03 LOC Area( b 33:49:43.287238 35:30:17.154394 20 ) RefPoint( rel :noObj 0.500000 33:49:43.287238 35:30:17.154394 v1= 37040 v2= 32767 ) RotatedCall( :rot 0 0 210.00 ) Jump( : ):rot CallLibObj( 0 73286269 11D30380 1000859C 2AE60C5A ) EndA; -----------------------------------------------------------------------------ThanksMichel

Share this post


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

Hi Michel stay away from using architect for 3d objects!! use FSDSor better yet gmax for your objects it's the .sca type objects that KILL your frame rates!!. Dan

Share this post


Link to post
Share on other sites

Not true.If you use the SCASM code efficient then it is not worse then GMax by definition. Of course you can create frame killing objects with any program, but it's not SCASM to blame (it's the designer).And Michel, in the code you posted I see that the RefPoint refers to :noobj but I don't see that label defined. Try to change it to : instead, maybe that helps (it should even give an error if the label is not there btw).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Hi Arno(please take this in the spirit intended) if one creates an object in (gmax at least) one WILL get a frame rate friendly objectwithout haveing to "code" every model one makes as long as it's kept clean from the start. Please understand I am just a "dumb" 3D modelernot a "codehead" . As a modeler I have found what tools work well(read are simple to use AND work as well) and thats what I use. I've done stuff for several different "games" not just FS2002. When I usethe "older tools" I spend more time coding than modeling and I for one want to create models that work the first time,do not kill framerates,do not crash ones computer and display right as well. So yes you are right but if one uses the right tool one does not allways have to "re-invent the weel" just to add something as simple as a static model to a scenery. If Michel had used a more "modern" toolto create his ILS(glide slopelocalizer) antennas with the abovethe poor guy would not have the problem of 5 simple models killinghis frame rates in the first place. In fact the one thing that dropedour frame rates in our secenery was you gussed it a model done up inArchitect!. All I know is EVERY time one adds an unessary step to anything you increase the chance that it will not work as intended.Please understand I am VERY greatfull to you sir for all you have done for me and many others we owe you a lot!!. Dan

Share this post


Link to post
Share on other sites

I understand your point :D, we have had more discusion about this, but I am just trying to put it a little less black vs white.I have made an airport completely with FSDS objects and placed them with GroundMaker and the framerate is still fine. This is without changing the code of the macros (apart from adding some extra effects). For my latest projects I used GMax and that also works fine (of course :)).And I think Michel just tried to place some default Architect macros that use some sort of library. I doesn't make a change with which program you place them (every program generates the same code for macro, it's just one line). So it must be somewhere in the macro or in the library BGL.And as has also been discussed before, the principle that it is a macro is not the problem, because GMax generates the same sort of commands. It's only about how you use the commands that actually generate the object.Once again not attacking you or so :D, just trying to put it less black vs white, as it is not that simple (unfortunately).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

I never thought you would Arno!! (some times I can be a little curt) Dan

Share this post


Link to post
Share on other sites

Maybe my first reply was a little bit curt too :).BTW Haven't told you yet, but your scenery looks great, only it doesn't like my PC I have here in Brussels (to heavy on the frames).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Hi Arno and Dan :)Thanks for the reply gentlemen. To tell you the truth all my scenery 3D objects are done in Gmax since I love the program and I thought that it was very frame rate friendly for the amount of details I added. Now the reason I added the ILS Antenas from architect is because I thought they are the same that we find in default FS2002 airports because I saw that in Architect its mentioned Object Library and especially, we do not need to install any texture in FS2002 for them so I said perhaps those are the same antenas we find in FS2002 default apts wish use textures alrady in FS2002 and they should be very light on frame rate. Wish was not the case...To tell you the truth I could have done them in Gmax but I do not want to extend the scenery design much longer by modeling tiny objects like Antenas so I thouhgt those FS2002 object Libraries can be a big help :)Arno I will try to modify the code as you said and I agree about groundmaker, I placed , just for a test, Taxiway signs in groundmaker and at my biggest surprise no matter how many I placed they are just okay on frame rate consumption. Those ILS Antenas seem majorly buggy indeed Now I wonder if I can acess the FS2002 object library and place those antenas with another tool without too much coding? Cheers !Michel

Share this post


Link to post
Share on other sites

Hi Arno,Yup, I will check the SDK if it sais anything about them. Actually I tried to modify the code as you told me but the problem was not solve. Very strange isnt it. I am pretty sure they are the default FS2002 antenas from the library but I wonder how they can reduce fps that way.I think but I am not 100% sure that the frame rate drops radically when I look at more then 1 antena at a time and a Gmax object is presnt in the view as well. This is my early discovery and I do not know if it makes any logical sens :)Cheers!Michel

Share this post


Link to post
Share on other sites

In the code you posted I noticed there were no returns in the subroutines called by the RotatedCall lines.This means the code will run through into the next area (and next...and eventually past the last Area into a random area of memory):rotCallLibObj(.........)returnEndAis what you should have in each of the Area blocks. All subroutines should have a Return statement otherwise the code will go who knows where.

Share this post


Link to post
Share on other sites

>In the code you posted I noticed there were no returns in >the subroutines called by the RotatedCall lines. >Hi,As Martin noticed that missing Return is the frame rate killer. I also note that not PerspectiveCall() is used. Is that actually needed? Could "gMax+BGLC" users decompile one file and report?Thanks,Luis

Share this post


Link to post
Share on other sites

I know GMax still uses PerspectiveCall (called different in BGLC of course), but you still need it. Otherwise you can get strange effect in the scenery (sky visible through the object for example).I agree that a PerspectiveCall would be better thus.Then the "ideal" code would be:Area()PerspectiveCall( :L1 )RotatedCall( :L1 )Jump( : ):L1CallObject()ReturnEndAMichel, did you make this code yourself or is it part of Architect?Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Actually I will email Architect2002 author about it so he can at least fix the missing "return" in the generated code otherwise a beginner scenery designer using Architect would think that it is a normal frame rate. CheersMichel

Share this post


Link to post
Share on other sites

Hi Arno,This code was generated by Architect automatically, I just edited the sca and added return and removed the noobj as you suggestedCheers!Michel

Share this post


Link to post
Share on other sites

OK, and the origional source compiled without errors?? With that missing label it shouldn't even compile. And the rest is also a bit strange (but I think we have solved it now all together :)).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Yes it compiled without errors. I used FreeSC actually it is the official Architect compiler. Now the Return made the frame rate back to normal :)CheersMichel

Share this post


Link to post
Share on other sites

>I know GMax still uses PerspectiveCall (called different in >BGLC of course), but you still need it. Otherwise you can >get strange effect in the scenery (sky visible through the >object for example). >Thank you Arno,And the Perspective before the RefPoint()? Do the PerspectiveCall() and ShadowCall() point to the same label? Or Perspective is obsolote?Regards,Luis

Share this post


Link to post
Share on other sites

Hi Arno you are one of the few people to have framerate problems withour scenery(see our site) try removeing the .bgl "ThunderBay9jk7NT.bgl and see if that helps. Dan

Share this post


Link to post
Share on other sites

Dan, it can also be that it is my PC I have here in Brussels. It's only a Celeron 433, with 192 MB RAM and a TNT2 video card.I haven't tried the scenery yet on my normal PC (AMD1333, 512 MB, GF2Ti). I think it will work much better there.Now I get around 3 frames at the airport, but that is without setting the density back (don't want that, because I am also testing my own scenery on it and want to see everything, I am not flying on that machine anyway :)).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Yes, PerspectiveCall is still after the Area command and in front of the other commands (ShadowCall, RefPoint, etc).Here is the code in BGLC commands:OBJECT_0_START label wordIFIN1 OBJECT_0_FAIL, image_complex, 2, 32767ADDOBJ OBJECT_0_SCALESHADOW_CALL OBJECT_0_SCALEOBJECT_0_FAIL label BGLCODEBGL_JUMP_32 OBJECT_0_END OBJECT_0_SCALE label BGLCODESCALE_AGL OBJECT_0_RETURN, 10000, 575, 131072, 0005A98C9h, 0AB7Fh, 0FB8FA5F2h, 0DCCAh, 0, 0INSTANCE_CALL OBJECT_0_BEGIN, 0, 0, 02AAAhOBJECT_0_RETURN label wordBGL_RETURNI think you will notice the different commands. First there is a check on the density, then the PerspectiveCall (ADDOBJ) and the ShadowCall (SHADOW_CALL) (both calling the same label). After that is the jump (BGL_JUMP_32) to the end of the file (just like the normal Jump( : )).Then you get the RefPoint (SCALE_AGL) and a jump to the actual code of the object (INSTANCE_CALL). I don't know yet what the exact difference is between the INSTANCE_CALL a normal call (so I don't know what the parameters do).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

FreeSC hasn't been updated for awhile. Have you tried taking your source file and compiling it with SCASM 2.88 - http://www.scasm.de/ to see if it gives a better build. I would also add:Set( FSVERS 0x800 ) --- This makes it use FS2002 commandsHeader( 1 -45.12500 -44.87500 -45.12500 -44.87500 ) - Your header vice thisLatRange( -44.87500 -45.12500 ) - Your LatRange vice thisset( areamx 64 ) ----- May or may not be necessary, can't hurt!!!

Share this post


Link to post
Share on other sites

Dan, every so often one of the discussions around frame rate has evoked your message of the value of GMAX. While we've learned from you, this thread is a neat indication that its also important to keep an open mind and consider the implications of well written code. A missing return is fixed and code works well independant of tool! This possibility wouldn't have been considered if we quickly dismissed issues based on a general perception of tools. Indeed, as I read the thread, the library objects was constructed in gmax, so it really wasn't a precise consideration in the first place.I love GMAX and agree with its value, but I also love understanding the details of problems and solutions.Bob B

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