Sign in to follow this  
Guest JR Morgan

Get rid of object's autogen removal?

Recommended Posts

Hi,I have a broad object, which seems to remove autogen in a rectangular area. Is there a way to edit this object so that autogen isn't stopped by it? Object is made in FSDS 1.6.

Share this post


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

Hi efva2002.The radius of the object's placement ( v2 in SCASM ) seems to control how much autogen is removed. You can try to reduce v2, but if you are too aggressive, the object will not display properly ( flashing is a common side effect ).I have not tried it, but the use of SCASM's TransformCall allows you to offset the refpoint away from it's display location, and that may be a way to display the object without destroying the autogen. I noticed you can use an offset of x, y, or z.. which brings to mind an interesting possibility... could the offset be above or below ground level, and bypass autogen exclusion that way? Search the forum for 'transformcall' and there are a few examples. Maybe Arno has some info on this, and "Claviateur" had some use for this with his airport scenery.Dick

Share this post


Link to post
Share on other sites

Thanks for that,I guess another solution would be to split the macro in several parts?

Share this post


Link to post
Share on other sites

Hi efva2002.I think if you split the object into ( more or less ) square chunks, then the radius ( v2 ) can be tightened-up on each chunk, to reduce the effect on the autogen.Dick

Share this post


Link to post
Share on other sites

Hi Arno.I made a test with BGLPlacer:LIBRARY,SCO_genbldg_skyltgraytall,N39* 52.87',W79* 44.50',AGL,0.00,0.00,0.00,Very Sparse,"RADIUS=100"That's a tall gray building, at ground level. I didn't scale it, so it's a bit undersized. :) The location is Brandonville, Richard Hill's stomping grounds. The autogen is snug around the building.Then I changed the radius:LIBRARY,SCO_genbldg_skyltgraytall,N39* 52.87',W79* 44.50',AGL,0.00,0.00,0.00,Very Sparse,"RADIUS=1000"This should make the autogen disappear around the base of the building.. and it does.pic1 = 100mpic2 = 1000mDick

Share this post


Link to post
Share on other sites

Hi all.A note about experimenting with autogen.VTPs and CUSTOM and objects will exclude a certain amount of autogen, as we know. When designing, we often activate, and deactivate scenery with the Scenery Library. But many times the excluded autogen will not return to normal when we deactivate object BGLs!The cure, is to Select a Flight, somewhere removed from the autogen's area, then return to the autogen's area... it should then be restored properly.If you don't do this, you may get a false indication that autogen is missing, when in fact it just needs to be "reset".Dick

Share this post


Link to post
Share on other sites

Interesting! And it makes sense to link it to the v2 value, as that should indicate the radius of the object (maybe MS has made things I such a way that we can understand it :D).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 now gave my macro a "dummy RotatedCall-switch", something that had been discussed earlier in this forum. It actually worked!

Share this post


Link to post
Share on other sites

Yep, that's a good tip. I went 'round and 'round with my first scenery project, with the autogen popping in and out and in and out and... well, it was really starting to get on my nerves. Then I discovered what Dick mentioned. Definitely not something that most simmers would see, but for scenery designers it's a real pain in the butt.

Share this post


Link to post
Share on other sites

Hi efva2002.I suspected a TransformCall could be used to salvage the autogen. It appears to work. In this example, I set the offset point to an altitude of 32767 meters:Header( 1 N39:52:52.19 N39:52:52.19 W079:44:30.00 W079:44:30.00 )LatRange( N39:52:52.19 N39:52:52.19 );Area( A N39:52:52.19 W079:44:30.00 100 ); PerspectiveCall( :_object_start ) ShadowCall( :_object_start ) Jump( : );:_object_start RefPoint( rel :_fail_return 0.50 N39:52:52.20 W079:44:30.00 V1= 0 V2= 1000 ) TransformCall( :_call_object 0 32767 0 0 0000 0 0000 0 0000 );:_call_object CallLibObj( 0 C545A27F 11D2E2EC 1000849C 2AE60C5A );:_fail_return Return;EndAThe autogen is preserved. The object crash-detection is fine. I used this number, as I believe it's the max altitude allowed by this call.With TransformCall, the first parameter is to the label for the object, in this case a library object. The next 3 parameters are signed integer numbers ( 16-bit ) for distance in meters from the point of origin ( in this case the longitude ( x ), AGL altitude ( z ), and latitude ( y )... I think ). Perhaps someone more knowledgable can confirm the X,Z,Y of the TransformCall as Long, Alt, Lat...?The final 6 parameters are the rotatation, just like rotated call, but followed by 0000, in each case, to reserve room for some kind of variable ( not needed for this code ). I'm not sure if rotation is integers or decimal.So, basically, I shift the refpoint temporarily straight up to 32767 meters, where it won't interfere with the autogen. At least I think I went vertical... :-lol This allows me to keep the V2 as 1000 meters, which normally would kill a lot of autogen. Setting v1 to 0 apparently tells the sim to display the object as soon as possible. I don't know the effect of this on framerates, or the rendering of other objects. If you set the altitude too close to the ground, the autogen is destroyed, and there may be a double shadow effect.At any rate, it seems to work.Dick

Share this post


Link to post
Share on other sites

