Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ALICE-open-data
ALICE Blender animation
Commits
091b662f
Commit
091b662f
authored
May 22, 2020
by
Breno Rilho Lemos
💬
Browse files
Add AntiOverviewCamera
parent
c0a09171
Changes
3
Show whitespace changes
Inline
Side-by-side
animate/animate_particles.py
View file @
091b662f
...
...
@@ -66,7 +66,7 @@ picpct = int(args.picpct) # percentage of animation to take picture
#configure output
outputPath
=
"/tmp/blender/"
fileIdentifier
=
"PhysicalTrajectories_"
## RenderCameras: ["ForwardCamera", "OverviewCamera", "BarrelCamera"]
## RenderCameras: ["ForwardCamera", "OverviewCamera",
"AntiOverviewCamera",
"BarrelCamera"]
renderCamera
=
args
.
render_camera
renderAnimation
=
True
# True
...
...
animate/scene_functions.py
View file @
091b662f
...
...
@@ -32,6 +32,9 @@ def init(unique_id,camera_type,transp_par,detectors):
if
camera_type
==
"OverviewCamera"
:
addOverviewLamps
()
else
:
if
camera_type
==
"AntiOverviewCamera"
:
addAntiOverviewLamps
()
else
:
addLamps
()
# Add Lamps
...
...
@@ -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
rgb_v
=
[
13
,
13
,
25
,
10
]
# Colors for "ForwardCamera"
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
...
...
@@ -233,6 +236,9 @@ def addLamps():
def
addOverviewLamps
():
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
():
# ForwardCamera
bpy
.
ops
.
object
.
camera_add
(
location
=
(
0
,
0.5
,
20
),
rotation
=
(
0
,
0
,
0
))
...
...
@@ -246,6 +252,11 @@ def addCameras():
bpy
.
context
.
object
.
name
=
"OverviewCamera"
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
bpy
.
ops
.
object
.
camera_add
(
location
=
(
6
,
0
,
0
),
rotation
=
(
0
,
1.5708
,
0
))
bpy
.
context
.
object
.
name
=
"BarrelCamera"
...
...
workflow_sketch.sh
View file @
091b662f
...
...
@@ -212,7 +212,7 @@ Usage:
-c | --camera VALUE
Which camera to use for the animation, where VALUE
is a comma-separated list (without spaces)
Options: Barrel,Forward,Overview (defaults to Overview)
Options: Barrel,Forward,Overview
,AntiOverview
(defaults to Overview)
--picpct VALUE
Percentage of animation to take HD picture, saved along with the clip.
-a | --sample
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment