From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Sep 19 2019 - 10:43:17 CDT

Hi,
  Aside from the workaround and I described to Walter, OBJ is a very poor
choice for these kinds of scenes as it doesn't even support per-vertex colors.

Also, while OBJ does (in its original form) support spheres and cylinders,
almost none of the existing open source software tools (Blender et al.)
are capable of parsing anything other than triangle mesh geometry,
so VMD only uses the subset of the OBJ format geometry types that
these other tools can actually parse. I would generally advise people
to use more modern scene formats such as X3D whenever possible.

I've been working with the Khronos glTF group to convince them to add
support for spheres, cylinders, and other geometry types that are critically
important for molecular visualization, but it will have to happen in future
versions of the glTF spec.

My hope is that we'll get an increasing fraction of what we need in future
revs of glTF and X3D which are both actively under development.

Best,
  John Stone

On Thu, Sep 19, 2019 at 07:37:07AM +0000, Luciano Abriata wrote:
> Ciao Walter,
>
> I've been using obj+mtl files for some AR applications and indeed, the colour information of some objects, particularly meshes, is lost. Luckily, in HTML you can color-code the mesh ad hoc (this only works if you don't load the mtl file, thus leaving all materials free to be set from code). Maybe you can use a similar trick in the program you are using.
>
> Note I have also seen some inversions going on in the meshes (like say x coordinates become -x) that I don't understand, but luckily HTML provides a way to re-invert them. I asked about these issues in this mailing list but apparently there's not much development going on.
>
> Best
>
> Luciano
>
> ________________________________________
> De: owner-vmd-l_at_ks.uiuc.edu [owner-vmd-l_at_ks.uiuc.edu] en nombre de Walter Rocchia [Walter.Rocchia_at_iit.it]
> Enviado: miércoles, 18 de septiembre de 2019 23:10
> Para: vmd-l_at_ks.uiuc.edu
> Asunto: vmd-l: exporting 3D model of a volume-based colored mesh
>
> Hi,
> I would like to export the mesh of a surface created in VMD and colored based on a electrostatic potential. The final aim would be to have a 3D model on it (e.g. a .u3d format)
> I tried most of the output options provided by VMD, including wavefront .obj and .mtl files. When the surface is colored with a colorID, it seems to work.
> In contrast, when I loaded these files in Meshlab, it seemed that the information of the color was missing?
>
> Is there any way to do it correctly?
>
> Thank you
> Walter
>
> *********************************************************************
> Walter Rocchia, PhD, Head
> Computational mOdelling of NanosCalE and bioPhysical sysTems - CONCEPT Lab<https://urldefense.proofpoint.com/v2/url?u=https-3A__concept.iit.it&d=DwMGaQ&c=OCIEmEwdEq_aNlsP4fF3gFqSN-E3mlr2t9JcDdfOZag&r=JBqQLS7jZ5whrB0hXJY8MNYcfDrh8UhlGJ2ANxoi8s0&m=IMSOYQxDteyG_ge_qxjPTnX6-k5PSRM7WnsmiyXyAMI&s=H8w19ltzEsfSzCdd6zsxnB8g8xUhmMkVGiCELWlagcw&e=>
> ISTITUTO ITALIANO DI TECNOLOGIA
> Via Melen ? 83, B Block, 16152 - Genova, Italy
> Phone: +39 010 2897418
>

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