Add new HDR environment maps in third_party (#182)
These are much better than the ones we had in assets/
@@ -125,6 +125,8 @@ Many other features have been either prototyped or planned:
|
||||
- `samples`: Sample desktop applications
|
||||
- `shaders`: Shaders used by `filamat` and `matc`
|
||||
- `third_party`: External libraries and assets
|
||||
- `environments`: Environment maps under CC0 license that can be used with `cmgen`
|
||||
- `textures`: Textures under CC0 license
|
||||
- `tools`: Host tools
|
||||
- `cmgen`: Image-based lighting asset generator
|
||||
- `filamesh`: Mesh converter
|
||||
@@ -834,6 +836,12 @@ $ doxygen docs/doxygen/filament.doxygen
|
||||
|
||||
Finally simply open `docs/html/index.html` in your web browser.
|
||||
|
||||
## Assets
|
||||
|
||||
To get started you can use the textures and environment maps found respectively in
|
||||
`third_party/textures` and `third_party/environments`. These assets are under CC0 license. Please
|
||||
refer to their respective `URL.txt` files to know more about the original authors.
|
||||
|
||||
## Dependencies
|
||||
|
||||
One of our design goals is that Filament itself should have no dependencies or as few dependencies
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 2.3 MiB |
|
Before Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 1.7 MiB |
@@ -46,14 +46,14 @@ add_custom_target(sample_materials DEPENDS ${MATERIAL_BINS})
|
||||
#
|
||||
# The goal is to create a "public" folder that can be the root of a simple file server:
|
||||
#
|
||||
# /suzanne.js built by em++
|
||||
# /suzanne.wasm built by em++
|
||||
# /suzanne.html copied from REPO/samples/web
|
||||
# /filaweb.js copied from REPO/samples/web
|
||||
# /favicon.png copied from REPO/samples/web
|
||||
# /monkey/*.png copied from REPO/assets/models
|
||||
# /monkey/*.filamesh built by filamesh
|
||||
# /desert/* built by cmgen
|
||||
# /suzanne.js built by em++
|
||||
# /suzanne.wasm built by em++
|
||||
# /suzanne.html copied from REPO/samples/web
|
||||
# /filaweb.js copied from REPO/samples/web
|
||||
# /favicon.png copied from REPO/samples/web
|
||||
# /monkey/*.png copied from REPO/assets/models
|
||||
# /monkey/*.filamesh built by filamesh
|
||||
# /syferfontein_18d_clear_2k/* built by cmgen
|
||||
#
|
||||
# ==================================================================================================
|
||||
|
||||
@@ -80,12 +80,12 @@ add_custom_command(
|
||||
# (1) single miplevel of blurry skybox (png)
|
||||
# (2) all miplevels for the IBL (rgbm)
|
||||
|
||||
set(source_envmap "${CMAKE_CURRENT_SOURCE_DIR}/../../assets/environments/desert/desert.exr")
|
||||
set(source_envmap "${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/environments/syferfontein_18d_clear_2k.hdr")
|
||||
|
||||
foreach(FACE nx ny nz px py pz)
|
||||
set(target_skybox ${target_skybox} public/desert/${FACE}.png)
|
||||
set(target_skybox ${target_skybox} public/syferfontein_18d_clear_2k/${FACE}.png)
|
||||
foreach(MIP 0 1 2 3 4 5 6 7 8)
|
||||
set(target_envmap ${target_envmap} public/desert/m${MIP}_${FACE}.rgbm)
|
||||
set(target_envmap ${target_envmap} public/syferfontein_18d_clear_2k/m${MIP}_${FACE}.rgbm)
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
|
||||
@@ -159,7 +159,8 @@ SkyLight getSkyLight(Engine& engine, const char* name) {
|
||||
|
||||
// Pull the data out of JavaScript.
|
||||
static auto asset = filaweb::getCubemap(name);
|
||||
printf("desert: %d x %d, %d mips\n", asset.width, asset.height, asset.envMipCount);
|
||||
printf("syferfontein_18d_clear_2k: %d x %d, %d mips\n",
|
||||
asset.width, asset.height, asset.envMipCount);
|
||||
|
||||
// Parse the coefficients.
|
||||
std::istringstream shReader((const char*) asset.envShCoeffs->data.get());
|
||||
|
||||
@@ -170,7 +170,7 @@ void setup(Engine* engine, View* view, Scene* scene) {
|
||||
scene->addEntity(app.ptlight[3]);
|
||||
|
||||
// Create sky box and image-based light source.
|
||||
auto skylight = filaweb::getSkyLight(*engine, "desert");
|
||||
auto skylight = filaweb::getSkyLight(*engine, "syferfontein_18d_clear_2k");
|
||||
scene->setIndirectLight(skylight.indirectLight);
|
||||
scene->setSkybox(skylight.skybox);
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@ body {
|
||||
<script src="filaweb.js"></script>
|
||||
<script>
|
||||
load({
|
||||
'albedo': load_texture('monkey/albedo.png'),
|
||||
'metallic': load_texture('monkey/metallic.png'),
|
||||
'roughness': load_texture('monkey/roughness.png'),
|
||||
'normal': load_texture('monkey/normal.png'),
|
||||
'ao': load_texture('monkey/ao.png'),
|
||||
'mesh': load_rawfile('monkey/mesh.filamesh'),
|
||||
'desert': load_cubemap('desert/', 9)
|
||||
'albedo': load_texture('monkey/albedo.png'),
|
||||
'metallic': load_texture('monkey/metallic.png'),
|
||||
'roughness': load_texture('monkey/roughness.png'),
|
||||
'normal': load_texture('monkey/normal.png'),
|
||||
'ao': load_texture('monkey/ao.png'),
|
||||
'mesh': load_rawfile('monkey/mesh.filamesh'),
|
||||
'syferfontein_18d_clear_2k': load_cubemap('syferfontein_18d_clear_2k/', 9)
|
||||
});
|
||||
</script>
|
||||
|
||||
178
third_party/environments/CC0.html
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!-- saved from url=(0059)https://creativecommons.org/publicdomain/zero/1.0/legalcode -->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Creative Commons Legal Code</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="./CC0_files/deed3.css" media="screen">
|
||||
<link rel="stylesheet" type="text/css" href="./CC0_files/deed3-print.css" media="print">
|
||||
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="https://creativecommons.org/includes/deed3-ie.css" media="screen" /><![endif]-->
|
||||
<script type="text/javascript" src="./CC0_files/errata.js">
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p align="center" id="header"><a href="https://creativecommons.org/">Creative Commons</a></p>
|
||||
<div id="deed" class="green">
|
||||
<div id="deed-head">
|
||||
<div id="cc-logo">
|
||||
<img src="./CC0_files/cc-logo.jpg" alt="">
|
||||
</div>
|
||||
<h1><span>Creative Commons Legal Code</span></h1>
|
||||
<div id="deed-license">
|
||||
<h2>CC0 1.0 Universal</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div id="deed-main">
|
||||
<div id="deed-main-content">
|
||||
<img src="./CC0_files/unported.png" alt="">
|
||||
<div id="deed-disclaimer">
|
||||
<div class="summary">
|
||||
Official translations of this legal tool are available <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode#languages">in other languages</a>.
|
||||
</div>
|
||||
</div>
|
||||
<blockquote>
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT
|
||||
PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES
|
||||
NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS
|
||||
PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE
|
||||
COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS
|
||||
DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND
|
||||
DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF
|
||||
THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
</blockquote>
|
||||
<h3><em>Statement of Purpose</em></h3>
|
||||
<p>The laws of most jurisdictions throughout the world
|
||||
automatically confer exclusive Copyright and Related Rights
|
||||
(defined below) upon the creator and subsequent owner(s) (each
|
||||
and all, an "owner") of an original work of authorship and/or
|
||||
a database (each, a "Work").</p>
|
||||
<p>Certain owners wish to permanently relinquish those rights
|
||||
to a Work for the purpose of contributing to a commons of
|
||||
creative, cultural and scientific works ("Commons") that the
|
||||
public can reliably and without fear of later claims of
|
||||
infringement build upon, modify, incorporate in other works,
|
||||
reuse and redistribute as freely as possible in any form
|
||||
whatsoever and for any purposes, including without limitation
|
||||
commercial purposes. These owners may contribute to the
|
||||
Commons to promote the ideal of a free culture and the further
|
||||
production of creative, cultural and scientific works, or to
|
||||
gain reputation or greater distribution for their Work in part
|
||||
through the use and efforts of others.</p>
|
||||
<p>For these and/or other purposes and motivations, and
|
||||
without any expectation of additional consideration or
|
||||
compensation, the person associating CC0 with a Work (the
|
||||
"Affirmer"), to the extent that he or she is an owner of
|
||||
Copyright and Related Rights in the Work, voluntarily elects
|
||||
to apply CC0 to the Work and publicly distribute the Work
|
||||
under its terms, with knowledge of his or her Copyright and
|
||||
Related Rights in the Work and the meaning and intended legal
|
||||
effect of CC0 on those rights.</p>
|
||||
<p><strong>1. Copyright and Related Rights.</strong>
|
||||
A Work made available under CC0 may be protected by
|
||||
copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but
|
||||
are not limited to, the following:
|
||||
</p>
|
||||
<ol type="i">
|
||||
<li>the right to reproduce, adapt, distribute, perform,
|
||||
display, communicate, and translate a Work;</li>
|
||||
<li> moral rights retained by the original author(s) and/or
|
||||
performer(s);</li>
|
||||
<li>publicity and privacy rights pertaining to a person's
|
||||
image or likeness depicted in a Work;</li>
|
||||
<li>rights protecting against unfair competition in regards
|
||||
to a Work, subject to the limitations in paragraph 4(a),
|
||||
below;</li>
|
||||
<li>rights protecting the extraction, dissemination, use and
|
||||
reuse of data in a Work;</li>
|
||||
<li>database rights (such as those arising under Directive
|
||||
96/9/EC of the European Parliament and of the Council of 11
|
||||
March 1996 on the legal protection of databases, and under
|
||||
any national implementation thereof, including any amended
|
||||
or successor version of such directive); and</li>
|
||||
<li>other similar, equivalent or corresponding rights
|
||||
throughout the world based on applicable law or treaty, and
|
||||
any national implementations thereof.</li>
|
||||
</ol>
|
||||
<p><strong>2. Waiver.</strong> To the greatest extent
|
||||
permitted by, but not in contravention of, applicable law,
|
||||
Affirmer hereby overtly, fully, permanently, irrevocably and
|
||||
unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims
|
||||
and causes of action, whether now known or unknown (including
|
||||
existing as well as future claims and causes of action), in
|
||||
the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty
|
||||
(including future time extensions), (iii) in any current or
|
||||
future medium and for any number of copies, and (iv) for any
|
||||
purpose whatsoever, including without limitation commercial,
|
||||
advertising or promotional purposes (the "Waiver"). Affirmer
|
||||
makes the Waiver for the benefit of each member of the public
|
||||
at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be
|
||||
subject to revocation, rescission, cancellation, termination,
|
||||
or any other legal or equitable action to disrupt the quiet
|
||||
enjoyment of the Work by the public as contemplated by
|
||||
Affirmer's express Statement of Purpose.
|
||||
</p>
|
||||
<p><strong>3. Public License Fallback.</strong> Should any
|
||||
part of the Waiver for any reason be judged legally invalid or
|
||||
ineffective under applicable law, then the Waiver shall be
|
||||
preserved to the maximum extent permitted taking into account
|
||||
Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each
|
||||
affected person a royalty-free, non transferable, non
|
||||
sublicensable, non exclusive, irrevocable and unconditional
|
||||
license to exercise Affirmer's Copyright and Related Rights
|
||||
in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty
|
||||
(including future time extensions), (iii) in any current or
|
||||
future medium and for any number of copies, and (iv) for any
|
||||
purpose whatsoever, including without limitation commercial,
|
||||
advertising or promotional purposes (the "License"). The
|
||||
License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the
|
||||
License for any reason be judged legally invalid or
|
||||
ineffective under applicable law, such partial invalidity or
|
||||
ineffectiveness shall not invalidate the remainder of the
|
||||
License, and in such case Affirmer hereby affirms that he or
|
||||
she will not (i) exercise any of his or her remaining
|
||||
Copyright and Related Rights in the Work or (ii) assert any
|
||||
associated claims and causes of action with respect to the
|
||||
Work, in either case contrary to Affirmer's express Statement
|
||||
of Purpose.</p>
|
||||
<p><strong>4. Limitations and Disclaimers.</strong></p>
|
||||
<ol type="a">
|
||||
<li>No trademark or patent rights held by Affirmer are
|
||||
waived, abandoned, surrendered, licensed or otherwise
|
||||
affected by this document.</li>
|
||||
<li>Affirmer offers the Work as-is and makes no
|
||||
representations or warranties of any kind concerning the
|
||||
Work, express, implied, statutory or otherwise, including
|
||||
without limitation warranties of title, merchantability,
|
||||
fitness for a particular purpose, non infringement, or the
|
||||
absence of latent or other defects, accuracy, or the present
|
||||
or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.</li>
|
||||
<li>Affirmer disclaims responsibility for clearing rights of
|
||||
other persons that may apply to the Work or any use thereof,
|
||||
including without limitation any person's Copyright and
|
||||
Related Rights in the Work. Further, Affirmer disclaims
|
||||
responsibility for obtaining any necessary consents,
|
||||
permissions or other rights required for any use of the
|
||||
Work.</li>
|
||||
<li>Affirmer understands and acknowledges that Creative
|
||||
Commons is not a party to this document and has no duty or
|
||||
obligation with respect to this CC0 or use of the Work.</li>
|
||||
</ol>
|
||||
<blockquote><a name="languages">Additional languages available</a>: <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.fr">français</a>, <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.it">italiano</a>, <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.lv">latviski</a>, <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.nl">Nederlands</a>, <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.pl">polski</a>, <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.fi">suomeksi</a>, <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.sv">svenska</a>, <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.zh-Hans">中文</a>, <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.ja">日本語</a>, <a href="https://creativecommons.org/publicdomain/zero/1.0/legalcode.zh-Hant">華語</a>. Please read the <a href="https://wiki.creativecommons.org/FAQ#officialtranslations">FAQ</a> for more information about official translations.</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div id="deed-foot">
|
||||
<p id="footer"><a href="https://creativecommons.org/publicdomain/zero/1.0/">« Back to Commons Deed</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body></html>
|
||||
1
third_party/environments/URL.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
https://hdrihaven.com/
|
||||
BIN
third_party/environments/flower_road_2k.hdr
vendored
Normal file
BIN
third_party/environments/graffiti_shelter_2k.hdr
vendored
Normal file
BIN
third_party/environments/noon_grass_2k.hdr
vendored
Normal file
BIN
third_party/environments/parking_garage_2k.hdr
vendored
Normal file
BIN
third_party/environments/pillars_2k.hdr
vendored
Normal file
BIN
third_party/environments/studio_small_02_2k.hdr
vendored
Normal file
BIN
third_party/environments/syferfontein_18d_clear_2k.hdr
vendored
Normal file
BIN
third_party/environments/the_sky_is_on_fire_2k.hdr
vendored
Normal file
BIN
third_party/environments/venetian_crossroads_2k.hdr
vendored
Normal file
@@ -117,15 +117,15 @@ static void printUsage(char* name) {
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" --help, -h\n"
|
||||
" print this message\n\n"
|
||||
" Print this message\n\n"
|
||||
" --license\n"
|
||||
" Print copyright and license information\n\n"
|
||||
" --quiet, -q\n"
|
||||
" Quiet mode. Suppress all non-error output\n\n"
|
||||
" --format=[exr|hdr|psd|rgbm|png|dds], -f [exr|hdr|psd|rgbm|png|dds]\n"
|
||||
" specify output file format\n\n"
|
||||
" Specify output file format\n\n"
|
||||
" --compression=COMPRESSION, -c COMPRESSION\n"
|
||||
" format specific compression:\n"
|
||||
" Format specific compression:\n"
|
||||
" PNG: Ignored\n"
|
||||
" PNG RGBM: Ignored\n"
|
||||
" Radiance: Ignored\n"
|
||||
@@ -133,7 +133,7 @@ static void printUsage(char* name) {
|
||||
" OpenEXR: RAW, RLE, ZIPS, ZIP, PIZ (default)\n"
|
||||
" DDS: 8, 16 (default), 32\n\n"
|
||||
" --size=power-of-two, -s power-of-two\n"
|
||||
" size of the output cubemaps (base level), 256 by default\n\n"
|
||||
" Size of the output cubemaps (base level), 256 by default\n\n"
|
||||
" --deploy=dir, -x dir\n"
|
||||
" Generate everything needed for deployment into <dir>\n\n"
|
||||
" --extract=dir\n"
|
||||
@@ -147,11 +147,11 @@ static void printUsage(char* name) {
|
||||
"\n"
|
||||
"Private use only:\n"
|
||||
" --ibl-dfg=filename.[exr|hdr|psd|png|rgbm|dds|h|hpp|c|cpp|inc|txt]\n"
|
||||
" Computes the IBL DFG LUT\n\n"
|
||||
" Compute the IBL DFG LUT\n\n"
|
||||
" --ibl-dfg-multiscatter\n"
|
||||
" If --ibl-dfg is set, computes the DFG for multi-scattering GGX\n\n"
|
||||
" --ibl-is-mipmap=dir\n"
|
||||
" Generates mipmap for pre-filtered importance sampling\n\n"
|
||||
" Generate mipmap for pre-filtered importance sampling\n\n"
|
||||
" --ibl-ld=dir\n"
|
||||
" Roughness prefilter into <dir>\n\n"
|
||||
" --sh=bands\n"
|
||||
|
||||