Forum Navigation
You need to log in to create posts and topics.

particle type visualization


I would like to visualize a system where I have two types of spherical particles, and I would like to be able to set a different colour and radius for each type. I tried to do this by using the settings in 'Data source / Particle Type', but with no success.

If I load a xyz file where I have the particle coordinates and type, but no radius, I am not able to set two different radii. I am also not able to impose two different colours for the particles or, more correctly, in the 'Data source / particle type' I can set the two colours for the two types, but it does not apply them and everything remains grey..

If I load a xyz file with particle coordinates, type and radius specified, I appearently can set/change the colours and radii in the 'Data source/Partycle type' but only the colour gets visualized correctly. Namely, I can change the radius in the menu of the Data Source, but the visualization does not change, which means that I am bound to the values of the radii indicated on the xys for the visualization.

How can I get the correct visualization?

Hi Laura,

Without knowing your input data file it is difficult to give you specific instructions. But I can try to describe the general system by which OVITO chooses particle colors and radii.

When rendering a particle, OVITO first checks if the Radius and the Color particle properties have been defined. If yes, then the per-particle values from these property arrays will be used for rendering that particle. These particle properties may come from the imported data file, or they may be assigned within OVITO by modifiers in your data pipeline. Use the data inspector panel of OVITO to check which properties are currently defined for your dataset. Furthermore, your can add the Compute Property modifier to your pipeline to explicitly set the values of these properties, giving you full control over the size and color of each individual particle.

Only if Radius or Color  properties do not exist, then OVITO will use the particle types to determine the color and/or the radius of the particles. You can change the color and radius of each particle type in the 'Data source / Particle types' panel, which you mentioned. Note that the radius value of a particle type is only used if it is greater than zero. If the radius of the type is set to zero, then the default particle radius is used to render particles of this type, which can be adjusted in the parameter panel of the visual element "Particles".

Note that the item 'Data source / Particle types' in the pipeline editor will only present if the particle property Particle Type has been loaded from the input data file. If that property does not exist, then the particles have no types, and they will all be rendered with a uniform white color. This is unless the Color particle property is assigned to the particles, which has the highest priority as described above.

I hope this information helps you solve your problem. If not, please save your program session as a .ovito file and send it to us together with the imported data file. We can then analyze the situation for you.