dump_image - transparent atoms

Dear users and developers,

Is there a way to dump a jpg or ppm file image of the simulation where
some atom types are transparent?

Thanks,

Jan-Michael

It sounds like a job for VMD and not for Lammps. Dump all atoms and
then use VMD to select only the ones you want to show.

-s-

Yes, Please try by dump_modify command.

Farrokh

You can do dump image with a subset of atoms (e.g. the group),
like any other dump command. If you mean draw an atom in
a semi-transparent manner, then there would need to be
some clever pixel rendering code for an atom sphere added to the
Image class, e.g. in draw_sphere and draw_pixel. Probably possible.

Steve

You can do dump image with a subset of atoms (e.g. the group),
like any other dump command. If you mean draw an atom in
a semi-transparent manner, then there would need to be
some clever pixel rendering code for an atom sphere added to the
Image class, e.g. in draw_sphere and draw_pixel. Probably possible.

...and it will probably look nothing than what people expect.

from a lot of discussions on the VMD mailing list, that typically
people are looking for one of two things:

- angle dependent transparency. (check out the first 4 images
in the slide show on the top left of this page)
http://sites.google.com/site/akohlmey/images-and-movies

- having a composite image that doesn't have
  transparent atoms, but rather would be created using
  multiple "layers" in gimp or photoshop with different
  transparency. this would require rendering multiple images
  with opaque atoms and different atom selections and then
  composing the final image with an external tool.

regular transparent objects in a rendered image look
horrible and rarely help to demonstrate what is desired to show.

just my 2 cents on the subject,
    axel.

Steve,

I remember in opengl where you can specifiy an "alpha" value. An alpha
value of 1.0 is full intensity and is fully opaque. If there is
something similar to that in libjpeg then it is possible to specify
transparency for both bond or atom types.

Jan-Michael

Axel,

I agree with you but having something "on the fly" just to view one
atom type and how it is positioned with respect to another atom type
(solvent) is very convenient. Dumping coordinates and using vmd , as
Salomon suggested would work but it will consume lots of HD space
especially if your system is large. Rendering multiple layers of
images just add extra work and is cumbersome for doing "on the fly"
visualization.

Jan-Michael

Axel,

I agree with you but having something "on the fly" just to view one
atom type and how it is positioned with respect to another atom type
(solvent) is very convenient. Dumping coordinates and using vmd , as

have you looked at how images look if you turn on transparency in VMD?
people ask for this kind of setup on the mailing list again and again,
but then are hugely disappointed at the outcome.

Salomon suggested would work but it will consume lots of HD space
especially if your system is large. Rendering multiple layers of
images just add extra work and is cumbersome for doing "on the fly"
visualization.

three more comments.

a) you can always dump only a relevant subset of your system
use a compact file format like xtc (which your can trade off
accuracy for compression) and save coordinates infrequently.

b) you can actually connect VMD to your ongoing simulation
via IMD without having to store anything but a matching data
or psf file that contains the relevant coordinate data. check out
the details of fix imd and you'll see that there are two modes.
one where fix imd waits for a connection and one where it doesn't.

c) you can easily script the layered transparency setup using
netpbm and dumping two sets of image files. i am certain that
this kind of approach is much more helpful for what you want
then having transparent atoms.

axel.

have you looked at how images look if you turn on transparency in VMD?
people ask for this kind of setup on the mailing list again and again,
but then are hugely disappointed at the outcome.

I did not try VMD but I have an in-house code that uses opengl. Please
see attached jpg file. The red sheet at the interface is opaque
(alpha=1.0). Having something outputted by lammps would be very
convenient.

Thanks for the other comments. I will consider them and see if it can
be of used or relevant in my setup. I will take a look at netpbm.

Jan-Michael

Opaque_vs_Transparent.jpg

have you looked at how images look if you turn on transparency in VMD?
people ask for this kind of setup on the mailing list again and again,
but then are hugely disappointed at the outcome.

I did not try VMD but I have an in-house code that uses opengl. Please
see attached jpg file. The red sheet at the interface is opaque
(alpha=1.0). Having something outputted by lammps would be very
convenient.

transparent OpenGL is *not* rendering with transparency.
OpenGL just ignores transparent objects if you stack too
many on top of each other. this is one of the "design tricks"
that keep it fast. you need add very special hooks in the
rendering code to add this behavior. i've been discussing
this repeatedly with john stone and i think he has it now
working in his tachyon raytracer.

this is *exactly* what i meant with people being disappointed
on the VMD list. because what the renderer creates using
transparency, looks very different from your OpenGL picture.

you should definitely have a look at the most recent VMD version.
it has a (GPU/Multi-thread accelerated) "QuickSurf" representation,
which can be efficiently combined with the angular dependent transparency
it - in my opinion - gives the best kind of visualization for what you
are looking for *and* it renders fast enough for interactive use. check out:
https://picasaweb.google.com/lh/photo/BMZxu2cGZhNPllx95YmHOdMTjNZETYmyPJy0liipFm0?feat=directlink
this one is using OpenGL and this one raytracing:
https://picasaweb.google.com/lh/photo/-1WEt4u41zSNcZr5nV-cCdMTjNZETYmyPJy0liipFm0?feat=directlink

cheers,
    axel.

Axel,

Thanks, I will take a look at this as well.

Jan-Michael