After passing through a couple of the manual pages I got the idea to create a tool for panda that can load models to the scene graph from an xml file.
My idea is not to directly load the models to the the render node. But to load all the nodes in the xml file and return a single node that can than be reparented to a node in the scene graph.
I could create a xml file that discribes a house. This xml file can than have the house model and some furniture. It will also store light positions. I also want to give it the ability to create instances to for example to use instances of the columns in the house. It will also be able to load animated models.
I would like to let the xml file do as much as posible. I have even some ideas of how I can add some python programming in the files.
I am not sure what would be the best method to open the files. I thought first on a program that would open the file and convert it to a python file. But I think now that it would be better to convert the file on runtime, but I'm new to python and I am not sure how I could do this.
I'm still learning, maybe in a couple of weeks I could have a first version ready.
Here is how I think the XML file could look like.
- Code: Select all
<model pos="10,12,-3" hpr="90,20,0" file="file1.egg" scale="0.25, 0.25 ,0.25" name="firstmodel">
<model file="file2.egg" name="model3" pos="20,11,0">
<instance name="instance1" of="model3" pos="3,6,0"></instance>
<light pos="10,50,30" color="R, G, B"></light>
<actor name="Actor_name" pos="0,0,0" hpr="30,0,1" file="file4.egg" scale="0.25, 0.25 ,0.25">
<animation name="walk" file="actor_walk" ></animation>
<animation name="run" file="actor_run"></animation>
<model name="model3" file="file3.egg" pos="0,0,0" hpr="0,0,0" scale="1,1,1"></model>
I would like to ask what you think of my project and if its worth making it.
Do you have any other ideas of wath else I could make the file support. Please post them.
Because I'm new to python I don't yet know all the information that could me stored about the models, light, camera, ...
It would help me alot if you could help me with this information.