Feeding Blender an XML road file

foresthero

New Member
My goal is to simulate traffic in a particular city. I'll be drawing cars using Blender and having them move about on lanes similar to a Manhattan configuration. All the information about the cars' relative position/orientation and speed at a given instant is determined by an XML file.How do I read from this XML file in Blender so that the cars have the useful information about how to move on the road?edit: Python is probably a good place to start. But do I actually have to parse strings? Or is there easy XML compatibility with Blender?The XML I need to import basically looks like:\[code\]<sumo-netstate> <timestep time="0.00"> <edge id="34403897"> <lane id="34403897_0"> <vehicle id="t0" pos="5.10" speed="0.00"/> </lane> </edge> </timestep> <timestep time="1.00"> <edge id="-10745949#5"> <lane id="-10745949#5_0"> <vehicle id="t1" pos="5.10" speed="0.00"/> </lane> </edge> <edge id="34403897"> <lane id="34403897_0"> <vehicle id="t0" pos="6.54" speed="1.44"/> </lane> </edge> </timestep>......</sumo-netstate>\[/code\]
 
Back
Top