HOLY CRAP! MOAI isn’t dead! In fact, they just released v1.5

27. March 2014

 

Wow, I gotta say this announcement pretty much broadsided me.  I wrote Moai off for dead, which was a huge shame, as I did a tutorial series on the subject, and frankly found MOAI to be some of the cleanest C++ code I had ever read.  So to hear of a new release certainly makes me happy.

image

So then, what’s new?

 

Feature merge from Zipline:

  • Massive rework of the garbage collection system to simplify object tracking
  • Reworking of the AKU Modules API
  • New SDL host to complement the GLUT host
  • A flag to MOAIAction to disable auto-stop on no children

A New Build System:

  • The CMake build system that was in place for the linux and blackberry hosts was extened to include all hosts
  • Luajit support was added to all platforms (via cmake scripts)
  • create-project-* scripts were created that allows you to generate vs2008->vs2013 and xcode project files.
  • Changes to a project can be recorded once in the relevant cmake script and all platforms should work instead of maintaining 6+ build configs
  • Plugin support was added for installing modules which are outside the moai sdk (other repos) [More]
  • Custom host support was added for compiling a host outside of the repo [More]
  • Support for compiling with Ming-w64 for a completely open source experience on Windows (no more vcruntime to distribute)

Additional Features:

  • Vector Pathfinding (MOAIVecPathGraph)
  • Box2D Closest Raycast Exposure
  • Twitter support in android
  • MOAIShader was enhanced with the 4x4 matrix and given access to UNIFORM_WORLD_VIEW
  • A faster and smoother android host with working keyboard support.
  • MOAISafariIOS is now MOAIBrowserIOS and MOAIBrowserAndroid added
  • Visibility can now be inherited!
  • Google Play Services
  • Updated Tapjoy and Vungle
  • MOAISim showCursor and hideCursor support
  • Documentation improvements
  • Chartboost for IOS and android
  • You can now EnqueueJoystickEvent from the host.
  • New HTML/JS host based on emscripten

Fixes:

  • Android logging support repaired
  • VFS works correctly on all platforms
  • A heap of lua stack overflows
  • Fixes to JSON parser and encoder
  • Textbox string bounds calculations fixed
  • PVR support working now

 

Certainly some nice new features in there, and hopefully this new release will breath renewed life into this project that frankly always deserved a better fate.

 

You can access the MOAI source code here.

You can read a more complete release notes here.

News, Programming ,




Building a 3D Mech model: Part 2 Getting a leg up

27. March 2014

 

Ongoing documentation of creating a 3D mech asset.  Previously we ended with the torso and upper leg, like so:

 

image

 

Since then, I’ve rotated the upper leg back, created a foot and lower leg:

imageimage

 

Current face count is at 527, but there is a hell of a lot of optimizing that could occur here.

 

There are a couple ugly areas too, that I intend to address later.  Not to much sense worrying about the ugly bits until you are cleaning things up.  One area of ugliness is the union between the foot and lower leg.  I modeled the foot first then extruded the leg up from it.  I then needed to connect it to the upper leg, which had a different number of edges.

 

I could have simply added an equal number of edge loops, but that seems like over kill, so instead I’ve created a problem to be solved later.

 

image

As you can see, I have about 5 faces blunting into a single face (top arrow ), as well as some triangle junction points.  Getting rid of the tri’s should be simple, but the lower leg presents a bit more of a challenge.  Reality is, I am using far more polygons than I really need to be, so I will probably solve things by reduction, not addition.

Art ,




Want to use LibGDX but hate Eclipse? Good news, with Gradle IntelliJ just became easier

26. March 2014

 

I am a big fan of LibGDX and a big hater of Eclipse.  This always put me in a bit of an awkward situation, as in order to use LibGDX you basically had to use Eclipse, at least if you wanted cross platform support.  You could get IntelliJ to work, but it required a heck of a lot of jumping through hoops.  The reason Eclipse was basically forced upon you is because Google tied it’s tools pretty heavily to the Eclipse platform.  So if you want to use GWT ( for HTML target ) or Android, Eclipse was by far the easiest path.  Fortunately LibGDX recently announced they moved their build system to Gradle. 

 

Now let’s take a look at how you create and execute a LibGDX project in Eclipse.  First and foremost, grab a new release of LibGDX.

 

