Yup, the cookbook applies to 1.6, but we've changed things a bit in the trunk so as to enable parallel volume rendering -- and to make some things nicer. For instance, you can now sample colormaps, automatically add layers, etc etc. We're also just about ready to roll out multivariate volume rendering, including planck functions and scattering.
Anyway, I'm sorry that it's not working right now for you! To use the script, we just need to get rid of direct_ray_cast, which we can replace with:
vp = pf.h.volume_rendering(L, W, c, Nvec, tf) vp.ray_cast()
At this point, we can get the image as vp.image:
to_plot = na.clip(vp.image, vp.image.min(), 0.8 * vp.image.max()) to_plot = (to_plot - to_plot.min()) / (to_plot.max() - to_plot.min())
(we still have to normalize, unfortunately -- we're working on that for the future.)
And we now also provide a saving function:
vr.plot_rgb(to_plot, "%s" % pf)
I've uploaded a new version of the cookbook recipe here:
which you can download with "yt_lodgeit.py --download=404". One thing you might consider is that sometimes it's easier to just "add_layers(N)" on the transfer function, optionally supplying the name of a colormap (defaults to gist_stern) so that yt will add onion layers to your image at even intervals. I've uploaded an example of that here:
Anyway, sorry for the trouble, but I hope that the annoyance is worth the new advantages!
On Tue, Mar 30, 2010 at 11:07 AM, Nicholas M. Earl email@example.com wrote:
Hey again YT community,
I was hoping to get some heading on using the simple volume rending script that is written up in the YT cookbook, but it seems that direct_ray_casting isn't a part of yt extensions anymore? Is there something to substitute this? I see that in the software sample script, there is a referencing of VolumeRendering, can I use this?
Thanks for your time and effort! Nicholas Earl
yt-users mailing list firstname.lastname@example.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org