Sign in to follow this  
Woopert

Just a few questions regarding Blender and Unity

Recommended Posts

The dimensions are square, 4.2 meters wide and 4.2 meters tall. it doesn't look like it visually, though. I don't see how that width and height in the picture can be the same.

Basically, the view I'm getting in Blender is off. I can't accurately judge how something looks when the scaling is "off."

Edited by Woopert

Share this post


Link to post
Share on other sites

You need to explain yourself better. What is an "illusion"? That could mean anything. Use appropriate words please. Elaborate. I've never had things changing shape, so i don't know what you're talking about.

Share this post


Link to post
Share on other sites

Okay, here goes. :) The way my eyes are perceiving this, it doesn't look the way my measurements are portraying it to be. If a cylinder, for example, is 4.2 meters in width and you enter 4.2 meters for the height, you would expect the height to look the same as the width, wouldn't you? I'm wondering why they don't look the same visually; I'm trying to find if there are any camera settings to give a different view so it looks like what you're actually entering in for the size parameters.

I've tried orthographic view before but the scaling still doesn't match up when I enter 4.2 for both the width and the height.

EDIT: I'm a moron, I was entering in the value for a diameter I wanted; you're supposed to enter the radius value. Problem solved.

Edited by Woopert

Share this post


Link to post
Share on other sites

I don't know if it's a medical issue or something everyone has but when i look at a square that is eg. 2x2 the height is just slightly a bit higher than the width.

I realized it a few years ago when I was laying on the couch and my view was rotated by 90 degress and the width of the tv was wider than normal. Sitting up made it look normal again.

I don't know and I might be talking nonsense but it might be the reason why we don't have 1:1 resolution and use for example 4:3 as it mostly looks like 1:1.

Please correct me if I#m wrong or know more about that phenomena. Howeve,r it's impact is very subtle.

Share this post


Link to post
Share on other sites
snip

Interesting! I never knew that before. I found that for myself, the issue was I was entering the diameter instead of the radius. :)

I have another question, this time about UV unwrapping. Usually when I unwrap parts of a cylinder, I get a nice strip that is easy to texture. When I try to unwrap a certain part of the model, it separates the strip into many pieces that aren't even aligned properly. Everything in the mesh is centered and perfectly aligned. I connected a hollow cone with two hollow cylinders via the Boolean modifier tool. They are joined into one mesh. Screenshots below.

T0XAlp8kUc9j.pngbz9KJ66R1RjS.png

tpvVPg6KXs1T.png

Share this post


Link to post
Share on other sites
did you try to remove doubles?

THANK YOU so much. That fixed it. :)

However, why are there two strips after I unwrap it? I only unwrapped one / removed doubles from one of the strips and I get two bands. :huh: I also tried removing doubles a second time, just in case.

PFKHZrg1eiPe.png2oWJJIiSeptM.png
Edited by Woopert

Share this post


Link to post
Share on other sites

not sure - are you certain, there aren't 2 bands behind each other or over each other and connected by one single vert that was a "valid" double - the rest just had not ben removed because they are too far shifted but still invisible in bormal zoom..

in other words - it happens much too often, that you inadvertadly douplicate something and don't realize it's there..

but without the file I can't help more than this guessing..

hth

Share this post


Link to post
Share on other sites

In your UV pane, you can turn on 'UV and Edit mode selection sync' (looks like a mouse cursor hovering over a plane, between the pivot select and select mode bars)

Then you can click on the UV islands in your UV pane, and they'll be selected/highlighted in the Edit mode window

This should let you identify where the other row is coming from

Share this post


Link to post
Share on other sites

I think it's the same strip, but it's been separated. I counted the faces and there were 12 on each strip. The shape has 24 faces so for some reason Blender split the strip in half. File for those interested: https://www.dropbox.com/s/mze1c0lvhwxcu29/SLS%20LVSA%20Tris%205.blend?dl=1

Also: how do you change the location of the "center of mass" or whatever it's called, for the origin of the mesh? Example (look at the engine that is separated from the rest, I moved it for clarity): https://cdn.mediacru.sh/QrjNumlq2wrF.png

Notice how the origin for the arrows is not at the center of the object. It is where the center of the original unmodified object is.

Share this post


Link to post
Share on other sites

Place the 3D cursor where ever you want the CoM to be (can also move the 3D cursor to the geometry you want with shift-s in edit mode, plus other options). You can set the 3D cursor position directly in the Edit mode popup toolbar too (N in the edit mode window).

