I try to compare the different render modes in Ovito, while I find AnariRenderer mode dose not work. It just produces a black picture, but other mode can obtain the right result.
Here is the python script:
import os
os.environ['OVITO_GUI_MODE'] = '1'
import ovito
from ovito.io import *
from ovito.vis import *
from ovito.modifiers import *
pipeline = import_file('test.data')
pipeline.add_to_scene()
vp = Viewport(type=Viewport.Type.Ortho, camera_dir=(-2, -1, -1), preview_mode=True)
vp.zoom_all()
pipeline.modifiers.append(
ColorCodingModifier(
property = 'Position.X',
gradient = ColorCodingModifier.Rainbow()
)
)
pipeline.compute()
for label, renderer in zip(['opengl', 'tach', 'osp', 'ana'], [OpenGLRenderer(), TachyonRenderer(), OSPRayRenderer(), AnariRenderer()]):
print(f'Rendering {label}...')
vp.render_image(filename=f'{label}.png', alpha=False, renderer=renderer, size=(1200, 800), background=(0, 0, 0))
pipeline.remove_from_scene()
I can not upload the data file due to new user limitation, while you can use any other files to reproduce the results.
My system information is as below:
Win 11
python 3.11.8
ovito 3.10.3
GPU information:
NVIDIA-SMI 537.32 Driver Version: 537.32 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M |
Any suggestions are helpful. Thanks a lot.