Jump to content

Somewhere to put any knowledge learned about using the .mu plugin.


Recommended Posts

@taniwha

I had the link in "open recent" but when I tried it said it no longer existed. The best I can do is post this older one I had put further back in the thread.

If I get new ones in the future, I will screen shot, post and tag you. I don't have the experience to interpret them myself.

fHXspgP.png

Link to comment
Share on other sites

56 minutes ago, ColdJ said:

Sorry, I didn't realise that I could ask for help resolving the issue,

That's what that "Issues" tab near the top of the github page is for :). If it's a bug, it'll get fixed (eventually, since my mind is usually elsewhere), or I'll point out what's wrong if I can.

Ah, that is exactly the "empty mesh" bug I was talking about (and "fixed").

@ColdJ because you saw (liked) my post before I got to post the comment about having fixed that bug, I'm adding this comment to ensure you see it.

Link to comment
Share on other sites

50 minutes ago, taniwha said:

@ColdJ because you saw (liked) my post before I got to post the comment about having fixed that bug, I'm adding this comment to ensure you see it.

Weirdly my notifications didn't tell me. But I see it now.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Layers in KSP

There are 32 layers available. This is a hard limit in Unity. Layers 0 to 7 are reserved by Unity.

  • 0: Default (Unity built-in): All external visible parts that interact.
  • 1: TransparentFX (Unity built-in)
  • 2: Ignore Raycast (Unity built-in)
  • 3:
  • 4: Water (Unity built-in)
  • 5: UI (Unity built-in)
  • 6:
  • 7:
  • 8: PartsList_Icons
  • 9: Atmosphere
  • 10: Scaled Scenery
  • 11: UIDialog
  • 12: UIVectors
  • 13: UI_Mask
  • 14: Screens
  • 15: Local Scenery
  • 16: kerbals/ Internals and their props. Everything in the heirachy must be set to layer 16, compared to external models the scene is rotated 180 degrees around the blender Z axis then 90 around the X axis.
  • 17: EVA
  • 18: SkySphere
  • 19: PhysicalObjects
  • 20: Internal Space: Used to prevent IVA camera views being blocked by props or hull parts also used when creating internal props)
  • 21: Part Triggers: Airlocks and Ladders etc, Must be tagged as to their function and have the boxes for trigger and separate ticked.
  • 22: KerbalInstructors
  • 23: AeroFXIgnore: Prevents parts from showing aero effects
  • 24: MapFX
  • 25: UIAdditional
  • 26: WheelCollidersIgnore: Layer for the wheel collision enhancer.
  • 27: WheelColliders: Used for the flat wheel collider, this tells the game where the wheel interaction is to be. It is the radius in the config that sets height of visible wheel to ground. If the radius is too large you will bounce high on spawn, too low , wheel will spin but not move.
  • 28: TerrainColliders
  • 29: DragRender
  • 30: SurfaceFX
  • 31: Vectors

The next about tags was found in a thread by @SpannerMonkey(smce)

 

TAGS

Ladder ( used for ladders )

Airlock ( used for hatches/doors )

Icon_Hidden ( used to hide item from editor view, engine shrouds use this )

Icon_Only    ( is useful if you want objects to only appear inside of the thumbnail, like decorative protective intake covers and remove-before-flight tags. Also handy for indicating different sized but similar looking parts ( thanks Ven ) )

NoAttach (prevents surface attach to the collision mesh in Editor. so you can have a part with areas that are not surface attachable while other areas are. set in same way as previous tags)

Drag_Hidden  (Prevents things like turbo fan blades being included or added to drag calculations)

Objects are visible in game when on layers 0 (Default), 15 (Local Scenery) and 19 (Disconnected Parts), and can also be visible on the camera plane on layers 12 (UI_Main) and 13 (UI_Mask). Only layer 0 displays mach and re-entry effects, so placing an object on layer 15 will disable these effects for that object.

Edited by ColdJ
Link to comment
Share on other sites

25 minutes ago, ColdJ said:

Layers in KSP

There are 32 layers available. This is a hard limit in Unity. Layers 0 to 7 are reserved by Unity.

