Editing User:Rishabhsuthar32/GSoC20/Log

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 62: Line 62:
 
** '''August 12''': The Superell patch is not rendering, though it was one of the simplest one. I think I am missing out on something trivial but can't figure out what. I want to re-do SUPERELL primitive from scratch.  
 
** '''August 12''': The Superell patch is not rendering, though it was one of the simplest one. I think I am missing out on something trivial but can't figure out what. I want to re-do SUPERELL primitive from scratch.  
 
** '''August 13''': Turns out, I missed one variable while passing it from .c file to .cl shot file - variable 'n'. It is now rendering, although not exactly the same. Gotta ask Sean on this!
 
** '''August 13''': Turns out, I missed one variable while passing it from .c file to .cl shot file - variable 'n'. It is now rendering, although not exactly the same. Gotta ask Sean on this!
** '''August 14''': Documented here in the wiki logs all MGED commands to render various primitives for future purpose.
+
** '''August 14''': Documented here and added in wiki logs all MGED commands to render various primitives for future purpose.
* Week 12
 
** '''August 17''': I'm unable to make superell primitive with "in" command. It throws error: rt_db_external5_to_internal5(superell.s):  unable to import non-BRL-CAD object, major=255 minor=35 . Deep diving into this for possible bug. It is accepting none of the abc/ne parameter values. Even with e=n=1 where it should form Sphere or ellipsoid with n=2.
 
** '''August 18''': That seemed to be a random error. I cloned a fresh repository and started again. The C rendering of the Superell worked with normal parameters. Don't know why it didn't work in previous repository. No luck with _shot.cl file though!
 
** '''August 19''': Gave HYP primitive a try as well. This is also one of the simpler primitive to work on. And it worked. Both the C and OpenCl renderings of the primitive match and with better performance in OpenCl. Hurrray!
 
** '''August 20''': Submitted the patch for HYP primitive here: https://sourceforge.net/p/brlcad/patches/553/ . Moving back, it seems I'm facing issues with memory allocation in OpenCL versions of other primitives I worked on which is why they don't render as expected. Looking into possible solutions!
 
** '''August 21''': Did a quick pixdiff to ensure both the renderings are similar or not. Couldn't understand the usage of pixdiff in BRL-CAD MGED terminal, so tried via OpenCV package in python.
 
* Week 13
 
** '''August 24''': It is officially the last week of GSoC. Gotta devote my time in documentation and logging details for future references. Also, turns out, we can hit pixdiff command in the way discussed in Issue 4 below.
 
** '''August 25''': Started the documentation process. Decided to use BRL-CAD wiki instead of Google Doc or GitHub page for this purpose. Took screenshots of rendering logs for performance measure and the images of primitives rendered.
 
**'''August 26''': Ensured all the patches submitted work smoothly with the latest version of the BRL-CAD repository!
 
**'''August 27''': Working on the final report, using performance and testing.
 
**'''August 28''': Completed the report, submitted to Sean for reviewing!
 
**'''September 1''': Nirt command probably needs a more detailed looking into. It should ideally have -z flag as well. Will look into it later. And so, the GSoC season ends.. Until next time!
 
 
 
 
 
  
 
== Major Issues Faced ==
 
== Major Issues Faced ==
Line 103: Line 88:
 
** '''Issue''':  The MGED commands to render the primitives don't have a proper documentation. I faced issues while making them so that they can render properly because the values for some of the variables are highly constrained according to their logic implemented. While trying to render, it got "segmentation fault" error code
 
** '''Issue''':  The MGED commands to render the primitives don't have a proper documentation. I faced issues while making them so that they can render properly because the values for some of the variables are highly constrained according to their logic implemented. While trying to render, it got "segmentation fault" error code
 
** '''Solution''': I've started documenting the commands for most primitives here in the logs for future reference. I'll keep on adding more as and when I find them.
 
** '''Solution''': I've started documenting the commands for most primitives here in the logs for future reference. I'll keep on adding more as and when I find them.
 
=== Issue 4 ===
 
** '''Issue''':  Once the OpenCL version renders successfully, I didn't know the exact technical methods to follow to ensure both the C and OpenCL version are identical.
 
** '''Solution''':
 
Method 1: Both the renderings of C and OpenCL version should look alike. Check this via rotating in different angles in MGED window. 
 
Method 2: Using pixdiff method.
 
<pre>
 
cd brlcad-svn-trunk
 
cd build
 
bin/pixdiff file1.pix file2.pix > out.pix
 
bin/pix-png -o out.png out.pix > out.png
 
</pre>
 
The details are in these link: https://brlcad.org/~nouhrasofat/man1/en/pixdiff.php and https://brlcad.org/~nouhrasofat/man1/en/pix-png.php . The images can be stored in pix format via the -o flag in the MGED window itself!
 
Method 3: The CPU performance in the logs registered while rendering a primitive should improve in OpenCL version compared to C version.
 
 
  
  
== MGED Commands to draw primitives ==
+
== Commands to draw primitives ==
===ARBN===
 
<pre>in arbn.s arbn 8 1 0 1 1 -1 0 0 1 0 1 0 1 0 -1 0 1 0 0 1 1 0 0 -1 1 0.5 0.5 0.5 1 -0.5 -0.5 -0.5 1</pre>
 
===ARS===
 
<pre>in x.1 ars 4 6 0 0 3 1 1 3 1 -1 3 -1 -1 3 -1 1 3 1 1 1 1 -1 1 -1 -1 1 -1 1 1 1 0 -1 0 -1 -1 -1 0 -1 0 1 -1 1 0 -3 0 -1 -3 -1 0 -3 0 1 -3 0 0 -3</pre>
 
 
===CLINE===  
 
===CLINE===  
 
<pre> make cline.s cline </pre>
 
<pre> make cline.s cline </pre>
Line 134: Line 100:
 
<pre> in rcc1.s rcc 0 0 0  1 1 1  0.5 </pre>
 
<pre> in rcc1.s rcc 0 0 0  1 1 1  0.5 </pre>
 
===SUPERELL===
 
===SUPERELL===
<pre> in ell.s superell 0 0 0  0 -1 0  1 0 0  0 0 1 1 3 </pre>
+
<pre> make superell.s superell </pre>

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)