News:

The purpose of these forums is to discuss TurboCAD.  Please keep the discussion of other products to compatibility issues or how the other software can be used with TurboCAD.

Main Menu

Bending a 3D box object

Started by AussieBloke, November 28, 2023, 07:35:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AussieBloke

Just asking questions on using anilab about things Ive never done.

Can we use anilab to animate bending a box into a 3D object?

I know there are a only few seasoned TurboCADers/Animationlab users here on the forum. Does v6 work reliably with TurboLux v2023/beta v2024 & png formats?


Andy H

Obviously I cannot comment about 2023 (Dean may know).  And you would be better asking Vlad about 2024, in the beta section.

Ideally one would use the SDK as a script within AL.  But I've no idea if bending, and bend properties ever got added to the SDK, (Nikki may know).

However,
Normal bending, and flange.  Requires selecting a face to bend, which cannot be done by any command in AL. The only thing one can automatically be done in AL, is to move the bend line, which simply changes the start of the bend.  If the SDK bend properties are accessible. on could also change the bend angle.  But as I say, I don't know how to access bend properties via the SDK

Bend by sketch should work, but in trials using 2020 and 2021, the object won't auto redraw after the sketch polyline is rotated within AL' unless one uses 'undo external changes'.  (it redraws if manually rotated).  There may be a way round this but it would need some further tests.  i.e. a way to force the object to redraw.

Bend to path depends on what shaped object is required,  for example, if one was creating a cardboard box, then To-path is not suitable.  For things like attaching a flat logo onto a curved object, To-path can be used / animated. 

Personally, apart from attaching a logo (where path can be used), I'd cheat.  If it was for visual purposes only, I'd use multiple ACIS objects and possible Hemispheres for the rounded edges.  If it was meant as a true to life project,  It could be done manually, and each movement saved as a PNG using Save-As. then all the images added together in a movie program.

Maybe others know a way to get Bend to work consistently.

AussieBloke

Thanks Andy, so you've given me an idea on howto go about creating a simple animation.  ;D

AussieBloke

Andy just 1 final question if I can. Want to animate the HT using TurboLux in v2023, Im thinking that if I setup the drawing with all parts/objects exploded/read separated out of sight then animate them into the scene. Does that make sense and is it the best approach?


Andy H

That is probably best with lots of parts. 

What I tend to do with most files, is record keyframes at key '0' of the finished position of the objects, then drag out of sight and record the next keyframe.  Then I move all the keyframes about so they are in the order I want them to move.

Its quite a bit more work, but this just saves me having to re-align the objects to get the finished positions. And avoids me possibly getting something wrong.

AussieBloke

Want to use Excel to save time with anilab, just searching for tips but couldnt find anything.

Andy H

It is possible to use Excel,  but that only works with Commands.

In Excel you could use either the move command, or move absolute. though you may need to set it up twice,  once to move the objects apart and once to put them back together.

In the additional AL help file, under 'commands' is Format for writing.  this is the information one needs for each command / actor.

In Excel one would need to set it, so it can output a text file (which can then be renamed to .sc) something like.
[Part1]
Name=Part1
State=1
Commands=1
0=1 1 Move 200 0 0
[Part2]
Name=Part2
State=1
Commands=1
0=1 1 Move 200 0 0
The above moves the first two parts 200 units in the +X direction.  Then a second set of commands..
[Part1]
Name=Part1
State=1
Commands=1
0=1 50 Move -4 0 0
[Part2]
Name=Part2
State=1
Commands=1
0=51 100 Move -4 0 0
This would move the objects back into position during 50 frames (about 2 seconds) at a rate of -4 units per frame.   NOTE, this is a very rough example. Normally one wouldn't just move everything in the same +X direction.


Dean

Darryl,
you need to be more specific mate,  :)  how does the box bend?

attached are two examples...
One by animating the bend line and the other by morphing.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

AussieBloke

Dean. Yeah I was a bit vague here but I need an update of keys for AL v6 to test with AI, old keys and codes no longer work ???

Its been quite a while since I last used AL, it reverted back to a trial version after installing a new copy yesterday and thats how the anilab install reported it before 1st use.

I did get a key from Zunair in about 2021 and the format of the key was:

xxxx xxxx xxxx xxxx xxxx xxxx

or so. Seems way to long given that the activation code only required those 1st 4 x groups, not the whole 6.

Anyone got any ideas on howto fix this?  >:(

Need a fix if there is one asap, cos I need to do sime animation work.  ;D

Andy H

Quote from: Darryl W on November 30, 2023, 05:56:46 PMAnyone got any ideas on howto fix this?  >:(
Need a fix if there is one asap, cos I need to do sime animation work.  ;D

Did my reply's to your PM mot come through Darryl.

IMSI had a faulty server back in Nov 2021, which stopped AL codes from working. Even brand new serial activation combinations did not work.  Plus, even if you had the right code, it will likely have expired by now.  I just tried a new code which I got in Nov 2021, and it says expired.  Back in 2021, I got an E-mail, which said they would get in contact when the server was repaired. But it is still faulty today as far as 'get new code' works.  (connection times out).

You will need to use the 'Chat' function on TC's website (Or E-mail support), to get new serial and activation codes.  Oh, and yes, AL codes are four banks of four characters.

AussieBloke

AnimationLab v6 is now working fine thanks to all here.

Andy if I wasnt clear before with using excel to assist with anilab.

The reason I asked was say: Ive created the basic animation and got the al editor(s) done, then if I want to add more animation at key points in either editor then using excel to add/delete/move with excel makes it simple and painless.

Hope that clarifies how I want to use excel?



 

AussieBloke

#11
Quote from: Dean on November 30, 2023, 04:55:27 PMDarryl,
you need to be more specific mate,  :)  how does the box bend?

attached are two examples...
One by animating the bend line and the other by morphing.

Dean I assume the 1st anilab example is animating the bend line, is that correct?

What are you animating in the bend line, can you be a little more specific here ( Ive never tried animating a line, let alone a bend line ).

Edit: Starting my preparations for animation of the ht and considering my options for the best Anilab content possible.

A little more, I am toying with animating a cardboard box being opened from the top 2 flaps. Simulating the contents of the ht being stored withing Styrofoam and removed, then animating a robot arm to simulate the building of the ht.

AussieBloke

Andy Im reacquainting myself with al after a long absence, when you assign the objects visibility to off does anilab render those objects ( havent tested this aspect, still in designing stage )?

Eg: say Ive got a shelled box and inside theres a smaller box, if the smaller box is not visible is/or will it be  rendered.


AussieBloke

#13
Quote from: Darryl W on December 05, 2023, 04:29:39 PM
Quote from: Dean on November 30, 2023, 04:55:27 PMDarryl,
you need to be more specific mate,  :)  how does the box bend?

