Difference between revisions of "Graphics FAQ"

From CSWiki
Jump to: navigation, search
(Making Models)
(Making Models)
Line 55: Line 55:
 
''Method 1:''
 
''Method 1:''
  
Use '''mesh_make'''. It is part of '''trimesh2''' and available at [http://www.cs.princeton.edu/gfx/proj/trimesh2 http://www.cs.princeton.edu/gfx/proj/trimesh2]. It can make at last count:
+
Use '''mesh_make'''. It is part of '''trimesh2''' and available at [http://www.cs.princeton.edu/gfx/proj/trimesh2 http://www.cs.princeton.edu/gfx/proj/trimesh2]. It can make at last count:
 
<pre>
 
<pre>
 
plane m [n] m x n tesselated square (default n = m)
 
plane m [n] m x n tesselated square (default n = m)

Revision as of 14:39, 11 October 2007

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.


Categories

Making Movies

  • How do I export a good quality, small size movie from Premiere?

Making Models

  • 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?

Mesh Processing

  • 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 from format X to format Y?
  • My mesh has holes. How can I fix it?

Qt Related

  • 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?

Making Movies

How do I export a good quality, small size movie from Premiere?

Method 1:

  • 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
 [01]) 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...

Making Models

I need a very simple shape. How do I make it?

Method 1:

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
  • 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?

Mesh Processing

  • 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 from format X to format Y?
  • My mesh has holes. How can I fix it?

Qt Related

  • 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?