nǐ hǎo, 你 好, Xiongiaohua,
aothms in in hollydays, but yes there’s two threads :city engine and opensteer
can you share some animations or code or anything about your project ?
First, it’s not memory effective, because blender must mantain a object for every vehicles, even before its entering and after its exiting of the road network.
you can store ipos without linking it to an object.
like any other blender object (mesh, ipo, mats, image, actions…) it can reside in the file even if it has no link. it’s the F flag in the gui, or when you browse a list of material or action for example.
in your case you could import only ipos in a first time, then link it on demand to a ‘car’ mesh.
also as you can link a script that runs at every new frame, you can code something like :
for ipo in ipos :
if xmin < xpos < xmax and ymin < ypos< ymax :
if linkedToCar==False :
elif linkedToCar :
there’s a registry blender module to remember the variables you need, at every new frame.
also you can share the same mesh between several car objects (maybe you already know that sorry, it’s just in case).
these things could permit to spare some memory.
you could look at the opensteer plugin code in plugins/opensteer/ in the dev version I’m about to publish.
in this case I just add an empty to each ipo, then AFTER it has computed all the ipos, I attach a group of object for the each car (armature, wheels, camera…) to the empty. it’s really more faster to compute at large scale.
theorically I suppose one could get rid of that empty at ipo creation time and only feed a python ipo list with coordinates.
something like your studying zone, a ‘window’, could be great too.
this wondow could be the active camera view.
Second, it’s hard to manipulate all vehicles as a whole. After importing, these is no easy way to add just scale for vehicle trajectorys either spacial or temporal.
so you can only modify once, at the ipo creation time. you right it must be harder to rekey/rescale all channels of all ipos…
see you soon then