- June 16, 2008 at 1:16 pm #29535
I was wondering… is there any easy way of loading multiple meshes into a PVR scene?
Is there any method of doing it?
I am trying to load both an animated mesh (using matrix palettes) and a background 3d hutt and I am unable to see them both!…
Thanks alotJune 18, 2008 at 10:55 am #32148
If you are using 3DS MAX, or Maya, to create your scene, the easiest way to do this is to import all your meshes into one file. Then, use the PowerVR Exporter to export this scene to a POD file. You can now load this POD scene, containing multiple meshes, with the tools provided in the PowerVR SDK. The IntroducingPOD training course in the PowerVR SDK is an example of using multiple meshes from a POD scene. The Matrix Palette training course (OpenGLES1.x SDK) has three meshes, one of which uses skinning, which sounds like it might be similar to what you’re trying to do.
StefanJune 18, 2008 at 11:44 am #32149
Yes, I know you can export multiple meshes into a single pod file, but I need to be able to load the meshes on demand.
I am trying to create a videogame, and It has no sense to load all of the enemies, structures, items, etc on a single file, that would exhaust the terminal’s memory
I found inside the demos section (“mouse” demo) a way to include the
meshes on demand using HeaderStruct_Mesh_Type objects, but the meshes I
import don’t animate at all.
No other way to load them?
ThanksJune 18, 2008 at 12:15 pm #32150
When loading POD files, the whole scene is always loaded into memory.
You could export each individual object to a different POD file. Each object would be loaded as a separate SPODScene, which you could use as required in your game.
StefanJune 18, 2008 at 12:21 pm #32151
Yes, that’s what I thought to do in the first place, but if I try to load two Scenes, only the last one appears.
I use m_Scene.ReadFromFile(pFilename); to load the scene.
Maybe there is some other way to load the scene adding the elements? something like “AddFromFile”?
Thanks for your quick responses! 🙂June 18, 2008 at 12:58 pm #32152
You should be able to load the required scenes, something like this:
Then at render time, draw meshes from m_Scene1, and draw meshes from m_Scene2.
There is no facility for adding the meshes from m_Scene2 into m_Scene1. Although, you could do it manually, if you needed too.
StefanJune 18, 2008 at 3:14 pm #32153
I’ve tried to load both scenes into an array and update them separately, and it worked!
Now the only thing I need to do is tweak the frames animation in order to make each .pod follow its own frame number, but I think I will be able to manage it.