Hi, <div><br></div><div>Thanks for the directions. I will definitely look at the codes from that perspective</div><div><br></div><div>Aditya<br><br><div class="gmail_quote">On Tue, Mar 31, 2009 at 6:53 PM, Ton Roosendaal <span dir="ltr">&lt;<a href="mailto:ton@blender.org">ton@blender.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Aditya,<br>
<br>
I would advise to check a bit on our drawing code, especially how<br>
derivedmesh and modifiers are used. You can find most of this (2.48a<br>
trunk) in these files;<br>
<br>
source/blender/src/drawobject.c<br>
source/blender/src/drawmesh.c<br>
<br>
and<br>
<br>
source/blender/blenkernel/intern/DerivedMesh.c<br>
source/blender/blenkernel/intern/modifier.c<br>
<br>
There&#39;s quite a clear separation between meshes in &quot;Edit mode&quot; or<br>
regular meshes. However, there&#39;s also some overlap, especially in the<br>
case of modifiers.<br>
<br>
Ideally, the best performance improvements we would get if modifiers<br>
are well supported with VBOs, allowing shape-based transformations on<br>
the fly without overhead. Such transformations are very common for<br>
editmode too, and would therefore be interesting to support.<br>
<br>
To make it more complex even, we also have multi-res, and custom layer<br>
data in Blender (displacement, UV, colors), which is one of the bigger<br>
contributors to CPU overhead.<br>
<br>
<br>
-Ton-<br>
<br>
------------------------------------------------------------------------<br>
<font color="#888888">Ton Roosendaal  Blender Foundation   <a href="mailto:ton@blender.org">ton@blender.org</a>    <a href="http://www.blender.org" target="_blank">www.blender.org</a><br>
Blender Institute BV  Entrepotdok 57A  1018AD Amsterdam The Netherlands<br>
</font><div class="im"><br>
On 30 Mar, 2009, at 8:06, Aditya Vishwakarma wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; thanks you all for the comments. I will modify my proposal to use<br>
&gt; vertex arrays + indices initially.<br>
&gt;<br>
&gt; I was thinking that i would use VBOs only when blender in not in edit<br>
&gt; mode. Constantly moving data to and from GPU would degrade performance<br>
&gt; rapidly. Another problem with VBOs would be finding the upper limit of<br>
&gt; number of vertices that can be stored on the GPU. Since this is a user<br>
&gt; side issue, i would suggest that we make some sample scenes or design<br>
&gt; tests that would find out the upper limit of memory needed.<br>
&gt;<br>
&gt; Besides having fair idea about drawing and fitting curves ( in our<br>
&gt; Graphics course), i don&#39;t have any idea how meshes are drawn in<br>
&gt; Blender.<br>
&gt;<br>
&gt; I have assumed that Blender rendering pipeline would be : [do all<br>
&gt; work(which pixel to draw)] - [ apply transformations etc] - [draw<br>
&gt; vertices]<br>
&gt;  I also assumed that i would mostly be redesigning the 3rd stage, and<br>
&gt; abstracting 2nd stage parts which have been mixed with the drawing<br>
&gt; code.<br>
&gt; Therefore, I frankly have no idea about how mesh is causing the problem<br>
&gt;<br>
&gt;  Thanking you<br>
&gt; Aditya <br>
&gt;  <br>
&gt;<br>
&gt; On Sun, Mar 29, 2009 at 11:24 AM, joe &lt;<a href="mailto:joeedh@gmail.com">joeedh@gmail.com</a>&gt; wrote:<br>
</div><div><div></div><div class="h5">&gt;&gt; On Sat, Mar 28, 2009 at 9:28 AM, Brecht Van Lommel<br>
&gt;&gt; &lt;<a href="mailto:brecht@blender.org">brecht@blender.org</a>&gt; wrote:<br>
&gt;&gt;  &gt; There is a certain complexity associated with this project, but I<br>
&gt;&gt; think<br>
&gt;&gt;  &gt; it is feasible and has well defined targets. I&#39;ve reviewed the<br>
&gt;&gt; proposal<br>
&gt;&gt;  &gt; in the google web app, and I agree display lists are not what this<br>
&gt;&gt;  &gt; project should focus on first, but rather using vertex arrays and<br>
&gt;&gt; then<br>
&gt;&gt;  &gt; vbo&#39;s or display lists as a second speedup.<br>
&gt;&gt;<br>
&gt;&gt; For VBOs, you&#39;d have to have a system for incremental updates, which<br>
&gt;&gt;  is why I&#39;ve stayed away from doing it myself (if you don&#39;t do that,<br>
&gt;&gt;  you might as well be using vertex arrays).  I guess it is possible,<br>
&gt;&gt;  maybe the same way ccgsubsurf does incremental updates; compare vert<br>
&gt;&gt;  positions with a stored mesh state in memory to see if an update is<br>
&gt;&gt;  needed, and rebuild the arrays on topological changes.<br>
&gt;&gt;<br>
&gt;&gt;  &gt;<br>
&gt;&gt;  &gt; Further, I don&#39;t know what this DerivedMesh refactor is. Purely<br>
&gt;&gt; from the<br>
&gt;&gt;  &gt; view of functionality it is working now without major defects. The<br>
&gt;&gt; code<br>
&gt;&gt;  &gt; could definitely be cleaner and easier to understand, but I don&#39;t<br>
&gt;&gt; think<br>
&gt;&gt;  &gt; that should hold back anything, especially since I don&#39;t know of<br>
&gt;&gt; any<br>
&gt;&gt;  &gt; concrete plans to actually do this refactor. To me it is just a<br>
&gt;&gt; part of<br>
&gt;&gt;  &gt; the Blender code that can be iteratively improved.<br>
&gt;&gt;  &gt;<br>
&gt;&gt;<br>
&gt;&gt; DerivedMesh can&#39;t handle ngons, so it&#39;s going to eventually need to be<br>
&gt;&gt;  modified for that.  We&#39;ve discussed this heavily in the past, and<br>
&gt;&gt;  agreed that we do need to refactor it at some point.  Our short-term<br>
&gt;&gt;  plan for interfacing bmesh with DerivedMesh , is to tesselate ngons<br>
&gt;&gt;  into fgons (which  basically means hiding internal edges of the<br>
&gt;&gt;  tesselation), and modify key modifiers (just subsurf at the moment, I<br>
&gt;&gt;  think) to convert that back to ngons.   This approach tends to be<br>
&gt;&gt;  error-prone and slow, as we&#39;ve seen with doing the same thing with<br>
&gt;&gt;  editmesh.<br>
&gt;&gt;<br>
&gt;&gt;  I don&#39;t think current DerivedMesh design has a future, so it&#39;d be<br>
&gt;&gt; nice<br>
&gt;&gt;  if people didn&#39;t make things even more harder for when we do refactor<br>
&gt;&gt;  it (which I&#39;ll probably partly do myself, in small steps when bmesh<br>
&gt;&gt;  becomes stable).<br>
&gt;&gt;<br>
&gt;&gt;  Joe<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt;  Bf-committers mailing list<br>
&gt;&gt; <a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
&gt;&gt; <a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
&gt; _______________________________________________<br>
&gt; Bf-committers mailing list<br>
&gt; <a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
&gt; <a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
<br>
_______________________________________________<br>
Bf-committers mailing list<br>
<a href="mailto:Bf-committers@blender.org">Bf-committers@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-committers" target="_blank">http://lists.blender.org/mailman/listinfo/bf-committers</a><br>
</div></div></blockquote></div><br></div>