redmotion: October 2009

31 October 2009

Unity is now FREE

I've been looking into Unity recently and was seriously considering purchasing the Indie version, primarily because of its ability to run in a browser, but also because projects can be deployed easily to PC, Mac, Wii and even i-phone. And now with the release of version 2.6, it's been announced that the Indie version is now FREE to use. (The indie version was a cheaper stripped down version with a commercial license.)

Unity also features an excellent asset pipeline integration. While many engines make getting art assets into them a real pain, Unity works well. Assets are exported to project folders and unity converts them for you. Updating everything so you can focus on scripting, art and level design. It even has a well integrated physics engine and level/terrain editor. Even the documentation is pretty good.

With this announcement, its certainly the best low budget 3d game engine on the market and definitely worth a look.

24 October 2009

Alternative to bevel

I say don't use the bevel. At all. Instead:

1. Press plus (numpad "+") to work in subdivision mode from the get go. (Times 2 if your computer can cope with it).

2. For the working viewport, go to the Camera Visibility (shift + S) > Attributes tab and turn on Polymesh hulls

3. Goto shaded mode.


4. Use split edge to create tighter edges on the subdivided mesh.

5. What defines the sharpness of the sub-d models edge is the distance the second edge or "inner" edge is to outer edge. So in the image above you can see that in the lower viewport, the left side has a second/inner edge causing a tighter curve while the right side is much softer.

6. With this technique using inset on an single polygon can have a similar result as using bevel. However, I recommend just using split edge and subdivide edges evenly.

Softimage 2010 SP1: dxfimporter and sunposition updated

Get the v2010 SP1 compiles of the:

DXFimporter plugins here

Sunposition plugins here

10 October 2009

RTCompound: Architectural Framebuffers Compound




This is a rendertree compound that splits up the Architectural Shader over ALL the framebuffer channels. Something similar has been done but I thought I'd try it myself anyway.

What I've also done is created a couple of simple scripts that set up ALL the required channels so that all you need to do is plug in the RM_Architectural Splitter and hook it up like a normal mia_architecture node and your ready to render out a pass on floating point or non-floating point channels.

Lastly, I've left the names of the mia parameters as they are so its easier to cross reference with the param names in Mental Images Architectural Shaders manual.

Download here.


04 October 2009

Convex collision mesh creation with Stanhull/Softimage

I use a number of scripts for speeding up the creation of collision boxes for Valves SMD exporter in Softimage. The process I follow is laid out below:

First you will need to download this file. Its called Stanhull. It's a simple program that spits out an obj file containing a convex mesh based on an input mesh (inside an .obj file). Extract and place in a folder of your choice. If you don't want to edit the script below use the path: C:\3d\Stanhull\ 

1. Create your physbox model components. I do this by breaking up the original model into roughly convex forms. You are limited to the number of these by default (to 16 I think) but you can overide the limit with a line in your .qc file. The $maxconvexpieces QC command can increase this.

2. Select the new convex model pieces and run the convex script:
    'Objdir = the directory you want the exported Obj to go to (change if you wish)
        Objdir = "C:\3d\Stanhull\"
        'StanhullDir = the directory you have put stanhull.exe in (change if you wish)
        StanhullDir = "C:\3d\Stanhull\"
        'NOTE: file is always created in the Softimage\version xx\Application\bin dir and always called hull.obj
        fileOutLoc = Application.InstallationPath( siFactoryPath ) & "\Application\bin\hull.obj"
      
        set list = GetValue( "SelectionList" )
        if list.count = 0 then
               MsgBox "Please select at least one polymesh object first!!"
               else
               for each item in list
                  logmessage item.name
                  name = item.name
                  if item.type = "polymsh" then
                      'select objects one by one and export
                     SelectObj name, , True
                     getObjname = Objdir & "convert.obj"
                     ObjExport getObjname, , , , , , , , , , 0, False, , , False
                     'set up s.ystem command to run Stanhull.exe
                     cmd = StanhullDir & "StanHull " & getObjname & " -t"   
                     cmdResult = s.ystem( cmd )
                     set inObj = ObjImport( fileOutLoc, 1, 0, True, True, False, True )
                     'select new object and set up geometry approximation as needed for .phy SMDs
                     SelectObj inObj, , True
                     MakeLocal inObj & ".geomapprox", siDefaultPropagation
                     SetValue inObj & ".geomapprox.gapproxmoad", False
                     CreateProjection , siTxtCubic, siTxtDefaultCubic, , "Texture_Projection"
                     FreezeModeling
                     end if
                 next
            end if


3. Now with the new convex imported back in, select them and remove automatic discontinuity from them all with the following script:
dim name
set list = GetValue( "SelectionList" )
if list.count = 0 then
   MsgBox "Please select at least one polymesh object first!!"
   else
'start rendermap make routine - depending on scene size and object complexity this could take a while... :)
   for each item in list
      logmessage item.name
      name = item.name
      if item.type = "polymsh" then
         SelectObj name, , True
         MakeLocal ".geomapprox", siDefaultPropagation
         SetValue ".geomapprox.gapproxmoad", False
         end if
      next
end if

4. Lastly, I apply cubic UVs to all of the physics box objects by selecting them and running this script (below). Once frozen, they are ready for exporting as SMD files for compiling.
dim name
set list = GetValue( "SelectionList" )
if list.count = 0 then
   MsgBox "Please select at least one polymesh object first!!"
else
'start rendermap make routine - depending on scene size and object complexity this could take a while... :)
   for each item in list
      logmessage item.name
      name = item.name
      if item.type = "polymsh" then
         SelectObj name, , True
         CreateProjection , siTxtCubic, siTxtDefaultCubic, , "Texture_Projection"
         end if
      next
end if

freeze ALL. (You may need to add an image to the material).

03 October 2009

New Ultimapper Options in Softimage 2010


Softimage 2010 has new Ultimapper options: now supporting the creation of bent normal maps, plus the full arrange of Ambient Occlusion shader options.

I did a quick test to see the differences between the available settings. The above image shows the resultant maps from the 4 combinations of options and on the image below how they look applied to the low resolution object in Open GL preview.

 

In this case, bent normals seem a lot smoother while the binormals map seems to result in a closer approximation from hi to low res sources in this case. The drawback with bent normals is they render twice as slow. However, I'm pretty sure that there is a case for each of these solutions out there.