This document is meant to organize answers to common task oriented problems, replacing (or at least augmenting) the usual approach of "just asking Szymon." Please add your own questions and solutions.
- How do I export a good quality, small size movie from Premiere?
- I need a very simple shape. How do I make it?
- Do we (Princeton Graphics Group) have good models lying around?
- Where can I find good models on the internet?
- How can I get models from Sketchup to a format I can use?
- How do I subdivide a mesh?
- How do I smooth a mesh?
- How do I remesh (retriangulate, reparameterize) a mesh?
- How do I decimate a mesh?
- How can I convert a mesh from format X to format Y?
- My mesh has holes. How can I fix it?
- What magic environment variables do I need to make Qt work?
- How can I set up the Qt Windows Open Source version to work with Visual Studio?
How do I export a good quality, small size movie from Premiere?
- Export a 95-100% quality "Motion JPEG A" video from Premiere.
- Compress this large (often ~1GB) file using mencoder and Szymon's toavi script, which is also reproduced below:
#!/bin/sh - rate=1200 #codec=msmpeg4 codec=mpeg4 case $# in ) echo "$0 in.avi out.avi [bitrate]" ; exit 1 ;; 3) rate=$3 ;; esac mencoder $1 -vf eq2=1.2:1.0:-0.1:1.0:1.0:1.0:1.0:1.0 -ovc lavc -oac mp3lame \ -lavcopts vcodec=$codec:mbd=2:mv0:trell:cbp:vqmin=3:last_pred=2:turbo:vbitrate=$rate \ -ffourcc MP43 -ofps 29.97 -o $2
- If you want it to play in Windows Media Player, you may need the "msmpeg4" codec.
- I'm sure there is something I'm forgetting about this whole thing...
I need a very simple shape. How do I make it?
Use mesh_make. It is part of trimesh2 and available at http://www.cs.princeton.edu/gfx/proj/trimesh2. It can make at last count:
plane m [n] m x n tesselated square (default n = m) bump n sigma n x n tesselated Gaussian bump of width sigma wave n omega n x n tesselated sine wave of frequency omega frac n n x n fractal landscape cube n n x n tesselated cube disc n m Circular disc, tesselated with m rings of n points cyl n m [r] Cylinder of radius r (default 1) ccyl n m [r] Capped cylinder cone n m [r] Cone ccone n m [r] Capped cone torus n m [r] Torus of minor radius r (default 0.25) knot n m [r] Trefoil knot of minor radius r (default 0.2) klein n m Klein bottle helix n m t [r] Helix of minor radius r, with t turns sphere n m Sphere, tesselated in polar coordinates platonic n Platonic solid with n sides ssphere n m Sphere, subdivided m times from a Platonic of n sides rd Rhombic dodecahedron rt Rhombic triacontahedron
Use Sketchup. Sketchup can do simple CSG operations. See answer below for how to convert sketchup files to something useful.
Do we (Princeton Graphics Group) have good models lying around?
There are some models in various peoples directories on graphicslab. Check /n/fs/graphicslab/smr/models and /n/fs/graphicslab/fcole/models for a start.
Where can I find good models on the internet?
Some good places to look include:
- Aim @ Shape: a nice collection with a variety of models including some commonly used models (rockerarm, fandisk, camel, dinopet, etc.).
- The Stanford 3D Scanning Repository: they have the bunny, armadillo, dragon, buddha, and others.
- Suggestive Contour Gallery: has links to models used for suggestive contours work.
- Google 3D Warehouse: the warehouse is accessed through Sketchup. It has a bewildering array of models of varying quality.
- Princeton Shape Benchmark: Contains a bunch of models suitable for shape analysis work.
How can I get models from Sketchup to a format I can use?
Method 1:Use a Sketchup plugin. Sketchup uses Ruby (God knows why) for its scripting language. There is an OFF exporter script available at
/n/fs/graphicslab/fcole/sketchup_exporter/off_exporter.rbOn windows, place it in
C:\Program Files\Google\Google SketchUp 6\Plugins
Use the Sketchup export feature to export to a KMZ (Google Earth 4) file. This is a COLLADA file. COLLADA is the all-singing, all-dancing graphics file format of the future. You can use FCollada or the COLLADA DOM to read it (not recommended, since both are absurdly heavyweight) or libcda, which is a simple but limited COLLADA library based on Qt (ask fcole).
How do I subdivide or smooth a mesh?
Use mesh_filter. It is a part of trimesh2. It can do planar, Loop, and butterfly subdivision, and gaussian, bilateral, umbrella, and lambda-mu smoothing.
How do I remesh (retriangulate, reparameterize) a mesh?
I hope to find this out soon.
How can I decimate a mesh?
Michael Garland's qslim is a good place to start, if you don't already have an implementation from when you took COS526.
How can I convert from format X to format Y?
Use mesh_filter. It will convert to and from anything trimesh2 can read, which includes at least OFF, PLY, and OBJ. For conversion, use it with no arguments like so
mesh_filter frommesh.off tomesh.ply
My mesh has holes. How can I fix it?
Try smr's hf program. It is available at ~smr/proj/hf.
What magic environment variables do I need to make Qt work?
See Configuring Qt.
How can I set up the Qt Windows Open Source version to work with Visual Studio?
In order to make Qt support MS Visual Studio .NET 2005, an unofficial patch is required. Download the patch from sourceforge.net. Install Qt as follows:
- Unpack the qt open source sources qt-win-opensource-src-4.2.2.zip to C:\Qt\4.2.2.
- Unpack acs-4.2.2-patch1.zip into C:\Qt\4.2.2\.
- From within the Visual Studio Command Prompt (under Start->Programs->...->Visual Studio Tools), not from cmd.exe, call:
installpatch42.bat qconfigure msvc2005 nmake
- If required, to start over, type
nmake distcleanand then re-run
qconfigure.bat. (Note: you must not call configure.exe; rather use qconfigure.)