Skip to content

Commit

Permalink
Add transmission color remap (#3)
Browse files Browse the repository at this point in the history
* Add transmission color remap

If metallness == roughness == 0 and transmission and color then set transmission color = color.

* Update docs.

* Add pillow dependence.

* Patch js.

* Cleanup.
  • Loading branch information
kwokcb authored Aug 25, 2024
1 parent 2ee6f6d commit 4b63a53
Show file tree
Hide file tree
Showing 85 changed files with 2,231 additions and 1,291 deletions.
1 change: 1 addition & 0 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ <h3>Dependencies</h3>
<ol>
<li>The MaterialX 1.39 or greater package for PhysicallyBased OpenPBR shader creation</li>
<li>The <code>requests</code> package.</li>
<li>The <code>pillow</code> package for image handling for GPUOpen package handling</li>
</ol>
<h3>Building</h3>
<p>The <a href="https://github.com/kwokcb/materialxMaterials"><img src="https://raw.githubusercontent.com/kwokcb/materialxMaterials/20cbe6bde0844699824a9a7a05afe882c42b071d/documents/icons/github-mark-white.svg?token=ALYVGHLEDNQAPHZHPUNJNP3GXTAUQ" width=16px> GitHub repository</a> can be cloned and the package built using:</p>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ The Python utilities require:

1. The MaterialX 1.39 or greater package for PhysicallyBased OpenPBR shader creation
2. The `requests` package.
3. The `pillow` package for image handling for GPUOpen package handling

<h3>Building</h3>

Expand Down
256 changes: 256 additions & 0 deletions documents/html/_js_g_p_u_open_loader_8js_source.html

Large diffs are not rendered by default.

521 changes: 281 additions & 240 deletions documents/html/_js_material_x_physically_based_8js_source.html

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions documents/html/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@
<tr id="row_0_0_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmaterialx_materials_1_1_g_p_u_open_loader_1_1_g_p_u_open_material_loader.html" target="_self">GPUOpenMaterialLoader</a></td><td class="desc">This class is used to load materials from the GPUOpen material database </td></tr>
<tr id="row_0_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_1_" class="arrow" onclick="toggleFolder('0_1_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacematerialx_materials_1_1physically_based_material_x.html" target="_self">physicallyBasedMaterialX</a></td><td class="desc">Class to load Physically Based Materials from the PhysicallyBased site </td></tr>
<tr id="row_0_1_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html" target="_self">PhysicallyBasedMaterialLoader</a></td><td class="desc">Class to load Physically Based Materials from the PhysicallyBased site </td></tr>
<tr id="row_1_"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_1_" class="arrow" onclick="toggleFolder('1_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>myserver</b></td><td class="desc"></td></tr>
<tr id="row_1_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classmyserver_1_1_my_h_t_t_p_request_handler.html" target="_self">MyHTTPRequestHandler</a></td><td class="desc"></td></tr>
<tr id="row_2_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_js_physically_based_material_loader.html" target="_self">JsPhysicallyBasedMaterialLoader</a></td><td class="desc">Javascript class for querying materials from the Physically Based database and creating MaterialX materials </td></tr>
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_g_p_u_open_material_loader.html" target="_self">GPUOpenMaterialLoader</a></td><td class="desc"></td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_js_physically_based_material_loader.html" target="_self">JsPhysicallyBasedMaterialLoader</a></td><td class="desc">Javascript class for querying materials from the Physically Based database and creating MaterialX materials </td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
Expand Down
4 changes: 1 addition & 3 deletions documents/html/annotated_dup.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ var annotated_dup =
[ "PhysicallyBasedMaterialLoader", "classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader.html", "classmaterialx_materials_1_1physically_based_material_x_1_1_physically_based_material_loader" ]
] ]
] ],
[ "myserver", null, [
[ "MyHTTPRequestHandler", "classmyserver_1_1_my_h_t_t_p_request_handler.html", "classmyserver_1_1_my_h_t_t_p_request_handler" ]
] ],
[ "GPUOpenMaterialLoader", "class_g_p_u_open_material_loader.html", "class_g_p_u_open_material_loader" ],
[ "JsPhysicallyBasedMaterialLoader", "class_js_physically_based_material_loader.html", "class_js_physically_based_material_loader" ]
];
Binary file added documents/html/bc_sd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions documents/html/class_g_p_u_open_material_loader-members.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MaterialXMaterials: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MaterialXMaterials
&#160;<span id="projectnumber">0.0.1</span>
</div>
<div id="projectbrief">Utilities for retrieving materials from remote servers</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_g_p_u_open_material_loader.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
<div class="headertitle">
<div class="title">GPUOpenMaterialLoader Member List</div> </div>
</div><!--header-->
<div class="contents">

