Sign in to follow this  
arno

Rotaiting wind turbine into the wind (again)

Recommended Posts

As many others have done, I created a wind turbine in GMax and created an animation so the rotor is rotating - works great. Now I read on http://home.wanadoo.nl/arno.gerretsen/ about the cahnges needed to turn it into the wind - I change the BGL_CALL to POINT_VICALL as suggested, however it has absolutely no effect. I tried placing two mills next to each other as seperate BGL files, then I tried 4 (based on 2 different GMAX exports to get the rotor at a slightly different angle). Still nothing....Next attempt was to insert the mill into a library - I used Airport to generate the base SCA file with two mills (identical) - still no turning into the wind. Next attempt is to revert the GMAX code so it no longer should rotate with the wind, and then change the API call to do a TransformCall instead of RotatedCall using the "0C74" variable - still nothing. I then tried to use the IfVarRange to at least detect wind from the east or the west - still no result. The mill can rotate as long as I "hard code" the call to rotatedcall, so as far as I can see my object is working fine.All I find from searching this forum (and other forums) is that more than one rotating object is needed - well, I have four, and still nothing. Does any have any suggestions on what else could be wrong in my code? I am kind of starting to get irritated at this thing :)

Share this post


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

Hi! I cannot be of much help in Scasm coding as I don't know anything about it. :-boomA couple of years ago I did produce an electric and a grain windmill with EOD for FS2K I transported in FS2K2. I had the rotors spinning but kind of a jerky type of spinning, realy not fluid. Also it could not orient itself into the wind.Lately Bernd R. Fix posted a demo file of very fluid animated objects among them a couple of electrical windmills that DO spin fluidely and orient themself into the wind, Busyobjectsdemo.zip, you can find on Avsim Lib. The animation is made with a program he is currently developping. I was realy impress by the fluidity of the mvt as to compare to whatever I saw until then.I contacted him to mention my appreciation of his work and joined along pictures of those 2 windmills I made. He offered me to animate them altough I was not after that. Turned out he needed the stucture (api files) to be mounted a certain fashion that was not the way I had created those windmills. So, with FSDS2, I hastely created a new electrical windmill of the form he needed it and sent him the apis. Nothing very fancy but still acceptable.In no time he returned me a functional api version of a very fluid and wind speadable/orientable of the beast. As you mentionnne, at least 2 of those must be part of the same scenery.Bernd is presently developping its tool of which I have a beta that goes well beyond animating rotors!!! It requires to have some knowledge of scasm coding though, which is beyond my means as I mentionned above :( I did look at some tutorials but this thing is so dry for a non-programmer. x(I join a picture of the windmill below. I'd be glad to send you the api file provide I get the autorisation from Bernd. Meanwhile take a look at its Busyobject demo. I think you'll like what you'll see and appreciate the tool potential,Hugo

Share this post


Link to post
Share on other sites

Hi lmoelleb.I've found Arno's advice on wind rotation to be right... there needs to be 2 wind-rotating objects close to each other. I have a trick that adds to Arno's website code. If this is your code:SCALE_AGL OBJECT_0_RETURN, 10000, 126, 131072, 00043D426h, 038E4h, 0E38E38E3h, 08E39h, 0, 0BGL_CALL OBJECT_0_BEGINOBJECT_0_RETURN label wordThis is possible:SCALE_AGL OBJECT_0_RETURN, 10000, 126, 131072, 00043D426h, 038E4h, 0E38E38E3h, 08E39h, 0, 0POINT_VICALL OBJECT_0_BEGIN, 0, 0, 0, 0, 0, 0, 0, 0, global_winds_surface_directionSCALE_AGL OBJECT_0_RETURN, 10000, 1, 002000000h, 00043D426h + 100h, 038E4h, 0E38E38E3h + 800h, 08E39h, 0, 0POINT_VICALL OBJECT_0_BEGIN, 0, 0, 0, 0, 0, 0, 0, 0, global_winds_surface_directionOBJECT_0_RETURN label wordWhat I did was to call the object twice... but the second time I changed the "V2" to 1, scaled the size to extremely tiny ( 002000000h ), and literally added a very small amount to the latitude and longitude.. to offset the refpoint.This supplies the second object, but it should no longer need to be hidden, as it is an offset tiny clone that's too small to see!Here's some similar SCASM code:;Area( B N42:37:42.00 W088:35:58.80 22 ); IfVarRange( : 0346 2 5 ) PerspectiveCall( :_PlaceObject ) ShadowCall( :_PlaceObject ) Jump( : );;:_PlaceObject; RefPoint( rel :_PlaceObjectFail 0.25 N42:37:42.00 W088:35:58.80 V1= 800 V2= 2 ) TransformCall( :_DrawObject 0 0 0 0 0000 0 0000 0 0C74 ); RefPoint( rel :_PlaceObjectFail 0.001953125 N42:37:42.20 W088:35:59.00 V1= 800 V2= 1 ) TransformCall( :_DrawObject 0 0 0 0 0000 0 0000 0 0C74 );;:_PlaceObjectFail Return;; :_DrawObject;Same idea. Tiny offset clone that's called by the second TransformCall(). Note I have limited the object visibility ( V1 ) to 800 meters, as the size of the object is only 1 meter in the SCASM example. If it was 100 meters tall, I might take the V2 to 8000 meters.I'm attaching a SCASM code example.Dick

Share this post


Link to post
Share on other sites

Yep, I already changed the ASM code that was mailed to me and that also worked fine. I returned it to the sender afterwards :). I am curious what the differences between that file and the origional ASM file are.Arno


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

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