Jump to content

Rover Wheel problems, New fault finding info UNITY wheel build package


Recommended Posts

Much enjoyed watching a rerun of your twitching, confirmed a lot of guestimates:), also glad I'm not the only one who mods the wrong cfgs and reloads . much rofling was had cheers

Haha! That's what happens when you're not paying attention. You should see the unholy mess I made of the track prototypes while I was trying to work at the same time!

Link to comment
Share on other sites

Lo-fi, regarding wheel suspension, I've done everything mentioned in the stream with it being modelled as compressed, and have set the distance correctly; however, the wheel seems to get compressed more than I modelled for some reason :huh:. Maybe I need to make the suspension stronger so it doesn't compress to that point in the first place? Would I need to alter the mass in unity for this to work?

Thanks

Link to comment
Share on other sites

No, you'll have something funny in the hierarchy, collider setting or the config. I've never had it do that... Post or PM me your part.cg and a screen grab of you Unity setup with the root GO selected?

Link to comment
Share on other sites

I've just smashed out my alpha parts, so I now have a bit of time. I'll get onto it.

Thanks for alarm clock, by the way. One of my essential mods :)

I have more info to add and there were a few bits I missed out in the stream.

Got a project in mind?

Link to comment
Share on other sites

Glad you like it.

I was trying to make a range of airplane landing gear a while back, I got very lost. It annoys me when I cant make something happen so I'd love to have another crack at it :)

When I tackle landing gear I'll post some details clarifying the process. I know how I want to set it up in Unity, I just haven't got round to modelling a part yet.

Link to comment
Share on other sites

Hi all, and thanks for the pm's regarding this thread it's good to know that I've been able to shed some small light and the dark art of rover wheels.

Having read many complaints regarding the infamous Rover wheel med otherwise known as the TR_2L, I decided to apply an up to date hierarchy and because I can i fitted it with the smoothSteering developed by lo_fi (what a star!)

It wasn't difficult to do and if you compare the stock version with the modded version the difference is very noticeable, no more grabbing at anything other than incredibly smooth terrain, no more instant roll over, the moment you try to turn at anything other than a crawl. You can try it HERE but you will need the kerbal foundries alpha plugin, in fact get it all and see how cool wheels can be

Below you can see the unity set up for the wheel, the positions of wheel colliders , in fact all the important stuff has been changed to provide greater stability,

HI2Cwy6.png

There's really nothing to the changes except for the movement of transforms and the adding of a couple of extra ones that are part of the smooth steering functionality.

The wheel collider has been moved to the outer edge of the wheel, this provides extra stability as wheel collider have zero width, placing in the center of the wheel basically reduces half the wheel to eye candy, the mesh colliders were all dumped in favor of capsule colliders with a much reduced diameter, this in itself stops the horrible grabbing that the standard TR_2L suffers from, and while i was at it I added a decent amount of suspension travel.

6H2SwLG.png

I messed with the weird mostly alpha texture just so that it's easy to tell them apart from the stock versions

(ps and for those who've expressed an interest in the rover pictured, check out the portrait pics for a hint of how the internal IVA is coming along)

LINK UPDATE HERE

Edited by SpannerMonkey(smce)
link updated
Link to comment
Share on other sites

Nice SpannerMonkey, your link is already dead or bad and did you update also the bump/normal map ? The lines on the thread seems to be more visible in game than in unity.

By the way, if you really want to test you wheel, you can try my Rover Proving Ground (click on the sig. logo).

Link to comment
Share on other sites

Cheers for pointing out the link issue Justin, Its updated now, not sure why that happens, must be me :)

and I'd forgotten all about your test course cheers

RE texture and normal map, never hacked a squad texture before so was unsure of how it was supposed to come out, It came out mostly alpha for some reason and the normal map as grey scale, so I just worked with it as it was, the only thing I did was to add the stripes on the hub, a few more RnD scratches etc and add my fave tire texture, It was only really done as a test but if peoples really want it I can sort the tex to stockalike(even though it's not my pref)

Edited by SpannerMonkey(smce)
Link to comment
Share on other sites

Cheers for pointing out the link issue Justin, Its updated now, not sure why that happens, must be me :)

