[Ves] Poor render performance in Kiwiviewer

Aashish Chaudhary aashish.chaudhary at kitware.com
Mon Jun 24 14:37:48 EDT 2013


HI Carlos,

I can provide a detailed response later (just got back). Can you provide
some more information on your data type, size, and need for creating 600
actors. Also, did you verify where you have the most time consumed in your
application (using Mac OpenGL tool). Once the geometry is stored in VBO's I
would not expected the rendering to be bottleneck unless you are filling in
more than what your card provide in which case it will drop, recreate VBO's
data as needed.

All of the code related to render stage and and render targets are related
to render tree which does not delete your previously created mapper and
therefore VBO's (if you find otherwise let us know).

Thanks for the feedback. Looking for some more information here. Will
follow up with you on another email later.

- Aashish




On Mon, Jun 24, 2013 at 2:01 PM, Carlos <ves at calculoandamios.com> wrote:

> Hi,****
>
> ** **
>
> I create a model with several actors with the following scheme trying to
> improve the performance as there are a lot of actors:****
>
> ** **
>
> **·         **Create an array of Mappers as some of the actors share the
> same mapper. The proper way should be to make a shallowcopy but this is not
> available right now.****
>
> **·         **Create the actors with: ****
>
> ** **
>
>        vesSharedPtr<vesActor>     Actor;****
>
>        Actor =vesSharedPtr<vesActor>(new vesActor());****
>
> ** **
>
>        vesSharedPtr<vesMaterial> Material;****
>
>        Material = vesSharedPtr<vesMaterial>(new vesMaterial());****
>
>        Actor->setMaterial(Material);****
>
> ** **
>
>        vesSharedPtr<vesBlend> Blend;****
>
>        vesSharedPtr<vesDepth> Depth;****
>
> ** **
>
>        Blend = vesSharedPtr<vesBlend>(new vesBlend());****
>
>        Depth = vesSharedPtr<vesDepth>(new vesDepth());****
>
> ** **
>
>        Actor->material()->addAttribute(this->shaderProgram());****
>
>        Actor->material()->addAttribute(Blend);****
>
>        Actor->material()->addAttribute(Depth);****
>
> ** **
>
>              ****
>
>        Actor->setMapper (MisMappers[My_ID_Mapper]);****
>
>
> Actor->mapper()->setColor(color_R,color_G,color_B,1-gradotransparencia);**
> **
>
> ** **
>
> **·         **Add the actor to the renderer with:****
>
> ** **
>
>        this->renderer()->addActor(Actor);****
>
> ** **
>
> ** **
>
> the question is that if the number of actors is quite high, around 600,
> the FPS in one  Ipad 3 drops to 1 or even less. It makes that rotations are
> not continuous. After some debugging I have arrived to the render method in
> vesRenderer and I also have look into the calling functions but there are
> some point that I do not understand properly.****
>
> ** **
>
> I would like if possible to have a brief explanation of the main calls
> made in Render, specially:****
>
> ** **
>
> **·         **What is done in Cull Traversal.****
>
> **·         **The meaning of renderStage and renderstate****
>
> **·         **Some  clues about the optimization comment  ****
>
> ** **
>
>   // By default enable depth test.****
>
>   glEnable(GL_DEPTH_TEST);****
>
> ** **
>
>   if (this->m_sceneRoot) {****
>
> ** **
>
>     // Update traversal.****
>
>     this->updateTraverseScene();****
>
> ** **
>
>     // Cull traversal.****
>
>    this->cullTraverseScene();****
>
> ** **
>
>     vesRenderState renderState;****
>
> ** **
>
>     // Clear all the previous render targets.****
>
>     this->m_camera->clearRenderTargets(renderState);****
>
> ** **
>
>     // For now, lets not push camera to the stage, just call****
>
>     // render on render target of the current camera.****
>
>     this->m_camera->renderTarget()->render(renderState);****
>
> ** **
>
>     this->m_renderStage->render(renderState, 0);****
>
> ** **
>
>     // \note: For now clear the stage.****
>
>     // \todo: Add an optimization where we could save whole or****
>
>     // part of the the stage.****
>
>     this->m_renderStage->clearAll();****
>
> ** **
>
> ** **
>
> Best regards,****
>
> ** **
>
> Carlos****
>
> _______________________________________________
> Ves mailing list
> Ves at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>
>


-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20130624/a9f187ea/attachment-0001.html>


More information about the Ves mailing list