attached are two examples...
One by animating the bend line and the other by morphing.

Dean I assume the 1st anilab example is animating the bend line, is that correct?

What are you animating in the bend line, can you be a little more specific here ( Ive never tried animating a line, let alone a bend line ).

Edit: Starting my preparations for animation of the ht and considering my options for the best Anilab content possible.

A little more, I am toying with animating a cardboard box being opened from the top 2 flaps. Simulating the contents of the ht being stored withing Styrofoam and removed, then animating a robot arm to simulate the building of the ht.

Got it now youre animating a parttree object. Is that the way its working for you?


Andy H

#14
Quote from: Darryl W on December 05, 2023, 06:33:12 PMAndy Im reacquainting myself with al after a long absence, when you assign the objects visibility to off does anilab render those objects ( havent tested this aspect, still in designing stage )?

Eg: say Ive got a shelled box and inside theres a smaller box, if the smaller box is not visible is/or will it be  rendered.

Objects will not be rendered if on a hidden layer.  However, if the object has an animation attached, be it keyframe or command. It will still follow the animation even though you cannot see the object.  This behaviour can be very useful in some situations.


As for Excel.  What your thinking of will work just fine.  There are a couple of things to note,  If using any key frames,  Although the actor name is saved with the .sc file (when using save scenario to file).  the key frames themselves are not saved to file.  And secondly,  when putting into Excel, the order of the actors is that of the actor list, not the frame number order.  Therefore when I put command scenarios into Excel, the first thing I do is to re-order them into frame order. makes adjusting frame numbers easier.

For the bend line.  yep, part tree is necessary, , there is no need to make the actual part an actor, just the line. The drawback is that, animation the bend line, is never going to look like a realistic animated bend. 

Andy H

Well. this was a pain to get right.  I had a play at animating a proper bend using a custom script.  And although possible, its far easier faking the bend using two ACIS solids.  The bit of script that does the work is

If s < efn then
  tot = tot + rads  ' tot = total bend so far + radians
Else
  tot = (pi / 180) * angl  'ensures the final frame set the bend to 90 degrees
End If
  Set TCdrw = ActiveDrawing
  Set gr = TCdrw.Graphics.GraphicFromID(12)
  gr.Properties("%$BEND_ANGLE") = tot  ' Total bend angle, increments each frame

But there there are a few other things needed before it gets that far.  And a few problems, like the undo buffer would not work with the animated bend. (flashes an error message).  not figured that out yet.

To be honest, I just wanted to see if its possible.  For the time and effort needed to get it right,  I'd cheat with two ACIS solids, and rotate one of them.

Click on the gif image below,  and it will animate.

Dean

Quote from: Darryl W on December 05, 2023, 04:29:39 PM
Quote from: Dean on November 30, 2023, 04:55:27 PMDarryl,
you need to be more specific mate,  :)  how does the box bend?

attached are two examples...
One by animating the bend line and the other by morphing.

Dean I assume the 1st anilab example is animating the bend line, is that correct?

What are you animating in the bend line, can you be a little more specific here ( Ive never tried animating a line, let alone a bend line ).

Edit: Starting my preparations for animation of the ht and considering my options for the best Anilab content possible.

A little more, I am toying with animating a cardboard box being opened from the top 2 flaps. Simulating the contents of the ht being stored withing Styrofoam and removed, then animating a robot arm to simulate the building of the ht.


Darryl,
 :) Perhaps "Bending" is not what you want but rather "rotating" If you want to animate a box being opened.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Andy H

Quote from: Darryl W on December 05, 2023, 04:29:39 PMA little more, I am toying with animating a cardboard box being opened from the top 2 flaps. Simulating the contents of the ht being stored withing Styrofoam and removed, then animating a robot arm to simulate the building of the ht.

Quote from: Dean on December 07, 2023, 04:41:14 AMDarryl,
 :) Perhaps "Bending" is not what you want but rather "rotating" If you want to animate a box being opened.

Thanks Dean.  I had completely missed that part of Darryl's post.

AussieBloke

Yesterday I spent some time creating some boxes with flanges ( from a partree object ) for anilab but soon discovered that attempting to unbend there were issues with that process. Looked into the unbend issue and found plenty of beta bug & general posts along the way.

Okay then onto Plan B. It then dawned on me to fake bending by using an acis solid as a flap, and just rotate that way instead. 

So now Ive got about 12 boxes of various sizes with the ht exploded down and packed into Styrofoam packaging, each Styrofoam package is packed inside a cardboard box with decals to boot and almost ready to animate.

Luckily I had an old model of a robot arm that I can use to simulate building up the ht model.