Jump to content

Help-A-Noob


Recommended Posts

Greetings, modelling Oracles. I beg of thee some knowledge, that I might continue in my strife.

I've just started learning how to use Blender - I've made a simple mesh and (I think) an acceptable UV map - however I'm not if my approach is correct or not. I have a few questions about my object:

u1redAxl.png

The above piece is intended to be a 'collar' that surface attaches to a tank and emits light from the flat bottom surface, for vain buggers like me that like their rockets to be lit up like Christmas trees - but also want to use less parts.

A few quick questions, firstly about the mesh:-

What sort of poly count (upper limit) should I be looking at?

I've based this off a 32 sided cylinder - too many/not enough sides?

Likewise with the bezel on the 'top' edge - is this an acceptable division?

I've read that Blender's units are arbitrary - I've set them to metres anyway, is this good practise or unnecessary? I planned on rescaling via .cfg for different radii, and I have yet to actually get anything into Unity.

I have yet to create a collision mesh for it - still not certain on where that actually 'goes' so to speak. When I do, I planned to mimic the radius of the cylinder, with about half as many sides (16 per whole cylinder) and to ignore the bevel edge and have it square - a sound approach or worthy of a slap?

Onto the UV unwrap:-

Is my approach to seams on this object solid? I tried a a few different things but I ended up with all sorts of things that didn't look like they wanted to be drawn all over - this one resembles the object somewhat and maintains aspect ratio mostly. Ignore the extraneous two faces in the bottom of the UV map - after much headscratching I figured out this was a result of me using the mirror modifier earlier during meshing and that I should have just worked on a half cylinder instead of a quarter with mirror modifier at the end.

Thanks all!

