-
Notifications
You must be signed in to change notification settings - Fork 3
/
pipeline2.sh
72 lines (54 loc) · 1.65 KB
/
pipeline2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
os=${OSTYPE//[0-9.-]*/}
function createModel {
path="`pwd`/createModel.py"
pathToAgisoft="~/../../Applications/PhotoScanPro.app/Contents/MacOS/"
eval "cd $pathToAgisoft"
eval "./PhotoScanPro -r $path"
}
function texture {
path="`pwd`"
# pathToMeshlab = "~/../../Applications/meshlab.app/Contents/MacOS/"
pathToMeshlab="~/Documents/newNewMeshlab/cnr-isti-vclab/meshlab/src/distrib/meshlab.app/Contents/MacOS/"
# normal maps
eval "python photometricNormals.py --maps"
# diffuse project
eval "python photometricNormals.py --diffuseProj"
eval "cd $pathToMeshlab"
eval "./meshlabserver -p $path/diffuseProject.mlp -o $path/diffuseAdded.ply -m vn -s $path/blenderScript.mlx"
eval "cd $path"
# nehab
eval "wine mesh_opt.exe diffuseAdded.ply -lambda 0.01 -fixnorm 1:4 diffuseEmbossed.obj"
eval "python photometricNormals.py --specularProj"
eval "cd $pathToMeshlab"
eval "./meshlabserver -p $path/specularProject.mlp -o $path/forBlender.obj -m vn -s $path/blenderScript.mlx"
eval "cd $path"
eval "python blur.py"
}
function blender {
# make sure you have created displacement map using shadermap 4 and named it the same texture map from the texture stage.
path="`pwd`"
pathToBlender = "~/../../Applications/blender.app/Contents/MacOS/"
eval "cd $pathToBlender"
eval "./blender -b -P $path/blender.py"
}
case "$os" in
darwin)
if [[ $1 == "-r" ]]
then
createModel
fi
if [[ $1 == "-d" ]]
then
texture
fi
if [[ $1 == "-b" ]]
then
blender
fi
;;
msys)
echo "I'm Windows using git bash"
;;
*)
esac