I don't get what you are doing? Why would you want to place your object in the air :)?Also, setting the v2 to 1000 is not really good normally. Set it as small as possible (so it fits the size of the object), to get best fps.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

But can you see any negative by using the dummy rotatedcall I now use? It seems to get rid of the autogen problems, and the object shows up just as before. Shouldn't be any FPS-hit either.This forum is unbelievable! :)/Sebastian

Share this post


Link to post
Share on other sites

Hi --- You've made my day; Dummy RotatedCalls work to preserve autogen on Ground Polygons, Groups of buildings and mostly, everywhere I've tried them.BUT WHAT ARE THE MECHANICS DURING COMPILING OF THE CODE THAT MAKES THEM WORK?? :-).J.R.

Share this post


Link to post
Share on other sites

Hi Arno.You miss the point...the object is sitting AGL, not in the air... it's on the ground, surrounded by autogen... even though the radius is huge! The 'temporary' distancing of the refpoint by the TransformCall allows the autogen to survive, even though a huge v2 is used.So the correct v2's of large objects should not affect autogen at all, if you 'fool' the autogen with the TransformCall. An object's radius doesn't need to affect autogen at all. That seems to have been a problem around airports. Others have moved the point to an area of water, where the 'moved' v2 will not disturb the ground's autogen. I had an idea to move it vertically... so we don't need a body of water to mask the autogen exclusion ( not much autogen at 32767 meters altitude ).I think SCASM's TransformCall is equivalent to BGLC's POINT_VICALL (0x46), but I think Manfred has altered the XYZ definitions to make x=longitudinal offset, y=latitudinal, and z=altitudinal. I'm not sure MS does it that way with BGLC.Dick

Share this post


Link to post
Share on other sites

Hi J.R.It is BGLC's POINT_VICALL ( opcode #0x46).But the SDK seems to confuse the issue by not properly listing the parameters. What the SDK says is: XYZ16 offsetis actually xx, yy, zz where each is a signed 16 bit integer, and is the distance in meters from the actual refpoint.Manfred lists those parameters as delta_x delta_z delta_ybut in the odd way of BGLC, X = longitudinal, Y = altitudinal, and Z = latitudinal. Page 7 of the FS2000 SDK goes over that. Manfred just transposed the z and y for our benefit, as we commonly refer to z as altitude.Whether BGLC or SCASM, the order of those parameters is longitude, altitude, and latitude. All parameters are integers, but rotate angles are probably translated to their integer equivalent by SCASM.

TransformCall( :call_object_label   E_W_meters   UP_DOWN_meters   N_S_meters   pitch_angle   0000   bank_angle   0000   heading_angle   0000 )

and who knows what the 0000's mean! ;)Dick

Share this post


Link to post
Share on other sites

Thanks for that explanation Dick.. You have a fantastic ability to corelate the way these assemblers and compilers work (!) and I sure appreciate your being willing to share your knowlege. 'Back to the 0000's --- These crazy "Dummy" RotatedCalls in SCASM (Dummy meaning telling the object to rotate 0, 0,& 0 in the 3 coordinates) just seems like wasted code; but darned if they don't work to preserve the native autogen. That's really got me confused. I guess some day people like yourself will be able to figure that one out and hopefully, let us know what's going-on. Is it possible that these "Rotate to nothing" opcodes confuse the FS scenery engine and it's just throwing up it's hands and painting the default scenery in spite of our throwing "interfering" polygons at it ? Thanks;J.R.

Share this post


Link to post
Share on other sites

So you are saying although you transform it 32767 units into the air it is still on the ground? This is a really strange thing :), maybe I must wake uo completely first and then have another look.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 J.R.The pitch-bank-heading rotation works just like RotatedCall, but the '0000' is some sort of "Variable".. not needed for our purposes.The odd thing is the temporary relocation of the refpoint... I'm going to play with excluding these types today, and see if that is a problem. If we normally must exclude the refpoint + v2 radius, then what and where do we exclude for these?If the relocation is too close to the object, you may see a false object shadow for the relocated refpoint!Dick

Share this post


Link to post
Share on other sites

>>>The odd thing is the temporary relocation of the refpoint... I'm going to play with excluding these types today, and see if that is a problem.<<<**OK... By 'temporary relocation of the RefPt', are you considering this as in a RotatedCall or as in a TransformCall --- or are those two opcodes actually the same function-wise? I thought the TransformCall "Offsets-From" the (original) RefPt but that the RotatedCall merely Rotates-Objects-Around the original RefPt?** >>>If we normally must exclude the refpoint + v2 radius, then what and where do we exclude for these?<<<** Right... There's probably a way if one is a C+ Guru but that's beyond my present scope of ability, for sure :-). Much Thanks that people like you are willing to share your knowlege. **>>>If the relocation is too close to the object, you may see a false object shadow for the relocated refpoint!<<<**I've seen the shadows you refer-to and in all such cases the shadows were in locations where there should have been an autogen object. To "recover" that missing autogen object, use of the "Dummy" RotatedCall and keeping V2 to the lowest possible value to retain the Object-In-Work's visibility did the trick. BTW, one of the worst offenders I found that did that was the Rwy-Hold and Nav-Hold line sets (there are no doubt other equally bad offenders). **Thanks;J.R.

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