-
Posts
2,473 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by ColdJ
-
Except for the problem that a .blend file will remember everything and load it up fine each time you work on it, but once you export as a .mu and you load it into your game to test, only to find nothing there, you will then try loading it back in BForArtists to see what is wrong. Unfortunately it is not a perfect world and there is a learning curve and other things go wrong. I know that idealy it is recommended that you only export once but when you are constantly testing and refining you often end up doing it more than once. As long as you remember to "Merge by Distance" all the meshes as soon as you import in to remove the excess vertices then you are fine. Also sometimes you are modifying someone else's .mu and so you have to do this anyway to clear the excess vertices on the original. I have literally had to reimport things I am working on, hundreds of times and as long as I follow the routine I am fine. So lets make it that you save as blend and work from blend till you finish as much as possible but if it is needed you can reimport and follow the routine and be ok. Thanks @Rodger I will copy your tips into here so that people on the forum can view them here as well. The first tips I read are also in a you tube video I posted a link to, further back in the thread. The following is information provided by Rodger on the Github page. In the same directory as your .blend, create a new .cfg file for your part, and add .in to the end of the file name (partname.cfg.in). There is a template included in the addon which includes calculations for volume/mass based on the mesh, but you can also just copy a stock cfg to start with. Once the cfg.in file is in the directory, when you export the part, the exporter will add certain things to a new cfg file it'll create based on the cfg.in: Empty objects called node_XXX will be turned into NODE{} definitions (single arrow helps see their rotation, but empty type doesnt matter). For surface attachment nodes, call the empty node_attach, and the exporter will add a "regular" node definition with the location data in it, as NODE{} doesn't work for srf attachment. The location of empty objects called CoMOffset, CoPOffset, or CoLOffset will be used to set CoM/CoP/CoL. Make sure your cfg.in has rescaleFactor = 1.0 and scale = 1.0. Otherwise KSP defaults to a 1.25 scale, so a 1m part in blender will come out as a 1.25m part in KSP. Create an empty as the "root" part for your part, and name it the same as your part.cfg.in file (without the .cfg.in extensions). Child your meshes, colliders, and other transforms(empties) to this (shift drag the objects on top of the root empty is one way to do this). Make sure your meshes have their transforms applied (crtl A), so the transform panel reads 0° for the rotations, and 1.0 for the scale. Then select the root object, press clearInverse, double check nothing's out of place (colliders will move if you moved them originally via transform panel), then press the export mu model button. It will create a .mu file with the name of the root part, and a .cfg file too. If something's out of place in-game, selecting the root object, and pressing the clearInverse button and then re-exporting will most likely fix it. The exporter will strip all ".xxx" suffixes, so you can have multiple instances of the same name in KSP, even when blender adds the numbered suffix to differentiate different instances with the same name. Add colliders via add mu collider tab inside the tool menu, or button at top. adjust size on creation, or in Mu Collider panel to adjust colliders size/location, inside the object properties panel of the properties editor, not the blender transform location/scale. Rotation needs to be done with blender's transform panel, but doesn't seem to cause any issues (and you seem to be able to get away with translations too). The isTrigger option makes a non-solid collider, for ladders/hatches etc. (you can use Sarbian's DebugStuff to view colliders in-game - https://forum.kerbalspaceprogram.com/index.php?/topic/135726-18-debugstuff-2019-10-22-see-the-hidden-secrets-of-the-game-objects/) In the Mu Shader panel of the material properties tab, select the KSP shader you want to use for the part (the dropdown menu should have entries like "KSP Diffuse", "KSP Bumped Specular" etc). If you don't have the list of shaders, you just need to press the 'install KSP shader presets' button in the preferences of the .mu addon. Then in the textures tab, Name: _MainTex, under that change 'grey' to your diffuse texture name. same for different maps eg _BumpMap (from bump to your normal map) or _Emissive (from white). For flag objects, go to the Mu Properties panel, (object properties panel of the properties editor), in "Tag:" type in and add Icon_Hidden, which will hide the flag mesh from the part tray. The flag mesh's UV map should be square to show the flag correctly, even when the mesh is the right aspect ratio (W = 1.6*H). Set the mu shader of the flag mesh to alpha translucent For parachutes, the model needs to be made with Y+ being "up", then "adopted" (set child) to an empty object, which is then rotated X+90° so the chute appears correct with Z+up in blender. The semi-deploy and fully deploy animations both need to start at frame 0, with the fully deploy starting position being the same as the end of the semi-deploy anim. Firstly for animation with key frames, rotation needs to be in quarternions, not eluer. You can still use eluer to edit, just change to quarternions before applying keyframes and blender will convert for you: "taniwha: if doing continuous rotations, because unity's curves are quaternion-only, you need to animate two full revolutions (in steps < 1 revolution) to avoid weird things happening at each revolution" Next ether change the timeline editor to the nonlinear animation editor, or make a new space to have both: Then you'll see "actions" with the keyframe data in them: Then you need to push down the keyframe data into an NLA track, by pressing the button Push Down Action: All tracks need to start at frame 0, for example semi and fully deploy parachute animations, both need to start at 0 even if you make them one after another. Then double click the NLA track's name and rename to what you want the unity animation clip to be called: You can name multiple NlaTracks the same name, and they will all be grouped together by the exporter, and played as one animation when activated by a KSP module. You don't need to merge them in blender (you can't anyway) You can still edit the keyframes of an NLA track by selecting the track so it's yellow, and pressing tab or right click it - start tweaking strip actions (it should turn green). Then you can just edit or add keyframes as normal: You can convert an animation to quarts by using a dummy object with constraints and animation baking: animate the thing you want make a new object/mesh/whatever add a constraint to the new object, copy rotation, and set the animated object as the source bake that constraint animation, so it doesn't have a constraint anymore, just its own keyframes (keys every frame) then, set the original thing to use quart rotations in the transform panel, and then repeat the last 2 steps, this time constraining the original object's rotation to the dummy objects. then bake the animation again, but this time since it's set to quarts, it'll key in quarts!
-
48
- 31,017 replies
-
- going off the rails!
- non-stop!
-
(and 3 more)
Tagged with:
-
46
- 31,017 replies
-
- going off the rails!
- non-stop!
-
(and 3 more)
Tagged with:
-
As seen in this pic on the right hand side, a material is what contains the shader information and the name or names, (depending on the shader) of the texture pics used by your mesh, this info is stored in your .mu when you export along with the UV map data, which is why all your vertices get multiplied around 5 times when you export. So if in your meshes heirachy you don't see that brown, yellow and white pie chart then it doesn't have a material set up and when you import it back in after export there will be no mesh saved, just nothing there. There is info in the thread in various posts that are helpful. @Watermel00n
-
Was, but now 42 I meant the negatives pushing it down from 50 to lower than 40. New yadda yadda page.
- 31,017 replies
-
- going off the rails!
- non-stop!
-
(and 3 more)
Tagged with:
-
40 Well, that was quite a blitz.
- 31,017 replies
-
- going off the rails!
- non-stop!
-
(and 3 more)
Tagged with:
-
Going to need a lot more information. Version of program, version of plugin, specific problem etc. I usually use the export function up on the top right with blue box. Most obvious thing I can see in your pic is that you haven't got "FuelCell1" highlighted in the right side heirachy and if it is not highlighted then there is nothing to export. Though having said that I opened up mine and the export option is still available even without highlighting. So yeah, assuming you have read all the way through the thread for answers and followed how to install correctly, that you are using the correct version of the plugin with correct version of the program and like, then going to need to know what led up to this pic, was all working before?, is this the first time you have tried etc. (is also best practice to have your mesh inside an empty axis in the heirachy, I can see there you just have the mesh on it's own.) Could you show if you have added a material to your model please.
-
BBQ? Cookie Burger
-
55
- 31,017 replies
-
- going off the rails!
- non-stop!
-
(and 3 more)
Tagged with:
-
55
- 31,017 replies
-
- going off the rails!
- non-stop!
-
(and 3 more)
Tagged with:
-
Who let the dogs out? Muttley Mountain.
-
Do not steal my cookie.
-
Thanks for that image. One fresh oven baked cookie.
-
Pick a random page and post and that is why you are banned.
-
Nope, time for a new strategy. I think @Ben J. Kerman might agree.
-
One sentence you could say to annoy an entire fan base?
ColdJ replied to Fr8monkey's topic in Forum Games!
Hey Lois the ace reporter. Who does Clark look like without glasses on? -
56 The cube of 56 is beef flavoured.
- 31,017 replies
-
- going off the rails!
- non-stop!
-
(and 3 more)
Tagged with:
-
Banned for not telling a joke so that the supernova will smile.
-
47
- 31,017 replies
-
- going off the rails!
- non-stop!
-
(and 3 more)
Tagged with:
-
Do not feed them after midnight.
-
I saw a UFC and nobody believes me. Unidentifed Flying Cookie.