Using Blender to Create Models
-
Guest
Using Blender to Create Models
I learned a lot about Blender while I was converting the Lanner to new-model format. I have written some tips on the wiki: [url]http://pioneerwiki.com/wiki/Blender_Tips[/url] I will try to add more tips and write a more detailed guide in the next few weeks, but hopefully this is helpful for some people already. I know Fish has put some information on the wiki about using 3DS Max to create Pioneer models, too. It would be great if more people could add guides, tips and examples for modelling on the wiki. For now I've just made this one page but I'll probably split it up as I add more. If you write guides, please make new pages and add a link from the main page. I guess people watch the forum more than the wiki, but threads on the forum disappear over time or they get really long so it's impossible to find things, so I think it's best to put this documentation on the wiki where we can all help to keep it organised. But if you add something you can post a link to it on the forum (maybe even in this thread) so that people who are just watching the forum will know! John B
-
mikehgentry
- Private
- Posts: 66
- Joined: Mon Dec 24, 2012 11:33 am
RE: Using Blender to Create Models
There's enough dark magic in UV unwrapping for its very own page, so we've started one
Intended mostly as a 'beginners crash course' but with room for experts at the end: [url]http://pioneerwiki.com/wiki/UV_coordinates_in_Blender[/url] Finding good textures seems to be a major bugbear for modellers. If anyone knows of any that are license compatible with Pioneer, put them here: [url]http://pioneerwiki.com/wiki/Textures[/url] -- (Thanks John - looks like some really good tips. I'll read that properly later...) (P.p.s. maybe this could use a sticky?)
-
fluffyfreak
- Private
- Posts: 1292
- Joined: Sun Nov 27, 2016 12:55 pm
RE: Using Blender to Create Models
Those are some good guides, I might actually give Blender a try again if I can follow those.
RE: Using Blender to Create Models
Some good tips there, could have done with some of those a couple of months ago. I am still really struggling with UV unwraping, I understand the concept but it just never seems to work out cleanly (without a lot of manual work) in practice. Mikehgentry - 'Seams' are where YOU want meshes 'cut' rather than letting blender decide for you.
-
Metamartian
- Private
- Posts: 217
- Joined: Tue Mar 08, 2011 3:53 pm
RE: Using Blender to Create Models
Mikehgentry - 'Seams' are where YOU want meshes 'cut' rather than letting blender decide for you. I want the other way round where I can join two meshes together to unwrap as one. Example.I have 2 meshes. Hull_Top and Hull_Bottom.I can successfully unwrap Hull_Top to the UV editor view but when I goto then unwrap Hull_Bottom, the UV for Hull_Top dissapears and I can only see Hull_Bottom.I can now see the UV's for Hull_Top and Hull_Bottom in the UV editor window but not at the same time. So how do you unwrap both meshes at once or unwrap the entire model so that you can see all the polygons in the UV window so you can pack them efficiently and export them in the same .png?
-
mikehgentry
- Private
- Posts: 66
- Joined: Mon Dec 24, 2012 11:33 am
RE: Using Blender to Create Models
Some good tips there, could have done with some of those a couple of months ago. I am still really struggling with UV unwraping, I understand the concept but it just never seems to work out cleanly (without a lot of manual work) in practice. Mikehgentry - 'Seams' are where YOU want meshes 'cut' rather than letting blender decide for you. I've played around with them, just couldn't make it work properly for some reason. I'm leaving that part for someone with some experience of it actually doing what it's meant to do... I want the other way round where I can join two meshes together to unwrap as one. Example.I have 2 meshes. Hull_Top and Hull_Bottom.I can successfully unwrap Hull_Top to the UV editor view but when I goto then unwrap Hull_Bottom, the UV for Hull_Top dissapears and I can only see Hull_Bottom.I can now see the UV's for Hull_Top and Hull_Bottom in the UV editor window but not at the same time. So how do you unwrap both meshes at once or unwrap the entire model so that you can see all the polygons in the UV window so you can pack them efficiently and export them in the same .png? Only suggestions I can think of are to join the meshes together for the purposes of unwrapping. Or to unwrap one, using only half of the available UV space. Draw a texture on it, then use it instead of a 'New' file for the second mesh.
-
fluffyfreak
- Private
- Posts: 1292
- Joined: Sun Nov 27, 2016 12:55 pm
RE: Using Blender to Create Models
My suggestions are:Merge the two meshes, once you've modelled them both there's no reason for them to be separate anymore.Alternative 1 - guesswork, make sure that mesh 1 is all in the top half of the UV/png space and mesh 2 is all in the bottom half.Alternative 2 - Unwrap mesh 1, export png, unwrap mesh 2, export png, merge the two pngs... if they overlap repeat process but move them around a bit, repeat until UVs don't overlap.Personally unless you've got a good reason for keeping them separate you could just merge it all into a single mesh which might be the easiest. Andy
-
Metamartian
- Private
- Posts: 217
- Joined: Tue Mar 08, 2011 3:53 pm
RE: Using Blender to Create Models
I've played around with them, just couldn't make it work properly for some reason. I'm leaving that part for someone with some experience of it actually doing what it's meant to do... Only suggestions I can think of are to join the meshes together for the purposes of unwrapping. Or to unwrap one, using only half of the available UV space. Draw a texture on it, then use it instead of a 'New' file for the second mesh.They are both superlative suggestions with only two minor drawbacks.1) I don't know how to join meshes together yet (EDIT - I do know now....ctrl+j)2) I never thought about doing the second one. My suggestions are:Merge the two meshes, once you've modelled them both there's no reason for them to be separate anymore.Alternative 1 - guesswork, make sure that mesh 1 is all in the top half of the UV/png space and mesh 2 is all in the bottom half.Alternative 2 - Unwrap mesh 1, export png, unwrap mesh 2, export png, merge the two pngs... if they overlap repeat process but move them around a bit, repeat until UVs don't overlap.Personally unless you've got a good reason for keeping them separate you could just merge it all into a single mesh which might be the easiest. AndyI'll figure out how to merge the meshes together tonight (depends on boy sleeping however and not being a mardy git like he was last night)EDIT - I figured it out now, ctrk+J. really should not be fiddling with blender at work but hey ho
Thanks again you fine guys.
-
fluffyfreak
- Private
- Posts: 1292
- Joined: Sun Nov 27, 2016 12:55 pm
RE: Using Blender to Create Models
Don't get fired!
Says me posting from my work! 
-
mikehgentry
- Private
- Posts: 66
- Joined: Mon Dec 24, 2012 11:33 am
RE: Using Blender to Create Models
My suggestions are:Merge the two meshes, once you've modelled them both there's no reason for them to be separate anymore.Alternative 1 - guesswork, make sure that mesh 1 is all in the top half of the UV/png space and mesh 2 is all in the bottom half.Alternative 2 - Unwrap mesh 1, export png, unwrap mesh 2, export png, merge the two pngs... if they overlap repeat process but move them around a bit, repeat until UVs don't overlap.Personally unless you've got a good reason for keeping them separate you could just merge it all into a single mesh which might be the easiest. Andy You do want separate meshes if they've got different shininess or transparency though right?
RE: Using Blender to Create Models
You do want separate meshes if they've got different shininess or transparency though right? some of the 'shininess' can be controlled by a specular map and you want to have any parts of the model that use transparency to have there own mesh, material and texture
-
mikehgentry
- Private
- Posts: 66
- Joined: Mon Dec 24, 2012 11:33 am
RE: Using Blender to Create Models
I understand mesh and material. Why do they need a different texture?
-
fluffyfreak
- Private
- Posts: 1292
- Joined: Sun Nov 27, 2016 12:55 pm
RE: Using Blender to Create Models
Two different things might get confused there. Meshes with transparency want to have a separate texture, so things like a cockpit area would be a separate mesh and go onto a separate texture with an alpha channel.Then the rest of the ship mesh gets mapped onto another texture without an alpha channel. This is for rendering performance, rendering with alpha testing is a bit more expensive than without.It's not a huge issue with Pioneer at the moment, but we'll get there pretty soon if we don't start of doing the right thing from the start 
-
mikehgentry
- Private
- Posts: 66
- Joined: Mon Dec 24, 2012 11:33 am
RE: Using Blender to Create Models
Ah, OK. I was thinking transparency was defined in the model file, but it isn't actually is it. I think that makes sense... - edit Dag nammit, there's an opacity in the model file. So what does that do??? opacity 0-100, controls transparency of the material. A node with a material opacity less than 100 is treated as transparent, otherwise opaque. Well, that seems to work for the whole mesh. I guess I'm just not sure which situations it's preferable to use one, and which the other. I'm guessing it's the distinction between wanting an entire mesh to be translucent vs. wanting parts of some surfaces to be translucent...
RE: Using Blender to Create Models
ok so this is what i have figured out if you have a texture that has a fully transparent part you need to use an alpha channel in the texture to mask the transparent part then use the opacity setting on the material set it to 99 and only the part masked by the alpha channel will be see through. if you keep lowering the opacity then the rest of the texture will start to become see through i hope that makes sense iv had a long day
-
mikehgentry
- Private
- Posts: 66
- Joined: Mon Dec 24, 2012 11:33 am
RE: Using Blender to Create Models
That seems to make sense. I think what you're saying is opacity0 - 98 mesh is translucent99 mesh is solid apart from surfaces set by alpha channel100 mesh is solid I don't have any textures with alpha. I'll whip one up then do some experimenting... Thanks all!
-
fluffyfreak
- Private
- Posts: 1292
- Joined: Sun Nov 27, 2016 12:55 pm
RE: Using Blender to Create Models
Hmm, i'm not sure now, unless Luomu chips in I'll have to check.
-
mikehgentry
- Private
- Posts: 66
- Joined: Mon Dec 24, 2012 11:33 am
RE: Using Blender to Create Models
I've been playing around with it - seems to be more or less correct. Settings below 99 do take account of the alpha channel, but their overall opacity is set in the .model file. To take advantage of the rendering performance improvement from not having an alpha channel, do you have to remove the alpha channel from the .png, or does the engine simply ignore it if the opacity is 100? I guess removing the alpha channel does no harm, and maybe shrinks the file fractionally anyway...
RE: Using Blender to Create Models
First of all, I think there is a bug and the game does not detect a transparent texture correctly. Will fix this tomorrow or thursday when I get pioneer-time. Forcing it with the opacity value can be used for now. The opacity setting is for if you simply want to have glass or other transparent material without using any textures. Or you can use it to multiply the texture alpha channel if you wish. Yes, you should remove alpha channel from a texture unless you intend to use it. So besides the alpha texture fix and two-sided material flag I think I will also add an alpha test material flag. Otherwise you'll get alpha blending which gives softer edges but it also has drawbacks. Here's one explanation: [url]http://docs.unity3d.com/Documentation/Components/SL-AlphaTest.html[/url]
RE: Using Blender to Create Models
Right, I've implemented the following (you'll have to wait for the next nightly or release):- geometry with alpha texture is not automatically treated as transparent. I decided this was too error prone (photoshop saves pngs with alpha unless you flatten the image). Still, I recommend not to include alpha channel needlessly.- alpha_test material flag added, use this for fences, grating, trusses etc.- unlit material flag added. Good for station interiors, where you don't want sunlight.- two_sided material flag added. This does what it says, however it cannot automatically flip the normals on the opposite side, which means lighting may not work as you expect. I recommend you just duplicate and flip geometry to get two-sided effects.