BTW: irrEdit 0.4 saved scenes might not work with irrlicht 1.1 currently, due to a change I did to the format, sorry. But the irrlicht version checked in the SVN works.
seven comments, already:
Scripting is always a useful feature, although I only ever use it for prototyping when it comes to writing exporters (e.g. I always play in script in XSI to figure out how to get the data I need, then write it ‘properly’ in C++).
The trouble with scripting languages is that they don’t scale particularly well to manipulating large volumes of data. Certainly I see significant speedups when porting export routines to native code. However, they’re great for interactive experimentation, API exploration, and low-volume things. So it’s good to have both.
steve () (link) - 02 09 06 - 12:49
I’d also advise trying to keep the interfaces as consistent as possible between script and native API – that way it encourages the prototype / native combo working. XSI does this very well, the script and C++ API are direct parallels. In contrast Max has significant differences between script and native which means it’s harder than it should be to switch from one to the other.
steve () (link) - 02 09 06 - 12:53
same time tho steve, blender exporters are just written in python, and they still seem to have acceptable performance…
buhatkj - 02 09 06 - 19:08
Acceptable maybe, but since you can’t compare them to native versions do you really know what you’re missing?
It really depends on how much work you do in the exporter. Having had direct experience writing relatively complex exporters in quite a few modelling tools now, it can make a difference. If all you’re doing is simplistically iterating over data and dumping it out to a file, no biggie. But if you start doing smart exporters which do things like rationalising / grouping meshes to improve batching, auto-welding, sorting out seams, optimising animation etc (which many modellers don’t do on their own simply because they’re not oriented towards realtime assets), it really can make a difference.
steve () (link) - 02 09 06 - 19:21
that’s right. And it was the same for me in Maya: First I wrote the plugin in MEL, then in C++, it’s really a nice way to write stuff. :)
I think the biggest performance trouble I’ll have is not the scripting language itself but the implementation of the functions in C++: Currently I am checking and validating and converting lots of data for every call behind the scenes. Going to improve this a bit using reference counting, eliminating the validation and I think everything should be usable well. IMO the squirrel VM is fortunately a very fast one.
niko - 02 09 06 - 23:06
For the export/import bit – I would prefer both. I come from a Maya background and the difference in “native vs scripted” for advanced plugins is often drastic (I have coded both my thesis project and several ‘real-time optimising’ exporters, so I have experience in this). I tend to find it easiest to code the C++ versions and then wrap them in script when I’m done.
On the subject of script wrapping – I was wondering about your experience with Squirrel VM, Niko. I am currently looking at Lua & Stackless Python as scripting environments for my project, both because of their co-routine support. However, integrating Python is a nightmare and Lua (while better) is also difficult. I’m debating whether it might be easier to put coroutines into squirrel…
Eternl Knight () - 03 09 06 - 02:23
Scratch that – Squirrel already has coroutine support, which then brings me to how easy is it to integrate and use?
Eternl Knight () - 03 09 06 - 02:26