# Load Multiple Meshes?

**URL:** <https://forums.imgtec.com/t/load-multiple-meshes/88>\
**Category:** PowerVR Insider\
**Created:** [June 16, 2008, 11:16am UTC](https://forums.imgtec.com/t/load-multiple-meshes/88 "2008-06-16T11:16:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![miguelferrer](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@miguelferrer](https://forums.imgtec.com/u/miguelferrer)\
**Post date:** [June 16, 2008, 11:16am UTC](https://forums.imgtec.com/t/load-multiple-meshes/88/1 "2008-06-16T11:16:04Z")

</div>

Hello  
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 alot

---

<div class="post-metadata">

**Author:** ![stefan\_senk](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@stefan\_senk](https://forums.imgtec.com/u/stefan_senk)\
**Post date:** [June 18, 2008, 8:55am UTC](https://forums.imgtec.com/t/load-multiple-meshes/88/2 "2008-06-18T08:55:54Z")

</div>

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.  
  
Stefan

---

<div class="post-metadata">

**Author:** ![miguelferrer](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@miguelferrer](https://forums.imgtec.com/u/miguelferrer)\
**Post date:** [June 18, 2008, 9:44am UTC](https://forums.imgtec.com/t/load-multiple-meshes/88/3 "2008-06-18T09:44:50Z")

</div>

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?  
  
Thanks

---

<div class="post-metadata">

**Author:** ![stefan\_senk](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@stefan\_senk](https://forums.imgtec.com/u/stefan_senk)\
**Post date:** [June 18, 2008, 10:15am UTC](https://forums.imgtec.com/t/load-multiple-meshes/88/4 "2008-06-18T10:15:52Z")

</div>

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.  
  
Stefan

---

<div class="post-metadata">

**Author:** ![miguelferrer](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@miguelferrer](https://forums.imgtec.com/u/miguelferrer)\
**Post date:** [June 18, 2008, 10:21am UTC](https://forums.imgtec.com/t/load-multiple-meshes/88/5 "2008-06-18T10:21:16Z")

</div>

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! 🙂

---

<div class="post-metadata">

**Author:** ![stefan\_senk](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@stefan\_senk](https://forums.imgtec.com/u/stefan_senk)\
**Post date:** [June 18, 2008, 10:58am UTC](https://forums.imgtec.com/t/load-multiple-meshes/88/6 "2008-06-18T10:58:14Z")

</div>

You should be able to load the required scenes, something like this:  
m\_Scene1.ReadFromFile(pFilename1);  
m\_Scene2.ReadFromFile(pFilename2);  
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.  
  
Stefan

---

<div class="post-metadata">

**Author:** ![miguelferrer](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@miguelferrer](https://forums.imgtec.com/u/miguelferrer)\
**Post date:** [June 18, 2008, 1:14pm UTC](https://forums.imgtec.com/t/load-multiple-meshes/88/7 "2008-06-18T13:14:47Z")

</div>

Hi there  
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.  
  
Thanks a’lot!

---

<div class="post-metadata">

**Author:** ![cgp](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@cgp](https://forums.imgtec.com/u/cgp)\
**Post date:** [June 16, 2011, 10:09am UTC](https://forums.imgtec.com/t/load-multiple-meshes/88/8 "2011-06-16T10:09:14Z")

</div>

The scene struct has multiple meshes. Add a node per mesh, and you can do multi instances with different materials, positioning scaling and rotation ( of same mesh).
