Background 1st: just doing some research for an idea!Can you control and objects speed of rotation by any other method?

Im not working in tcw at this moment or looking at the anilab editor now either!eg: if I want to control the speed of rotation of say a ball then I think its relative to the number of frames ( start & stop ).

Therefore take an example like a cars tachometer, put ya foot down on the accelerator pedal and the tacho revs increase, likewise if ya back off the revs drop. Can anilab simulate the same action as the tacho needle changing by using any of the preset commands to control speed of rotation?

Can anilab simulate the same action as the tacho needle changing by using any of the preset commands to control speed of rotation?

There is no pre-set 'command' for acceleration/deceleration, however using keyframes, under keyframe properties there is a 'law of changing' one can set each keyframe to accelerate of decelerate, so with just 2 keyframe (3 if one includes the start one) on can simulate a needle going up and down.

Using commands it will be necessary to write a little custom script to handle the calculation, which ideally should result in a curve not straight lines, I guess a sine curve would be best but I'm not good at that type of maths (other on the forum are a lot better with that stuff).

The attached is a bit rough but shows one way of producing it using keyframes and one way for commands using custom script, - the script really needs someone with better mathematical knowledge to come up with the correct calculation. File save way back to v20 so should open ok in any recent version.

Andy H your bloody marvelous thats almost what Im looking at doing and youve done it for me, wow.

Okay now that Ive got the render done http://forums.turbocad.com/index.php/topic,21879.0.html the next step is to animate the key parts for training and that should be straight forward. As I said in the 1st post was to control the speed of rotation based on a control mechanism.

So what Ive gotta do now is:1. Rotate shaft with all connected parts - simple2. When rotating 1 above show how the weights move against spring tension, mechanical advance principles3. Show the balls rotating within the bearing itself4. Show the points opening and closing against the points cam ( camshaft )5. Show the vacuum advance diaphram moving to demonstrate the vacuum advance principles6. Show a spark when the rotor button aligns to each postion in the cap7. Show the contact points spring ( not clearly visible in the gallery post ) moving

For all those points 1 -7 hence I need speed control in anilab. From how I see it its not necessary to show infinitely switchable speed of rotation but just enough for video and animation demos.

No, they are just names I gave to variable so I wouldn't forget which variable needed to go against the commands, the name 'factor' I just used as its a constant figure, and 'tmp' was going to be a temporary variable but ended up storing a figure ready for the next frame' calculation.

To check things I just typed the calculations into an excel sheet and just played around with altering 'factor' and 'tmp start' figures until I got the accel total around 128 degrees.

But like I said the calculation is a bit rough as the' decel' doesn't return the pointer to where it started from, needs playing around with a bit more.

The variable names are not inside the SDK, as such. They are created prior to running the code, Sub {a code routine} StepCustomAction, by use of the Dim statement. This Dim statement creates a slot in memory to store the changing variable values, before doing anything else. This is common to most BASIC programming languages/scripts.

It's a whole new world!

Regards Tim

« Last Edit: November 11, 2017, 03:10:08 AM by Tim Stewart »

Logged

You can design without engineering, but you cannot engineer without design.Using Win 10 with Designer 2017 and TurboCAD Pro. Plat. 2016/2017/2018 + Lightworks (64-bit versions).

Hey Tim, I didnt know that you could declare/use a variable within the editor param-3 value, that really threw me out the window. Hence the question, I too did a lot of programming 25-30 years ago and it looks like I will have get back into the saddle to understand more about the sdk within anilab.

Just wondering if from yours or Andy point of view can the animation be done with little or no prgramming

There are a few ways to accomplish it and no doubt Tim will likely come up with different solutions, so I'll just jot down a few ways how I would tackle it - you shouldn't need to do any custom coding.

1. Rotate shaft with all connected parts - simplegroup all part which are to move as a connected unit, using nested groups when necessary which allows child objects to animate independently whilst still being controlled by the parent, if you haven't looked at nested groups before see - running man thread.

3. Show the balls rotating within the bearing itselfrotate command on all balls, then group all the balls, ensure reference point to centre of group, rotate command on group

4. Show the points opening and closing against the points cam ( camshaft )rotate command (ref point moved to point of rotation) or use keyframes

5. Show the vacuum advance diaphragm moving to demonstrate the vacuum advance principlesrevolve with compound profile, either morphing command or node editing via keyframes, Note - morphing is buggy in RedSDK 2017 for me (ok in 2016), no idea about Lightworks.

6. Show a spark when the rotor button aligns to each position in the capI'd use layer switching for the spark.

7. Show the contact points spring ( not clearly visible in the gallery post ) moving Springs, there are a number of ways depending on how involved or realistic one wants to get.stretching and contracting will give some distortion, but in many cases this will not be noticeable in the finished movie, avoid using the scale command with RedSDK - its buggy. or, using sweep with compound profile, the spline (exploding from a helix) can be altered and recorded using keyframes, the sweep will alter between 2 keyframes, (again buggy in RedSDK 2017), or, sweep, then cut a full length slot out of the back where it cannot be see, explode into separate solids and use keyframes to record minimum spring and maximum spring - keyframes editor will work out the rest. works well with RedSDK.or, if there was no intermediate movement needed one could just used 2 layer switching.

Thanks for the feedback, I hope I didnt get you to write that all up just for me. Point is I obviously wasnt clear in that I just wanted to know if you thought that it was reasonable to animate those aspects with little or no code. Anyway that done check this out.

Ive completed the camshaft rather than it being driven by the oil pump ( its from a Mitsubishi ), spark plug is done and ignition coil also. I will include these in the render from the gallery soon.

So I did some basic animation and found buggy things happening, crashed once so bad that I had to turn the power of to the pc, could run taskmanger by ctrl-alt-del-keys.

Check the difference between Anibug1.png - Anibug2.png images, on the Acis Solid I set the rotate angleZ to -.5, Id then run the animation and could work out why the points opened and closed in the wrong direction. Thats when I found that the values in the AngleZ column had jumped to the AngleY column ( Param-2 ) go figure. Thats when it crashed and that was no fun as I had to re do it all.

So after changing things around and checking my I got it right. This is the basis for the complete animation, just that I have to work out the timings for frames to 360 degree rotation and open and close the points at precise times. So far ive just gone the long route as youll see. see Ani Test Points1.png - Ani Test Points2.png

Looking good Darryl, regarding the first two pics, I don't know if that's how you actually had them or but try to ensure the parameters for a particular command have something in them, even if its a nought, leaving a parameter blank can upset AL (usually throwing up a error message).

Andy's suggestions are more than thorough. Personally, I would tend towards using the Key Frames Editor more. The vacuum advance might be worth showing in a simplified slow-mo animation, if the intention is towards education. The wire-frame animation looks very promising. It might not matter that much, but, does the heel of the moving arm visibly follow the surface of the cam, when rendered?

Regards Tim

Logged

You can design without engineering, but you cannot engineer without design.Using Win 10 with Designer 2017 and TurboCAD Pro. Plat. 2016/2017/2018 + Lightworks (64-bit versions).

Hey Tim your right on the mark, Andy is a wealth of knowledge on animation aspects!

Yes I agree on using keyframes more, its just thats the way I initially did it for quick and dirty starting point. The 1st problem I encountered was anilab by default starts with 17 frames ( easily changed though ), so I started to divide 17 keyframes by 360 ( as one whole revolution ) then realised that was just too many frames. Then decided that 36 frames was sufficient and just animate at selected intervals as per the prev posts eg: 4-5, 5-6, 6-7 & 7-8 represent 44 - 46 degrees and so on would open and close the points at suitable intervals.

Vacuum advance: most likely show by a separate animation, why because it may confuse the trainees. Point here is that its a primary function just like the mechanical advance, for clarity I will probable show this as a 2nd animation with a clear description.