Next we want to generate our project.  You need gdx-setup.jar, you can download it here or find it in the lightly release of LibGDX.  Simply double click the jar to run it.  You can also run it from the command line, but we will only use the GUI in this example.

 

image

 

It’s like a stripped down version of the old setup tool, enter the name, package and class name ( following Java naming rules ) and click generate.

 

Configuring Android

 

You need to have the Android SDK installed to continue.  I recommend installing the stand-alone version of the SDK instead of the ADT bundle ( which is Android SDK + Eclipse ).  You can download the Android SDK here.  The download can be a bit tricky to located, Scroll down and locate “DOWNLOAD FOR OTHER PLATFORMS”, then locate SDK Tools only and download the appropriate package:

 

image

 

Extract that archive somewhere. 

At this point ( I am not sure its required, but it’s a good idea ), set the environment variable ANDROID_HOME and point it to this folder.

 

Now open up this folder and located SDK Manager:

image

 

Run it.  Let it install/un-install whatever it wants to do to make sure you are current.

 

The next step is very important.  You need to install the build tools version that LibGDX expects.  Right now I believe that version is 19.0.3.  The Gradle build process will fail if these tools are not installed.

image

 

 

Configuring IntelliJ

 

Make sure you have version 13 or higher.  You can download it here.  Community edition is fine, in fact, not much of the paid version is of use to a game developer.  Download and install IntelliJ 13.x if you haven’t already.

 

Anyways, now that we have fired up IntelliJ, we have a bit of configuration to do before we continue.  We need to setup our JDK and Android SDK in IntelliJ.  If you haven’t already, install and configure the Java 7 JDK.

 

This part is going to be a bit awkward, but it should only happen the first time.

 

Run IntelliJ.

In the welcome dialog, select Import Project

image

 

Navigate to the directory you created your project in earlier and select build.gradle from the root directory:

image

 

Click OK.

In the next dialog, accept the defaults and click OK.

image

 

Gradle is now going to build your project… or at least try.

Gradle downloads all the required components, so this could take a while.   Or it should, but truth is, its going to explode in a horrible state of explosionness.  Look for an error like this;

image

 

Don’t worry over much, it’s just that IntelliJ doesn’t have a clue where your JDK and ADK are.  Let’s fix that now.

 

In the Project View (ALT + 1 if missing), right click the root project and select Open Module Settings:

image

 

In the resulting dialog select SDKs then click +.

image

 

Select JDK

image

 

Navigate to the location you installed your JDK.

 

Next click + again, and this time select Android SDK.  Select the Android SDK location and click OK.

This time you also have to pick the version:

image

 

Now there is a possibility you have a wrongly configured JDK at this point too:

image

If you have an entry other than the ones you created, select it and then hit the – button.

 

OK, SDK’s are now configured.

 

Now lets re-import the project.  Select File->Import Project and pick the .build file in the root of your project again.  When prompted:

image

Select “This Window”.

 

Now your project should load without errors.  You should never have to perform the above steps again, unless you change JDK or Android SDK versions.

 

Running the Desktop Project

 

You have a one time configuration to run each project type.  Let’s start with the Desktop project:

Select Run->Edit Configurations…

image

 

If an entry for Desktop doesn’t already exist, select the + icon.

image

 

Select Application:

image

 

Now configure the project like so.  Name it then select DesktopLauncher as the Main Class, the Android\assets folder for the working directory and desktop for the classpath value.

 

image

 

Once again, its very important when selecting the working directory, make sure to select the assets folder in the android project!

image

 

Now select Run->Run Desktop and voila:

image

 

Running the Android Project

 

Once again select Run->Edit Configurations.

If an Android project doesn’t exist, select the + icon and select Android Application.

image

 

In the configuration, name it, select Android for module and optionally pick USB Device under target device.  Unless of course you are crazy enough to actually use the horrific Android emulator that is!

image

 

Now select Run->Run Android to run on an Android device.  The application will be deployed to your device and you should see Logcat information in IntelliJ

 

image

 

Running the iOS Project

 

Ok… you need a Mac to do this part and I don’t currently have my Mac with me.  So… coming later.

 

 

Running the GWT ( HTML ) Project

 

If there is an area you are going to have trouble with, this is the one.  It’s somewhat normal though, I’ve had a lot of fights with GWT tooling thus far.

 

