How to export a curve network with normals in Blender

9 April 2018 in blender

Most curve network datasets found online contain only positions and not surface normals along the curves (Cycles, True2Form, ILoveSketch). When I needed to create a bunch of synthetic curve networks with normals to test our surfacing algorithm, I thought this could be easily done using Blender:

  1. Select the network on a mesh
  2. Separate the network from the mesh using the Separation tool (P)
  3. Export the network as an OBJ file (including the normals)

It turned out to be much more tricky than that.

continue reading…

Zippering two pdfs

1 September 2017 in cmd

If for some reason you have two pdfs with separated odd and even pages of a document, the following command zippers them into a single pdf. (Assuming odd.pdf and even.pdf have the same number of pages; in this case 8.)

qpdf --empty --pages $(for i in $(seq 1 1 8); do echo " odd.pdf $i even.pdf $i "; done) -- all.pdf

Re-encoding subtitles in utf-8

29 August 2017 in cmd

Most Slovak/Czech subtitles are encoded in Plex-incompatible windows-1250 (wiki). The following changes the encoding to utf-8.

iconv -f windows-1250 -t utf-8 subs-win-1250.srt > subs-utf-8.srt

Compressing papers with ghostscript

5 May 2017 in research

When searching for ways to compress the size of a ~50MB paper pdf, I’ve discovered the following ghostscript command (askUbuntu, TeX StackExchange)

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf original.pdf

Argument of -dPDFSETTINGS can be any of:

-dPDFSETTINGS=/screen   # lower quality, smaller size.
-dPDFSETTINGS=/ebook    # for better quality, but slightly larger pdfs.
-dPDFSETTINGS=/prepress # output similar to Acrobat Distiller "Prepress Optimized" setting
-dPDFSETTINGS=/printer  # selects output similar to the Acrobat Distiller "Print Optimized" setting
-dPDFSETTINGS=/default

(descriptions copy-pasted from askUbuntu)

I wrote a small script to test the different -dPDFSETTINGS modes.

continue reading…

3d fabricated lilium

15 February 2017 in research

We got this giant plastic lilium for the tests of our sensor surface reconstruction. Looking forward to the experiments!

(The small device in the middle is the Morphorider.)