and I'd forgotten all about your test course cheers

RE texture and normal map, never hacked a squad texture before so was unsure of how it was supposed to come out, It came out mostly alpha for some reason and the normal map as grey scale, so I just worked with it as it was, the only thing I did was to add the stripes on the hub, a few more RnD scratches etc and add my fave tire texture, It was only really done as a test but if peoples really want it I can sort the tex to stockalike(even though it's not my pref)

You're welcome ;).

Maybe you've missed some threads in this exact same sub-forum on imported stock textures, they (almost) all have an alpha channel for one purpose or another (depending on shader used: transparency, or more often, specular value). Bump/normal map can use any color I guess, blue may be an historical legacy from the beginning of bump maps :) ).

Link to comment
Share on other sites

The KSP shader uses the alpha channel on the diffuse for specular. It's a right weird way to do it, so that may explain that one.

The blue bump is the modern 'normal map' which bakes in directional information and levels in the different colours. Slight contrast to the bump map of old, which simply had level info in black and white. There are some good unity tutorials knocking about.

Just broken the collider placement issue right open as I damn near re-wrote ModuleWheel last night. I reckon I could write a book on the subject!

Robot, bundle up your unity project and I'll do a live stream setting up the wheel you're working on if you like? I've been meaning to redo the stream again, seems like the perfect opportunity.

Spanner, most of that stuff is half finished, though heading in the right direction :) keep an eye on the SteeringTest class, I try to always leave a working build in the repo.

A completely open source ModuleWheel is right around the corner.

Link to comment
Share on other sites

A completely open source ModuleWheel is right around the corner.

you've certainly gone the extra yard on this, I dont think that theres been so much wheel development done ever before , the proof of that is 8 weeks ago all we had was a standard dodgy wheel module, now look where we are, 10/10 for effort and dedication:cool:

Link to comment
Share on other sites

What are the essential game oboes that I need in the hierarchy? For my ski/repulsor, if I only have to suspension arms, do I need the other suspension GameObjects? If you want me to post the .blend of the ski I can do that as well. lo-fi, a youtube vid would be better for me than a twitch stream, but I will try to watch it.

Link to comment
Share on other sites

You can actually build the whole thing without any physical suspension as its just eyecandy anyway, all the suspension is really done by the wheel collider, I'll knock up a demo ski and see how it needs setting up, it all depends on what you want it to do, will the ski have steering? or will it be like a repulsor unit(ala lo_fi) which has no actual steering curve, I gather you basically just need the ski to move up and down in terrain following style? let me get something setup and i'll post a pic and info

Ps it seems that the pic i posted HERE would have exactly what you need , i'll pull it up in unity and check

Edited by SpannerMonkey(smce)
too many actualies
Link to comment
Share on other sites

You can actually build the whole thing without any physical suspension as its just eyecandy anyway, all the suspension is really done by the wheel collider, I'll knock up a demo ski and see how it needs setting up, it all depends on what you want it to do, will the ski have steering? or will it be like a repulsor unit(ala lo_fi) which has no actual steering curve, I gather you basically just need the ski to move up and down in terrain following style? let me get something setup and i'll post a pic and info

Ps it seems that the pic i posted HERE would have exactly what you need , i'll pull it up in unity and check

Pretty much, I may make a directly vertical one similar to LLL's skids.

Link to comment
Share on other sites

Well it took longer than expected, didn't take long to make one that sort of worked, but tuning it took a while, especially with the constraint of only using an almost standard hierarchy, so here you go a full unity breakdown of whats needed to make a Ski type thing with a minimum of fuss and parts. I have included a download that has full res screen grabs, the actual dae that was imported into unity, so you can open in any modeling software that will read dae which is most I think, and the .mu so you can bust it open in blender and see how it looks with all the transforms in place , be warned however you will not be able to put that straight back in unity without some re editing due to the mu exporter misplacing transforms etc.

The model only comprises 7 parts in total, 2 of which are not absolutely required but do make lie better later on.

