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

Add AntiOverviewCamera

parent c0a09171
...@@ -66,7 +66,7 @@ picpct = int(args.picpct) # percentage of animation to take picture ...@@ -66,7 +66,7 @@ picpct = int(args.picpct) # percentage of animation to take picture
#configure output #configure output
outputPath = "/tmp/blender/" outputPath = "/tmp/blender/"
fileIdentifier = "PhysicalTrajectories_" fileIdentifier = "PhysicalTrajectories_"
## RenderCameras: ["ForwardCamera", "OverviewCamera", "BarrelCamera"] ## RenderCameras: ["ForwardCamera", "OverviewCamera", "AntiOverviewCamera", "BarrelCamera"]
renderCamera= args.render_camera renderCamera= args.render_camera
renderAnimation = True # True renderAnimation = True # True
......
...@@ -33,7 +33,10 @@ def init(unique_id,camera_type,transp_par,detectors): ...@@ -33,7 +33,10 @@ def init(unique_id,camera_type,transp_par,detectors):
if camera_type == "OverviewCamera": if camera_type == "OverviewCamera":
addOverviewLamps() addOverviewLamps()
else: else:
addLamps() # Add Lamps if camera_type == "AntiOverviewCamera":
addAntiOverviewLamps()
else:
addLamps() # Add Lamps
if camera_type == "ForwardCamera": if camera_type == "ForwardCamera":
addALICE_Geometry(True,transp_par,detectors) # ALICE TPC, EMCal, ITS, TRD addALICE_Geometry(True,transp_par,detectors) # ALICE TPC, EMCal, ITS, TRD
...@@ -45,7 +48,7 @@ def addALICE_Geometry(bright_colors=True, transp_par=1.0, detectors=[1,1,1,1]): ...@@ -45,7 +48,7 @@ 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", "AntiOverviewCamera" and "BarrelCamera"
# ADD ITS # ADD ITS
...@@ -233,6 +236,9 @@ def addLamps(): ...@@ -233,6 +236,9 @@ def addLamps():
def addOverviewLamps(): def addOverviewLamps():
bpy.ops.object.lamp_add(type='POINT', location=(0,0,6)) bpy.ops.object.lamp_add(type='POINT', location=(0,0,6))
def addAntiOverviewLamps():
bpy.ops.object.lamp_add(type='POINT', location=(0,0,-6))
def addCameras(): def addCameras():
# ForwardCamera # ForwardCamera
bpy.ops.object.camera_add(location = (0,0.5,20), rotation = (0, 0, 0)) bpy.ops.object.camera_add(location = (0,0.5,20), rotation = (0, 0, 0))
...@@ -246,6 +252,11 @@ def addCameras(): ...@@ -246,6 +252,11 @@ def addCameras():
bpy.context.object.name = "OverviewCamera" bpy.context.object.name = "OverviewCamera"
bpy.context.object.data.lens = 66.78 bpy.context.object.data.lens = 66.78
# AntiOverviewCamera
bpy.ops.object.camera_add(location = (-24.1218, -10.7468, -22.754), rotation = (-0.10123, 2.27591, 3.44703))
bpy.context.object.name = "AntiOverviewCamera"
bpy.context.object.data.lens = 66.78
# Barrel Camera # Barrel Camera
bpy.ops.object.camera_add(location = (6, 0, 0), rotation = (0, 1.5708, 0)) bpy.ops.object.camera_add(location = (6, 0, 0), rotation = (0, 1.5708, 0))
bpy.context.object.name = "BarrelCamera" bpy.context.object.name = "BarrelCamera"
......
...@@ -212,7 +212,7 @@ Usage: ...@@ -212,7 +212,7 @@ Usage:
-c | --camera VALUE -c | --camera VALUE
Which camera to use for the animation, where VALUE Which camera to use for the animation, where VALUE
is a comma-separated list (without spaces) is a comma-separated list (without spaces)
Options: Barrel,Forward,Overview (defaults to Overview) Options: Barrel,Forward,Overview,AntiOverview (defaults to Overview)
--picpct VALUE --picpct VALUE
Percentage of animation to take HD picture, saved along with the clip. Percentage of animation to take HD picture, saved along with the clip.
-a | --sample -a | --sample
......
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