Once the 3D cursor is where you want the origin, TAB to object mode and SHIFT-CTRL-ALT-C and select Origin to 3D cursor (or whichever option you find gives you the origin you want)

Edited by NoMrBond
  • Like 1

Share this post


Link to post
Share on other sites

Okay, yet another question. This time about smoothing. I converted the mesh to triangles with the triangulate modifier, and some of the triangles are *really* small and narrow. I tried manually doing some of it but not much luck with that. The problem arises when I smoothed, applied edge split, and then did some further manual smoothing / marking edges to be sharp. I don't know how to explain it, really, but it should be pretty apparent in the pictures below.

https://cdn.mediacru.sh/j_g8YqyfNcwh.png

https://cdn.mediacru.sh/Y1R2oIwMmNMN.png

Thanks again for all the help (applies to everyone, :) )

Share this post


Link to post
Share on other sites

I find a merge (or weld) vertex operation with a small radius can help with this. Not sure what the terms are in Blender, the operation merges clusters of vertices into a single vertex, often getting rid of the super oblique triangles.

Share this post


Link to post
Share on other sites

One thing you can try is 'Remove Doubles' but go down to the Merge Distance dialog that pops up and increase it a bit (from the default 0.001) until it just enough to catch all the vertexes you want

Share this post


Link to post
Share on other sites

This time I have a question about texturing: when you are painting over the UV layout (I use GIMP and Photoshop), should you paint over the edges? Or, on the contrary, should you make sure *not* to paint over the edges? I made a test texture just using solid colors, and I converted the path (I used an SVG and imported the paths) to a selection and inverted it so I could delete the overlapping textures. Once I applied the texture in Unity, there were some black lines on the edges, probably since I filled the background with black (the actual texture was white and grey in the image file).

And I also have a question about the actual texturing: is everything painted manually with a brush, or do you all use filters, noise, blurring, and various other filters to assist in the texturing process? I'm quite experienced with Photoshop (five years of experience, I mostly know photomaking and logo design work with Inkscape) but I don't know how to approach this texturing ordeal. Specifically, I'm looking to make stockalike textures.

Cheers

Edited by Woopert

Share this post


Link to post
Share on other sites

you want some padding outside the UV edges. 3~6 pixels worth. this way when the mip maps get generated, you have less chance of the UV seams becoming visible due to pixel averaging.

as far as painting actual texture, depends on the style you are going for. Stock textures are very simple, just some large sections of light-mid-dark grays and some seams. Use whatever you want to get the look you want. photosource, filters, whatever. I tend to source alot from photos from cgtextures.com and use masks and stamps to clone specific sections, and using adjustment layers to integrate everything together. others prefer painting textures from scratch.

Share this post


Link to post
Share on other sites

I usually go over by the edges by 2px, just to avoid weird edge case shenanigans like the background showing on some corners, having the 'snap to pixels' option on when assigning UV's seems to help too

Something which can help kickstart your texture is making a normalised Ambient Occlusion (AO) bake (in your modelling program) and then save the bake as an image, drop your AO bake image into your stack as a separate layer above your Base/DIFF set to Multiply.

My ability beyond there could charitably be described as potato, but use whatever works, some detailing (like scratches or edge wear) by hand, patterns by filter, brushed look by adding noise then motion blurring it, I'm sure you'd have a much better idea than me

Share this post


Link to post
Share on other sites

Questions galore, here we come. I've tried Googling these but most of my questions are so specific it helps to get a refined result via forum posts. So --- I'm adding a mesh collider in Unity, but the mesh is 90 degrees sideways. I've looked for a rotate mesh function but couldn't one. I'm curious as to why this is happening. I didn't do any rotations to the mesh in Blender, but I saw a forum post from last September saying that if you do so in Blender, you need to apply the rotation. I'll check for that.

I'm also curious how to make the collision mesh conform to both the main part and the engines, which are separated from the rest of the model so I can have them individually gimbal in KSP. Speaking of which, how do I import multiple textures? I UV mapped the engines and engine structure separately as I don't think you can put them on the same map (prove me wrong, though :P ) and I have no idea how to do this. I've read over the compilation of KSP modding links and I'll look over it again; I've found that the best way to learn Unity + Blender are through time. :)

Share this post


