The MadMan is back.

 

More Madness

 

When I read my last post I must say I really must have had a boost of optimism and god-like energy over me back then, eh?

Books to be written, 3D art to be made, Allegorithmic products to review, Python programming, Blenders Game Engine, Modo stuff.. Phew!

Well. I have actually done something. I won’t present anything here today, but some things stayed and some things did not.

I’m still into writing the book series, that’s one. (But it will be a bit postponed)

What I’m still into is off course Blender! It has gotten a LOT of updates the last seven months.
I’m still willing to create a tutorial series on the BGE (Blender Game Engine) which we all know is programmed with Python. Actually A LOT of Blender is programmed with Python now. It’s just the low level bits and pieces left in hard core C / C++ (?asm?).

I was planning on starting on this in a couple of weeks and off course post it on this blog, if it is any interest for it.

As some of you know, I’m a software developer, mainly using C# and C++, but I’ve also been using some Python through the years.

Lately I’ve been keen on learning to program GAMES. What kind of games? No idea. Just games. Fun programs that can include gaming elements, like “gamification” or something.

So I’ve downloaded the latest Unreal 4 Engine, but that was totally overkill for me. I need to know the basics first.

Even Unity seems a bit cryptic to me sometimes. But that’s mostly because of the horrific implementation of C# / .Net they’ve chosen. Goes against all good usage patterns.

So now I’m going to test out Blenders Game Engine, to see if I can make any sense of that.

Along the way will be some tutorials and some Python code for those interested.

 

Also I’ll look into some rendering with Cycles, Thea Render and LuxRender…

 

Until next time…

Blender Logo

 

 

 

 

 

Making the move, “From Commercial 3D Software to Blender” Part 1

So. I have used software like Maya, Lightwave and Modo for some time now. The reason I could do this is because I have gotten educational licenses for the software. Well, I actually have a commercial license for Modo but anyway…
If I want the latest editions of these packages, I would have to upgrade my educational licenses to commercial, and that is anything but cheap!
My economy these days suck big time, so I soon came to the conclusion that this would be impossible.
So what are my options? Blender!
I have tried Blender many times before, each time there is a new version I download it and goof around in the the viewport, but every time I have been put off by the non-standard way of doing things compared to my other software.

The thing is that Blender IS a bit different from everything else, but that is not necessarily a bad thing.
It just takes some getting used to. I have never before actually tried to LEARN Blender, but this time I have seriously committed myself into learning this software.
I will not lie, it has not been all easy, and I still am in the very early stages of “Mastering Blender”, but for each day I learn something new, and discover the cool things that is different, but good.
So, my goal with this series of posts will be to share my experiences with moving from commercial software packages like Maya, Lightwave and Modo to Blender.
I’ll compare features and methods of doing things along the way as I discover this myself.

There are many good reasons for using Blender. These are my reasons:

  • Cost (this one is obvious)
  • In the latest version Blender has gotten bMesh and bSurfaces
  • The integration of Bullet Physics (Same as in Lightwave, Modo, Maya 2013)
  • A very active and vibrant user community
  • Always get the latest innovations for Free (as in beer)
  • Deep support for scripting with Python via the API
  • A new rendering engine with a superb node based shader system (Cycles)
  • Great modeler (once you get used to it)
  • Some of the best UV tools available both commercially and free

So this is a pretty impressive list if you ask me.

I’ll continue sharing my experiences with this project, hopefully some of you will see that there is actually an alternative to Autodesk!

I don’t say that Blender is the best tool for everything, but neither is any of the commercial packages. All has its flaws.
But if you ever thought of switching to Blender, now is a good time to do so! New tools and features makes Blender a serious competitor in the market of professional tools for creating Digital Art.

Happy Blending!

First post about Python scripting in Maya

This is the first post in a planned series of posts about Python scripting in
Autodesk Maya. Don’t expect this to turn you into a pro or something, this is
something I do to learn the material better myself.
I don’t know about your experience with Python, but this is not meant to be
a tutorial in the python language. I’ve used Python for some time now, and
I hope you are familiar with the language to get something out of the content.
You can probably do basic stuff without knowing the ins and outs of Python,
but to do something creative you must have some knowledge about the
different datatypes and constructs that defines Python.
One thing that also is important is that you understand the basics of how MEL
works, as most of the same applies to Python for Maya.
Well, let’s get started!

Getting access to Python in Maya

You can use Python either as a single command launcher from the command line,
or as a full scripting environment in the script editor, I’ll mention both in
sequence.
To start using Python in Maya you have to click the command line where it says
“MEL”. This will change into “Python”, and for one-shot commands this is all
you need.

