Commit fb4d68a2 authored by Breno Rilho Lemos's avatar Breno Rilho Lemos 💬
Browse files

Add options for not building detectors in workflow_sketch.sh

parent b08f74da
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# animate_particles.py - Animate HEP events # animate_particles.py - Animate HEP events
# #
# For console only rendering (example): # For console only rendering (example):
# $ blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=1 -camera="BarrelCamera" -datafile="esd-detail.dat" -n_event=0 -simulated_t=0.02 -fps=24 -resolution=100 -transperency=1.2 -stamp_note="Texto no canto" # $ blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=1 -camera="BarrelCamera" -datafile="esd-detail.dat" -n_event=0 -simulated_t=0.02 -fps=24 -resolution=100 -transperency=1.2 -stamp_note="Texto no canto" -its=1 -tpc=0 -trd=1 -emcal=0
# #
import os import os
...@@ -36,6 +36,10 @@ parser.add_argument('-resolution','--resolution_percent') ...@@ -36,6 +36,10 @@ parser.add_argument('-resolution','--resolution_percent')
parser.add_argument('-stamp_note','--stamp_note') parser.add_argument('-stamp_note','--stamp_note')
parser.add_argument('-n_event','--n_event') parser.add_argument('-n_event','--n_event')
parser.add_argument('-transperency','--transp_par') parser.add_argument('-transperency','--transp_par')
parser.add_argument('-its','--its')
parser.add_argument('-tpc','--tpc')
parser.add_argument('-trd','--trd')
parser.add_argument('-emcal','--emcal')
args = parser.parse_args() args = parser.parse_args()
bpy.context.user_preferences.view.show_splash = False bpy.context.user_preferences.view.show_splash = False
...@@ -50,7 +54,9 @@ simulated_t = float(args.simulated_t) # in microsseconds ...@@ -50,7 +54,9 @@ simulated_t = float(args.simulated_t) # in microsseconds
duration = int(args.duration) # in seconds duration = int(args.duration) # in seconds
fps = int(args.fps) fps = int(args.fps)
resolution_percent = int(args.resolution_percent) resolution_percent = int(args.resolution_percent)
stamp_note = args.stamp_note
transp_par = float(args.transp_par) transp_par = float(args.transp_par)
detectors = [int(args.its),int(args.tpc),int(args.trd),int(args.emcal)] # Array that stores which detectors to build
#configure output #configure output
outputPath = "/tmp/blender/" outputPath = "/tmp/blender/"
...@@ -73,7 +79,7 @@ driver = dataDriver("AlirootFileGenerator",n_event,args.datafile) # Simple dataD ...@@ -73,7 +79,7 @@ driver = dataDriver("AlirootFileGenerator",n_event,args.datafile) # Simple dataD
driver.configure(renderCamera, duration, fps, simulated_t, outputPath, fileIdentifier, resolution_percent) driver.configure(renderCamera, duration, fps, simulated_t, outputPath, fileIdentifier, resolution_percent)
### Build scene ### Build scene
init(args.stamp_note,renderCamera,transp_par) # Cleanup, addCameras, addALICE_TPC init(stamp_note,renderCamera,transp_par,detectors) # Cleanup, addCameras, addALICE_TPC
particles = driver.getParticles() particles = driver.getParticles()
blender_particles, blender_tracks = createSceneParticles(particles,createTracks = True) # Create blender objects - one sphere per particle blender_particles, blender_tracks = createSceneParticles(particles,createTracks = True) # Create blender objects - one sphere per particle
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
filename = os.path.join(os.path.basename(bpy.data.filepath), "blender_functions.py") filename = os.path.join(os.path.basename(bpy.data.filepath), "blender_functions.py")
exec(compile(open(filename).read(), filename, 'exec')) exec(compile(open(filename).read(), filename, 'exec'))
def init(unique_id,camera_type,transp_par): def init(unique_id,camera_type,transp_par,detectors):
bcs = bpy.context.scene bcs = bpy.context.scene
# Configure Environment # Configure Environment
...@@ -31,190 +31,194 @@ def init(unique_id,camera_type,transp_par): ...@@ -31,190 +31,194 @@ def init(unique_id,camera_type,transp_par):
addCameras() # Add cameras addCameras() # Add cameras
if camera_type == "ForwardCamera": if camera_type == "ForwardCamera":
addALICE_Geometry(True,transp_par) # ALICE TPC, EMCal, ITS, TRD addALICE_Geometry(True,transp_par,detectors) # ALICE TPC, EMCal, ITS, TRD
else: else:
addALICE_Geometry(False,transp_par) addALICE_Geometry(False,transp_par,detectors)
def addALICE_Geometry(bright_colors=True, transp_par=1.0): def addALICE_Geometry(bright_colors=True, transp_par=1.0, detectors=[1,1,1,1]):
if bright_colors: # Defining sequence of RGB values to fill 'createMaterial' functions below if bright_colors: # Defining sequence of RGB values to fill 'createMaterial' functions below
rgb_v = [13,13,25,10] # Colors for "ForwardCamera" rgb_v = [13,13,25,10] # Colors for "ForwardCamera"
else: else:
rgb_v = [0.5,0.9,1,0.2] # Colors for "OverviewCamera" and "BarrelCamera" rgb_v = [0.5,0.9,1,0.2] # Colors for "OverviewCamera" and "BarrelCamera"
# ADD TPC
# Material
createMaterial("tpc",R=0,G=rgb_v[0],B=0,shadows=False,cast_shadows=False,transperency=True,alpha=transp_par*0.2,emit=0.3,specular_alpha=0,fresnel_factor=5,fresnel=0.3)
# Add TPC
bpy.ops.mesh.primitive_cylinder_add(radius=2.461, depth=5.1, view_align=False, enter_editmode=False, location=(0, 0, 0)) #bigger cylinder
TPC = bpy.context.object
TPC.name = "TPC"
# Set material
TPC.data.materials.clear()
TPC.data.materials.append(bpy.data.materials["tpc"])
# ADD EMCal
# Material
createMaterial("emcal",R=rgb_v[1],G=rgb_v[1],B=0,shadows=False,cast_shadows=False,transperency=True,alpha=transp_par*0.05,emit=1.5,specular_alpha=0,fresnel_factor=5,fresnel=0.3)
# Add cylinder for EMCal
bpy.ops.mesh.primitive_cylinder_add(radius=4.7, depth=5.1, vertices=19, view_align=False, enter_editmode=False, location=(0, 0, 0))
EMCal = bpy.context.object
EMCal.name = "EMCal"
# Add cylinder to be removed from center
bpy.ops.mesh.primitive_cylinder_add(radius=4.35, depth=5.2, vertices=19, view_align=False, enter_editmode=False, location=(0, 0, 0))
emcal_hole = bpy.context.object
emcal_hole.name = "Hole"
subtract(emcal_hole,EMCal);
# Adds rotated cube to be removed from EMCal so that there's a 7.3° angle with top y axis, clockwise
bpy.ops.mesh.primitive_cube_add(location=(2.85,2.2,0), rotation=(0,0,-0.1274), radius=2.55)
bpy.ops.transform.resize(value=(1.5,1.5,1.5), constraint_axis=(False,False,True))
cube1 = bpy.context.object # first quadrant
subtract(cube1,EMCal)
# Adds rotated cube to be removed from EMCal so that there's a 9.7° angle with left x axis, anticlockwise # ADD ITS
bpy.ops.mesh.primitive_cube_add(location=(-2.08,-2.95,0), rotation=(0,0,0.1693), radius=2.55) if detectors[0]:
bpy.ops.transform.resize(value=(1.5,1.5,1.5), constraint_axis=(False,False,True))
cube3 = bpy.context.object # third quadrant
subtract(cube3,EMCal)
#Adds cube with right angle in fourth quadrant to be removed from EMCal # ADD ITS INNER BARREL
bpy.ops.mesh.primitive_cube_add(location=(2.55,-2.55,0), radius=2.55)
bpy.ops.transform.resize(value=(1.5,1.5,1.5), constraint_axis=(False,False,True))
cube4 = bpy.context.object # fourth quadrant
subtract(cube4,EMCal)
# Set Material # Material
EMCal.data.materials.clear() createMaterial("innerITS",R=rgb_v[2],G=0,B=rgb_v[2],shadows=False,cast_shadows=False,transperency=True,alpha=transp_par*0.7,emit=0,specular_alpha=0,fresnel_factor=5,fresnel=0.3)
EMCal.data.materials.append(bpy.data.materials["emcal"])
# Add Inner ITS
bpy.ops.mesh.primitive_cylinder_add(radius=0.0421, depth=0.271, view_align=False, enter_editmode=False, location=(0, 0, 0))
inner_TPC = bpy.context.object
inner_TPC.name = "innerITS"
# ADD ITS INNER BARREL # Set Material
inner_TPC.data.materials.clear()
inner_TPC.data.materials.append(bpy.data.materials["innerITS"])
# Material
createMaterial("innerITS",R=rgb_v[2],G=0,B=rgb_v[2],shadows=False,cast_shadows=False,transperency=True,alpha=transp_par*0.7,emit=0,specular_alpha=0,fresnel_factor=5,fresnel=0.3)
# Add Inner ITS # ADD ITS OUTER BARREL
bpy.ops.mesh.primitive_cylinder_add(radius=0.0421, depth=0.271, view_align=False, enter_editmode=False, location=(0, 0, 0))
inner_TPC = bpy.context.object
inner_TPC.name = "innerITS"
# Set Material # Material
inner_TPC.data.materials.clear() createMaterial("outerITS",R=rgb_v[3],G=0,B=rgb_v[3],shadows=False,cast_shadows=False,transperency=True,alpha=transp_par*0.4,emit=0.8,specular_alpha=0,fresnel_factor=5,fresnel=0.3)
inner_TPC.data.materials.append(bpy.data.materials["innerITS"])
# ADD ITS MIDDLE LAYERS
# ADD ITS OUTER BARREL # Add "hole" to subtract from the middle
bpy.ops.mesh.primitive_cylinder_add(radius=0.1944, depth=0.9, view_align=False, enter_editmode=False, location=(0, 0, 0)) #smaller cylinder
middle_ITS_hole = bpy.context.object
middle_ITS_hole.name = "Hole"
# Material # Add actual middle layer ITS part
createMaterial("outerITS",R=rgb_v[3],G=0,B=rgb_v[3],shadows=False,cast_shadows=False,transperency=True,alpha=transp_par*0.4,emit=0.8,specular_alpha=0,fresnel_factor=5,fresnel=0.3) bpy.ops.mesh.primitive_cylinder_add(radius=0.247, depth=0.843, view_align=False, enter_editmode=False, location=(0, 0, 0)) #bigger cylinder
middle_ITS = bpy.context.object
middle_ITS.name = "middleITS"
# ADD ITS MIDDLE LAYERS # Subtract hole from main TPC part
subtract(middle_ITS_hole,middle_ITS)
# Add "hole" to subtract from the middle # Set material
bpy.ops.mesh.primitive_cylinder_add(radius=0.1944, depth=0.9, view_align=False, enter_editmode=False, location=(0, 0, 0)) #smaller cylinder middle_ITS.data.materials.clear()
middle_ITS_hole = bpy.context.object middle_ITS.data.materials.append(bpy.data.materials["outerITS"])
middle_ITS_hole.name = "Hole"
# Add actual middle layer ITS part
bpy.ops.mesh.primitive_cylinder_add(radius=0.247, depth=0.843, view_align=False, enter_editmode=False, location=(0, 0, 0)) #bigger cylinder
middle_ITS = bpy.context.object
middle_ITS.name = "middleITS"
# Subtract hole from main TPC part # ADD ITS OUTER LAYERS
subtract(middle_ITS_hole,middle_ITS)
# Set material # Add "hole" to subtract from the middle
middle_ITS.data.materials.clear() bpy.ops.mesh.primitive_cylinder_add(radius=0.3423, depth=1.5, view_align=False, enter_editmode=False, location=(0, 0, 0)) #smaller cylinder
middle_ITS.data.materials.append(bpy.data.materials["outerITS"]) outer_ITS_hole = bpy.context.object
outer_ITS_hole.name = "Hole"
# Add actual outer layer ITS part
bpy.ops.mesh.primitive_cylinder_add(radius=0.3949, depth=1.475, view_align=False, enter_editmode=False, location=(0, 0, 0)) #bigger cylinder
outer_ITS = bpy.context.object
outer_ITS.name = "outerITS"
# ADD ITS OUTER LAYERS # Subtract hole from main TPC part
subtract(outer_ITS_hole,outer_ITS)
# Add "hole" to subtract from the middle # Set material
bpy.ops.mesh.primitive_cylinder_add(radius=0.3423, depth=1.5, view_align=False, enter_editmode=False, location=(0, 0, 0)) #smaller cylinder outer_ITS.data.materials.clear()
outer_ITS_hole = bpy.context.object outer_ITS.data.materials.append(bpy.data.materials["outerITS"])
outer_ITS_hole.name = "Hole"
# Add actual outer layer ITS part # Make ITS middle and outer layers a single object
bpy.ops.mesh.primitive_cylinder_add(radius=0.3949, depth=1.475, view_align=False, enter_editmode=False, location=(0, 0, 0)) #bigger cylinder joinObjects([middle_ITS,outer_ITS])
outer_ITS = bpy.context.object Outer_ITS = bpy.context.object
outer_ITS.name = "outerITS" Outer_ITS.name = "OuterITS"
# Subtract hole from main TPC part # ADD TPC
subtract(outer_ITS_hole,outer_ITS) if detectors[1]:
# Set material # Material
outer_ITS.data.materials.clear() createMaterial("tpc",R=0,G=rgb_v[0],B=0,shadows=False,cast_shadows=False,transperency=True,alpha=transp_par*0.2,emit=0.3,specular_alpha=0,fresnel_factor=5,fresnel=0.3)
outer_ITS.data.materials.append(bpy.data.materials["outerITS"])
# Make ITS middle and outer layers a single object # Add TPC
joinObjects([middle_ITS,outer_ITS]) bpy.ops.mesh.primitive_cylinder_add(radius=2.461, depth=5.1, view_align=False, enter_editmode=False, location=(0, 0, 0)) #bigger cylinder
Outer_ITS = bpy.context.object TPC = bpy.context.object
Outer_ITS.name = "OuterITS" TPC.name = "TPC"
# Set material
TPC.data.materials.clear()
TPC.data.materials.append(bpy.data.materials["tpc"])
# ADD ALICE TRD # ADD ALICE TRD
if detectors[2]:
# Material # Material
createMaterial("TRD",R=rgb_v[3],G=0,B=rgb_v[3],shadows=False,cast_shadows=False,transperency=True,alpha=transp_par*0.15,emit=0.8,specular_alpha=0,fresnel_factor=5,fresnel=0.3) createMaterial("TRD",R=rgb_v[3],G=0,B=rgb_v[3],shadows=False,cast_shadows=False,transperency=True,alpha=transp_par*0.15,emit=0.8,specular_alpha=0,fresnel_factor=5,fresnel=0.3)
# Add "hole" to subtract from the middle # Add "hole" to subtract from the middle
bpy.ops.mesh.primitive_cylinder_add(radius=2.9, depth=6, vertices=18, view_align=False, enter_editmode=False, location=(0, 0, 0)) #smaller cylinder bpy.ops.mesh.primitive_cylinder_add(radius=2.9, depth=6, vertices=18, view_align=False, enter_editmode=False, location=(0, 0, 0)) #smaller cylinder
TRD_hole = bpy.context.object TRD_hole = bpy.context.object
TRD_hole.name = "Hole" TRD_hole.name = "Hole"
# Add actual TRD part # Add actual TRD part
bpy.ops.mesh.primitive_cylinder_add(radius=3.7, depth=5.1, vertices=18, view_align=False, enter_editmode=False, location=(0, 0, 0)) #bigger cylinder bpy.ops.mesh.primitive_cylinder_add(radius=3.7, depth=5.1, vertices=18, view_align=False, enter_editmode=False, location=(0, 0, 0)) #bigger cylinder
TRD = bpy.context.object TRD = bpy.context.object
TRD.name = "TRD" TRD.name = "TRD"
# Subtract hole from main TRD part # Subtract hole from main TRD part
subtract(TRD_hole,TRD) subtract(TRD_hole,TRD)
# Set material # Set material
TRD.data.materials.clear() TRD.data.materials.clear()
TRD.data.materials.append(bpy.data.materials["TRD"]) TRD.data.materials.append(bpy.data.materials["TRD"])
# Add 'slices' to subtract from TRD structure # Add 'slices' to subtract from TRD structure
bpy.ops.mesh.primitive_cube_add(radius=1, location=(2.855942,0.50358,0)) bpy.ops.mesh.primitive_cube_add(radius=1, location=(2.855942,0.50358,0))
slice = bpy.context.object slice = bpy.context.object
slice.name = "slice" slice.name = "slice"
bpy.ops.transform.resize(value=(1,0.03,4)) bpy.ops.transform.resize(value=(1,0.03,4))
bpy.context.object.rotation_euler[2] = 0.174533 bpy.context.object.rotation_euler[2] = 0.174533
subtract(slice,TRD) subtract(slice,TRD)
def rad(theta): # Convert degrees to radians def rad(theta): # Convert degrees to radians
return theta * math.pi / 180 return theta * math.pi / 180
xn = 2.9 * math.cos(rad(10)) xn = 2.9 * math.cos(rad(10))
yn = 2.9 * math.sin(rad(10)) yn = 2.9 * math.sin(rad(10))
for n in range(1,18): for n in range(1,18):
dx = -2 * 2.9 * math.sin(rad(10)) * math.sin(rad(n * 20)) dx = -2 * 2.9 * math.sin(rad(10)) * math.sin(rad(n * 20))
xn += dx xn += dx
dy = 2 * 2.9 * math.sin(rad(10)) * math.cos(rad(n * 20)) dy = 2 * 2.9 * math.sin(rad(10)) * math.cos(rad(n * 20))
yn += dy yn += dy
rotat = rad(10 + n*20) rotat = rad(10 + n*20)
bpy.ops.mesh.primitive_cube_add(radius=1, location=(xn,yn,0)) bpy.ops.mesh.primitive_cube_add(radius=1, location=(xn,yn,0))
slice = bpy.context.object slice = bpy.context.object
slice.name = "slice" slice.name = "slice"
bpy.ops.transform.resize(value=(1,0.03,4)) bpy.ops.transform.resize(value=(1,0.03,4))
bpy.context.object.rotation_euler[2] = rotat bpy.context.object.rotation_euler[2] = rotat
subtract(slice,TRD) subtract(slice,TRD)
# ADD EMCal
if detectors[3]:
# Material
createMaterial("emcal",R=rgb_v[1],G=rgb_v[1],B=0,shadows=False,cast_shadows=False,transperency=True,alpha=transp_par*0.05,emit=1.5,specular_alpha=0,fresnel_factor=5,fresnel=0.3)
# Add cylinder for EMCal
bpy.ops.mesh.primitive_cylinder_add(radius=4.7, depth=5.1, vertices=19, view_align=False, enter_editmode=False, location=(0, 0, 0))
EMCal = bpy.context.object
EMCal.name = "EMCal"
# Add cylinder to be removed from center
bpy.ops.mesh.primitive_cylinder_add(radius=4.35, depth=5.2, vertices=19, view_align=False, enter_editmode=False, location=(0, 0, 0))
emcal_hole = bpy.context.object
emcal_hole.name = "Hole"
subtract(emcal_hole,EMCal);
# Adds rotated cube to be removed from EMCal so that there's a 7.3° angle with top y axis, clockwise
bpy.ops.mesh.primitive_cube_add(location=(2.85,2.2,0), rotation=(0,0,-0.1274), radius=2.55)
bpy.ops.transform.resize(value=(1.5,1.5,1.5), constraint_axis=(False,False,True))
cube1 = bpy.context.object # first quadrant
subtract(cube1,EMCal)
# Adds rotated cube to be removed from EMCal so that there's a 9.7° angle with left x axis, anticlockwise
bpy.ops.mesh.primitive_cube_add(location=(-2.08,-2.95,0), rotation=(0,0,0.1693), radius=2.55)
bpy.ops.transform.resize(value=(1.5,1.5,1.5), constraint_axis=(False,False,True))
cube3 = bpy.context.object # third quadrant
subtract(cube3,EMCal)
#Adds cube with right angle in fourth quadrant to be removed from EMCal
bpy.ops.mesh.primitive_cube_add(location=(2.55,-2.55,0), radius=2.55)
bpy.ops.transform.resize(value=(1.5,1.5,1.5), constraint_axis=(False,False,True))
cube4 = bpy.context.object # fourth quadrant
subtract(cube4,EMCal)
# Set Material
EMCal.data.materials.clear()
EMCal.data.materials.append(bpy.data.materials["emcal"])
def addCameras(): def addCameras():
......
...@@ -33,8 +33,8 @@ if [[ ${PIPESTATUS[0]} -ne 4 ]]; then ...@@ -33,8 +33,8 @@ if [[ ${PIPESTATUS[0]} -ne 4 ]]; then
exit 1 exit 1
fi fi
OPTIONS=c:hdau:m:t:r:b: OPTIONS=c:hdau:m:t:r:b:ipqe
LONGOPTS=camera:,resolution:,transperency:,duration:,maxparticles:,help,download,default,url: LONGOPTS=camera:,resolution:,transperency:,duration:,maxparticles:,help,download,default,url:,its,tpc,trd,emcal
# -regarding ! and PIPESTATUS see above # -regarding ! and PIPESTATUS see above
# -temporarily store output to be able to check for errors # -temporarily store output to be able to check for errors
...@@ -61,6 +61,10 @@ HELP=false ...@@ -61,6 +61,10 @@ HELP=false
DOWNLOAD=false DOWNLOAD=false
DEFAULT=false DEFAULT=false
URL= URL=
ITS=1 # 1 means "build this detector", while 0 means "don't"
TPC=1
TRD=1
EMCAL=1
# now enjoy the options in order and nicely split until we see -- # now enjoy the options in order and nicely split until we see --
while true; do while true; do
case "$1" in case "$1" in
...@@ -101,6 +105,22 @@ while true; do ...@@ -101,6 +105,22 @@ while true; do
CAMERA="$2" CAMERA="$2"
shift 2 shift 2
;; ;;
-i|--its)
ITS=0
shift
;;
-p|--tpc)
TPC=0
shift
;;
-q|--trd)
TRD=0
shift
;;
-e|--emcal)
EMCAL=0
shift
;;
--) --)
shift shift
break break
...@@ -144,6 +164,14 @@ Usage: ...@@ -144,6 +164,14 @@ Usage:
Options: Barrel,Forward,Overview (defaults to Barrel) Options: Barrel,Forward,Overview (defaults to Barrel)
-a | --default -a | --default
Creates a default animation with blender. Creates a default animation with blender.
-i | --its
Removes ITS detector from animation
-p | --tpc
Removes TPC detector from animation
-q | --trd
Removes TRD detector from animation
-e | --emcal
Removes EMCal detector from animation
Example: Example:
-------- --------
...@@ -171,6 +199,24 @@ else ...@@ -171,6 +199,24 @@ else
echo "Max particles: ${MAX_PARTICLES}" echo "Max particles: ${MAX_PARTICLES}"
echo "Camera: $CAMERA" echo "Camera: $CAMERA"
echo "-----------------------------------" echo "-----------------------------------"
echo "------------ Detectors ------------"
if [[ $ITS = 1 ]]; then
echo "Building ITS"
fi
if [[ $TPC = 1 ]]; then
echo "Building TPC"
fi
if [[ $TRD = 1 ]]; then
echo "Building TRD"
fi
if [[ $EMCAL = 1 ]]; then
echo "Building EMCAL"
fi
if [[ $TPC = 0 && $TPC = 0 && $TRD = 0 && $EMCAL = 0 ]]; then
echo "Not building any detectors"
fi
echo "-----------------------------------"
fi fi
if [[ $URL = "" ]]; then if [[ $URL = "" ]]; then
...@@ -218,7 +264,7 @@ if [ "$DEFAULT" = "true" ]; then ...@@ -218,7 +264,7 @@ if [ "$DEFAULT" = "true" ]; then
# Phase 1: blender animate # # Phase 1: blender animate #
############################## ##############################
pushd ${BLENDER_SCRIPT_DIR} pushd ${BLENDER_SCRIPT_DIR}
blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=${DURATION} -camera=${CAMERA} -datafile="d-esd-detail.dat" -simulated_t=0.03 -fps=24 -resolution=${RESOLUTION} -transperency=${TRANSPERENCY} -stamp_note="Default animation" blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=${DURATION} -camera=${CAMERA} -datafile="d-esd-detail.dat" -simulated_t=0.03 -fps=24 -resolution=${RESOLUTION} -transperency=${TRANSPERENCY} -stamp_note="Default animation" -its=${ITS} -tpc=${TPC} -trd=${TRD} -emcal=${EMCAL}
popd popd
BLENDER_OUTPUT=. BLENDER_OUTPUT=.
mkdir --verbose -p ${BLENDER_OUTPUT} mkdir --verbose -p ${BLENDER_OUTPUT}
...@@ -291,7 +337,7 @@ elif [ "$DEFAULT" = "false" ]; then ...@@ -291,7 +337,7 @@ elif [ "$DEFAULT" = "false" ]; then
for type in $CAMERA; do for type in $CAMERA; do
echo "Processing ${EVENT_UNIQUE_ID} with $type Camera in blender" echo "Processing ${EVENT_UNIQUE_ID} with $type Camera in blender"
blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=${DURATION} -camera=${type} -datafile="${LOCAL_FILE_WITH_DATA}" -n_event=${EVENT_ID} -simulated_t=0.03 -fps=24 -resolution=${RESOLUTION} -transperency=${TRANSPERENCY} -stamp_note="${EVENT_UNIQUE_ID}" blender -noaudio --background -P animate_particles.py -- -radius=0.05 -duration=${DURATION} -camera=${type} -datafile="${LOCAL_FILE_WITH_DATA}" -n_event=${EVENT_ID} -simulated_t=0.03 -fps=24 -resolution=${RESOLUTION} -transperency=${TRANSPERENCY} -stamp_note="${EVENT_UNIQUE_ID}" -its=${ITS} -tpc=${TPC} -trd=${TRD} -emcal=${EMCAL}
# Move generated file to final location # Move generated file to final location
mv /tmp/blender/* ${BLENDER_OUTPUT} mv /tmp/blender/* ${BLENDER_OUTPUT}
echo "${type} for event ${EVENT_UNIQUE_ID} done." echo "${type} for event ${EVENT_UNIQUE_ID} done."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment