<div dir="ltr">Hello, Mr. Howard,<div><br></div><div>Today as you said before I tried to print the values of colors at various location, but again no result.</div><div><br></div><div>Well, during the whole process it was always found that the color was getting assigned to the vertices correctly. </div><div><br></div><div>What I think is there might be the problem in the 3d window as you mention in #case 2, almost at all the places alpha was being considered whenever col was used. </div><div><br></div><div>If the subdivider would have used some different interpolation method then the final color would also have been different, but after printing it is same as other if we give all of them the same color. So what exactly happening is the final vertices have the same color along with alpha but the 3d display is different.</div><div><br></div><div> Also, if we subdivide the darker face which forms after the subdividing it gets the same color(confused).  </div><div><br></div><div>I don&#39;t know why this happens (this may be the reason), that when we run the blender as &quot; blender.exe --debug&quot;, while vertex painting we see the &quot;, ,&quot; and occasionally 1 getting printed on the command prompt., (may be this might be the reason for the slowness?) I will look into more detail of it. </div><div><br></div><div>Thank you.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 17, 2017 at 10:30 PM, Howard Trickey <span dir="ltr">&lt;<a href="mailto:howard.trickey@gmail.com" target="_blank">howard.trickey@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Darshan,<div><br></div><div>Did you make any progress on discovering the problem with the values after subdividing?  I haven&#39;t had time to look myself.  Though I did have several thoughts:</div><div>1) maybe the subdivide code uses some special purpose code in some cases in order to do the interpolation?</div><div>2) maybe the final values after subdivide are actually right but the display in the 3d window is somehow wrong?</div><div>To see if it is (2), I&#39;d been tinkering with the idea of having a debug-mode way of seeing the loop colors as (r,g,b,a) displayed on the screen, to help easily diagnose problems like these. I might send you a patch for this tonight. One way in which the 3d window display might be wrong: what if we are somehow seeing backfaces rendered differently through the partially-transparent faces?</div><div><br></div><div>If you are truly blocked without any ideas, you should probably move on to something else while so that you are at least accomplishing something. One suggestion would be to look at the complaint of someone in BA that said that this branch seems much slower than when before you started your work.  A possible reason for this is that the BLEND mode you just added makes things a lot slower, so you could try with and without that enabled, on a model with a very large number of vertices, and see if it makes a noticeable speed difference.</div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Sun, Jul 16, 2017 at 9:28 PM Howard Trickey &lt;<a href="mailto:howard.trickey@gmail.com" target="_blank">howard.trickey@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Darshan,<div><br></div><div>I too am puzzled because, as you say, the alpha channel does seem to be interpolated properly.</div><div><br></div><div>One way to debug things like this is to keep printing out the vertex color layer at various points in execution and see where it seems to go wrong.  I think you should try for a bit to debug this yourself rather than have me do it.  If you can&#39;t solve it in a day or two, I will try to help.</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Jul 16, 2017 at 2:26 PM Darshan  kadu &lt;<a href="mailto:darsh7807@gmail.com" target="_blank">darsh7807@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">So, I found the function layerInterp_mloopcol in the file source\blender\blenkernel\<wbr>intern\customdata.c which is getting called if you do subdivide. The interesting thing is it is using the alpha channel, also as I said in previous mail, after printing the values of all the vertices with the same color and alpha the values printed of RGBA were same, this means that values of color to the vertices are getting assigned properly along with alpha. So, this creates more confusion. <div>What do you think? </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 16, 2017 at 6:18 PM, Howard Trickey <span dir="ltr">&lt;<a href="mailto:howard.trickey@gmail.com" target="_blank">howard.trickey@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ah, now I understand, I think. So what seems to be happening is that the part of Blender that gets attributes for new vertices created by geometry operations - which typically interpolate values between the values of old vertices, is probably only interpolating 3 channels of color and not 4.  See if you can find the part of the code that interpolates values in custom layers. If you can&#39;t, I&#39;ll give you a hint after I get back to my computer later.<div class="m_-6607701781819084008m_-4285744328371865391m_-3739460258670692866HOEnZb"><div class="m_-6607701781819084008m_-4285744328371865391m_-3739460258670692866h5"><br><div class="gmail_quote"><div dir="ltr">On Sun, Jul 16, 2017 at 8:34 AM Darshan  kadu &lt;<a href="mailto:darsh7807@gmail.com" target="_blank">darsh7807@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">I divided the mesh by subdivide option in the toolshelf on the left side in the edit mode. </div><div class="gmail_extra"><br><div class="gmail_quote">On 16-Jul-2017 5:42 PM, &quot;Howard Trickey&quot; &lt;<a href="mailto:howard.trickey@gmail.com" target="_blank">howard.trickey@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Darshan,<br><br><div dir="auto">I&#39;m away from computer until later today, so can&#39;t check this right now. But I thought when I tried a few days ago that when I added a subdivision modifier, I saw drawing done by some function in subsurf_ccg.c. Did you subdivide some other way?</div></div><div dir="auto"><br></div><div dir="auto">One way you can discover for yourself which function is drawing the faces is to start single stepping in a debugger after hitting a breakpoint in draw_mesh_paint.</div><div dir="auto"><br></div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div>On Sun, Jul 16, 2017 at 7:37 AM Darshan  kadu &lt;<a href="mailto:darsh7807@gmail.com" target="_blank">darsh7807@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hello, Mr. Howard,<div><br></div><div>I am still not able to figure out why some faces have different color. <br>As, you said that it is an only one case, but other cases like emDM_drawMappedFaces this is used in edit mode and I didn&#39;t see control getting in it while in vertex mode, same goes with the ccgDM_drawMappedFaces.  So, this two may not be the reason for this behavior.</div><div><br></div><div>I printed out the colors of the vertices, here also all the vertices had the same color if i assign them the same color along with the alpha.</div><div><br></div><div>I tried glEnable to blend for both the conditions i.e. setDrawOptions NULL and non-NULL . Still no output.</div><div><br></div><div>If we look at the Fabio&#39;s patch, he added glEnable to the cdDM_drawFacesTex_common but control don&#39;t go in that function if  we are in solid mode. How Fabio would have handled this problem?</div><div>It works properly for alpha 0 and 255 but not for intermediate values.</div><div><br></div><div>Can the way in which mesh gets divided be the reason for it? </div><div>Thank you ,</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Fri, Jul 14, 2017 at 4:24 PM, Howard Trickey <span>&lt;<a href="mailto:howard.trickey@gmail.com" target="_blank">howard.trickey@gmail.com</a>&gt;</span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><p>Darshan,<br>
</p>
<div>The changes I suggested were just a start to get it working in the most basic case. Good that you got the basic alpha display working!</div><div><br></div><div>So far, you changed cdDM_drawMappedFaces, which is used to draw the faces for a basic type of derived mesh. But there are other kinds of derived meshes too, and you should try to figure out how to change those too, if you can.  Search for drawMappedFaces in the blenkernel/intern directory and you will see the other versions of the drawing function. When you add a Subdivision Surface modifier, the drawing function will be ccgDM_drawMappedFaces in subsurf_ccg.c .  See if you can figure out yourself how to change the function. See if you can figure out in what circumstances other versions of the drawMappedFaces function are called, and whether or not you think those are important cases to fix.<br></div><div><br></div><div>Another case where the current code doesn&#39;t work for displaying alpha is when you have pushed the &#39;Face selection used for masking&#39; or &#39;Vertex selection used for masking&#39; buttons in vertex paint.  You may want to see if you can figure out how to fix those cases too.</div><div><br></div><div>I put some hints on how the drawing code works in the basic case in our shared notes, doc, <a href="https://docs.google.com/document/d/1SX6ASWpYPoJ3EYJri8bX3BfXC5e-mOmraZkKMH8z4_U" target="_blank">https://docs.google.com/<wbr>document/d/<wbr>1SX6ASWpYPoJ3EYJri8bX3BfXC5e-<wbr>mOmraZkKMH8z4_U</a></div><div><br></div><div>You can generally figure out stuff like this yourself by putting breakpoints at interesting places in the code and step through from the breakpoints, to see what code is called, what direction tests go, etc.</div><span><div><br></div><br><div class="gmail_quote"><div>On Fri, Jul 14, 2017, 5:00 AM Darshan  kadu &lt;<a href="mailto:darsh7807@gmail.com" target="_blank">darsh7807@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hello, Mr. Howard,<div><br>I have pushed the suggested changes. It is working properly for the meshes without subdividing.</div><div>But after the subdivide it is giving the rectangularly shaped spots. I tried, but I am not getting any hints. What can be happening?</div><div><br></div><div>Thank you,</div></div><div class="gmail_extra"><br></div>
</blockquote></div></span></div>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">______________________________<wbr>_________________<br>
Soc-2017-dev mailing list<br>
<a href="mailto:Soc-2017-dev@blender.org" target="_blank">Soc-2017-dev@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/soc-2017-dev" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/soc-2017-dev</a><br>
<br></blockquote></div></div>
______________________________<wbr>_________________<br>
Soc-2017-dev mailing list<br>
<a href="mailto:Soc-2017-dev@blender.org" target="_blank">Soc-2017-dev@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/soc-2017-dev" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/soc-2017-dev</a><br>
</blockquote></div></div>
<br>______________________________<wbr>_________________<br>
Soc-2017-dev mailing list<br>
<a href="mailto:Soc-2017-dev@blender.org" target="_blank">Soc-2017-dev@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/soc-2017-dev" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/soc-2017-dev</a><br>
<br></blockquote></div></div>
______________________________<wbr>_________________<br>
Soc-2017-dev mailing list<br>
<a href="mailto:Soc-2017-dev@blender.org" target="_blank">Soc-2017-dev@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/soc-2017-dev" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/soc-2017-dev</a><br>
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
Soc-2017-dev mailing list<br>
<a href="mailto:Soc-2017-dev@blender.org" target="_blank">Soc-2017-dev@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/soc-2017-dev" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/soc-2017-dev</a><br>
<br></blockquote></div><br></div>
______________________________<wbr>_________________<br>
Soc-2017-dev mailing list<br>
<a href="mailto:Soc-2017-dev@blender.org" target="_blank">Soc-2017-dev@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/soc-2017-dev" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/soc-2017-dev</a><br>
</blockquote></div></blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
Soc-2017-dev mailing list<br>
<a href="mailto:Soc-2017-dev@blender.org">Soc-2017-dev@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/soc-2017-dev" rel="noreferrer" target="_blank">https://lists.blender.org/<wbr>mailman/listinfo/soc-2017-dev</a><br>
<br></blockquote></div><br></div>