To access Python through the script editor, click the script editor button
also on the command line, next to the output field.
There you’ll see to tabs, MEL and Python. Off course you should choose Python,
but you already knew that!
In the script editor I also choose “Command” -> “Command Completion” and
“Command” -> “Object Path Completion”.
This makes experimenting with Python a lot easier, as you can try out
different functions without knowing the names.

One thing you should be able to do is to transform MEL commands into Python,
so that you can download existing scripts, modify them to your needs and run
them in Python. Most of the scripts out there are still MEL, but py scripts
start to show up here and there.
I’ve always wanted to learn MEL, but it didn’t really make sense to me, so I
find the Python logic easier to grasp. Besides I use it for other tasks, so
I don’t have to learn a whole new language and tools.

Let’s make a polygon cube!
Let’s see, if I watch my script editor output while creating a cube I see that
the MEL needed for this is:

polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;

Well, it’s actually not that complicated but this is all the default arguments
used by MEL in the output. The same cube will appear by just typing:

polyCube

Try that in the command line by changing back to MEL and press enter. Whee!
But hey! This is not Python… True. Lets try to switch back to Python
and run:

polyCube()

as all function calls ends with parentheses.
This does not work, because we have to import the namespace that the Maya
commands live in. We can do that by:

from maya.cmds import *

This makes a bunch of frequently used commands accessible to Python.
Now we can try again with:

polyCube()

or, for a change, let’s say that we wanted to change the defaults. Look back
to the MEL command used to create the polyCube. -w 1 -h 1 -d 1 etc.
All these define width, height, depth, sizeX, sizeY, sizeZ and so on.
To access these preferences in python, we have to write it as arguments
with a value in the construction call:

polyCube(w=2,h=3,d=4)

This creates a different cube with changed parameters.

Well, this wasn’t much but I’ll post more soon!
Try creating different shapes with different attributes to get a feel for how
it works.

Have a nice one!

Scripting Maya with Python

This is the introduction to a series of small tutorials I’m going to make while learning to use Python in Maya.

I always learn stuff better if I try to teach what I learn to others while doing it. Maybe someone out there will find use for my experiences!
To start with I want to explain why I want to learn to use Python with Maya.
For some years now, I’ve used both Python and Maya occasionally, just as a hobby.
I am by no means an advanced user of Maya, but I find the software incredibly fascinating.
You can do so much cool stuff with its modules, like the nCloth module, the dynamics and fluids modules, hair and fur, Maya Muscle,
I could go on and on. Incredibly complex software. It’s also very demanding and difficult to learn properly.

People spend years of working with it without learning everything. You just can’t expect to master all aspects of the software, but
that’s not my goal either.
I like to model objects, set up the shaders and render settings and watch the results. Animation is also something that Maya does maybe best in the industry, so a bit of that is also something I like to spend time doing.
When it comes to Python, I learned some of it while working as a network administrator, using it for system scripting mostly.
I’ve never felt the need for extending Maya with anything, because I have plenty to learn before ever needing to customize anything myself.

So basically this project with learning how to use Python to script Maya is purely for entertainment.
But, who knows? Maybe I find it so interesting that I can start writing plugins. Or maybe I come across a situation where I miss a certain modeling tool or want to change how the defaults are working, then it would be nice to
roll my own little script instead of relying on others work on places like creativecrash.com.

Anyway, if you’re new to the world of scripting Maya with Python, the upcoming posts to this blog might get you in the right direction of learning it!

So, until next time, sharpen your senses.

More Lightwave praise… I’m not kidding, this is going to be Good!

I’ve ben praising Newtek and their 3D Suite “Lightwave” on a couple of occasions. This time I want to point the ones in doubt onto a track of future optimism and, hopefully, a shitload of fun.

The upcoming Lightwave Core, scheduled for Q4 2010, will incorporate seamless connectivity against the most promising standards out there, and will eventually include support for components mentioned in this text.

I’ve received questions by artists, or say, budding artists, that is in “serious” doubt about the big changes between the current (open beta) 9.6.1 64-bits Mac/Win release that uses the separation between the Modeler application (modeling) and Layout (everything else). Core will by default merge the different tasks into one application by dividing the UI into “workspaces”, without the need of “The Hub” for synchronizing data layers and plenty of other stuff. No more F12 for switching apps.

BUT, you can if you insist use the same workflow as in LW 9.x, this is a matter of preference settings. So no worries, your training won’t be “outdated” in a year.

