Load Multiple Meshes?

This topic contains 7 replies, has 3 voices, and was last updated by  cgp 6 years, 4 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #29535

    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

    #32148

    Stefan
    Member

    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

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

    Thanks

    #32150

    Stefan
    Member

    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

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

    #32152

    Stefan
    Member

    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

    #32153

    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!

    #32154

    cgp
    Member

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

Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.