The project is the same Run->Edit Configurations:

This time select Gradle as the project type.

image

 

Now configure the following, set the Name, select the gradle project ( details below ), click Single Instance Only and task to superDev:

 

image

 

When setting the gradle project, be sure to select the project in the gwt folder.

image

 

Now click Run->Run HTML.

 

It will churn away for a few moments, then you should see:

image

 

Look for the URL in the results.  Open this in a browser to run your app.

 

In all honesty, this currently simply doesn’t work for me right now.  Currently I get:

image

 

Frankly I have had nothing but trouble with GWT and superDEV, so I really cant be bothered fixing this at the moment.  If I do come up with a solution, I will post it here.

 

EDIT

Ok, I have a solution to the GWT problems, and it was mostly me, but partially a lack of intuitiveness.

To see your application, once you run the project open a browser window and go to localhost:8080/gwt

Then you should see:

image

 

There you now have a working project running in IntelliJ now.  Much of that was one time, so at the end of the day, after the first time, setting up a new project in IntelliJ is just as fast as an Eclipse one.  YAY, no more Eclipse!

Programming ,




Building a 3D Mech model: The initial stages.

24. March 2014

 

I have the need of a fully rigged Mech model, for a couple of reasons, so I’ve started working on one.  Figured I would document the process as I go.  It’s somewhat of a background task, so don’t expect a whole lot of speed.  This isn’t a tutorial either, look here for that, just a documentation of my process.  Hopefully some of you find it worthwhile, while I am sure some of you will find it cringe worthy!

 

Here, are the humble beginnings:

image

 

One of the challenges all modelers face is where to start?  I had trouble deciding.  Generally if I stat with a limb, I struggle a bit with proportions going forward, so this time I decided to start with the torso and upper legs.  Of course details are going to be added as I carry on in the process.  Currently we are sitting at 390 faces.  Ultimately I want to be in around the 5,000 mark.  There are several easy points of optimization here.  The eagle eyed viewer may also spot my first mistake too.

 

image

 

I always try to work in quads only, but sometimes corners just turn into triangles like this.  Look what happens if we apply a couple sub-divisions around this corner:

 

image

 

It’s not the end of the world, but not as clean as I would have liked.  In this case though, it still leaves me with proper edge loops in both directions, so I am not to phased about it.

 

 

So, where you might ask, is the concept art?  This is a good point and generally I would sketch in a front and side view, like I did in the Blender tutorial.  That said, for reasons I can’t bring myself to understand, whenever I do this with pen and paper, I just end up ripping off existing designs.  So in this case, I’m just going to wing it, although when it comes to the cockpit area, I may have to reconsider.

Art




Quixel dDo 5.3 texturing tool free for commercial use

23. March 2014

 

This tidbit comes care of reddit.  Quixel dDO 5.3 can now be downloaded (that’s a direct link) and is free for commercial use.

Here are details of the release from Quixel:

Yes, we are now making dDo as we know it free. Not only that but we have also spent some love and care on improving features, stability and UI. This version will have limited support but will still be updated as per your needs.

We sincerely hope that you who own dDo will not feel let down that you paid for something that will now be free, but rest assured we will do our best to make it up to you with a free upgrade to the all new, arguably more bad-ass, DDO.

So what exactly is dDO?  Here is the official description:

DDO empowers artists with tools to make better textures. DynaMask unlocks extreme masking control over ultra-real wear & tear and shape based coloration. The 100% customizable Smart Materials empowers artists with the easiest PBR workflow to date. And Fusion lets you plug DDO right into any app.

 

Perhaps of more use is actually seeing dDo in action.

Just a bit of a heads-up... dDo works in Photoshop, and thus requires Photoshop. Without Photoshop dDo is of no use to you.

Art




Creating a game sprite: Texture mapping Part 5: External texture editing
Home > Art

Creating a game sprite: Texture mapping Part 5: External texture editing

11. September 2013

 

Now we are going to export our texture so we can edit it in an external image editor.

 

First in the image editor, make sure Mode is set to View.  ( We changed it to paint in the last section ).

 

In UV Window, Select Image-> Save As Image

image

 

Pick a filename and location and then click Save As Image:

image

 

Now we can export the UV layout to help us with the painting.

 

In 3D View, switch to edit mode and select All ( A ).

In the UV window select the UV menu, then Export UV Layout:

