Jump to content

Starting on Modding, I'm running into a weird scaling issue, also have several questions.


Recommended Posts

Hello! I recently (as in, today) decided to get into KSP modding. I have a lot of experience with Blender, but nothing regarding coding or Unity.

I've been following these forum posts to figure out exactly where to begin, but they seem to be pretty outdated.

KSP Wiki page

Complete Beginner Modding Tutorial

Mod Development Links Compilation (has many convenient links that would seemingly solve my problems, but all of them are dead)

So far using these tutorials, i've managed to export a FBX file from blender into Unity. I used PartTools to export that into a .mu, and used a .cfg file base from the Wiki page to make it appear in game.

When i made the model in blender, i made sure it was 2.5 meters in diameter. I don't know how to measure that in Unity, but i assumed it transferred over. But in game it appears absolutely minuscule and sideways.

Changing the scale and rotation in Unity doesn't change anything, and changing the scale in the .cfg file only changes the size/distance of the attachment nodes, not the mesh or collision. Does anyone know a fix, or what the problem is?

Spoiler

Pictures

Model in Unity - It was originally upright, but i rotated it 90 degrees, and it didn't change anything. I also scaled it, both smaller and larger, with no change to the in game asset.

In game Asset - You can (barely) see it below a Mk1-3 Command pod.

Game Data folder - I'm not sure if the texture is necessary or if it's included in the .mu file, but PartTools wrote it that way, so I kept it.

.CFG file:


PART
{
	name = test_cylinder
	module = Part
	author = lizard
	mesh = Test_Cylinder.mu
	rescaleFactor = .5
	node_stack_top = 0.0, 1, 0.0, 0.0, 1.0, 0.0, 1
	node_stack_bottom = 0.0, -1, 0.0, 0.0, -1.0, 0.0, 1
	node_attach = 0.5, 0.0, 0.0, 1.0, 0.0, 0.0
	TechRequired = basicRocketry
	entryCost = 1200
	cost = 150
	category = FuelTank
	subcategory = 0
	title = Test Cylinder
	manufacturer = Jebediah Kerman's Junkyard and Spacecraft Parts Co
	description = Test Cylinder for Testing Cylinders.
	attachRules = 1,1,1,1,0
	mass = 1
	dragModelType = default
	maximum_drag = 0.2
	minimum_drag = 0.2
	angularDrag = 2
	crashTolerance = 6
	maxTemp = 2000
	breakingForce = 50
	breakingTorque = 50
	bulkheadProfiles = size1, srf
}

 

If any body could link a full, not-out-of-date guide for this, i would be eternally grateful.

Another question is about Module Manager. Nearly every mod i've seen requires it, but i don't know exactly what it does. I've heard it can do a lot with CFG files, but if anybody could link a full guide/page about it i would also be thankful.

Any other tips or things i should know will be appreciated.

Thanks nonetheless.

Link to comment
Share on other sites

5 hours ago, Entropian said:

I just got started too, and I had the same problem.  I think Blender rescales the model by some factor of 10.  Change the import scale in Unity to 10 or 100 times and it should fix it.

Thanks! This helped a lot. I looked harder, and it turns out i didn't import models from Blender correctly. I found this guide on how to export a .blend into a .fbx without messing up the scaling and rotation, and it worked.

Link to comment
Share on other sites

@Lizardman383 You ask about Module Manager - it's a mod that allows you to modify config files at game startup. You can do things like change the fuel type in a tank or the maximum length of a strut with out modifying the original config file. This is very convenient as the MM patch is stored separately from the mod and when the mod updates you don't lose you changes. So it's a mod to mod other mods when the game loads.

I've put together a number of projects and notes for making parts to remind myself of the steps/gotchas - includes the Blender, Gimp and Unity projects, some notes and the config to get them in game.

I haven't updated to 1.10 but they're just parts so should still work.

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