> Hmmm. There seem to be a couple of issues here:
>
> The boolean weaving code expects seg_in.hit_rayp and seg_out.hit_rayp to
> be pointing to something. These values are mostly used for debug printfs in
> bool.c with the exception of bool.c:bool_max_raynum. So I changed this to
> point to a dummy struct xray.
>
> There just 2 occurrences of hit_rayp (sanity checks) in bool.c, so I had
temporarily commented out both of them. But yeah your way is a lot more
cleaner. I changed my code too.

The other issue is that the number of partitions per pixel is not
> necessarily the same as the number of segments. IIRC it may be larger. I
> changed the patch to only copy the first partition per pixel. This may not
> be sufficient when doing multi-hit rendering.
>
> I had an insight on this and wrote a post. Check this out -

https://catchchaos.wordpress.com/2016/07/11/shading/

Let me know what you think.

> There may still be issues with the regionbits and solidbits
> initialization. Or, like you said, with a mismatch between the
> implementation of the partitions and the segs that are currently used in
> the OpenCL shading code.
>
> I still think this is an important issue and am stumped as to how to get
around this.

>
> Get a sample .g file which demonstrates the issue with the subtraction
> boolean op. Then we can compare the results from the OpenCL code with the
> results from the ANSI C code. One simple way to do this is to dump the per
> pixel partition length results to a grayscale image. e.g. you can use the
> PPM P2 graymap image format which is simple to write:
> https://en.wikipedia.org/wiki/Netpbm_format
>
> This should make the result comparison easier than looking at a text dump.
>
> There already is a sample .g file (build/share/db/boolean-ops.g). My code
does in fact generate an image on the screen. But all the primitives are
displayed and the color is distorted in some places. I suppose I could dump
and create a greyscale image, but don't feel I really need to right away.

Also, is your local copy functional. Do you get correct results with
weaving in OpenCL?

Sorry for the delay, my Nvidia drivers crashed suddenly and I took some
time to fix and update them.

Best,
Param
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to