Tech Artists Blog

A Blog for Technical Artists

On the Direction of TAO

I just thought I’d comment on the perception, and reality, of TAO’s 3ds Max-centric focus.  It will also point out where I’d like TAO to go in the near and not so near future.

No doubt about it, most people at TAO use Max.  This is because I use Max, and the other Admins use Max, and thus most of our core members use Max.  So whereas there is some crossover in the community, and we do have some fantastic Maya and XSI users, and we try to be a software-agnostic forum, there is a definite Max slant.  On the other hand, we have some excellent Python users, and after Max the Python and Python/Mel components are very integral.

This in itself isn’t a bad thing, but unfortunately it means many of the innovations at TAO- and we strive to be one of the most innovative and evolving places for CG artists- are Max-centric.  Our imminent Community Script Initiative, for example, is very MXS-centric.  This is unfortunate, because I really think Maya and XSI’s futures are much stronger than Max’s.  And I don’t want to be using Max at my next job either.   What I’d really like is someone on the Maya or XSI side who was a strong coder, but more importantly, had a killer itch to innovate and improve the community.

Unfortunately, these people are few, and are much more likely to do it their own way than assimilate.  And I don’t blame them, I’m probably one of them!  I didn’t join TAO, I helped start it, and in that way I’m no different.  But what I am really passionate about is innovating and improving the community.  And that is why I did it.  I needed to start somewhere to try to turn this trend around, if it is what I really wanted.

What this looks like on the outside, though, is a fancy agnostic website for my personal projects.  I can’t underestimate how much I want that perception to be changed; no, how I want that reality to be changed.  And this is what brings me to the future direction of TAO and where I’d like to see it and the community headed.  And unfortunately, to tie in with the Max-centric points above, this will happen on the Max side of things.  What I’d like is to find a soulmate to deal with the Maya/XSI sides; perhaps, if these dreams become a reality, it will happen.

I’d like to see the Max community become a series of nodes, of sorts.  There is so much great material in so many places.  It isn’t just enough to link to material nowadays.  To stop there is like turning one’s back on the most important revolutions in interconnectedness in our history, or at least our generations.  What is required is a transformation of these disparate materials into a single entity- and not a single entity in the sense of a Microsoft or Google.  Identity is important, and with no ability to buy people out it is very hard to convince anyone to ‘become assimilated.’

What I envision is a community that behaves very similarily to the software design I have spoken about in the forums many times.  It doesn’t have to do with a brand, or conforming to a standard- it has to do with standardizing and opening exchange of information.  It has to do with loosening our often defensive postures on sharing of work and sharing of sites, something which I think people are already somewhat inclined to do.  There need to be hubs of communication, of course, but even these hubs do not need to be centralized- TAO doesn’t have an MXS forum, for example.  On the other hand, I’d like to see somewhere like Polycount.com try to reference some of its technical discussion with TAO.  More formally, I’d like to see some sort of ‘layer’ added to web content on tech sites that allows other sites to hook into it- to reference it, document it, search it, add to it.  Scriptspot can add in hooks that we can read, and vice-versa.  It’d be awesome to get this sort of thing working for personal html pages or wordpress blogs as well, so for example someone’s blog page on a script could auto-update their scriptspot page, which would maybe change an index or fire an alert at CGTalk or TAO.

And we are full circle.  The problem is, finding people to do this.  Fortunately we have Aryeh for web-development right now, and we may add others in the future.  And we have some determined people to see this sort of thing happen.  What we need, then, are motivation- which means, people who like these ideas must actually embrace them and use them.  Money is another motivator but in far less need right now.  I’d trade 10,000 worth of donations for 100 dedicated users any day, for people who make use of what the community offers and are willing to work to make it better.  It doesn’t take a huge sacrafice, it takes many people making small contributions to achieve a larger common goal.  It takes supporters and enthusiasm that provides the drive to achieve great things.

No comments

global sonnet

I open a script I did not write
And sigh or scream when I often find
That dreaded keyword which gives me such fright,
Perhaps I should not be so kind?
Why do they stack them a dozen high,
And why don’t they just put them in a struct,
When they are just three letters long I sigh
And think that I am really fucked.
Just put them in local scope,
Oh my god who wrote this shit
The rest is better I sincerely hope
Or I will have to refactor it.
It is of globals I write this ode,
So please keep them out of your code.

I wrote that little ditty for this post, I thought it was funny so I put it here.

No comments

Performance: XSI vs. Max vs. Maya

A really interesting article, benchmarking the three major 3D programs in a variety of activities.

http://www.3dspeedmachine.com/?idna=33