EDIT: IF anyone else has the issues I have later in this thread with Unity not lighting objects correctly (they almost look 'round' where they shouldn't) Then import your object into Unity as a .dae Collada file. I just found you can't do this if doing animations; you need to use .fbx - the lighting issues came back. To solve this once and for all, click on the imported .fbx in Unity asset browser - the top left 'inspector' panel displays lots of import options. I turned Normals and Tangents to Calculate and checked 'Split Tangents'. No more lighting issues!

Edited by Milkshakefiend
Additions
Link to comment
Share on other sites

What sort of poly count (upper limit) should I be looking at?

With that part, I doubt you'll have to worry too much about going too high with the poly count. No worries there.

I've based this off a 32 sided cylinder - too many/not enough sides?

32 should be fine. I generally use about 24 for a 1.5m diameter part, and 32-36 for larger ones with no issues.

Likewise with the bezel on the 'top' edge - is this an acceptable division?

It looks fine, however if you wanted to, you could lower the poly count of it by half and apply a smooth shader without any noticeable difference in game, I think

I have yet to create a collision mesh for it - still not certain on where that actually 'goes' so to speak. When I do, I planned to mimic the radius of the cylinder, with about half as many sides (16 per whole cylinder) and to ignore the bevel edge and have it square - a sound approach or worthy of a slap?

I'd add the bevel edge onto the collider. That way if you decide to surface attach any antennae or similar items to the part, they would follow the contour.

As a final note, take everything I just said with a grain of salt. I'm barely a novice at making parts myself :) Hope I was some help though

Link to comment
Share on other sites

Can't really help with the questions, but I have to wonder, can a part in KSP totally encircle another part like you intend like a hoop on a barrel?

Honestly - I haven't the faintest! I just thought of a part that I'd like that has simple enough geometry/texturing for me to start out with. I can't think of a reason off the top of my head - if the attachment point is set as the centre of the half cylinder and the internal diameter matches the diameter of the tank, it should line up? 2x radial symmetry would then create the other side? Maybe? Hopefully? I guess we'll find out if I get it into KSP!

As a final note, take everything I just said with a grain of salt. I'm barely a novice at making parts myself :) Hope I was some help though

Thanks, it is indeed a help - novice or not, I always like to have a second/third/fourth opinion from people more experienced than me!

I think I've twigged how to make a collider mesh and I've been working on the texture with the UV mask so some progress is being made on that front. I still feel like I'm learning a foreign language though!

EDIT: Had a problem when experimenting with textures. Heres a 5 second attempt at stripes

dq8k9UYl.png

Removed the seams on the bevel, resulted in what I thought was a worse UV map (looked less like the object)

4YdWHa1l.png

But resulted in (obviously) no seams on the bevel, which makes the stripes appear better

gQl1pXxl.png#

From this, can I state that the goal of UV unwrapping is not to use seams to create a UV map that 'looks' like the object, but to create a map with as few seams as possible (in 'critical' areas)?

To this end, can you rescale/flip/join parts/islands of the UV map in Blender? I don't really get why I'd want an island for each half of the object when I haven't created a seam there - but this is what Blender gives me. It would be more useful when texturing to have the 'inside' and the 'outside' as an island each, right?

Edited by Milkshakefiend
Addition
Link to comment
Share on other sites

I have to wonder, can a part in KSP totally encircle another part like you intend like a hoop on a barrel?

It can, but not with just a single collider. since the colliders have to be convex, you actually have to set up multiple colliders in a ring while leaving the center free. That's the way I made this tank:

icwm.png

The top and bottom of the torus actually extend a little less than half a meter past the center connection point on top and bottom. There may be an easier way to do it though.

Link to comment
Share on other sites

The problem that you are experiencing is due to the fact that what you are doing is applying a flat picture to a curved surface. That's what is causing the distortion and making your stripes appear to be curved when they are on the bevel. mapping a texture to a flatter surface, such as the part of the ring below the bevel is much easier. I'm pretty horrible at texturing things, so I tend to stick with solid colors for any surfaces that have much curve to them. I'm getting better at it by trial and error, but texturing well seems to be more of an art than a science in my experience.

Link to comment
Share on other sites

Your colliders do not have to be convex, its just much better for performance. I have them in my mod and no one has even noticed yet. They are of course extremely simplified shapes.

At some point multiple convex colliers becomes just as slow as a single non convex one.

Link to comment
Share on other sites

The problem that you are experiencing is due to the fact that what you are doing is applying a flat picture to a curved surface. That's what is causing the distortion and making your stripes appear to be curved when they are on the bevel. mapping a texture to a flatter surface, such as the part of the ring below the bevel is much easier. I'm pretty horrible at texturing things, so I tend to stick with solid colors for any surfaces that have much curve to them. I'm getting better at it by trial and error, but texturing well seems to be more of an art than a science in my experience.

I expected a distortion due to the UV map aspect ratio not being similar to the object, so what I draw is not what I get, but I didn't really realise the seams would present an issue. I hunted around a bit and discovered that you can rescale on x and y axis, rotate islands etc and this has allowed me to create a UV map bearing more resemblance to the object without resorting to seams everywhere, but the vertex stitching (which I also just discovered - Google is my friend now) is giving me grief - it joins two of the islands together visually on the UV map, but trying to stitch the vertices of the other halves together just plain isn't working. More investigation needed.

You're probably right about texturing being an art - I can draw pretty well in PS/Gimp using a Wacom tablet + stylus, but I'd rather learn things right the first time instead of spending hours texturing a more complex object because I haven't understood the principles here.

Link to comment
Share on other sites

It can, but not with just a single collider. since the colliders have to be convex, you actually have to set up multiple colliders in a ring while leaving the center free. That's the way I made this tank:

icwm.png

The top and bottom of the torus actually extend a little less than half a meter past the center connection point on top and bottom. There may be an easier way to do it though.

Now that I have seen this part in game, I can say it's not the same thing as what the OP is trying. You've made a flat piece that mounts pretty normally and has the ring attached to it. The OP is trying to make a ring that surface attaches all the way around an existing part like a fuel tank.

Link to comment
Share on other sites

As long as you set the attachment rules properly, you don't even need to make the collider a ring. The only time the colliders of parts on the same vessel matter to each is when you're building it, and wheels, you can set your collar so that it's permitted to clip through whatever you place it on, and just have the collider be a nice simple puck with slight rounding, and the collider that's inside the tank you place it on will simply be there, inside, perfectly happy to do do nothing.

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

just make sure allowCollision is 1

Then you just have to put the node_attach in the right place and it should be totally reasonable to put a collar on something.

Problems you're likely to run into:

It may not be concentric to the tank you place it on, depending on the faces of that tank's collider.

The part will be attached at one point, and therefore hinge at one point, so the other end may sag. To fix that I suggest making a modified strut config that is one tenth scale or less, then place them in radial 3x symmetry so one of the struts is opposite the attachment point. Unfortunately nothing part-wise can be done to fix this without turning the collar into a greeble (thing that looks cool but doesn't do anything)'

Alternate solution if you're up to it and willing to have set points where the collar can be placed, use Module Manager to add in stack nodes midway along inside all the tanks you intend to use these with, and don't make it surface attach at all, it can still wobble but it'll wobble around the center of the tank instead of off one side, meaning the forced will be a lot more balanced, it'll move less at a given force, but you may want to still do the strut thing

Edited by Greys
Link to comment
Share on other sites

Now that I have seen this part in game, I can say it's not the same thing as what the OP is trying. You've made a flat piece that mounts pretty normally and has the ring attached to it. The OP is trying to make a ring that surface attaches all the way around an existing part like a fuel tank.

Yes, I was aware of that. I was just pointing out that you would technically be able to have one part completely surrounding another. The first iteration of the toroidal tank that I tried out did not have the centerline docking point, just an attach node in the center. This worked fine, but I didn't like the look. I also tried out another that had a node for surface attachment offset inside the center of the ring, and this seemed to work all right as well, but only for the exact size part that it was designed for... so I could place it anywhere along a 2.5m diameter tank and have it look fine, but it was horribly offcenter on 1.25m tanks.

Link to comment
Share on other sites

@OP

I would suggest putting the surface attach point right at the middle, on the inside, so that when you have 2x symmetry on and surface attach it (to a part of the right size) it will seem to be attached all around but it will really only be attached to one point per side.

Although, for stability sake, if you think your PC will be good enough maybe make the circle in 4 or even 8 pieces.

Link to comment
Share on other sites

Remember, the goal of UV unwrapping is not to make an image that looks like your object: The goal is to "unfold" a 3d object into 2d space. The simplest example is a cube:

800px-Cube_Representative_UV_Unwrapping.png

Notice the final image doesn't look anything like a cube: It looks like a cross. But now you will only have a few places where the textures aren't continuous. Try to imagine you're unfolding a shape made of paper: Where would you have to make cuts to lay it completely flat without tearing it? That's where you place seams. Additionally, putting your seams in places where they won't be visible (like on the backside of an object) is preferable for obvious reasons.

Link to comment
Share on other sites

Problems you're likely to run into:

It may not be concentric to the tank you place it on, depending on the faces of that tank's collider.

The part will be attached at one point, and therefore hinge at one point, so the other end may sag. To fix that I suggest making a modified strut config that is one tenth scale or less, then place them in radial 3x symmetry so one of the struts is opposite the attachment point. Unfortunately nothing part-wise can be done to fix this without turning the collar into a greeble (thing that looks cool but doesn't do anything)'

One thing I'm uncertain of is how is the structural rigidity/stiffness of connecting parts is applied in KSP? I've only even seen breakingForce and breakingTorque in .cfgs, but these don't affect the rigidity of the connection do they? Just the numeric torque and force required for the connection to be severed?

@OP

I would suggest putting the surface attach point right at the middle, on the inside, so that when you have 2x symmetry on and surface attach it (to a part of the right size) it will seem to be attached all around but it will really only be attached to one point per side.

Although, for stability sake, if you think your PC will be good enough maybe make the circle in 4 or even 8 pieces.

The 2x radial symmetry is my plan, however if what I mentioned above about rigidity presents a problem then I'll move onto a different project - the idea here is to reduce part count and still prettify rockets - having 4 or more pieces per rocket/booster would achieve little.

Remember, the goal of UV unwrapping is not to make an image that looks like your object: The goal is to "unfold" a 3d object into 2d space.

I'm feeling that now; the problem I had earlier was due to the aspect ratio of the UV islands - the UV map looked remarkably difficult to paint upon. I figured that would be 'hard coded' to how it was unwrapped, but I have since figured you can rescale the UV in Blender before exporting and the seam placement is now along edges unseen when in use. I was just slightly flummoxed how I would reliably put text or complex patterns on a UV map that bore little relation to object in terms of x/y scaling.

Cheers for all the help so far people, it makes things much easier to grasp!

Link to comment
Share on other sites

The wobble of a joint is based on a relationship between the mass of the two parts, and there is no exposed setting that will impact the wobblability of the joint at all. Not sure if a plugin could change that easily.

Link to comment
Share on other sites

The wobble of a joint is based on a relationship between the mass of the two parts, and there is no exposed setting that will impact the wobblability of the joint at all. Not sure if a plugin could change that easily.
What about breaking force and torque?
Link to comment
Share on other sites

The wobble of a joint is based on a relationship between the mass of the two parts, and there is no exposed setting that will impact the wobblability of the joint at all. Not sure if a plugin could change that easily.

OK, that's a shame but work with what you've got eh. These 'collars' are going to be quite lightweight compared to say the mass of a fueltank so hopefully this will reduce the impact of only being surface attached at one position.

On another note, wobblability is a cracking word! I'm going to work that one into my dissertation :D

What about breaking force and torque?

I've tinkered with .cfgs when I've created obscenely wobbly rockets before and changing these didn't seem to change a whole lot? Maybe I was doing something wrong?

Link to comment
Share on other sites

Okay - Running into a slight hitch in regards to the part showing up in KSP. Basically, it removes all stock parts form the VAB, and still doesn't show up itself.

Here's what I did:

- I've set up Unity (Created new project, imported part tools package, directed it to GameData)

- Imported my .blend file, it displays fine, right orientation etc

- Dragged it into the hierarchy

- Assigned a texture to the material, set the shader to KSP/Diffuse

- Turned off rendering the collision mesh

- Added a Physics -> Collision mesh component to the collider, turned it to convex

- Added a KSP -> Part Tools component to the parent object

- Set a file URL within GameData (/My Parts/Parts/)

- wrote the part

I now have a .mu file, and a texture - great.

So now I make a basic .cfg. Thinking I'm being smart, I give it a SatELight module, but this causes a repeating error upon reloading the database, and this I assume is because I have not defined any light sources in Unity. I then change the module to 'Part' to see if it will show up at the right scale in the VAB and surface attach. When I do this I get no errors reloading database and my part count has increased by 1 - yippee. I check the models, configs and texture section of the database and sure enough, my test components are in there, but I've obviously missed something critical or done something catastrophic for it to not display ANY parts in the VAB, right?

Here's the dummy .cfg I'm using.

PART
{

// KSP Config
// mk I Light Collar
//

// --- general parameters ---
name = Collar
module = Part
author = Milkshakefiend

// --- asset parameters ---
mesh = model.mu
scale = 0.1
rescaleFactor = 1
texture = testUV3.tga
specPower = 0.5
rimFalloff = 3
alphaCutoff = 0


// --- node definitions ---
node_attach = 0, -0.67, -0.08, 1.0, 0.0, 0.0, 1.0

// --- FX definitions ---

// --- Sound FX definition ---

// --- editor parameters ---
cost = 0
category = Utility
subcategory = 0
title = Collar
manufacturer = blank
description = test

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision

attachRules = 0,1,1,1,1

// --- standard part parameters ---
mass = 0.02
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 7
maxTemp = 3000

// --- specific part parameters ---

}

So, any ideas?

Link to comment
Share on other sites

When that happens it means something in your cfg is faffed, try making cost > 0

No joy, still gives errors. When I click debug next to my part config on the alt+f12 debug menu, it looks like it's ignoring part of the cfg? First term is scale = 1, it appears to have ignored mesh, name, module etc. It is also mission the entire editor section. I've re-created the .cfg according to the wiki article but it's still being an eejiot.

EDIT: Just tried commenting out the lines that DO appear in KSP debug, and I still can't get name, author, module or editor parameters to show up! I'm disliking cfg's already.

EDIT EDIT: In an attempt to see if I'm full of typos or something, I copied the config for a structural cube, replaced the stack nodes with the surface node form my part, and changed the name but this still didn't work - it refuses to acknowledge the name, author, module and editor params from the copied and pasted config, too. I can only assume I did something wrong in the Unity export?

Edited by Milkshakefiend
Link to comment
Share on other sites

Question, when you set up the part in Unity, did you create an empty GameObject, and place your part in that? Then add the PartTools component to the GameObject and export it from there?

I had a similar problem a while back, and I'm not certain, but I believe that doing this fixed it for me. I basically went and redid everything from start to finish and it worked afterwards, so I'm not completely sure what I borked up to cause the problem in the first place.

Link to comment
Share on other sites

Question, when you set up the part in Unity, did you create an empty GameObject, and place your part in that? Then add the PartTools component to the GameObject and export it from there?

I had a similar problem a while back, and I'm not certain, but I believe that doing this fixed it for me. I basically went and redid everything from start to finish and it worked afterwards, so I'm not completely sure what I borked up to cause the problem in the first place.

This could be it, because I read something about that earlier and re-jigged the hierarchy for the part and re-exported, but at the same time I also changed the last value in the node attachment string to an integer instead of a float - I didn't realise this wasn't a scaling thing but rather you can only set it to 0, 1 or 2? The part now shows up, anyway.

nAoCxdPl.jpg

With only minor adjustment of surface node placement and absolutely no rescaling, the part works as intended with the mirror symmetry. As someone predicted earlier, the coarse collision meshes of the tanks and this part means that theres only 2/3 places where the collar lines up perfectly, but thats good enough for rock and roll, right? Also, I can't see how to fix that without having new collision meshes for everything, so that's out of my hands.

Unfortunately the collision mesh is still rendering for some reason - I have the mesh renderer disabled already, so I've tried disabling cast shadows/receive shadows but still shows up. Possibly something wrong with my blend file, but I'll have to check that after dinner.

I WILL have this damned thing working tonight!

Link to comment
Share on other sites

Unfortunately the collision mesh is still rendering for some reason - I have the mesh renderer disabled already, so I've tried disabling cast shadows/receive shadows but still shows up. Possibly something wrong with my blend file, but I'll have to check that after dinner.

I WILL have this damned thing working tonight!

Right click on the "Mesh Renderer" part (where you unchecked it) and choose "Remove Component" on the collision mesh part to fix this. You should probably go to the parts that you want visible, but that are not part of the collider and do the same for the "Mesh Collider" tab

Edited by Talisar
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...