Jump to content

Need help with Unity( meshes, tags, etc) so I can import parts to KSP


Recommended Posts

Hello guys.

First I must say I read all 20 pages in this thread but still I have troubles with UNITY and setting the parts in UNITY.

So I want to ask you if we can pretend or play :) that I will be a good student and you will be patient teachers :) okee-day ? :)

So first here pic :

YOySMBh.jpg

Now the NOSE part is quite OK I am following this tutorial from Tiberion :

But the questions starts with RCS and Landing gear :

1/ I read somewhere here that for RCS I just need to create an empty object and name it "RCS_node" ? But do I have to do this for all holes ( 14 holes ) ?

2/ Landing gear should be rigged right ? And where do you advice to do the rigging in Maya or Unity ?

3/ I saw somehere around here that somebody has suspension too. Hmm I would love to have this too. Can you post your tips ?

4/ Coliders. So as far as I know I have to have wheel colliders, mesh colliders and what ? For example what type of colliders I should put on the whole landing gear and where ?

5/ Animation of landing gear. I think I need to put those colliders in a group with landing gear right ? So they will move together with landing gear during animation cycle right ?

Thanks this are first question of my long long paper.

Thank you really for your help and patience.

Link to comment
Share on other sites

1. RCS work like engine thrustTransforms. you can call it whatever you want, as long as you feed it to ModuleRCS in the part config. 1 per visible jet you want to see in game. all identically named transforms should get the effect assigned. Thrust should be per ModuleRCS, in otherwords, each ModuleRCS will have same thrust whether it has 10 RCS transforms or 1.

2. Depends on complexity of your design. if it's simple like the stock gear, you can do it in Unity. if you have a complex gear that requires many constraints etc, may be easier to animate before import. Bear in mind imported animations will break if you change the part hierarchy in Unity later.

3~5. a bunch of links to several threads on Landing gear setup; a few sample unity projects floating around too. check the Mod Info links.

Link to comment
Share on other sites

Hello

OK thanks I will try to find some examples from unity here on the forum. And some tutorials too. I think I saw something a wekk ago with some recording of landing gear creation from twich.

And one more thing which I somehow do not get.

Example : OK so I have a landing gear , I created an animation in Maya for it, put in KSP through Unity and I know that in KSP when I click with right nouse button directly on that part I will have buttons for my animation called raise gear , lower gear.

But what I do not get is how the game engine or game knows that when I press on my keyboard "G"or click with mouse on one of those three buttons ( gear, brake , lights ), how it knows that it should start playing my animation with the gear ( lowering or rising ) ? Do I set this in part.cfg or ?

And the same with aileron and rudders. How the game knows that when I press A or D or W or S on my keyboard, it should start move with the aileron up or down or in case rudder it should start moving with it left or right?

Somehow I do not get this.

Thanks for explanation :)

Link to comment
Share on other sites

this is a good thread for dealing with landing gears. not too long; just about every post is relevant. good to read. lots of images and videos of gear tests.

http://forum.kerbalspaceprogram.com/threads/72802

I can't find the thread that had the sample package I uploaded. using CptKipard's nose gear for his Skylon mod

here's the direct link. Has Unity package and working KSP part.

http://www./download/psu9e2k70d6wwz0/skylonNoseGear.zip

Edited by nli2work
Link to comment
Share on other sites

OK update: I got it I think. Both for whell and for ailerons and rudder.

I was just a little bit afraid. Last week I was looking for some tutorials for Unity on youtube and I saw this video :

As you can see here is somebody setting his robot with a feature called Animator in Unity. Assigning him how to behave when somebody press some key on keyboard.

And I was afraid that I have to use something simmilar for the rudder and ailerons.

Link to comment
Share on other sites

KSP doesn't support Animator yet.

control surfaces are tricky, maybe this can help a little http://www./download/1ptsytr7ol3lgf1/ctrlSrf.zip

the posts starting at #235 here maybe helpful too, http://forum.kerbalspaceprogram.com/threads/49756-WIP-R-E-L-Skylon-C2-Stabiliser-and-Rudder-problems-%2805-Nov-2014%29?p=1451600&viewfull=1#post1451600

Link to comment
Share on other sites

Thank you very cery much nli2work.

If I may one more question.

How should I name colliders in Unity ? for example if I have 2 colliders in one big part. Like here I am trying to put the landing gear into RCS block like Buran has something simmilar.

