Saturday 22 April 2017

Installing Blender on Windows 10

I've been having trouble installing and using Blender on Windows 10. I've had various issues with 2.78a, 2.78b and 2.78c. The issues might have happened on earlier versions but I hadn't updated for a long while.


Just to be clear. Once Blender is working, it's working well.
It appears to install but when I try to run it for the first time I just get the black console screen.

With 2.78a and 2.78b I got an error message, not a very enlightening message but the Internet search pointed me in the direction of graphics drivers and updating them fixed the problem.

I installed version 2.78c in April 2017. Lots of Windows updated had happened since the last installs. This time I just got a black screen with no error messages. It did not even appear to to try to load or to create the user preferences.

This time, the first thing I tried was to turn on Developer mode.



I'd had issues with other installs where, despite it's name, Developer Mode needed to be enabled for the app to be able to setup its preferences correctly, or at all.


After selecting Developer Mode, it is necessary to reboot the machine, or at least it was in my case.


After that Blender ran as it should.

Friday 18 March 2016

Uneven Curved Corners

I was surprised how well a simple technique worked to get a curved corner that had a different radius in two directions.


To get the first curve I subdivided a plane and moved the vertices to line up with a circle in each of the directions I wanted the corner.

To get the curve round the corner to be a larger curve than the others I added a circle and simply scaled each row of vertices in just one direction until the edge vertex lined up with the view of the edge of the circle.


The other vertices scaled neatly to keep a smooth complex curve. In the above example I scaled [S] and restricted it to the Y axis [Y] which is the direction of the green arrow in the above image.


It was the fact of scaling rather than moving that kept the curve in the other direction looking smooth.
I started from the top and always scaled to the centre line of the guide circle. I just selected the upper most vertex as the last selection and scaled towards that.


It's much harder to describe than it was to do.


Thursday 10 March 2016

Modelling with quads

I've been working on some static models of cars. This hopefully this will improve my 3D modelling skills.

I am trying to stick to the pretty much universally recommended way of doing this and that is to use only quads. Not triangles.

There are several articles online about why quads work better. Here's a link to just one explanation but a quick search on Google will find you lots of others. In short, quads can be smoothed, quads maintain edge loops and can be subdivided for improved quality results.

Most balance articles also mention that there are cases for using triangles in some parts of the model but they should be hidden out of sight. I now know why I found it so difficult to get smooth faces on some of my earlier models. I'd used triangles in the wrong places.

From a games perspective, most, if not all rendering is done as triangles but we are talking about the best way to create the model. Quads, apparently also animate better because the folds will be more predictable.

Anyway. The point of this post is to remind myself of how I have made some shapes with quads, avoiding triangles.

At the moment there is just one tip but I'll add more as I work them out.


  • Reduce the number of edges subdividing rectangles 



This transitions from a row of three quads down to a row made with just a single quad. A complex shape at the bottom of the face and simplified at the top.


I often end up with this situation when creating curves within otherwise flat faces.


Another example, 10 quads down to just two.


Other useful articles and tips:
What shape should the quads be? Evenly sizes or any shape.
Also look for edge-parallel mode. After pressing Ctrl-R for a loop cut, press E to align to an edge and F to toggle between which edge to align to.

Monday 29 June 2015

My Blender Preferences

Every time I come back to Blender I forget how I had it setup the last time I used it.

Obviously settings are to each persons' taste but I have never quite got on with all the Blender defaults.  I assume when using a new programme that the authors know better than me what are the best settings for their application. Eventually I give up and use my own choice.

Rotation


The default rotation type of Turntable is fine but it pivots round a hard to understand global point. It almost feels arbitrary to me.

I prefer it to pivot round the centre of the selected items. It's still not ideal every time but at least I can understand what it is doing.


Zoom


This is just my preference. By default Blender zooms to the centre of the current view. Sometimes that is OK but I find it quicker to zoom to where my mouse is pointing.

Metric


I like to work with actual sizes and I like those to be metric.


Ideally millimeters (mm) but although Blender allows entering numbers as mm, it displays the results in centimeters (cm).


I use the scale option to get the result to be mm. One unit size equals 1mm.

I am sure that most readers will assume that my preference for metric is because I have grown up in England. This is not entirely the case. I am old enough that I can work in both imperial and metric and I do still measure in inches when working on less precise jobs, like fences for the fields. When I'm 3D modelling, I typically need some accuracy and millimeters is just so much easier at all scales.

I can't complain because I still prefer working in degrees and not radians but clearly Blender's interface is designed for the units  most commonly used in Europe and not for people like me and most of the building trade in the UK that work in the scientific standard size of millimeters.  I am happy there is a choice and centimeters are much better for my needs than inches.

Display


The information I display while working changes. It is handy to hide bits so they do not get in the way.



The things I find useful are the lengths of selected edges to get accurate sized objects and the normals to show the outside face of a surface.


I also turn on back face culling to help with keeping track of the outside and inside of objects.

As I find other preferences, I'll update this page.

Wednesday 3 June 2015

Blender Quick Reference

I have used Blender a lot for 3D models for games but my use has long periods away doing coding or other projects.

That means whenever I return to 3D modelling I have to remember how to use Blender again. Typically Blender has progressed a version or two as it is very actively being developed. It always takes me a while to get back up to speed.

I hunted round for quick start guides and keyboard shortcuts but none quite had what I needed.

What I wanted was the common features used to make most models to get me up to speed as quickly as possible. I don't need every feature because I can look up the rarely used ones as needed. Therefore, in my usual way, I have created a desktop quick reference guide that has the features I need to remember each time.




This will continue to be a work in progress. I will add more reminders as and when I know what I need to use.

Downloads

I've made a couple of versions available for download:

PDF to print or view
Source PowerPoint to edit to make your own changes

3D Printing

If you are interested in 3D printing see my other blog.

==

Last Updated - 3 March 2016

Cross post on my other blog

Blender Set Origin Script

I have not done much work on my game recently but to do so I need to get round to creating the levels and I'm back to using Blender again.

When I started to tidy up one of my models I came across an odd feature in Blender. You can only set the origin on the active object.

My main reason for setting an origin is to get all of the origins of all of the objects in a scene at the zero point. I find it easier to import in to other programmes and line them up if they all have the same centre.


Using the built in button, it is frustrating having to select one object at a time to set all the origins. I decided to create a script to do this for me.

Not as easy as I expected because even in code the set origin only works on the active object.


I just typed the lines in to the console to run it. After the last line press return one extra time to run it.



for item in bpy.context.scene.objects: 
 if item.type == 'MESH': 
  item.select = True 
  bpy.context.scene.objects.active = item 
  bpy.ops.object.origin_set(type='ORIGIN_CURSOR') 
  item.select = False



The above worked in version 2.74 of Blender. It goes through ALL objects in the scene which is what I wanted.



for item in bpy.context.selected_objects:
 if item.type == 'MESH': 
  bpy.context.scene.objects.active = item 
  bpy.ops.object.origin_set(type='ORIGIN_CURSOR') 



In theory the above should work for the currently selected objects but I have not tested that script.



I came across another oversight when trying to copy that code to save it. To get the Windows Ctrl-C (copy) and Ctrl-V (paste) to work in the console window you first have to click on the console menu item at least once. After that Ctrl-C and Ctrl-V work as expected.

Friday 12 December 2014

Ultimate FPS and Photon Unity Networking

I received an e-mail today that got me interesting in my game again.

Too much of my time was spent tinkering with animations and controls to try to get things just right. I've looked at some pre-built assets before but none quite hit the mark.


Ultimate FPS (UFPS) have added a third person view and are now adding multi-player.  Both those features are exactly what I have been waiting for.  They have teamed up with Photon Unity Networking (PUN) which is my multi-player platform of choice so I am already familiar with that.

http://forum.unity3d.com/threads/ufps-ultimate-fps-50-off-sale.126886/
https://www.assetstore.unity3d.com/en/#!/content/2943
https://www.exitgames.com/en/PUN

It's a closed Beta at the moment but this looks to be exactly what I need to speed up my development:
http://www.visionpunk.com/content/assets/ufpsmp/landing.html

1000's of hours have gone in to UFPS which I would never have time to replicate and so I am very hopeful that all I need to do is add in my gamepad support and some AI and the rest will be level design and assets to complete the game.  Sounds easy but I know there is still a lot of work left to do.


Coming up to the Christmas break I might even have some time to work on it.

Fingers crossed that they let me in on the Beta.