<p>This is the complete list of members for <a class="el" href="class_g_p_u_open_material_loader.html">GPUOpenMaterialLoader</a>, including all inherited members.</p>
<table class="directory">
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>constructor</b>() (defined in <a class="el" href="class_g_p_u_open_material_loader.html">GPUOpenMaterialLoader</a>)</td><td class="entry"><a class="el" href="class_g_p_u_open_material_loader.html">GPUOpenMaterialLoader</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>downloadPackage</b>(listNumber, materialNumber, packageId=0) (defined in <a class="el" href="class_g_p_u_open_material_loader.html">GPUOpenMaterialLoader</a>)</td><td class="entry"><a class="el" href="class_g_p_u_open_material_loader.html">GPUOpenMaterialLoader</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>downloadPackageByExpression</b>(searchExpr, packageId=0) (defined in <a class="el" href="class_g_p_u_open_material_loader.html">GPUOpenMaterialLoader</a>)</td><td class="entry"><a class="el" href="class_g_p_u_open_material_loader.html">GPUOpenMaterialLoader</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>getMaterials</b>() (defined in <a class="el" href="class_g_p_u_open_material_loader.html">GPUOpenMaterialLoader</a>)</td><td class="entry"><a class="el" href="class_g_p_u_open_material_loader.html">GPUOpenMaterialLoader</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>
126 changes: 126 additions & 0 deletions documents/html/class_g_p_u_open_material_loader.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MaterialXMaterials: GPUOpenMaterialLoader Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MaterialXMaterials
&#160;<span id="projectnumber">0.0.1</span>
</div>
<div id="projectbrief">Utilities for retrieving materials from remote servers</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_g_p_u_open_material_loader.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_g_p_u_open_material_loader-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">GPUOpenMaterialLoader Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a4155c2fcf6b2c38088f85c63e933aef9"><td class="memItemLeft" align="right" valign="top"><a id="a4155c2fcf6b2c38088f85c63e933aef9"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>constructor</b> ()</td></tr>
<tr class="separator:a4155c2fcf6b2c38088f85c63e933aef9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa20236461b74f2fd756649fa63757f05"><td class="memItemLeft" align="right" valign="top"><a id="aa20236461b74f2fd756649fa63757f05"></a>
async&#160;</td><td class="memItemRight" valign="bottom"><b>getMaterials</b> ()</td></tr>
<tr class="separator:aa20236461b74f2fd756649fa63757f05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae420983c6072cceb216459ed5ab2a2aa"><td class="memItemLeft" align="right" valign="top"><a id="ae420983c6072cceb216459ed5ab2a2aa"></a>
async&#160;</td><td class="memItemRight" valign="bottom"><b>downloadPackage</b> (listNumber, materialNumber, packageId=0)</td></tr>
<tr class="separator:ae420983c6072cceb216459ed5ab2a2aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44ccdf25c1654dd628e8351889298e83"><td class="memItemLeft" align="right" valign="top"><a id="a44ccdf25c1654dd628e8351889298e83"></a>
async&#160;</td><td class="memItemRight" valign="bottom"><b>downloadPackageByExpression</b> (searchExpr, packageId=0)</td></tr>
<tr class="separator:a44ccdf25c1654dd628e8351889298e83"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock">
<p class="definition">Definition at line <a class="el" href="_js_g_p_u_open_loader_8js_source.html#l00001">1</a> of file <a class="el" href="_js_g_p_u_open_loader_8js_source.html">JsGPUOpenLoader.js</a>.</p>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_js_g_p_u_open_loader_8js_source.html">JsGPUOpenLoader.js</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="class_g_p_u_open_material_loader.html">GPUOpenMaterialLoader</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>
7 changes: 7 additions & 0 deletions documents/html/class_g_p_u_open_material_loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var class_g_p_u_open_material_loader =
[
[ "constructor", "class_g_p_u_open_material_loader.html#a4155c2fcf6b2c38088f85c63e933aef9", null ],
[ "downloadPackage", "class_g_p_u_open_material_loader.html#ae420983c6072cceb216459ed5ab2a2aa", null ],
[ "downloadPackageByExpression", "class_g_p_u_open_material_loader.html#a44ccdf25c1654dd628e8351889298e83", null ],
[ "getMaterials", "class_g_p_u_open_material_loader.html#aa20236461b74f2fd756649fa63757f05", null ]
];
Loading

0 comments on commit 4b63a53

Please sign in to comment.