Link to post
Share on other sites
So --- I'm adding a mesh collider in Unity, but the mesh is 90 degrees sideways. I've looked for a rotate mesh function but couldn't one. I'm curious as to why this is happening. I didn't do any rotations to the mesh in Blender, but I saw a forum post from last September saying that if you do so in Blender, you need to apply the rotation. I'll check for that.

does the object itself have any rotation applied to it? Under "Properties".

  • Like 1

Share this post


Link to post
Share on other sites
Questions galore, here we come. I've tried Googling these but most of my questions are so specific it helps to get a refined result via forum posts. So --- I'm adding a mesh collider in Unity, but the mesh is 90 degrees sideways. I've looked for a rotate mesh function but couldn't one. I'm curious as to why this is happening. I didn't do any rotations to the mesh in Blender, but I saw a forum post from last September saying that if you do so in Blender, you need to apply the rotation. I'll check for that.

Blender uses the same world orientation as Max, Z-up instead of Y-up like Unity and most other 3d apps. when you import from Blender a 90 degree rotation is applied automatically so the pivot matches Unity's world orientation. to rotate a mesh collider you use the transform like any other game object.

Share this post


Link to post
Share on other sites
This time I have a question about texturing: when you are painting over the UV layout (I use GIMP and Photoshop), should you paint over the edges? Or, on the contrary, should you make sure *not* to paint over the edges? I made a test texture just using solid colors, and I converted the path (I used an SVG and imported the paths) to a selection and inverted it so I could delete the overlapping textures. Once I applied the texture in Unity, there were some black lines on the edges, probably since I filled the background with black (the actual texture was white and grey in the image file).

And I also have a question about the actual texturing: is everything painted manually with a brush, or do you all use filters, noise, blurring, and various other filters to assist in the texturing process? I'm quite experienced with Photoshop (five years of experience, I mostly know photomaking and logo design work with Inkscape) but I don't know how to approach this texturing ordeal. Specifically, I'm looking to make stockalike textures.

Cheers

I just started a week ago, but I've gotten far enough to probably answer some of this. :)

The lines indicate the edge of the texture as applied to the polygon, but the important thing to remember, is that it's a zero-width line. That is, it can read from the texture at the "sub pixel" level, and so if you paint to the lines exactly, you may see some blur, or color bleed from what's on the other side of the line, in some edge cases. So I think, whenever possible, it's preferable to paint past the line a little.

I've been doing nearly everything with Photoshop's effects-- gradients, shadows, glow, cloud renders applied via "multiply", etc. It's letting me do some things that I think are fairly pretty, and somewhat stock-like:

* Stackable fuel tanks,

* Radial fuel tanks,

* RCS block,

* Nose cones,

* Interstage adapter (another angle)

Edited by NecroBones

Share this post


Link to post
Share on other sites

Another few questions. How do you add multiple textures in Unity? I have the engine bells separate from the rest of the model and they therefore require separate textures (I think there's probably a way around it...). How do you actually export the ambient occlusion, and do you have to add lights in Blender to create the shadows? How do you make sure the textures tile when you are making them?

I've tried searching on Google but I didn't get much luck with the results.

Share this post


Link to post
Share on other sites

Separate objects in unity can have separate textures. Even if you compile them into a single part. Just model the objects separately in Blender and drag/drop the appropriate textures in Unity.

Ambient occlusion should be baked and incorporated into your colour map. I usually add the map as a layer on the very top of your layer stack in GIMP and change the layer mode to "multiply"

If you want tiled textures you need to unwrap the appropriate faces in a way that they extend beyond the image in your Blender image viewer.

Share this post


Link to post
Share on other sites

Long time no see, all! I recently started playing with Blender a bit and I'm working on an upper stage engine. I have connected vertices into edges/lines and want to know how to add depth to them or solidify them (I know there is a solidify filter, but it doesn't seem to work with edges, just faces). Below are two pictures: one of which is my view in Blender and another is a picture of a rocket design of which I am inspired by.

Blender view

qUQ07dM.png?1

Inspiration from real rocket

Y3MFs54.jpg

Thanks all! :)

Share this post


Link to post
Share on other sites

You have two options:

1. Delete one of the disks, and extrude the other one.

2. In cases where you need to keep the existing geometry you can select the edges and press Alt+F to fill the space between them. (F on its own is useful for creating a single face which can sometimes be made of several triangles)

Once you do either of those you might need to press Ctrl+T to triangulate and then Alt+J to convert to quads (because you should always work with quads as much as possible)

You'll probably also need to press Ctrl+N to recalculate normals to outside.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this