Basically anything that you want to move up and down should be a child of the suspensionTraverse transform, and anything you want to stay put is a child of the base.

NOw the gallery, i think I've made it fairly self explanatory but if theres something you don't understand I'd be happy to answer your questions.

Javascript is disabled. View full album

And this is the cfg that I used for the test version this is where the two extra parts come in.

PART
{
name = ProjectSkidsrevdC
module = Part
author = Spanner

mesh = model.mu
scale = 1
rescaleFactor = 1

node_attach = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0

TechRequired = advancedMotors
entryCost = 6000

cost = 580
category = Utility
subcategory = 0
title = ProjectSkidsrevdC
manufacturer = SMSE
description = See if this works..ProjectSkidsrevdC. a new format for wheels

attachRules = 0,1,0,1,0

mass = 0.5
dragModelType = default
maximum_drag = 0.3
minimum_drag = 0.2
angularDrag = 1
maxTemp = 3600

crashTolerance =3000
breakingForce = 3000
breakingTorque = 3000

MODULE
{
name = ModuleWheel
hasMotor = true
resourceName = ElectricCharge
resourceConsumptionRate = 0.1
canSteer = true
hasBrakes = true
controlAxisType = Forward
steeringModeType = AutomaticSteer
brakeTorque = 100
brakeSpeed = 2.5
impactTolerance = 3000
overSpeedDamage = 600

WHEEL
{
wheelName = wheelC
wheelColliderName = wheelColliderC
suspensionTransformName = suspensionTraverseC
suspensionNeutralPointName = suspensionNeutralPointC

rotateX = 1
rotateY = 0
rotateZ = 0
}
//////////////////optional wheel elements that would be fitted in unity to the front and rear of the skid to prevent the collider digging in//////////////
//WHEEL
// {
// wheelName = wheelF
// wheelColliderName = wheelColliderF
// suspensionTransformName = suspensionTraverseF
// suspensionNeutralPointName = suspensionNeutralPointF
//
// rotateX = 1
// rotateY = 0
// rotateZ = 0
// }
//WHEEL
// {
// wheelName = wheelR
// wheelColliderName = wheelColliderR
// suspensionTransformName = suspensionTraverseR
// suspensionNeutralPointName = suspensionNeutralPointR
//
// rotateX = 1
// rotateZ = 0
// }
steeringCurve
{
key = 0 30
key = 10 10
key = 20 5
}

torqueCurve
{
key = 0 50 0 0
key = 10 80 0 0
key = 25 10 0 0
key = 30 5 0 0
}

}
MODULE
{
name = FXModuleLookAtConstraint
CONSTRAINLOOKFX
{
targetName = suspT
rotatorsName = SuspB
}

CONSTRAINLOOKFX
{
targetName = SuspB
rotatorsName = suspT
}
}

MODULE
{
name = FXModuleConstrainPosition
matchRotation = true
matchPosition = false
CONSTRAINFX
{
targetName = steering
moversName = trackSteering
}

}
////non standard addition
MODULE
{
name = FXModuleConstrainPosition
matchRotation = false
matchPosition = true
CONSTRAINFX
{
targetName = PinLowB
moversName = SuspB
}

}



}

Now that is a fairly standard cfg for a wheel with addition of an extra FXModuleConstrainPosition this is to ensure that the bottom end of the the suspension part SuspB does not appear detached from the mount, and also helps with the visual effect allowing for a greater arc than would normally be visible, you could do this by just adding a transform in the location, but it saves a lot of hassle getting things aligned correctly if you put it there in your modeling. You could add a constraint the same way to the top part but its not really required.

Note the optional colliders in the pics and the cfg, if you build one and test you'll probably want to add more wheels to prevent the nose dig in that occurs due to the skids collider grabbing the terrain.

This cfg includes motor and steering torque, to remove that just edit the cfg to remove the second set of numbers following the key so

 key = 0 50 0 0 

would change to

 key = 0 0 0 0 

and

 key = 10 10

changes to

 key = 10 0

The same can be done to any rover wheel to increase/decrease speed and steering rate

And just in case you missed it heres the DOWNLOAD again

mOPjcJG.png

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