Jump to content

How do you create multiple instances of an animation in Blender?


Recommended Posts

I am trying to setup a 3 leg landing system. Worked before, once, when I had very little experience with Blender. Now, nothing I do will work. The Landing leg has all the animations and I just need to copy the legs and get in the right position but I am at a loss as to how to do it. :(

1zznac7.jpg

Hopefully, the pic not only works but will actually help someone in throwing a rock at me with the answer!

And yes, still playing with this silly mod. If anything, it is helping me learn the different systems so maybe, I'll actually have something later to add to the community.

Link to comment
Share on other sites

Multiple ways.im not sure if the main problem youre having is how to arrange or how to link so ill be going over all

in no perticular order

nr 1: use an array

can be tricky to setup, forget it if your animated object has multiple seperate objects, only really works if you use bones to animate remember to place the armature modifier above the array in the stack.

nr 2: instances

use alt+d to copy and arrange how you want (or select all objects you want to link then ctrl+select the object you have the animation data on and press ctrl+l select animation data etc.) To arrange first select your "baseplate" then shift+s cursor to selected. Go to pivot point settings select 3d cursor select ypur animated object and alt+d. R to rotate, then Z to rotate on the z axis then type in "120" ( because 360 degrees / 3) press enter. Then repeat from the alt+d step.

nr3 dupliframes:

Since you want your objects arranged in a circle create a bezier circle arrange it in the center of your baseplate then select the animated object (delete or hide the rest of them) then ctrl+select the circle then ctrl+p select follow path. Go to the curve settings of your bezier curve and rightclick on the green evaluation time field and clear keyframes. Above it (frames) select 3 then go to your animated gear and go to object properties (the box) and under the "duplication" menu choose frames then set "end" to 3 and uncheck speed.

There you go. Hope this helps

Link to comment
Share on other sites

I think your option 2 is the way to go and I sorta remember using a hierarchy and linking data before but not sure.

9i4w84.jpg

The ladder (steps for non Navy personnel) :), the actual foot pad and the 2 suspension cylinders are all animated separately. I tried grouping them but when I moved a copy of the leg to another location 120 degrees out and rotated, as soon as I played the animation, the leg worked but it reverted to the original rotation on Z of 0. The ladder (steps) is, I guess, my baseplate? It is the parent of my landing leg.

When I add the parts to a group, they do not seem to actually be IN the group. If I select the ladder (steps) which is set as parent, the other parts do not get selected. I seem to recall that when I accidentally did it, selecting the parent selected the child as well. Now, nada.

Will I have to wipe all animation data, join them all as a group and then recreate the animations? Only about the 1000th time I've done it so that's easy, just time consuming. :)

I 'think' though that hurts :) that I did use your option 2 on my first attempt on the original model, now nothing seems to work like it did before. Heck, still can't remember where I found the settings for default/meters setting so please bear with me. I can be a bit slow in learning new software.

Sorry, my terms might not be correct.

Link to comment
Share on other sites

Hey. You wont need groups or remaking the animations. You may need to parent all the "root" object(s) or your animated part to an empty transform first before doing the steps in method 2 (you can use shift+d as well for normay copy instead of instance).(sounds like you are using parenting as your animation method) by root i mean the object(s) that are the first in the chain/last pparent probably the "top" of your object(it should be the object (s)that you can use to move the entire landing leg with.

ok slightly updated guide:

Select heatshield

Ctrl+s snap cursor to selected

add an empty object

shift+select the root object (s) then shift+select your empty object

ctrl+P parent to object (keep transform)

Then rightclick your empty in the outliner(top right by default) and select hierachy

shift+d then enter and repeat that.

now you should have an empty, an empty.001 and an empty.002 each with your gear nested under it in the outliner. leave empty 001 where it is and select empty.001

press R then Z then 120 then enter

then select empty.002

press R then 240 then press enter

now you should have 3 identical gears arranged in the grooves with animations intact

Hope this helps

Selecting the parent object doesnt select the child objects but you can move the child objects with the parent by moving just the parent. You can also choose all child objects by rightclicking the parent in the outliner and chose "select hierachy"

By plate i mentioned earlier i meant the big black heatshield thing Since i assumed the that the groves in it was where you intend to place your landing legs/stairs

Edited by landeTLS
Link to comment
Share on other sites

Well....

2e530p4.jpg

Not sure this is exactly how you instructed me but, it did work in blender! I, for some reason, had to create dummy boxes on each of the 4 components and parent the actual part to each of them. Then I parented the dummies to the main one at the center of the ship. In Unity, I'll just remove the mesh render from the dummies so it should look right but hope this will not cause an issue with adding real suspension to the legs.

Thank you for all the help.

BTW, do you know if I can setup real suspension to a tripod type landing gear arrangement?

P.S. The ship looks weird because the engine section is a separate piece for KSP as well as the astrogator globe on the top.

Link to comment
Share on other sites

Well. most important thing is that you got it to work!

regarding suspension. Yes you can have it. Roverdude did a gear with 4 legs inbuilt so you could take a look at that. Im not sure how the setup differs from the standard setup but perhaps just try to setup each component with the same names in unity and write those into the appropriate fields in your landing gear module. Its been a while since i setup something for ksp so perhaps someone else can be of more help

If you wanna quickly make those boxes dissapear instead of removing the renderer in unity you can tab into edit mode on each of them and press A to select all the geometry then delete it. The object is still there but it has no mesh. btw the reason i said empty object is because blender has an object made spesifically for these kinds of cases. Its called an empty object and is just a point with no mesh. Its at the bottom of the add object list)

