Jump to content

Tutorial: How to make robotic parts for the Infernal Robotics plugin.


Recommended Posts

I'm going to show just how easy it is to make a custom robotic part that is powered with Infernal Robotics. To make things simple in this, you have 2 choices.

  1. Things that slide in a direction: AdjustableRail from the Infernal Robotics pack for example.
  2. Things that rotate: Rotatrons from the Infernal Robotics pack for example.

Let's start with things that slide. Here's an image of the AdjustableRail. It's comprised of 2 meshes.

  1. A mesh that will NOT move. This is the fixedMesh.
  2. Second mesh(or meshes) are the ones that will move.

In this picture, you will see I have two meshes. One called Base and the other called Cylinder (yeah, real original on that part).

5ntDqYP.png

The mesh called Base, which is the one that we want to move is highlighted in this image:

HVHe1uS.png

The other mesh now highlighted is called Cylinder. We want this particular mesh to stay put.

lxItV69.png

Skinning, importing into unity, all that stays the absolute same as you would with a normal part.

Now for the config part!

Remember that mesh that we want to stay still? In the config, you want the plugin to know which will be your fixed mesh. There's even a line called fixedMesh! Notice how it says "Cylinder" for the fixedMesh? You'll also need to specify which direction you want the moving mesh to go. That's where translateAxis comes into play. I can never remember which axis does what so I experiment with this part but "Y" in this case is the middle value so that's why it's 0,1,0.

MODULE

{

name = MuMechToggle

translateJoint = True

translateAxis = 0, 1, 0

keyTranslateSpeed = 0.30

translateLimits = True

translateMin = 0

translateMax = 2.0

stepIncrement = 0.01

translateLimitsRevertKey = False

jointSpring = 0

jointDamping = 0

onActivate = False

translateKey =

revTranslateKey =

fixedMesh = Cylinder

invertSymmetry = False

servoName = AdjustableRail

motorSndPath = MagicSmokeIndustries/Sounds/infernalRoboticMotor // Motor loop sound path

}

Now, as you can guess it, rotatrons are the same way. One mesh you want to designate as your fixedMesh, the others can rotate. Instead of translateAxis, you would use rotateAxis instead. Feel free to download my parts pack and plugin at: http://forum.kerbalspaceprogram.com/threads/37707-0-23-5-Magic-Smoke-Industries-Infernal-Robotics-0-15d

To look at how the parts are made, I highly suggest using Taniwha's .mu importer for blender. You will get to see the meshes and how they are arranged by name and then compare them to the CFG settings. I like to keep my parts arranged in the origin as it makes handling things easier especially with rotatrons. I put the center of the part in the absolute center in the editor as shown here:

jvpsQS2.png

That's really it. It's really that simple, I explained it to ZodiusInfuser in a PM just telling him that it's essentially 2 meshes. One that moves, one that doesn't. Specific that one that doesn't move and the rest is easy. Now go make some awesome parts!

Link to comment
Share on other sites

Good explanation sirkut :).

Is there any way to make a stack node on a moving piece of a part "solid" ?

(I have made a while ago an "extending corridor", which could be seen as a piston, with two stack nodes, and no surprise, the moving area of the part go through the attached part(s), ignoring the collider :/)

Link to comment
Share on other sites

I'd suggest adding an addendum to this primer, Sirkut. From my experience the origin of the parts is where the robotics joint is created, meaning that when you put your meshes in unity you must align them so that your rotation/translation axis lies along the X, Y or Z. Here's some examples of what I mean (I highlighted the X and Z axes to make things clearer):

_a06bb6ff0e0e43abb92fc3e9695d6e41

Then in the case of the hinge and right angled joint, I use the following CFG node positions:

name = IR_Pivotron_xHinge_BasicClosed
...
node_stack_top = 0.0, 0.3, -0.3, 0.0, 1.0, 0.0, 1
node_stack_bottom = 0.0, -0.3, -0.3, 0.0, 1.0, 0.0, 1
node_attach = 0.0, -0.3, -0.3, 0.0, -1.0, 0.0

name = IR_Rotatron_Right
...
node_stack_top = 0.0, 0.0, 0.1, 0.0, 0.0, 1.0, 1
node_stack_bottom = 0.0, -0.35, -0.25, 0.0, 1.0, 0.0, 1
node_attach = 0.0, -0.35, -0.25, 0.0, -1.0, 0.0

Link to comment
Share on other sites

Hi , Thanks for the pointers, I get that its painfully simple to do and was quite prepared to kick it around until it works but I'm still kicking after 3hours, and that leads me to believe I'm doing something stupid or am missing something, I could also be having a senior moment :P

The issue, made a simple ram, initially it was more complex but I've stripped the extra parts off just in case it was those causing the wierdness, the problem is that the whole object moves, even though i've tried setting both cylinder and base to be the fixedmesh it makes no difference, the whole object piston and cylinder translates instead of just the piston( named Base as per your tut) heres a piccy ,

erm, do both parts have a convex mesh collider, should the parts have an empty Game Object transform in unity? any clues would be helpfull , going to put it away now and go and do something I know i can make work Cheers in advance

HloY7RL.png

Link to comment
Share on other sites

Keep in mind it's case sentive. If your mesh is Base and it shouldn't move then it needs to be Base when you define it as your fixedMesh.