Yes the heel of the points does follow the PointsCam ( thats my reference name in tcw.

So Ive got the animation done nearly, but I need to get the flash animation from the old FilmProjector.tcw file.

By the way there are differences between the:FilmProjector.tcwFilmProjector-Ani.tcwwhich took me some to understand & resolve, mostly differences with lighting as its an older version from 2012.

Ive attached just the bare bones from the distributor to this post so that I can debug and understand why Im not getting the results I need. Simply the anilab light switching for the Lamp does not switch on or off, why?

All source lights just copied from the filmprojector.tcw file. Just noticed then in the testani No2.gif that the points dont appear to be opening either, must add that I did discover that when I pasted into anilab scenario editor it did modify my target scenario frames data as well. This occurred when I had to files open ( tiled windows ) FilmProjector.tcw and TestAni No.tcw. What Im saying is that when I copied from source to destination inside anilab the destination frames data was modifeid as well.

Daz, wasn't sure if you had posted the correct file, I opened it in v2017 and it didn't have a light actor to turn on/off, nor a LightSwitch command.

One needs to create a light (or use an existing one), make it an actor, select it and use the LightSwitch command (which only appears once a light has been made an actor) to control it, with 1 being on and 0 being off.

I know its how the projectior had it, but what I'd expect to happen is frame 2 light turns on, frame 3 light turns on then turns off, frame 4 light turns on / off then on, frame 5 on/off/on/off, etc. one wouldn't see this extra switching as its all done internally, but is probably adding unnecessary internal switching, and also the animation will run for 1000 frames,

Another oddity is that the light actor is being called a lamp, I've no idea why that is, maybe something to do with older versions, normally its just called a light actor unless the name is change using propertied - general attribute .

Personally I'd suggest deleting the light, making a new light, and create it as an actor, the use something like2 2 LightSwitch 1 4 4 LightSwitch 06 6 LightSwitch 1etc. as a test, then adjust the frame numbers to suit your animation.

#Edited## edited frame numbers in the last bit as there is no need to switch the light on in both frames 2 and 3 etc. ##End Edit##

Got it mostly solved, now the points open close and it now produces a spark as well. The main problem was that I used the same naming convention from the Filmprojector file and that caused a conflict with anilab v5. Further the light souce used in the Filmprojector also caused problems with ani lab also as they were set to directional, but when I changed them to spot bingo it worked. So now I will add the spark plus x 4 and the coil. With the coil I can now add a simulation of the magnetic current buildup prior the the points flash.

Oh and thanks to Andy H he is supreme, can I buy yo a beer? Happy boy.

Thankyou and then some to you both Andy & Tim. I appreciated your comments here on this topic.

Tim Im now working on the finer points of the design like:1. rotating bearing is done, just that it shows so little because its chrome!2. working with 3D mesh to simulate the vac advance, do you know if tcw can create a round mesh and then use the morphing example from the ani lab samples to simulate this?3. mechanical advance simulation was easy, but its problematic trying to achieve in the complete model. will most likely split the animation into two parts ( one for the distributor, other for vac and mechanical advance ). Tim I may convent to 2016 for your input here and 2017 for Andy to look into options if that ok. Tim pm me with your email address if that suits. Just finalising the plug leads design and then I will put it all together. If either of you manage to come downunder then ya got a free bed and beer!

Hey Tim I need to clearly document how the ignition systems works ( points based with other parts ) and Im wondering if yourself or others have either the time or experience ( auto mechanic, simple electronics) to check my work prior to posting?

Just checked the anilab tutorial again and it says that the key frames editor can be used to control speed of rotation plus others. Therefore can this be used to vary the animation speed by a bezier curve?

If so the I can simulate vac advance and show the weights simulation also

Hey Tim I need to clearly document how the ignition systems works ( points based with other parts ) and Im wondering if yourself or others have either the time or experience ( auto mechanic, simple electronics) to check my work prior to posting?

This should be no more than a page or two at the most.

Hi Daz,

pleased to help. Send it along . .

Regards Tim

Logged

You can design without engineering, but you cannot engineer without design.Using Win 10 with Designer 2017 and TurboCAD Pro. Plat. 2016/2017/2018 + Lightworks (64-bit versions).

Got 3 circles and I want to rotate the blue circle 45 degress, also move the yellow circle along the bezier curve and also rotate the yellow circle around its center axis to correct the distance based on the length of the bezier curve. See the Reference Arc Layer that hidden.

Put another way for clarity can you perform more than 1 action on the same object eg: yellow circle by moving and rotating?( this then simulates a ball bearing being rotated ( the outer ) and showing the ball moving along a path and also rotating/spinning at the same time)

Can this be done in AL?

Andy & Tim the distributor animation is done and it looks cool, just wanted to finish off some other animations and package up for a complete and overall picture.

Got 3 circles and I want to rotate the blue circle 45 degress, also move the yellow circle along the bezier curve and also rotate the yellow circle around its center axis to correct the distance based on the length of the bezier curve. See the Reference Arc Layer that hidden.

Put another way for clarity can you perform more than 1 action on the same object eg: yellow circle by moving and rotating?( this then simulates a ball bearing being rotated ( the outer ) and showing the ball moving along a path and also rotating/spinning at the same time)

Can this be done in AL?

Andy & Tim the distributor animation is done and it looks cool, just wanted to finish off some other animations and package up for a complete and overall picture.

Ive mentioned anilab screen speed before ( I cant find any downloaded files, maybe lost now ) and since I m nearing a hopefully successful distributor animation conclusion. As the main animation is done and as I just add the other pieces together, screen speed now comes into play as the gif or video file performs/displays the animation file. So I will most likely break the display into 3 pieces and then join them together:

Therefore I will most likely create them as 3 separate animations and then join them into one complete animation, The way I see it is the screen speed factor or alternatively the displayed speed for the last 2 points above now need to be addressed. Sure I can double or even triple the number of frames but I would prefer to slow down the processing speed by the way of wait or delay command, Reason being that the last 2 points are just to show clarity of whats happening within the vac & mechanical advance, and I want to zoom into the distributor to show detail.

Does the above approach make sense or could I do better? Did anyone create a wait or delay function?