Edited by landeTLS
Link to comment
Share on other sites

Again, THANKS!

Not sure how I screwed the animations up. Most likely by doing the animation for each item THEN trying to tie it all together with a group. Did give me some funny and frustrating animations though! :)

Will look at his work and see. Going to test the ship in KSP in a few minutes. Wonder if the engine will lift 550 tons of craft? :)

Link to comment
Share on other sites

Youre welcome. You where right by doing it for one item then duplicating it and arranging them. Thats how i would do it. Its just getting familiear with the software that will make it go easier. Good luck with your mod and launch

Link to comment
Share on other sites

Thanks and, a, oopsie? Model is a bit over on poly count it seems. Looks fine in Unity but KSP shows it as invisible and the Alt-F2 debug keeps scrolling about being invalid due to poly count.

Reducing count now.

BTW, the engine CAN lift the 550 tons. Destroyed the launch pad at liftoff though so more testing? :)

Link to comment
Share on other sites

Thats wierd. Are you sure its saying the models polycount is too high and not the collider polys?(you need extreme polycounts for ksp to reject it like that. If it ever does) if its the collider then that has nothing to do with your model geometry but the collider you are generating in unity is too complex. You need to create a super simple mesh to put ontop of your object and use that to generate your collider instead of your main mesh and remove the mesh renderer on it. If these are the moving parts then youll need to go ahead and use unitys primitive colliders instead.

Link to comment
Share on other sites

Created a collider in Blender and thought I had made it simple. Maybe that is what is wrong. Cleaned up my object anyway but will look at the collider as well.

Since the silly debug window was continously scrolling, I was unable to look above the message to see what was actually causing the problem.

Back to the Blender board!

Link to comment
Share on other sites

dxl8w2.jpg

This is what I get.

No errors other than might not cache in Debug

Looks perfect in Unity, mesh is not hollow, IE: The normals are correct.

Collider is set and checked for convex.

Funny thing is, the only that that shows up of the main ship is the leg bays. They have a messed up texture but are not even part of the collider as it covers them completely.

All my hair is now gone.

Going to play dodge in the freeway methinks! :)

and yes, rifling the forum right now trying to see if the answer is out there.......( queue the x-files music)

Link to comment
Share on other sites

Im not sure what that is youre getting there. Seems like a gameobject component in your unity setup that should not be there(. But again im not sure. Collider is not the problem. Neither is your mesh.

Anyways those are just warnings. They are not problems per say other than the debug messages You see There.

the visual issue most likely lies in your unity setup. For example, Not all unity shaders and components can be used in ksp. Best to stick with the ones that come with parttools tho you can use the default ones too. Not sure if thats the reason for your invisible mesh but id go over everything step by step and see if youwe missed something. Also make sure you are using the supported version of unity. I think its 4.6etc.

Link to comment
Share on other sites

Think I found the problem. I was using 4 different textures on the main ship model and researching (getting better at it!) says 1 texture per mesh/model. So, just hacked it to pieces and now going to see what KSP thinks of my hack job. :/

Link to comment
Share on other sites

6 hours of recreating the entire ship from scratch and making (mediocre) textures shot down the drain. Let this be a lesson to any new modders. ONE FRIGGING TEXTURE PER MESH!

At least it's visible again in KSP though the textures all have to be recreated.

Mod and learn, mod and learn.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...