The following workspaces will be available:

• Model

• Surface

• Setup

• Animate

• Render

• Composite

In addition to the above, the following items are also presented as aspects of the Animate workspace:

• Creation Tools

• Deformation (Subset)

• Transforms

• Dynamics (Collision Detection, Etc.)

• Constraints

• Scripting

Rendering:

LightWave 3D with CORE technology offers two different flavors of rendering: Viewport Preview Rendering (VPR) and CORE rendering.

VPR

The CORE viewport rendering engine allows for direct interaction with elements in the rendering, from the rendered view. Any viewport can switch to VPR, and even portions of viewports can be specified for viewport rendering.

VPR is essentially the CORE rendering engine operating in an iterative, interactive fashion. Whatever CORE can render, VPR can also render. The results will be virtually identical, with some exceptions, as VPR does prioritize to deliver on speed and interactivity.

As VPR is a complete version of the CORE rendering engine, not a subset, it can render global illumination interactively, however, with less interactivity due to the amount of performance required to produce GI renderings. Fortunately, the CORE rendering engine is fully multithreaded, another benefit leveraged by VPR.

The more processors you have available to you, the faster VPR will render.

Now, to the juicy stuff:

The Composite workspace in CORE is capable of image manipulation and compositing via a selection of internal tools, as well as available third-party plug-ins that support the OpenFX standard (OFX). OFX is an open source plug-in standard for developing 2D digital visual effects.

The Foundry (http://www.thefoundry.co.uk/), Re:Vision Effects (http://revisionfx.com/) and GenArts (http://www.genarts.com/product/sapphire/ofx/fxlist) and several other prolific plug-in vendors offer a variety of image processing and manipulation plug-ins in OFX format.

Core uses the industry standard file format Collada for scenes, as it handles cross pipelines, and the Collada format offers all the structures a combined application needs.

The optional Modifier Stack (Lightwave finally has memory!)

The CORE modifier stack is an attribute of each mesh item. Every CORE mesh item has a modifier stack behind it. The modifier stack is a living record of all of the geometric operations applied to a specific object. Operators in the stack can be rearranged (doing so can produce notably different results), enabled, frozen (so as to be un-editable or “flattened”), muted and deleted on command.

Scripting:
Every expression in Core are Python based.

Industry-standard Python forms the basis of the scripting in CORE (currently version 2.6). The Python implementation is layered into CORE via SWIG. SWIG is a language-interfacing layer that allows the CORE SDK to be accessed through languages other than the factory Python language that ships with CORE.

Now to the really Juicy stuff:

CORE integrates the popular Bullet Physics Library (http://bulletphysics.org/wordpress/)

into the CORE unified dynamics solver. Bullet supports both rigid body and soft body collisions. Bullet plans to offer OpenCL support in the future, which fits with the development of CORE.

The Bullet Physics Library offers the following benefits:

Open source C++ code under Zlib license and free for any commercial use on all platforms including PLAYSTATION 3, XBox 360, Wii, PC, Linux, Mac OSX and iPhone.

• Discrete and continuous collision detection, including ray and convex sweep test. Collision shapes include concave and convex meshes and all basic primitives.

• Fast and stable rigid body dynamics constraint solver, vehicle dynamics, character controller and slider, hinge, generic six degrees of freedom and cone-twist constraint for rag dolls.

• Soft Body dynamics for cloth, rope and deformable volumes with two-way interaction with rigid bodies, including constraint support.

In CORE, you can use dynamics for simulation, modeling, or interaction with scene items. Animation created in CORE can be exported into LightWave Layout (and other applications) via the MDD file format.

Modeling with dynamics example: Consider an alley scene with crates. You can choose to place the crates (and other debris) by hand, or you can choose to use the dynamics tools to help streamline the process.

TRUE MULTI PLATFORM SUPPORT

CORE is written in C++, and designed as an object-oriented application. CORE uses several different technologies and libraries to deliver state-of-the-art performance. For the user interface, CORE uses the Qt libraries from Nokia. The Qt environment is fast becoming a standard throughout the software development industry. It is available on all platforms, allowing for a single codebase development process, which is very important when you have more than one host operating system to support. By using Qt, Newtek can offer LightWave CORE for Linux as well as Windows X and Mac OS.

Lightwave is capable of every stage of production, from modeling to physics and animation. It’s priced at a fragment of other products that can deliver the same feature set. This makes it a perfect mach for wallets, individuals and small to medium studios.

Did I mention the 999 free network render nodes?

Need I need to say more?

Go get it!