Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
oxyflame_rendering_tools
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
oxyflame_rendering_tools
Commits
a65b3e0c
Commit
a65b3e0c
authored
3 years ago
by
vr-group
Browse files
Options
Downloads
Patches
Plain Diff
Added final working version.
parent
fc0722af
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
offline_ray_tracer/include/settings.hpp
+7
-7
7 additions, 7 deletions
offline_ray_tracer/include/settings.hpp
offline_ray_tracer/source/main.cpp
+10
-11
10 additions, 11 deletions
offline_ray_tracer/source/main.cpp
settings.json
+10
-11
10 additions, 11 deletions
settings.json
with
27 additions
and
29 deletions
offline_ray_tracer/include/settings.hpp
+
7
−
7
View file @
a65b3e0c
...
...
@@ -23,7 +23,7 @@ struct settings
{
double
time
;
std
::
array
<
double
,
3
>
position
;
std
::
array
<
double
,
3
>
forward
;
std
::
array
<
double
,
3
>
center
;
std
::
array
<
double
,
3
>
up
;
};
...
...
@@ -65,10 +65,10 @@ struct settings
iteratee
[
"position"
][
0
].
asDouble
(),
iteratee
[
"position"
][
1
].
asDouble
(),
iteratee
[
"position"
][
2
].
asDouble
()};
entry
.
forward
=
std
::
array
<
double
,
3
>
{
iteratee
[
"
forward"
][
0
].
asDouble
(),
iteratee
[
"
forward"
][
1
].
asDouble
(),
iteratee
[
"
forward"
][
2
].
asDouble
()};
entry
.
center
=
std
::
array
<
double
,
3
>
{
iteratee
[
"
center"
][
0
].
asDouble
(),
iteratee
[
"
center"
][
1
].
asDouble
(),
iteratee
[
"
center"
][
2
].
asDouble
()};
entry
.
up
=
std
::
array
<
double
,
3
>
{
iteratee
[
"up"
][
0
].
asDouble
(),
iteratee
[
"up"
][
1
].
asDouble
(),
...
...
This diff is collapsed.
Click to expand it.
offline_ray_tracer/source/main.cpp
+
10
−
11
View file @
a65b3e0c
...
...
@@ -52,11 +52,9 @@ std::int32_t main(std::int32_t argc, char** argv)
for
(
const
auto
&
key_frame
:
settings
.
key_frames
)
{
auto
*
camera
=
renderer
->
GetActiveCamera
();
camera
->
SetPosition
(
key_frame
.
position
[
0
]
,
key_frame
.
position
[
1
],
key_frame
.
position
[
2
]);
camera
->
SetFocalPoint
(
key_frame
.
position
[
0
]
+
key_frame
.
forward
[
0
],
key_frame
.
position
[
1
]
+
key_frame
.
forward
[
1
],
key_frame
.
position
[
2
]
+
key_frame
.
forward
[
2
]);
camera
->
SetViewUp
(
key_frame
.
up
[
0
]
,
key_frame
.
up
[
1
],
key_frame
.
up
[
2
]);
camera
->
SetPosition
(
key_frame
.
position
.
data
());
camera
->
SetFocalPoint
(
key_frame
.
center
.
data
());
camera
->
SetViewUp
(
key_frame
.
up
.
data
());
interpolator
->
AddCamera
(
key_frame
.
time
,
camera
);
}
...
...
@@ -72,10 +70,11 @@ std::int32_t main(std::int32_t argc, char** argv)
auto
window_to_image
=
vtkSmartPointer
<
vtkWindowToImageFilter
>::
New
();
auto
video_writer
=
vtkSmartPointer
<
vtkAVIWriter
>
::
New
();
window_to_image
->
SetInput
(
window
);
window_to_image
->
ReadFrontBufferOff
();
video_writer
->
SetInputConnection
(
window_to_image
->
GetOutputPort
());
video_writer
->
SetFileName
(
"video.avi"
);
video_writer
->
SetQuality
(
2
);
video_writer
->
SetRate
(
static_cast
<
std
::
int32_t
>
(
1000.0
/
settings
.
update_rate
));
video_writer
->
SetQuality
(
2
);
video_writer
->
Start
();
std
::
cout
<<
"Starting rendering.
\n
"
;
...
...
This diff is collapsed.
Click to expand it.
settings.json
+
10
−
11
View file @
a65b3e0c
{
"data_file_paths"
:
[
{
"geometry"
:
"D:/data/grids/AIA/Oxyflame/GEOM_0013200.vtp"
,
"volume"
:
"D:/data/grids/AIA/Oxyflame/1024/QOUT_0013200.vti"
,
"scalar"
:
"Q"
},
{
"geometry"
:
"D:/data/grids/AIA/Oxyflame/GEOM_0013200.vtp"
,
"volume"
:
"D:/data/grids/AIA/Oxyflame/1024/QOUT_0013200.vti"
,
"scalar"
:
"Q"
},
{
"geometry"
:
"D:/data/grids/AIA/Oxyflame/GEOM_0013200.vtp"
,
"volume"
:
"D:/data/grids/AIA/Oxyflame/1024/QOUT_0013200.vti"
,
"scalar"
:
"Q"
}
],
"transfer_function"
:
"D:/source/internal/oxyflame_rendering_tools/transfer_function.json"
,
"time_scale"
:
1000.0
,
"loop"
:
tru
e
,
"loop"
:
fals
e
,
"image_size"
:
[
4096
,
4096
],
"step_size"
:
0.
1
,
"samples"
:
1
28
,
"image_size"
:
[
1920
,
1080
],
"step_size"
:
0.
05
,
"samples"
:
1
6
,
"ambient_samples"
:
0
,
"shadows"
:
true
,
"update_rate"
:
16.0
,
"key_frames"
:
[
{
"time"
:
0.0
,
"position"
:
[
0.0
,
0.0
,
250.0
],
"forward"
:
[
0.0
,
0.0
,
-1.0
],
"up"
:
[
0.0
,
1.0
,
0.0
]
},
{
"time"
:
2500.0
,
"position"
:
[
250.0
,
0.0
,
0.0
],
"forward"
:
[
-1.0
,
0.0
,
0.0
],
"up"
:
[
0.0
,
1.0
,
0.0
]
},
{
"time"
:
5000.0
,
"position"
:
[
0.0
,
0.0
,
-250.0
],
"forward"
:
[
0.0
,
0.0
,
1.0
],
"up"
:
[
0.0
,
1.0
,
0.0
]
},
{
"time"
:
10000.0
,
"position"
:
[
-250.0
,
0.0
,
0.0
],
"forward"
:
[
1.0
,
0.0
,
0.0
],
"up"
:
[
0.0
,
1.0
,
0.0
]
}
{
"time"
:
0.0
,
"position"
:
[
0.0
,
0.0
,
200.0
],
"center"
:
[
0.0
,
0.0
,
0.0
],
"up"
:
[
0.0
,
1.0
,
0.0
]
},
{
"time"
:
4000.0
,
"position"
:
[
200.0
,
0.0
,
0.0
],
"center"
:
[
0.0
,
0.0
,
0.0
],
"up"
:
[
0.0
,
1.0
,
0.0
]
},
{
"time"
:
8000.0
,
"position"
:
[
0.0
,
0.0
,
-200.0
],
"center"
:
[
0.0
,
0.0
,
0.0
],
"up"
:
[
0.0
,
1.0
,
0.0
]
},
{
"time"
:
12000.0
,
"position"
:
[
-200.0
,
0.0
,
0.0
],
"center"
:
[
0.0
,
0.0
,
0.0
],
"up"
:
[
0.0
,
1.0
,
0.0
]
},
{
"time"
:
32000.0
,
"position"
:
[
0.0
,
0.0
,
0.0
],
"center"
:
[
0.0
,
0.0
,
0.0
],
"up"
:
[
0.0
,
1.0
,
0.0
]
}
]
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment