jPCT-AE - a 3d engine for Android > Support

How to do the profiling in jPCT-AE?

(1/2) > >>

kiffa:
My purpose is to do some performance profiling, and there are another questions:

1, Is there a method to print the exact numbers of draw calls per frame?

2, How to print the total numbers of triangles(vertices) in world?

3, How to print the total  numbers of triangles(vertices) which was exactly  rendering in world?(means which was not culled/in display list/in visible list ...).

4, How to print the consuming time of gpu and cpu per frame?

EgonOlsen:

* Not build in. You could get all the objects from World, attach an IRenderHook and count the calls to repeatRendering(). That would be the number draw calls.
* You would have to add all triangles of all objects in the world.
* You can't. The engine does some gross culling, but the gpu does additional culling and there's no way to detect culled triangles.
* You could measure the time it takes to render a frame, but you can't split it into cpu/gpu. Both can work in parallel and there's no way to detect how much time the gpu has consumed.

kiffa:
Thanks, I did some work for this, see the pic below(the left is memory profiling, the right is performance profiling):



And I visited the statistics view of Unity3D(http://docs.unity3d.com/Documentation/Manual/RenderingStatistics.html, I want to print some of these but I have no idea how to do:

1,  VRAM usage:  Approximate bounds of current video memory (VRAM) usage. This also shows how much video memory your graphics card has.

2,  VBO total:   The number of unique meshes (Vertex Buffers Objects or VBOs) that are uploaded to the graphics card. Each different model will cause a new VBO to be created. In some cases scaled objects will cause additional VBOs to be created. In the case of a static batching, several different objects can potentially share the same VBO.

3,Onscreen objects(triangles\vertices).

And another questions:

4, For cloned Object3D(reuse the mesh), will object3d.getMesh().getTriangleCount() return the same number as the origin object3d?

5, Could I get the consuming time of each draw call(or sum)?

6, I have read the default shaders, and I found there is a "precision mediump float;" in defaultFragmentShader.src but a "precision highp float;" in defaultFragmentShaderTex0Amb.src. Could you explain the reason, and how much difference of performance between them will be?

kiffa:
7, And there are no lights in my game, so I think I needn't to upload the normals as VBO. Could I do this? (I used custom shaders which have no "attribute normal")

8, The apple-doc say:
  Avoid using the OpenGL ES GL_FIXED data type. It requires the same amount of memory as GL_FLOAT, but provides a smaller range of values. All iOS devices support hardware floating-point units, so floating point values can be processed more quickly.(http://developer.apple.com/library/ios/documentation/3ddrawing/conceptual/opengles_programmingguide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html

  I want to know how about jPCT-AE and Android?

EgonOlsen:
I'm on low bandwidth and only mobile ATM. I'll try to give a detailed answer later....

Navigation

[0] Message Index

[#] Next page

Go to full version