This one gave me a hell of a run for my money on DOE!

I have a visual glitch where bodies' flares were being visible trough atmospheres, what's not a surprise as they are being drawn on a layer above the Planets (forgot exactly which one now), and the Atmosphere layer is way "down there".

"No big deal", I talked to myself. "I will shove the flares on Layer 6 and call it a day". And so I did, and it solved the problem - the flares weren't being visible behind atmospheres anymore. But were being drawn behind their bodies now…

I left as an exercise to the reader to imagine what I yelled to myself about software development  - depicting them here would infringe the Forum's Rule 2.2 itens A, C, D, E and above all, G. :sticktongue:

I tried to solve the problem by using raycasts: calculating the vector of the camera to the flare, and then casting a ray from the body to infinity using that same vector, and if it hits a Atmosphere, the flare is hidden. Not sure if I messed up the code or if Atmospheres are not hittable by raycasts - but in a way or another I concluded that casting rays all the time would not be exactly the most efficient way out of the mess, so I ditched the idea.

My  next time window for this task (pending Real Life™ agreement) will be to look for some function or property that would tell me if a body is visible by the current camera (I had noted that celestial bodies - as the Mün - are not drawn over the Atmosphere) and then replicate the status on the flare!

Cheers!

 

Link to comment
Share on other sites

So, this thread exists because I have asked many questions but only got some answers, and I like to treat others how I like to be treated. So thankfully tonight I followed some old links that contained other links and due to a thread by@Nils277 on lights lighting up the planet. (A problem I have had with many older lights) and access to models inside my BforArtists (currently 3.13) I can now see the problem.

Under the light section there is a MU properties section. Within are two wide boxes filled with smaller boxes. Nothing obvious about which box is which but if you hover over a box and look at the end of the fine print you can see a number, knowing about layers now I can see that starting at layer zero at the top left and going all the way across both large boxes that the top layer is 0 to 15. The next layer down is 16 to 31. If the box is highlighted then that layer gets lit. If not then not.

The modern Stock lights have 0, 15, 17 and 23 highlighted. The old lights have everything highlighted. That explains that. You simply tap on a small box to change it's status.

@Lisias you got in before another update. :)

 

Link to comment
Share on other sites

41 minutes ago, ColdJ said:

@Lisias

This link any help?

 

Hey, very interesting info!

I'm unsure I should use it on the flares problem because I would have to mangle with the game camera (assuming, of course, I could cook something for my problem with this info), and it will risk screwing up things with people using Camera add'ons.

On the other hand, this will solve for sure another problem on another add'on of mine! Life saver! :)

Thanks!

Link to comment
Share on other sites

  • 1 month later...

Did someone know if KSP have two sided shader? My model have some invisible face on view from exterior but not on the inside (diffuse shader). The face on question have only one face layer. And there are some graphical glitch, i never encounter.

Spoiler

In Blender:

Uaye17R.png

 

After export in game:

BVgEpZj.pngZptjCsv.pngAon5cS2.png

Thanks in advance for help!

Link to comment
Share on other sites

1 hour ago, Stone Blue said:

Make sure your face normals are facing the right way (out)... also, no
so, for like the nozzle, you have to model *both* interior & exterior geometry

Thanks, that's fixe the invisible part, still have the weird artifact glitch but no idea what cause it, i think i have some face that scale up weirdly. 

Edit: find it, for some raison face scale was 99.

Edited by josselin2196
Link to comment
Share on other sites

Hi @josselin2196.

Sorry was asleep when your question came in. From your second post it seems that you already know how to see which way a face is pointing and how to flip the normals. Whenever I am creating new faces I always check how it has gone by turning "Face Orientation" on to see if it is the blue outside or red inside I am seeing and flip if needed, saves having to find out later and fix. Blender can also change faces sometimes when you change something else as it thinks it is correcting for outside.

I noticed one other thing from your pics which I don't know if you have already fixed. On the flat top of your engine you are getting the crazing that happens when faces have been overlayed on each other, very close together. If you haven't already fixed it you might want to remove the faces on that bit and then put fresh ones down that aren't overlapped.

