Bruno BELANYI
fc2de38b1a
library: render: split bidirectional pathtracer
2020-04-01 23:58:27 +02:00
Bruno BELANYI
96995e7ef1
library: core: light_properties: add emitted light
2020-04-01 23:43:01 +02:00
Bruno BELANYI
7eefd7b574
WIP: library: render: pathtracer: add build_path
2020-03-31 12:09:28 +02:00
Bruno BELANYI
6d0de72e57
WIP: library: render: pathtrace: add Path struct
2020-03-31 12:09:28 +02:00
Bruno BELANYI
a200a839b6
examples: rename aliasing_limit to shot_rays
2020-03-31 12:09:28 +02:00
Bruno BELANYI
d4345e6ea4
library: scene: rename aliasing_limit to shot_rays
2020-03-31 12:09:28 +02:00
Bruno BELANYI
e68ceb484d
executable: use dummy pahtracer renderer
2020-03-31 12:09:09 +02:00
Bruno BELANYI
b624ced37f
library: render: pathtrace: add dummy Pathtracer
2020-03-30 02:25:58 +02:00
Bruno BELANYI
9c6b9af31a
library: render: add Renderer trait
2020-03-29 21:28:06 +02:00
Bruno BELANYI
83ed6406ac
executable: allow the choice of renderer
2020-03-29 21:28:06 +02:00
Bruno BELANYI
5ebad7c1ab
pathtracer: move rendering logic to 'render' module
2020-03-29 20:41:19 +02:00
Bruno BELANYI
ad668251d4
beevee: bvh: accelerated: add missing link to BVH
2020-03-29 20:20:01 +02:00
Bruno BELANYI
a59bd026bc
library: rename 'render' module to 'scene'
2020-03-29 20:15:27 +02:00
Bruno BELANYI
aa47b54e4c
examples: move OBJ-related files to subdirectory
2020-03-29 19:44:12 +02:00
Bruno BELANYI
4593e276c4
library: core: camera: fix documentation phrasing
2020-03-29 19:36:51 +02:00
Bruno BELANYI
9ad1100ded
library: core: camera: move film behind the camera
...
To prepare for adding the handling of focal blur, move the film so that
it is behind the point of convergence of the lens.
In addition, store the distance to the focal plane in the camera, which
will be used when calculating rays with an non-zero aperture.
2020-03-29 19:36:51 +02:00
Bruno BELANYI
2f3224ea07
library: render: scene: calculate rays w/ camera
2020-03-29 19:36:51 +02:00
Bruno BELANYI
78d5954419
library: core: color: fix from_slice's doc-test
2020-03-29 19:36:16 +02:00
Bruno BELANYI
b79c94aad9
library: core: camera: add ray calculation method
2020-03-29 19:35:50 +02:00
Antoine Martin
c7fec074c2
examples: add cornell box example
2020-03-29 19:22:12 +02:00
Bruno BELANYI
2994a7dcfa
library: render: mesh: parse rotation in degrees
2020-03-29 18:13:38 +02:00
Antoine Martin
e1f18786ce
cargo: bump tobj to 1.0
2020-03-29 16:52:26 +02:00
Bruno BELANYI
642f4221cd
beevee: bvh: tree: fix build panic
2020-03-27 17:40:12 +01:00
Antoine Martin
0e65a75e2b
library: render: mesh: fix panic when parsing OBJ
2020-03-27 17:40:12 +01:00
Antoine Martin
cca40bcb8e
library: render: mesh: from_slice to build Vector
2020-03-27 17:40:12 +01:00
Antoine Martin
f0d36c7d7b
library: render: mesh: use nalgebra::zero instead
2020-03-27 17:40:12 +01:00
Bruno BELANYI
15381d4bbd
library: render: mesh: scale, rotate, & translate
...
The scaling factor is the same on all axis, to avoid having angles
changed which would mess with the normals too much.
2020-03-27 17:40:12 +01:00
Antoine Martin
2d624c517f
library: render: mesh: make default material grey
2020-03-27 17:40:12 +01:00
Antoine Martin
fe5eee0172
library: render: mesh: load basic material from OBJ
2020-03-27 17:40:12 +01:00
Antoine Martin
6ba0f328cd
library: render: mesh: handle empty normals in OBJ
2020-03-27 17:40:12 +01:00
Antoine Martin
0368edbd74
library: render: mesh: add OBJ loading
2020-03-27 17:39:44 +01:00
Bruno BELANYI
a0d7d5e590
library: render: scene: remove ignored test
2020-03-26 19:05:01 +01:00
Bruno BELANYI
8727ae9d87
library: use #[serde(from)] for Deserialize
2020-03-26 19:03:42 +01:00
Bruno BELANYI
0678317442
library: render: scene: deserialize meshes
2020-03-26 18:48:48 +01:00
Bruno BELANYI
f03880799b
library: render: deserialization: error on unknown
2020-03-26 18:37:42 +01:00
Bruno BELANYI
0f6b81e40c
WIP: add Mesh, TriangleTexture, TriangleMaterial
2020-03-26 18:37:42 +01:00
Bruno BELANYI
e65a2a1f48
WIP: add comment about path-tracing
2020-03-26 17:42:08 +01:00
Bruno BELANYI
998838a6fc
library: use Intersected as a super trait
2020-03-26 17:42:08 +01:00
Bruno BELANYI
3039607e4f
beevee: bvh: use Accelerated trait for objects
...
This will allow for the use of meshes inside the BVH.
Returning the reference to a triangle inside the mesh directly instead
of returning the reference to the mesh itself allows for more optimum
execution.
2020-03-26 17:42:08 +01:00
Bruno BELANYI
5c0fc9689e
library: shape: add InterpolatedTriangle type
...
This is a triangle with added normal interpolation at its edges. This is
particularly useful when rendering mesh objects.
2020-03-25 00:27:26 +01:00
Bruno BELANYI
3b5410aef9
library: render: scene: add hemisphere sampling
...
This method takes a given normal, and computes a random ray in the
unit-hemisphere described by that normal.
We use cosine-weighted importance sampling because it leads to better
convergence and is a nice micro-optimisation (from four trigonometric
operations to only two).
2020-03-25 00:12:05 +01:00
Bruno BELANYI
965fda7395
examples: add background color to example scene
2020-03-25 00:09:49 +01:00
Bruno BELANYI
08063b5aa3
library: render: scene: add background color
2020-03-25 00:09:49 +01:00
Bruno BELANYI
c2fd001430
library: render: object: remove index field
2020-03-25 00:09:49 +01:00
Bruno BELANYI
2e224b280d
Merge branch 'add-beevee' into 'master'
...
Add beevee
See merge request EPITA_bruno.belanyi/image/ing2/pathtracer!4
2020-03-24 21:04:52 +00:00
Bruno BELANYI
6df2d857d4
library: use beevee's Intersected trait
2020-03-24 21:55:51 +01:00
Bruno BELANYI
21c7aea1c0
beevee: bvh: use Intersected trait for objects
...
This avoids having black squares around the objects because we computed
that it was the closest but the ray didn't actually hit it...
2020-03-24 21:55:51 +01:00
Bruno BELANYI
48bb3550cb
library: use beevee instead of rust-bvh
...
I also used this opportunity to use `nalgebra::Unit` as much as
possible.
2020-03-24 21:55:48 +01:00
Bruno BELANYI
d8a4a2eaad
beevee: bvh: add intersection test to BVH
2020-03-24 21:47:14 +01:00
Bruno BELANYI
45fca6f3ed
beevee: bvh: remove reference to objects in BVH
2020-03-24 21:47:14 +01:00