Do I need to name them like coolider1 and collider2 ? But I think the game will not recognize them or ?

xMLf5IB.jpg

Link to comment
Share on other sites

name is important if part modules need to refer to them specifically. add collider components to colliders or directly to mesh. use unity primitive colliders whenever possible. convex-mesh colliders when absolutely necessary.

Unity has a good short video on using colliders.

Link to comment
Share on other sites

Hello Nli2work

Thank you for the info.

Trying to figure it out whole day why I have this.

Want to ask you, I was following the Cpt Kippard tutorial wheel in Unity. Created/renamed everything exactly like he has. But somehow in game I see this:

ERUioB7l.jpg

I meesed the config or Unity messed my animation after I created some new groups and put there some objects ? As animation is from Maya so I think maybe Unity messed my animation after I created a new groups and put there some parts which are part of animation sequence

Edited by Jovzin
Link to comment
Share on other sites

Hmm

Here is testing ( sorry for video quality I was using fraps and handbrake for the first time to creata a video )

https://www.youtube.com/watch?v=LTPomLXtfZo

So as you can see the suspensionm, well I think we can say is working as the part has some moving up and down.

Just the steering is problem but I think this I can correct in config file to change the axis.

But what I still do not get is why some parts are missing. And even during the gear raising and lowering the wheel was a little bit more forward than it should be. It should not be visible through the mesh during the raising and lowering.

So I am thinking about : Creating only wheel collider in Unity and try to export the part without groups like : steering and suspensionparent and nosegearsteering etc etc.

And if again some parts will be missing from the part, I will know that I messed it in Maya. But if will happen again that some parts will be missing, I am messing something in Unity :D

Link to comment
Share on other sites

parts on WheelColliderIgnore layer will be invisible. so if you got a strut or piston that needs to be ignored by the wheelCollider; their collision mesh has to be a child gameobject of the piston or strut; not a collider component of the piston or strut itself.

FXLookAt constraint works along the local +Z Axis; so you might need to adjust the pivots of the mesh objects or add empty game objects in unity as movers for the struts and pistons. you can add/remove child objects to the heirarchy without breaking animations, as long as the original tree structure of the keyframed objects left intact

Link to comment
Share on other sites

  • 2 months later...

Hello Guys,

After new year, my brain starting to have some doubts if I am doing some things the right way. So I have decided to ask you, who are more experienced guys, a few questions.

1/ For landing gears -> raise and lower gear is better to use Rigging or Animation for Unity and for the conversation from Unity to KSP ?

2/ For ailerons or control surfaces what is better to use for Unity and for the conversation from Unity to KSP ? Rigging or animation or nothing ? As I read somewhere that control surfaces they only need the correct XYZ orientationof the AXES and nothing more no animarion or riging right ?

3/ For other stuff like cargo bay doors ? Is better to rig them or just create some animation of the opening and closing ?

I do not what happend to my brain but somehow I really have some doubts if I am creating the model in a right way. Mainly the parts that wll move or will have some kind of interaction with ohter stuff like gears with the ground.

Edited by Jovzin
typos
Link to comment
Share on other sites

1. animate before export to KSP. whether you animate before Unity, or with Unity, doesn't matter.

2. yes, as long as ctrlSrf_obj is aligned with +X-right, +Y-forward in SPH; that's all you need to do.

3. simple animate of opening will be enough. animateGeneric will reverse animate clip automatically when you close the doors.

Link to comment
Share on other sites

1. animate before export to KSP. whether you animate before Unity, or with Unity, doesn't matter.

2. yes, as long as ctrlSrf_obj is aligned with +X-right, +Y-forward in SPH; that's all you need to do.

3. simple animate of opening will be enough. animateGeneric will reverse animate clip automatically when you close the doors.

Thank you nli2work. :) You are the best.

So it is OK to have a basic keyframe animation for those raise/lower wheels and open/close cargo bay doors right ?

Link to comment
Share on other sites

FK is forward kinematics and IK is inverse kinematics which is mainly used for rig. FBX is a file like cob, obj, 3ds so a file whre is your model stored from 3d program.

Edited by Jovzin
Link to comment
Share on other sites

FK is forward-kinematics; simplest way of animating a skeleton chain. if you didn't set up any rigs (in maya, max, blender, etc), you are animating FK. Unity is FK only if you are not running any plugins.

FBX is basic file format for import into Unity, stores mesh/UV; skinned mesh and vertex animation; light and camera information.

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...