Hi yt users,<div><br></div><div>I'm having a lot of trouble recreating a volume rendering I did a couple of weeks ago. Specifically, when I try to add</div><div>a boundary box to my snapshot through draw_domain() or grids through draw_grids(), the transfer function rendering fades very significantly, regardless of alpha value, and it did not behave this way before. </div>


<div>However, it does not fade for cam.draw_box(... , ... , np.array([0.1, 0.1, 0.1, 0.2]) . Since draw_domain is basically just a call to draw_box, I took a look in camera.py and did a bit of testing, and the only difference is that the color array is np.array([1.0,1.0,1.0,alpha]) (where alpha=0.2) for draw_domain, and that is what seemed to be causing so much fade in the case of draw_domain. I didn't experience this problem before. Also, I don't know much about how this color stuff works, but I was under the impression that only the alpha value determined how bright the box is compared to the rendering underneath. Furthermore, when I decrease the alpha value, the box fades, but so does the rendering underneath, which should not be the case (?).</div>


<div><br></div><div>I see the same behavior when doing draw_grids. Here is the image I created a couple of weeks ago: <a href="http://i.imgur.com/R0uhz2D.png" target="_blank">http://i.imgur.com/R0uhz2D.png</a></div><div>

And here is the image that the same script (very nearly) creates now: <a href="http://i.imgur.com/xcTmCMC.png" target="_blank">http://i.imgur.com/xcTmCMC.png</a></div>
<div>The rendering underneath the grids is nearly invisible in the second one. If I stack another draw_grids onto the image after this, for a different level range, the rendering goes completely invisible, and the first set of grids almost does-- again, even with alpha values of ~0.05.</div>

<div><br></div><div>For reference, here is the script I'm using:</div><div><br></div><div>-----------------------</div><div><div>from yt.mods import *</div>
<div>pf = load("plt_derr_perr_grav_00020")</div><div>field = "pressure"</div><div>[variable definitions, cut out for clarity]</div><div><br></div><div>pf.h</div><div>pf.field_info[field].take_log=True</div>

<div><br></div><div>tf = ColorTransferFunction((mi-1, ma+1), nbins=1.0e6)</div><div><br></div><div>tf.sample_colormap(np.log10(2.0e21), 0.006, col_bounds=[mi,ma],</div>
<div>                   alpha=[55.0], colormap="RdBu_r")</div><div><br></div><div>tf.add_layers(6, mi=di, ma=da,</div><div>              col_bounds=[pu,da],</div><div>              alpha=26*na.ones(6,dtype='float64'), colormap="RdBu_r")</div>

<div><br></div><div>[more layers, cut out for clarity]</div><div><br></div><div>tf.grey_opacity=True</div>
<div><br></div><div><br></div><div>c = [5.0e9, 5.0e9, 5.0e9]</div><div>L = [0.15, 1.0, 0.4]</div><div>W = (pf.domain_right_edge - pf.domain_left_edge)*1.25</div><div>Nvec = 768</div><div><br></div><div>cam = pf.h.camera(c, L, W, (Nvec,Nvec), transfer_function = tf,</div>


<div>                  fields=[field], pf=pf, no_ghost=False)</div><div>im = cam.snapshot(clip_ratio=6.0)</div><div><br></div><div><br></div><div>im.add_background_color('black', inline=True)</div>
<div>cam.draw_box(im, np.array([3.0e9, 4.0e9, 4.0e9]),</div><div>             np.array([7.0e9, 6.0e9, 6.0e9]), np.array([0.1, 0.1, 0.1, 0.2]))</div><div><br></div><div>nim = cam.draw_grids(im, alpha=0.08, min_level=1)</div>


<div><br></div><div>nim.write_png('v1.png')</div></div><div>-----------------------</div><div><br></div><div>Am I doing something wrong or missing something obvious? Was the behavior of draw_grids and draw_domain changed with the new update? Thanks for your help!</div>

<div><br></div><div>-Noel Scudder</div>