Overall, XSI had a very strong showing, with Maya second, and Max a distant third in most tests.  Unfortunately, these tests were rigged, as spacefrog points out here:

http://www.tech-artists.org/forum/showthread.php?t=222

No comments

Max Bug: Looping through collections

Looping through a collection, such as lights, geometry, etc., will hang up Max into an infinite loop if you change the hierarchy of the member you are iterating on directly (for g in geometry do, for example).  It only does this when you iterate directly on the collection.

Iterating through the collection with an index iterator (for i = 1 to geometry.count, for example), the behaviour is different- the object you parent moves to the end of the collection, so you process some members more than once and some not at all.

The workaround is simple- just cast the collection as an array and loop through that instead.

No comments

Max Bug: Recursion/Stack Limit

As a followup to the previous bug about recursion, Neil Blevins recently made a post at CGTalk about a similar issue.  This is from Bobo:

MAXScript has a hard-coded (in Max 9 and higher) stackLimit of 2048000 bytes. The return addresses of function calls are put on the stack, so you might be overflowing the stack. If the limit is exceeded, a Runtime error should be displayed, but Max should not crash.

Prior to Max 9, the size was 1024000 and you could increase the stackLimit value. Now it is twice that but you cannot effectively change it.

This followup post from Neil:

So apparently this is a known issue, and is basically a problem that can affect any software written in C++. The only way to avoid it is to not use recursion, so you’ll never blow your stack.

This problem really sucks; any sort of deep recursion is not doable in MaxScript (though simple ones like traversing hierarchies are probably OK).  What I find most upsetting is there is not way to increase the stack limit, there is no information given by Max about exceeding the stack limit, and with Max’s terrible and bloated memory handling, any deep recursions are impossible.  Even Neil’s simple test case crashed after only 1300 recursions (just adding one to a counter and printing the value).  Quite a shame.

No comments

Max Bug: CTD on endless recursion

Something I had planned to do eventually was a blog dedicated to Max bugs.  Since this blog doesn’t seem to be used for much else at the moment, I figured I’d get this started.

First bug is, Max will CTD if it gets caught in an endless recursive loop.  For example:

fn something =
(
   1 + 1
   something()
)

Will crash max, much faster than a normal exit.  So instead of hanging in an endless loop (like an endless While loop does), or realizing the loop is endless and throwing an error, Max just CTD’s.

No comments

Convert Hex to Float

Here at Volition, we store all of our transform and mesh data in our intermediary format as Hex.  This is primarily done to address floating point precision issues, nothing new there.  However, when you are data-mining or looking for other crap in those files, it sure would be helpful to use that Hex data!

Well, in Python, here is a handy little function that will take a Hexadecimal number and return you an IEEE float.

def hexToFloat(hexstr):
intval = int(hexstr, 16)
bits = struct.pack(’L', intval)
return struct.unpack(’f', bits)[0]

- Jason

1 comment

Python Operator Overloading

If you aren’t familiar with the phrase ‘Operator Overloading’, it is basically the giving of a different meaning to a program’s operators like + or ==. Programming languages such as C, C++, Java, Python and many others offer this ability.

So when and why would you ever want to do this? Well, for myself, I actually ran across this need today with a tool I’m working on. I didn’t actually think Python had the ability to do this until I did some Googling on the Internets.

I wrote a Vector class in Python that had members for the X, Y and Z components. So, to see if two vectors are the same, I would have needed to do this:

if vec_a.x == vec_b.x and vec_a.y == vec_b.y and vec_a.z == vec_b.z:
…do something here…

Well, thats just messy to look at and is a pain to write out. Wouldn’t it be nicer if you could just say:

if vec_a == vec_b:
…do something here…

You can do this as long as you overload the operator. To overload the operator, you need to implement the overload function(s) within your class object. To overload the equality == and non-equality != operators, you use __eq__ and __ne__.

Below is some Python code that shows how to do this:

Python Operator Overload

The one problem with overloading an operator is that it can sometimes become confusing when something is or isn’t overloaded. But I can’t offer and suggestions that would make it easier. I think that is a risk you take when doing something this.

Well, I hope this short post gave you some insight into what operator overloading is and how to use it. For more information, I recommend these sites:

http://en.wikipedia.org/wiki/Operator_overloading

http://docs.python.org/ref/specialnames.html

Thanks.

- Jason

2 comments

Welcome to the Tech Artists Blog

The Tech Artists Blog is a place where TA’s can share their thoughts with everyone else. To visit a blog, simply click on a name under Categories on the sidebar.

No comments