From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Feb 26 2009 - 23:46:09 CST

For the existing versions of VMD, the drawn objects in a single molecule
all share the same material, which is why it behaves the way it does.
You can put your drawn objects into separate molecules if you need to
use multiple materials. I plan to revise this in a future rev of VMD,
but haven't gotten to it yet.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Thu, Feb 26, 2009 at 09:31:08PM -0800, BIN ZHANG wrote:
> Dear all:
>
> I was playing with the "draw" command in VMD, and found it hard to use
> two different drawing materials in the same script.
>
> Here is my script :
>
> =============================
> # draw the plane
> draw delete all
> draw color 3
> draw material Transparent
> draw triangle $left_up $left_down $right_up
> draw triangle $left_down $right_up $right_down
>
> # draw x axis
> draw color 1
> draw material Opaque
> vmd_draw_arrow $origin [vecadd $origin [vecscale 20 $unitx]] "x axis"
> # draw y axis
> draw color 7
> vmd_draw_arrow $origin [vecadd $origin [vecscale 20 $unity]] "y axis"
> # draw z axis
> draw color 0
> vmd_draw_arrow $origin [vecadd $origin [vecscale 20 $unitz]] "z axis"
>
> ===============================
>
> The second command "draw material Opaque" will always overwrite the
> first "Transparent" material.
>
> Is it possible to use TWO different materials at all?
>
> Thanks a lot.
> Bin
>
>
>

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078