www.cgTantra.com - LEARN INSPIRE GROW
vivekshindevikramvrGlazyrinTransformers - Bumblebeedecember modelling winner Rigging Challenge Winner
LOGIN Not a member? Register Now
 
Programing for Pipeline - Susanta Dutta PDF Print E-mail

Susanta Dutta is working in graphical R&D team in Eurocom entertainment Ltd, a leading console game developer in Derby, UK. His role in company is developing and maintaining production pipeline, support for motion capture character set-up and tools for current gen and next generation game animation and environment teams. He has also worked with Maya entertainment ltd, Mumbai as animator and NetGuru, Kolkata as Technical Head. Susanta, as known as Dada among all this friends is one of the Founders of cgTantra.

His personal blog: www.santascript.blogspot.com

Susanta Dutta

Pipeline development in animation and video game industry is a classy and interesting term, but a little confusing. Like art doesn't  have one universal definition, production pipelines cant be defined in one particular way. No one can say “Look! I made the best production pipeline”. It changes according to project, demand, budget available, technology and available talent pool. Here we are not going to discuss about a perfect pipeline model. You have to design a basic pipeline suiting your production environment.

You will discover its strengths and weaknesses, when your team starts using it on different projects. Your team members will start giving you feedback according to what they need to work efficiently. Modular approach always helps you in improvisation process which is very important because every project comes with its specific expectations to the pipeline. This article is all about programming practices involved in pipeline development. Let’s start with some questions to initiate the discussion..

What is the scope for technical implementation?

Production tools: Which language and When?

Smart work or hard work?

It is possible to make a pipeline without using programming and instead choosing off-the-shelf software or plugins. But a busy production house cant  solely depend on third party vendors . They often need customized in-house solutions for greater control and flexibility. Besides abstract, administrative and budgetary dissection, in-depth technical analysis of any pipeline model is extremely important. In such cases programming can  make the process flow in a much cleaner, practical and cost effective way.

Always use source control like source safe or TortoiseSVN and do proper documentation for pipeline programming itself. Instead of using different coding habits, try to follow standard coding rules, so that in future others can understand it easily. This leads to better maintenance and bug fixing process. Further handy practices are Class Diagram, profiling and unit testing. One point we have to keep in mind is that at any point of time any member of the pipeline development team can be absent or leave company. So it is better to be always prepared  for easy hand over of responsibility.

Developing tools for production software packages is one of the important aspects of pipeline development. Tool development is not actually pipeline development as a whole. But it provides the strings to converse between different pipeline nodes. Let’s take  3dsMax for example to enlighten it. MaxScript is the native scripting language for 3dsMax. Through it you can develop batch tools or utility tools. But like other scripting languages it also has some limitations. If you want to make a high performance plug-in then you have to use 3dsMax SDK or software development kit, and for that we need a fair understanding of object oriented programming through C++ and windows platform SDK. Sounds confusing? ...Let me explain.
Suppose we have to export thousands of assets for game production. Our game programmers are using .x file format or collada format. To export them manually one by one is very tedious task. This is where production process is facing so many problems, especially when the next production milestone is very near.
Max Script - Programing for Pipeline

So as a pipeline developer you mark the bottle neck and develop a custom batch tool. Which simply automates the process. For every max file in the asset folder, instead of loading them one by one in 3dsMax and then exporting them using DirectX exporter, you can export all using MaxScript very easily.

