Virtools SDK

There is a little trick one can find in a sample of the SDK in regards to parameter indices inside BBs. Ever had the case where you were writing a BB and suddenly you wanted to insert i.e a InputParameter? If your code is more complex you maybe just add it at the end to prevent changing all the Input-Parameter queries.

If you use ENUMs instead, you can easily reorder and insert new paramters. For example 

// Input Params

// Settings/Local Params


// example usage
CKCharacter* charc = (CKCharacter*) beh->GetInputParameterObject(PARAM_CHARACTER);
(etc  …)

Any reordering is now not braking the code anymore. Inserting now only needs changes in two places: enums and proto-definition.
Very nice idea! Thanks to whoever it had.

In case you want your exporter to be able to assign attributes to exported entities based on some custom data in your DCC tool, then beware of the SetAttribute method of the Ge2Virtools. In case that you assign an attribute that has no parameter, the Ge2Virtools lib will create you an attribute with a parameter of a type from the font system anyways.

I send that issue to Virtools support over a week ago, but got no answer. I guess they are in holdiays or again they don't have enough people to handle all the input and wait time is 2 weeks (we had that quite often in the past).

So what you got to do is, reimplement the SetAttribute method and check if the type string is empty. If so, use

att = am->RegisterNewAttributeType(attributeName, CKGUID(0,0)); 

Well, a little update about my attempt to make it more like we need it. I extended the maxscripted part so a gfx artist can now easily assign Attributes values – predefined one or custom ones. This, in combination with the new Stencil Shadow Caster script, allows a gfx artist to have instant previews of stencil shadows. It's nice 😀

Now, regarding the modding of the exporter with the fewest lines possible to make it export multiple animations from one single 3ds max file: after several e-mails exchanged with support, we came back to my first idea I had when contacting support: not possible without the sources of the Ge2Virtools lib. Not possible means: not possible with only few places where to change the code. You can do that, but it takes much more time and effort. This also means, each time there is a new 3ds max exporter (like the one they just released with a few bug fixes), you need to be very careful and look what has been changed etc. 😐

I am still very interested in having such a workflow, especially if I think of all the characters what are in the pipeline. Hmmm …

There are several heavy shortcoming with the 3ds max to Virtools exporter. We all now about those: no instant feedback for artists, no complete material control, no shader control etc. There has been no major extension to it – maybe since 3ds max 5 where support for baked material (via shell material) and the lightmap material was added.

Last year some had the joy so see and test what "Laf" from Virtools Canada was working on: a complete overhaul of the exporter. If there wouldn't be a major bug regarding UV export under certain conditions we maybe would use it for production. But no updates has been available for this unoffical exporter for at least 6 onth and when I asked Virtools around Christmas when they will release it to public, the answer was: as fast as possible, but they don't know when.

Now we have the artists – even with maxscripts i wrote for checking common errors – a Virtools developer still can pass a whole day "debugging" files from the artists. Why? Well imagine your compiler just breaks the process with a syntax error without line indication and without any hint. I mean how often did you forget to put a ; to signalize the end of a command?! It just happens from time to time. In addition to that design and art needs high interactivity. Quick feedback is important for that parameters and such can be tweaked frequently. Design is a process !!!

Now we have the 3ds max exporter sources in the Virtools SDK. There were some bug fixes so I requested a newer version. Took some time as support is overwhelmed by the high token usage recently. After we got the sources, I compiled with the USESCRIPTS flag which enables some maxscript support and a different export gui (mxs scripted). It's a nice thing that has been there for years but never been included in public builds. I think "CGr" was the first user who enabled the stuff and make it work.

The state it is, it's .ms scripts only. Nothing that can be added nicely to the 3ds max GUI. So I put the export GUI into a macroscript. This broke the compability with the other, extenal, scripts and forced me to refactor the code slightly. It seems to be solid now and opens the door to more macros. Something that is on my TODO list is to use persitent vars instead this stupid config file for the settings. It makes much more sense to store the export params per maxfile instead having one global config that only remembers the last settings.

So what would be cool to have with this new preview function we got? What if finally the artist could test his character animations within a few clicks? Good idea! The problem is the exporter only exports the current time range as one – and only one – animation. S my first test was to see if i could mod the exporter in a way to export multiple animations from one 3ds max scene.

After studying a bit the sources I started coding. The idea is not new: use notetracks to tag animation ranges. I wanted to have the notetrack on the WORLD node in the trackview. I tried hard but I haven't found how to acces it yet. I posted on sparcs, will see if somebody answers there. I'll let you now. For now I have it under the "Global Params" track.

So the exporter "hack" is quite simple: for every range export only the animations, then export as usual. So far so goog – I get a couple of animations. Named correctly but the result is totally incorrect. So i dived back into studying the exporter code and when I came to the spot trying to understand where the connection between a bodypart animation and the global (character) animation is, I got stopped. The exporter uses th generic utility class defined in Ge2Virtoos.h. I haven't checked in detail yet but it looks like there are NO sources from this in the SDK. I blocked ! The Ge2Virtools seems to have / have only 1 (!) global animation. It seems to block the door for stuff I am trying to do.

Do I have to conact support and ask for the Ge2Virtools source? Will I get it? Or shall I ask for modifications so I can continue to improve our pipline instead of waiting for Virtools doing so? Or shall I try something else? Yes I have another idea but I need to understand a bit better the relation of object animations and character animations first.

I keep you up-to-date and hopefully also with some screenshots.