[Bf-committers] GSOC proposal: Improving 3D viewport performance using retained mode rendering

Aditya Vishwakarma adi.vishwakarma at gmail.com
Fri Mar 27 19:18:02 CET 2009


Hi,

I am Aditya Vishwakarma. I would really like it if you take some time out
and consider reviewing my proposal. I have submitted it to GSOC also. All
opinions are welcome.

adityav at freenode.net

*Synopsis:*
Retained mode is commonly used to improve rendering time ( FPS, if you
prefer ) by reducing CPU involvement in providing data to the GPU. There are
basically 4 modes to pass data to GPU. In Order of  increasing performance,
they are:

   - Immediate mode ( glbegin/end calls, glvertex calls, currently being
   used by Blender)
   - display lists
   - vertex arrays
   - Vertex Buffer Objects ( very new, not supported by many GFX cards )


Blender currently uses Immediate mode for its viewport, which results in
very low performance. Goal of this project is to implement retained mode
structures to dramatically improve performance.

*Benefits to Blender:*

Blender uses immediate mode for its viewport rendering. In a complex scene (
shaders, textures etc )consisting of invariant geometry, retained mode has
been proven to improve performance as far as 10x over immediate mode. I have
seen Retained* mode give FPS of 300+ while immediate mode was only giving
25.*
This performance increase would be particularly helpful for animators , and
in general will help users working on model with complex geometry.

*Deliverables:*

By end of project, blender 3D viewport would be aided by retained mode
rendering to increase its responsiveness. It will be enabled/disabled by an
option provided.

*Project Details:*

As it has been pointed out to me, the files that would be center point of
this project are view_3ddraw.c and drawobject.c in space_view3d folder of
the source.
I will start with implementing Display lists. Display lists are most widely
supported and easiest to debug. Also, the programming methodology for
retained mode is similar for all three conecepts. Hence, a solution would be
found out to render using display lists. This will give me enough time to
get comfortable with the current code without additional complexities of
VBOs.

After gaining confidence, i will work with my mentor and target areas which
are suitable for optimization using one of the three techniques.

The current viable high level solution in my mind is to use immediate mode
in editing view ( where geometry constantly changes ) and then switching to
retained mode while reviewing the model.

Immediate mode rendering capability would henceforth become a fallback
option if:

   1. An error crops up
   2. The graphics card is incapable of supporting implemented features.


*To improve performance further, a concept of grouping can be introduced.
For eg, a model of human body can be divided ( by user ) into groups. The
user can henceforth, mark a group as draft, or final. Accordingly, the
rendering model for that group of vertices can be changed to maximise
performance. However, it is not a part of deliverables, and will be
considered if there is time left to implement this.*

*Implementation Process:*

Initially, i will invest time to study the blender geometry processing
pipeline, specifically, how does 3D viewport gets its vertices etc. This
process is important to understand how mesh, and its modifiers and materials
are rendered to the viewport.


After this, i will work on viewport details. Specifically, understanding the
pipeline ( various transformations, culling, Face ordering ) and
systematically marking out areas which can be optimised. This will help me
to understand the code and provide me confidence which i will use to
implement display lists.

Henceforth, A prototype rendering methodology would be developed using
display lists which will be open for community review. Optimising using VBOs
would be next step.

The code would be systematically reviewed and judged by using various models
created in blender.

*Project Schedule:*
1st week would go in understanding how the Blender pipeline works. By mid
term evaluation, i plan have most of my display lists based framework ready.
Before two weeks of deadline, the implementation would be ready enough to
undergo testing and reviewing by the community.


*BIO:*
I am Aditya Vishwakarma, a 3rd year Information technology student at Netaji
Subhas Institute of Technology, Delhi, India. I have been interested in
realtime graphics since my childhood. I had developed some simple maps for
Quake III in 2000, from where my interest in realtime graphics started.

Since last year, i have been doing research work in shadowing technologies.
This brought me into close contact with OpenGL ( my primary API) and GLSL.
The latest shadow mapping technology uses PBOs, which brought me into close
contact with retained mode rendering technologies.

I got to know about Blender when i was 17, and used it to make a animation
of a mummy corpse hand open and close :D . Henceforth, i have used Blender
to create very simple models for usage in my shadowing research work. I have
also worked in promoting Blender as a animation tool, in which we show
various movies and animations that have been made using blender in order to
foster some interest in this great open source tool.


I believe that my understanding of the opengl framework, modelling pipeline
and my closness to blender make me viable candinate for the job. Also, the
effects of this project on blender community and the challenge to find an
optimal solution is something i would really love to work on

I am hoping I would be given an opportunity to do my small part in improving
Blender.


Thanking you

Aditya Vishwakarma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-committers/attachments/20090327/eb1feb96/attachment.htm 


More information about the Bf-committers mailing list