Good luck with your project.

Link to comment
Share on other sites

Hi @taniwha. When you have a chance, is there any info you could tell me about the extra fields available in the mu properties for wheel colliders?

As seen in the pic below when comparing a stock wheel to its configuration file, the only thing that matches exactly is the radius, so does changing anything else in this section actually have any affect on how the wheel reacts in world?

Thank you.

CGdISjT.jpg

Edited by ColdJ
Link to comment
Share on other sites

On 10/23/2022 at 2:01 PM, ColdJ said:

Hi @taniwha. When you have a chance, is there any info you could tell me about the extra fields available in the mu properties for wheel colliders?

They haven't been relevant since KSP 1.1. I should probably disable them (and maybe wheel colliders), but they're still useful for getting the information from ancient models.

Link to comment
Share on other sites

14 minutes ago, taniwha said:

They haven't been relevant since KSP 1.1. I should probably disable them (and maybe wheel colliders), but they're still useful for getting the information from ancient models.

Thank you for that info. Please don't disable wheel colliders, they are still very useful and now that I know that the radius figure is there I don't have to experiment till I get it right.

Thank you.

Link to comment
Share on other sites

@RealTimeShepherd

Just had an extra thought based on the shape and texturing of that models panels.

You could delete your patches and then in editing, select a section of paneling from the original that matches the holes, by highlighting their vertices and and then duplicating it. Best done from inside looking out when in wireframe mode, so that you don't accidently get any other part of the model. Make sure you remembered to use merge by distance on the entire model first so that each vertice is a single point, they will get split again on export by the program because unity can't read all the vertice info like blender can. That way you won't accidently leave a vertice behind.

Once you have your duplicate panel, maneuver it into the space so the vertices overlap, keep duplicating using whatever the last panel you you are on for all the holes that match that size, do similar for holes of different sizes. Then when all in place, highlight the entire mesh and use merge by distance to weld them in. If you weren't accurate enough you can open up the pop up that appears when you first do it, and then remove a zero one by one from the distance till they merge. If you increase too far so that the mesh becomes less detailed then just add a zero back and and increase a 10th at a time till you get the sweet spot. Advantage is that each duplicate panel will already be UV mapped like the panel it came from.

So that might fix your problem as the duplicate panels will all have the same data as the originals.

Good Luck.

Link to comment
Share on other sites

@ColdJ - Thanks for your continued attention, I'm extremely grateful! :)

So, you were right that I could affect the reflections by manipulating the smooth shader function. I can't make it match the original piece though, which I assume was made in Unity:

https://ibb.co/FX9DnGD

Nevertheless, I have made enormous progress and learned a great deal about Blender!

I think next I will try your idea about duplicating sections of mesh from the original piece, I am becoming much quicker with making the changes as I become more familiar with Blender, so I can easily start from scratch multiple times

I'm trying to create this new piece to act as a 'depot' StarShip for a future video. The depot variant will never return to Earth, so will be launched without flaps or a heatshield. Man, I thought this was going to be so easy when I started...!

Edited by RealTimeShepherd
removed irrelevant content
Link to comment
Share on other sites

22 hours ago, Stone Blue said:

This is why I generally *dont* use Xray mode most of the time.

There is an easy fix, hold down Ctrl while selecting and it will deselect any vertices you choose. So if you catch some you didn't mean too you can remove them from your selection.

There are so many instances where you need to be able see what is going on around and behind an area you are working on, that it would require a page to list and show examples, so I will leave that for now.

Link to comment
Share on other sites

I've been hard at work on the Runway Project S5 trailer, and I've learned a lot about taking the default KSP textures and making them look very pretty in blender. I'm thinking of releasing a Behind the Scenes video on that, along with a "How to make KSP planes look pretty in blender" video. I'll put them both here, as I believe they'll have useful information.

I know most people here are using blender as an intermediary step, to put parts back into KSP, but there are actually quite a few people who, like me, simply want to import craft into blender and render them.

Link to comment
Share on other sites

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