image

 

Once again, pick a directory and location for the saved image file.  I personally went with ReferenceImages5UVLayout.png.

 

Now load your exported texture file in your image editor of choice.  You have the option of registering a program that will be opened by Blender automatically if you prefer, then you can simply select Image->Edit Externally.  For now we will simply open it manually.

 

In this case I am going to use the GIMP as the editor.  The GIMP is a freely available 2D graphics package.

 

Here is our texture loaded in GIMP. 

image

 

Now let’s load the UV Layout.  In the GIMP select File->Open As Layers

image

 

Select the file you saved the UV layout to.  Now it should appear like so in GIMP:

image

 

Now we draw the additional texture details on our texture.  Just be certain you have the right layer selected when you edit:

 

image

 

Drawing textures is an art in and of itself that I can’t cover here.  Frankly, I am not very good at it either.  Now I add some graphical details to the image and end up with something like this:

 

Untitled 3 2 (6)

 

… yeah, I’m no artist!  Don’t worry though, in sprite sheet form it will look just fine.  Just make sure when you export the image from your image editor, the reference layer ( the wireframe ) isn’t visible.

 

Once you are done editing your texture, assuming you didn’t change the location or filename, in the UV/Image Editor window, simply select Image->Reload Image or press Alt + R.  If you did change the file name, instead select Image->Replace.  Keep in mind you also have to change the texture name in the Texture panel if you renamed it.

 

image

 

As a 3D model though, it could certainly use a bit of work.  It’s a matter of adding more details to the texture, as well as implementing normal maps to give it some depth, something we will hopefully talk about later.  You can also greatly improve rendering with various texturing modes ( specular, bump, etc ) which only will work within Blender.  ( Wont work when exported to a game engine ).  This is also something we will hopefully talk about in more detail later.  Texturing adds a hell of a lot to your models quality, so it’s certainly a skill you should take some time to develop ( unlike me! Smile )

 

image

 

 

Tips

Often you will find yourself working in the UV Window and wanting to figure out just what @#$@$#ing Polygons you are working on.  Fortunately there is an easy way to do this.  In the UV window, make sure you are in View ( as opposed to Paint ) mode.  Then click the Keep UV and edit mode mesh selection in sync icon:

image

 

Now you can select stuff in the UV window:

image

And in the 3D View, the corresponding items will be selected.

image

 

 

Another thing you might have noticed is how incredibly annoying the layout is to paint on.  The UVs are set how Blender thinks they fit best, not necisarrily how you think they should be arranged to paint on.  You can however move the UVs however you want.  Unfortunately every single time you Unwrap again, the UV layout changes you have made will be reset.

 

Say for example we want to paint our cockpit in it’s natural direction.  We could then move the cockpit UVs into a position that is more appropriate to painting ( using G(rab), R(otate) and S(cale) like normal 3D editing ).  Like I’ve done here by moving them to the right and rotating 90 degrees:

image

 

This will be a great deal easier to paint.  Unfortunately if we go to 3D View and choose Unwrap:

image

 

Well, that’s annoying!  Fortunately there is a solution.  If you want to have a custom UV layout, you need to “Pin” them in place.  Then when the model is Unwrapped again, Blender knows where to put it.

 

Select the outermost two vertices and press P to pin them in place.  The selected value will turn red(ish) when selected, like so:

image

 

Now the next time you Unwrap the texture, these UVs will be pinned in place.  Of course, you could just select and Pin all vertices in place, but you are greatly handicapping Blender’s ability to deal with UV map changes.  Keep in mind too that adding a Seam will automatically cause an Unwrap. 

 

Final tip.  Notice the ugly line across the tail of the plane?

image

What causes this?  It’s the texture seem.  Basically make sure the edges of your textures where you cut a seam have a matching seamless colouring on both sides, or you will end up with an ugly artefact like this.  A few seconds with a Blur brush would solve this problem.

 

The astute eyed may also notice that the text is mirrored on the mirrored half of the model:

image

 

This is a side effect of using the mirrored modifier.  You’ve got a few options here.  1 – apply the modifier, to form a single mesh and texture each side manually ( nah! ).  2- Switch to a symmetric number like 808  3- live with it.  I’ve chosen 3.

 

Next up we will look at animation.


Click here for the Next Part

 

Art , ,







blog comments powered by Disqus