Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
4. January 2016

 

I was recently working with a tool that exported it’s level data as a directory full of obj files, literally hundreds of them.  You can import them into Blender using File->Import->Obj, unfortunately there is no way to do a select all.  Apparently in Blender 2.4x if you held SHIFT while selecting OBJ import, it would import an entire directory, but this doesn’t appear to work in modern Blender.  You can also SHIFT+Click multiple files to do multiple selection, but this gets tedious when you have hundreds of them.  Unfortunately CTRL + A doesn’t work…

 

Thankfully Blender is extremely scriptable, so let’s turn to Python for a solution.  The following script will import a directory full of OBJ files into the current scene.

import bpy
import os

def fileList(path): 
    for dirpath, dirnames, filenames in os.walk(path):
        for filename in filenames:
            yield os.path.join(dirpath, filename)

for f in fileList("C:\\file\\path\\here\\"):
    if f.lower().endswith(".obj"):
        bpy.ops.import_scene.obj(f)


Be sure to change the path to your directory and if on Mac OS or Linux, to change the path format /to/this/style. Otherwise this script will chug away importing the OBJ files for you. Hopefully at some point Blender gives you the ability to select all while importing and the need for this script goes away completely.

Art Programming


17. December 2015

 

One of the major weak points for Blender, especially for game developers, is it’s FBX support.  You see, Blender is GPL licensed, which among other things means it can’t link to closed source libraries.  On the other hand, FBX is pretty much the industry standard interchange format these days, but it’s owned by Autodesk.  Autodesk have made an SDK available for years, but due to the GPL, Blender can’t use it.  This means their FBX implementation is a clean room reverse engineering of the format… and this results in… issues.

 

Thankfully, if you are like me and don’t give a damn about the GPL, there is a great option available.  There is a Blender add-on available that makes use of the Autodesk FBX SDK.  The install process is a bit non-intuitive though.

 

First download UmComv, this is a version of the Autodesk FBX SDK compiled for you.  Inside the archive, copy the folder umconv to the root of your Blender directory (same folder as the Blender executable).

 

Next download the addon zip file available here.  Extract the contents of this zip file somewhere, the file you care most about is io_scene_bos_fbx.zip.

 

Next in Blender, go to User Preferences…  Add-Ons and select Install From File…

image

 

In the resulting dialog box, locate and select io_scene_bos_fbx.zip.  Next locate the newly added add-on and make sure it’s enabled:

image

 

Now you will have additional import and export options available in Blender:

image

 

There may still be times where you want to use the built in FBX importer/exporter, but this certainly gives you more options and I have found does a MUCH better job supporting animation and other features.

Art


15. December 2015

 

Via BlenderNation a great collection of Blender materials came to my attention and I figured I would share.  Blender user Mackraken is a bit of a hoarder of materials and this certainly works to our advantage!  He has made a complete collection of shaders available for our use, all nicely organized using matlib.

 

To install, if you haven't already got git installed, install git and make sure it is available in your path.  Next in a terminal/command prompt, change directory to your Blender’s addon folder.  On my system it was D:\Program Files\Blender Foundation\Blender\2.76\scripts\addons

 

Next run the command:

git clone https://github.com/meta-androcto/materials_library.git

 

Now load up Blender.  Go to User Preferences…

image

 

Switch to the Add-ons tab, search for “mate”, click the enabled check box for the entry Material: Material Library Cycles, then click Save User Settings if you wish this setting to persist the next time you load Blender.

image

 

The materials will now be available.  First make sure the Cycles renderer is selected:

image

 

Pick an object you wish to apply a texture to and navigate to the Materials tab:

image

 

If the plug-in install worked properly, you should now have a new field named Material Library VX available:

image

 

In the dropdown, select the category of material you want:

image

 

Next select the actual material you want, then click the indicated icon to make that material active:

image

 

Tada:

image

 

Now keep in mind that Cycles materials will NOT export correctly to any game engines.  Instead you will have to bake your textures for use in real-time.  Don’t worry though, I already got you covered there!

 