If it is a character asset then we have to write a much more sophisticated batch tool.  You can develop a lot of batch process tools for character rigging or modeling tools using Max Script. Another example can be the default “Render to Texture” tool inside 3dsMax, which has been written using MaxScript. But for performance reasons, any particular exporter or render engine, that these tools are using under hood has been developed using C++ and Max SDK. If we only use max script to develop the exporter it will be very slow compared to C++ one. For some kind of functionality we just can’t use max script at all like writing own controller or render engine. Like that, to write a production useable modifier, procedural object, Material or a texture plugin we normally use C++. MaxScript is used to control them in runtime. There are some plugin types that can be scripted, but as I said, they are very slow compared to plugins developed with C++ one. So why not make everything through C++ and MaxSDK? Development using MaxSDK and C++ is much more complicated and time consuming process than writing MaxScript tool. MaxScript is another layer over 3dsMax SDK. Tools developed through maxscript are easy to maintain and most of them are version independent because of there ASCII nature. Plugins developed using C++ and MaxSDK are binary, and they need specific version of SDK and compiler for that specific 3DsMax version. So you have to understand, when you should use MaxScript and when C++.

Max Script - Programing for Pipeline

It is also be possible to extend the default MaxScript function library. We can develop a fast performance function library using Max SDK & C++ and expose them to maxscript using dlx plugin or through function publishing interface. Inside MaxSDK as well there are some class libraries and header files available to ease the job. Like for exporter development, developers normally use 3ds Max Data Exchange Interface (IGame) for data extraction instead of using original 3dsMax SDK.

Another interesting area of tool development is using dot net library and C# or other dot net compliant languages. In case of 64 bit windows production environment, to use some common windows component (like list view or tree view), Dot net is the only choice. But from here another world opens. Managed or Safe Programming. After the launch of  XNA by Microsoft , gaming world is also taking it seriously, simply because, you can deploy a game directly on XBOX 360 developed using XNA framework and C#. We can view the game assets  directly  inside the game engine which is hosted on 3DsMax viewport. It is quite promising…because now artist not have to boot another middleware to see their game asset in game. C# is very elegant the language and has all power of object oriented programming like C++. Using visual studio C# as programming IDE, now, you can develop and debug windows form application, command line tools, system tools, class library, server plugin etc. much quicker than before. If render farm and editing & compositing department are using Linux operating system, still using MONO you can code with C# for Linux. Dotnet supports robust server-client architecture. From 3dsMax 9.0 MaxScript is also now supporting dot net class library. So no more registration problem of COM objects. You can use max script as glue between 3dsMAXSDK & C++ with custom Dotnet class library. 3dsMax plugin now can contain managed and native code both. So, using managed C++ or C++.net, you can directly use 3dsmaxSDK with Dotnet. Again it is all about what you want to do. Using ADO dotnet we can now give much more support for database management.

We can integrate the project management system inside the content creation package like 3dsMax which results a unified production model.

OLE automation has its own importance in tool development. Like you want to make a tool, which can render an image using 3dSMax, and then it will automatically apply series of filters or do other post processing inside Photoshop. Using OLE automation you can easily do that. From Photoshop CS2 now we also have scripting environment beside Photoshop SDK. It extends the possibility of automated pipeline what we can’t achieve by just using Photoshop action.

Max Script - Programing for Pipeline
Asset management is another important subject in pipeline development. Every asset management system has command line facility. Some of them are already integrated inside the content creation software itself. Like Autodesk vault is integrated inside 3dsMax and also has max script exposure. So you can use that functionality in your tool to do auto check out or check in for assets. Command line instructions also can work in the same way. In case of command line, either we can use DOS bat file or custom command line utility developed using C++ or C#.
Max Script - Programing for Pipeline
Here we have used 3dsMax or Photoshop just as an example but almost all content creation software comes with similar kind of programming scope. Like Maya with MEL or Blender with Python. Some of them are open source, while some provide SDK. After Softimage XSI 6.0 you can also use C# . Besides that  there is C++ based SDK and scripting environment. Using them effectively you can make your pipeline more intuitive and artist friendly. It is our job as pipeline developers to make the artist’s life a  bit easier so they can concentrate more on the creative side and enjoy their role. After all the CG industry doesn't want just hard working people. It wants  smart, creative and hard working people to build an efficient production environment. Isn’t it?
Max Script - Programing for Pipeline
 
< Prev   Next >
© 2010 CGTantra.com. cgT Toolbar .RSS
test