Commit Graph

183 Commits

Author SHA1 Message Date
Philip Rideout
bfaa2bdd4e gltf_baker: allow 3D visualization of mesh normals. 2019-06-03 13:03:14 -07:00
Philip Rideout
ce4a3edf7b gltf_baker: visualizers now use fp32 textures.
This allows us to skip the CPU-side vector-to-color conversion that
occured at the end, and makes the real-time visualization consistent
with the final visualization.
2019-06-03 13:03:14 -07:00
Philip Rideout
6c153b046f gltf_baker: allow visualization of mesh normals. 2019-06-03 13:03:14 -07:00
Philip Rideout
7a732eb9c4 gltf_baker: show the bounds of the asset
Parameterization can run into problems for very large, very small, or
off-center assets. Showingthe min/max helps users diagnose these issues.
2019-06-03 13:03:14 -07:00
Philip Rideout
fdfb8862eb gltf_baker: allow tmin adjustment. 2019-06-03 13:03:14 -07:00
Philip Rideout
78ec315b69 Overhaul the gltf_baker UI.
As per the design doc, this makes the app somewhat usable by eliminating
hardcoded filenames, the hidden state machine, etc.
2019-06-03 08:32:48 -07:00
Ben Doherty
89c4647c3c Expose gltfio library so it can be used by third_parties (#1230) 2019-05-28 14:50:38 -07:00
Philip Rideout
122eb8c82e gltf_baker: add UV visualization option 2019-05-28 11:44:04 -07:00
Philip Rideout
cc89b6ad1e PathTracer now applies OpenImageDenoise. 2019-05-28 11:43:50 -07:00
Romain Guy
e896ed9d87 Add support for Parallax Occlusion Mapping in the PBR demo 2019-05-24 17:45:26 -07:00
Romain Guy
975395ce98 Simplify duplicate code 2019-05-24 17:01:57 -07:00
Philip Rideout
761b407159 AssetPipeline now has replaceOcclusion function.
This preserve original materials and substitutes the occlusion texture
with the generated AO.
2019-05-24 14:59:10 -07:00
Philip Rideout
5bdbf63ff6 gltf_baker now has an export modal. 2019-05-24 14:59:10 -07:00
Philip Rideout
8f1d4ffa4d gltf_baker now parameterizes in a background thread. 2019-05-23 22:06:43 -07:00
Philip Rideout
3b2d75e129 gltf_baker now has adjustable resolution. 2019-05-23 22:06:43 -07:00
Romain Guy
0a5c068cb6 Switch specular AA to Tokuyoshi and Kaplanyan (#1218)
This replaces the previous "curvature to roughness" method. Both are related
and rely on the screen space variance of geometric normals but this new
solution offers more control (the screen space variance and the clamping
threshold can be controlled).
2019-05-23 12:56:26 -07:00
Philip Rideout
cfb6a1c917 gltf_baker: add diagnostics. 2019-05-18 20:43:31 -07:00
Philip Rideout
07be9d1721 PathTracer: add bent normals and diagnostic targets. 2019-05-17 10:01:26 -07:00
Philip Rideout
9a72831a33 AssetPipeline can now preview baked texture. 2019-05-16 15:53:20 -07:00
Philip Rideout
59f929c7d3 Fix "already freed" bug in gltf_baker. 2019-05-16 15:53:20 -07:00
Romain Guy
f0aab6e46a Add micro-shadowing feature (#1188)
* Add micro-shadowing based on ambient occlusion

* Prevent crash when IBL is turned off

* Apply micro-shadows to baked AO only

* Remove debug code

* Add opacity control

* Fix opacity term

* Switch to micro-shadowing from Chan 2018
2019-05-16 12:24:16 -07:00
Philip Rideout
c112b3ce40 Introduce AssetPipeline::SCALE_TO_UNIT to boost bake quality. 2019-05-15 16:44:33 -07:00
Philip Rideout
affc947ce0 gltf_baker: improve error reporting. 2019-05-15 16:44:33 -07:00
Philip Rideout
cbfb364c41 Introduce libs/rays and implement AO baking.
The AO baking procedure consists of the following steps:

1. Flatten the glTF hierarchy.
2. Generate a single 2D parameterization for the entire scene.
3. Embree Pass 1: Create G-Buffer using the above UVs as vert positions.
4. Embree Pass 2: Cast rays from the positions embedded in the G-Buffer.

The `gltf_baker` tool is not ready for general use but already
produces reasonable results for certain well-formed models.
2019-05-15 13:10:56 -07:00
Philip Rideout
c84c60112e Implement the bake button, uses a "UV camera" to cast primary rays. 2019-05-15 13:10:56 -07:00
Philip Rideout
cd364b029c gltf_baker: fix needless reload for rendering. 2019-05-13 18:55:56 -07:00
Philip Rideout
3291fb6a1b Introduce gltf_baker tool. 2019-05-13 10:25:12 -07:00
Romain Guy
ac8f55099d Indent SSAO options 2019-05-09 17:18:37 -07:00
Mathias Agopian
cbae6120e1 Ambient Occlusion APIs are more descriptive
Use “AmbientOcclusion” instead of SSAO in all APIs.
2019-05-09 16:36:18 -07:00
Mathias Agopian
011daa952e Add API for controlling SSAO 2019-05-09 16:36:18 -07:00
Mathias Agopian
725ea06400 Add a contrast control for SSAO
This approximates ao^n with 1 <= n <=2 and gives a little bit of
control over the ambient occlusion contrast.
2019-05-07 18:35:19 -07:00
Mathias Agopian
facaa3326b SSAO is now configurable through the debug manager 2019-05-07 18:35:19 -07:00
Philip Rideout
59f1fb8956 gltfio: fix file path bug. (#1151)
The cgltf "base path" that gets passed to cgltf_load_buffers should
actually be the path to original glTF file, otherwise bin filepaths
are resolved incorrectly.
2019-04-29 22:42:17 -07:00
Pixelflinger
af7c3784d6 add support for polygon offset in shadow map parameters
Also use new default bias parameters that seem to work better with
more scenes.

Renamed SAMPLING_HARD to SAMPLING_PCF_HARD because the GPU still
performs 4-taps PCF.
2019-04-15 18:53:41 -07:00
Mathias Agopian
9b0fa727f4 Added normal bias slider to debug ui 2019-04-13 11:01:02 -07:00
Philip Rideout
90c5af3b0e Add specular-glossiness to material_sandbox. (#1095) 2019-04-12 09:40:03 -07:00
Philip Rideout
bd20d005ce gltfio: split out a core library for WebGL and Android (#1080) 2019-04-08 12:43:30 -07:00
Mathias Agopian
1634a8a2db debug option to fill the shadowmap with a checkerboard 2019-04-05 18:45:35 -07:00
Mathias Agopian
bc381ac1b7 Add a "stable" shadow-map option
- "stable" mode disables all resolution optimizations that can affect
stability of the shadow map (e.g. lispsm, focusing)

- expose near/far hint + stable option to java
2019-04-05 11:29:56 -07:00
Philip Rideout
10251821c6 filagui: Introduce widget for manipulating vectors.
This is our first ImGui extension, it draws a draggable 3D arrow for
manipulating a unit vector. This is especially useful for tweaking the
light direction.
2019-04-04 10:59:38 -07:00
Philip Rideout
ccc9606ffc gltfio: allow folder paths and disable auto-scale 2019-04-03 10:18:05 -07:00
Romain Guy
ab12d1d1bb Add postLightingColor property to materials (#1057)
* Add postLightingColor property to materials

This property can be used to modify the color computed in the lighting
passes of the materials. That color is blended with the computed color
according to the postLightingBlending option (add, transparent or opaque).

* Remove test

* Update docs

* Address code review comment

* Switch postLightingColor default blend mode to transparent
2019-03-29 10:02:07 -07:00
Jack Diver
5366105ed2 Removing STL headers from filameshio (#1050)
* Removed STL headers from filameshio/MeshReader.h modified the samples to work the same, and made an effort to remedy the jsbindings although I'm not experienced with them.

* Fixed assignment operators for MaterialRegistry

* Fixed formating for MeshReader Material Registry

* Forgot one format

* Forgot another format
2019-03-28 07:30:22 -07:00
Mathias Agopian
b26684deed rename namespace filament::driver -> filament::backend 2019-03-26 11:47:47 -07:00
Mathias Agopian
639d05374b update layering: libbackend is now at the bottom
We now have:

backend -> filabridge -> filaflat -> filament
                      -> filamat

Instead of backend depending on filabridge.
2019-03-26 11:47:47 -07:00
Ben Doherty
8b7c2159d3 Fix issue with Windows JAWT swapchains (#1021) 2019-03-25 14:41:46 -07:00
Mathias Agopian
2b5f6cafa6 Separate src/driver into its own library
In this first step, we just "blindly" move everything under src/driver
to a new library libbackend.a. And all headers are moved under
private/backend.

Note that "driver" is renamed "backend", but namespaces are unchanged for now.

Later we'll have to untangle the actual private headers from public
ones and ideally not have any private headers.
2019-03-22 09:45:51 -07:00
Mathias Agopian
9daf7aab64 Decouple tone-mapping, fxaa, msaa and dynamic resolution
It's now possible to enable/disable tone-mapping, fxaa, msaa and
dynamic resolution independently.

A new set/getToneMapping() method is added to View.

It's still possible to disable *all* these post-processing effects
together using setPostProcessing(). This is currently needed when
rendering a transparent view (such as UI) on top of another view.
This limitation might be addressed in the future.

This fixes #621
2019-03-19 11:38:47 -07:00
Philip Rideout
df9791faaf gltf_viewer: add stats and view controls. 2019-03-14 12:18:56 -07:00
Philip Rideout
e3e7073f74 gltf_viewer: add support for drag-and-drop.
You can now drop gltf or glb files into the app.

Note that we will soon be migrating from SDL to GLFW, which also
has support for drag-and-drop.
2019-03-14 10:06:44 -07:00