Here is a video of the entire process.  Thanks to Mackraken for sharing the results of his hoarding nature!

Art


9. December 2015

 

Blend4Web have launched a Christmas/New Year themed contest with a $1000 prize pool.  Full details follow:

Description

We are happy to announce the first Blend4Web contest - a competition in creating interactive scenes for the Web! The theme is: X-Mas and New Year! The days when static images, video and Flash were enough to fully visualize your ideas in Internet are long gone!

The new technology of three-dimensional graphics called WebGL adds a third dimension to the browser, allowing you to implement all your creative ideas. And with Blend4Web, creating this content becomes quick and easy.

Become a pioneer in a new genre! Create a stunning scene that will be experienced by millions of people!

The Prizes

 

First place:
500cash
+
30% off
SDK Pro

Second place:

300cash
+
20% off
SDK Pro

Third place:

200cash
+
10% off
SDK Pro


 

Contest Dates

  • Submit your entry by January 10, 2016;

  • All entries will be processed and the winner determined by January 12, 2016;

  • The winning entries will be published on the official contest page by January 13, 2016.

Contest Rules

  • The scene must correspond to the contest's theme;

  • Each step of the work process must be done by the contestant him/herself. You also can record project's history on the Forum;

  • Models used in a presentation must be unique, made specifically for this contest (no BlendSwap, etc.);

  • The work must be completed and submitted before the deadline;

  • Source files (.blend files, textures etc.) and application code (if any) must be published under CC BY 4.0 license.

Specifications

  • The work must be done using Blend4Web;

  • The result must be presented as HTML or zip archive;

  • The scene polygon limit is 50000 triangles;

  • Textures resolution must be a power of two, maximum 1024 px (for example 1024x1024, 128x512, 512x64). Exceptions are environment cubemaps: they must have an aspect ratio 3:2 and be a power of two vertically (for example, 1536x1024, 768x512);

  • The scene must be optimized - keep the balance between detailization and polygon count, quality and resolution of textures, use the possibility to pack BW textures into RGBA channels, combine several node materials into one using masks, use heavy effects wisely (such as SSAO).

 

Full contest details are available here.

GameDev News


1. December 2015

 

Blender4Web, a 3D engine that enables you to create web content directly in Blender, just released version 15.11.

 

From the release notes:

New Features
  • Initial support of WebGL 2.0 technology.

    New API features are automatically provided with compatible browser and hardware

  • New logic editor nodes:

    • Camera animation.

      The option to smoothly change camera’s position has been added to the Move Cameranode.

    • New: behavior animation.

      The Play Animation node can now add Behavior animation to an object.

    • New Stop Animation node

      Can be used to stop object’s animation

    • New Stop Sound node

      Can be used to stop a speaker’s sound playback

    • New Stop Timeline node

      Can be used to stop NLA animation

  • MSAA support

    This antialiasing algorithm is used in systems compatible with WebGL 2.0. For now, it allows highest image quality on the ULTRA settings by using 16x MSAA algorithm.

  • Viewer interface improvements.

    A Home button has been added. When pushed, it will open the basic scene specified in the application’s URL parameters, or, if there isn’t any, a placeholder scene with Blend4Web cubic logo will be opened.

    The Reset button has been moved to the right side of the application’s upper panel and will now reset not only internal but also URL parameters (such as loaded basic scene) of the Viewer.

    The Auto View Mode button used for automatic walkthrough of all scenes has been moved to the Tools & Debug panel.

  • High precision rendering performance measure mechanic.

    Using the WebGL extension EXT_disjoint_timer_query allows high precision timers to be created, which can be used to measure the performance of GPU operations. With the activation of the debug mode in the Viewer (‘’HUD Info`` option in the Tools & Debug panel), the time (in milliseconds) the GPU needs to render part of the scene (subscene) is shown in the last column of the debug information.

  • Web player improvements.

    Now, the cursor changes appearance while the camera is moving.

  • There are numerous additions and improvements in the documentation.

 

Additionally there were several changes and bug fixes announced.

GameDev News


GFS On YouTube

See More Tutorials on DevGa.me!

Month List