No empty game objects. Just both meshes and their colliders.

Link to comment
Share on other sites

Me again, thanks for the reply, checked my cfg and it's all good, no case errors that i can see, I compared my cfg to one from the pack and it's the same 'cept for the names of course, had another go at it this morning, messed around with transforms and hierarchy (parent/child etc) and the results are exactly the same,

It's as though it's moving the mesh collider but not the mesh, I did try removing any default animation and/or animate physics component that was default added by unity but still the same results,

Couple of pics below 1 showing before and after translation and the other the unity layout, any further input welcomed, cheers

PS checked both logs and there are no related errors

DQAZffy.png

sH5BUvQ.png

I thought posting the cfg may help also so here that is,

 
PART
{
// --- general parameters ---
name = HydraulicRam
module = Part
author = r4m0n (code) ||Sirkut (code) SMSE (model)

// --- asset parameters ---
mesh = model.mu
scale = 1
rescaleFactor = 1

// --- node definitions ---
node_stack_bottom = 0.0, -0.0002, 0.0, 0.0, -1.0, 0.0
node_stack_top = 0.0, 2.013642, 0.0, 0.0, 1.0, 0.0

// --- editor parameters ---
TechRequired = advConstruction
entryCost = 0
cost = 100
category = Utility
subcategory = 0
title = HydraulicRam
manufacturer = SMSE FluidPower
description = Hydraulic Cylinder. Pushes stuff away. Right?

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,0,0

// --- standard part parameters ---
mass = 0.2
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 15
maxTemp = 3000
breakingForce = 999
breakingTorque = 999

MODULE
{
name = MuMechToggle
translateJoint = True
translateAxis = 0, -1, 0
keyTranslateSpeed = 0.30
translateLimits = True
translateMin = 0
translateMax = 1.8
stepIncrement = 0.01
translateLimitsRevertKey = False
jointSpring = 0
jointDamping = 0
onActivate = False
translateKey =
revTranslateKey =
fixedMesh = B
invertSymmetry = False
servoName = New Cylinder
motorSndPath = MagicSmokeIndustries/Sounds/infernalRoboticMotor // Motor loop sound path
}
}

Link to comment
Share on other sites

I need to download unity and I will demonstrate what needs to be done but the trick is to not group it in a folder under the root "folder" in Unity.

I can confirm what sirkut is saying. All my robotics parts have a root GameObject, then meshes Base and Joint directly below. Both have their own collision mesh.

Link to comment
Share on other sites

YAY thanks chaps that did it, seems that 3ds max adds an extra transform when exporting multi part objects via fbx removing that got it all working

Awesome. Now please make some parts and share!

Link to comment
Share on other sites

  • 3 weeks later...

Got to say thanks for your help with this stuff chaps, just finished a batch of bits , thought i'd post a pic here to see if they meet with your approval, before a tentative release, don't know if i'm ready to get into all that maintenance etc again after my last 51k download modding carreer.

SOMEBODY PLEASE STICKY THIS THREAD BEFORE IT DISAPPEARS, PLEASE !!! , if you do i'll remove the caps:sticktongue:

Thanks again chaps

So below we have std and double acting rams(push pull cylinder in center) a couple of crane jib parts and my patent rover righter, and the animated sunshine in a can which is the light tower thing you can ignore as it's a traditional anim.

EahABPu.png

BjwLpeX.png

PS hope you dont mind me posting these pics here?

Link to comment
Share on other sites

Coool! But (My opinion) I don't like the textures so mutch..make it more stockalike! Some yellow/black stripes etc. Thats what I missed in Infernal Robotics: The parts were super and really helpful, but it didn't looked as stock parts. Would be great if you could do that:)

Link to comment
Share on other sites

Nice going smce. I don't mind if you post pictures. They look fine to me but as potato cake pointed out people will fuss to no end that they don't look stock enough. God have I seen the wrath of that.

Edited by sirkut
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

You cant add parts to an animated part and have them move with the animation unfortunately, to make a boom that can have things like KAS attached to it you need a plugin and Infernal Robotics parts or custom parts made to IR spec are the only things afaik that can do this.

It is the reason for this tutorial after all, believe me when i say we've all tried to do the very thing you want and ended up making an IR part which is not difficult if you follow the simple rules

kTCAIn4.png

Link to comment
Share on other sites

ooohhhh, yes the pluging, that was the part that I didn`t figure out. mm well I tried to do a IR piece from the tutoral, no luck yet, seems 3dmax export extra transform, so until I know how to fix it, I will be just making something simple I guest, as I was trying to fix up my boom. will make a 1 piece boom. ty for the quick reply

Link to comment
Share on other sites

will try again, but overall I think a 1 piece boom can`t be beat for lifting stuff, would be nice if I could lift 800t + with a real working boom, supposed to be easy, well I might be missing something lol

p.s. I saw a boom in pics like this, is this one yours?? it would have been good if it was bigger?? I think I got to many pieces in the project, are u allowed only 1 static mesh and 1 animated mesh?

also do u add the folder I made in your parts folder? anyway, about to give up, will try a few more and then that's it lol, if I can`t get it , then to noob to do it

screenshot47.png

Edited by mjy
Link to comment
Share on other sites

  • 11 months later...
  • 1 year later...
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...