Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Summary

A special treatment for 3d models in glb/gltf format is implemented in the Binaries Service. 

...

This preview generation happens on the cluster nodes. A Chrome browser instance is started on a virtual framebuffer device. The model is loaded by the browser and then a screenshot of the browser is taken. 

Obtain Sources

The software can be obtained by executing

Code Block
git clone https://dev.fiz-karlsruhe.de/stash/scm/ddb/3d-screenshot-generator.git

Installation

In order for this the scripts to work the follwing packages following things need to be installed done on the cluster nodes: 


Code Block
sudo yum install npm 
sudo yum install xorg-x11-server-Xvfb
sudo yum install atk java-atk-wrapper at-spi2-atk gtk3 libXt ImageMagick

# Register and start Xvfb service 
sudo echo "
[Unit]
Description=Xvfb headless plotting
After=network.target

[Service]
User=root
ExecStart=/usr/bin/Xvfb :0 -screen 0 1280x1024x24

[Install]
WantedBy=multi-user.target
Alias=Xvfb.service
Alias=xvfbd.service
" > /etc/systemd/system/xvfb.service

sudo systemctl daemon-reload
sudo systemctl enable xvfb
sudo systemctl start xvfb

Configuration and Problem solving

Please always refer to the projects Readme file (especially for CentOS 7 systems). The configuration in appconfig.json needs to be adapted.

Regular problems

If some models work and other models don't work do the following checks:

  1. Always first check if the timeout setting (in appconfig.json) is high enough.
  2. Is is the correct Binary Server (in appconfig.json)?
  3. It could be that the Puppeteer (Chromium) version is to old for newer generated model version. Update Puppeteer (and Node itself).