-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e471e5
commit 4d8684b
Showing
38 changed files
with
6,929 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <http://unlicense.org/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Vixel | ||
|
||
A javascript & webgl voxel path tracer. See it live [here](https://wwwtyro.github.io/vixel-editor). | ||
|
||
Author: Rye Terrell | ||
|
||
![vixel screenshot](media/screenshot-000.png) | ||
|
||
![vixel screenshot](media/screenshot-001.png) | ||
|
||
## Materials | ||
|
||
- **Color** is the material's base color. | ||
|
||
- **Roughness** describes how randomly specular light is reflected from the surface. | ||
|
||
- **Metalness** describes how much of the light it reflects is diffusive. A purely metallic surface reflects zero light diffusively. | ||
|
||
- **Emission** is how much light the material emits. If this value is greater than zero, only the **color** component of the material is used. | ||
|
||
| Roughness | Metalness | Real world analogue | Rendered example | | ||
| --------- | --------- | ------------------- | -------------------------------- | | ||
| 0.0 | 0.0 | Smooth plastic | ![thing](media/material-000.png) | | ||
| 1.0 | 0.0 | Chalk | ![thing](media/material-001.png) | | ||
| 0.0 | 1.0 | Mirror | ![thing](media/material-002.png) | | ||
| 1.0 | 0.05 | Unpolished metal | ![thing](media/material-003.png) | | ||
|
||
## Ground | ||
|
||
The **color**, **roughness**, and **metalness** properties can also be set for the ground plane, and are identical in meaning. | ||
|
||
## Sky | ||
|
||
- **Time** is simply the time of day on a 24-hour clock. The sun rises at 6:00 and sets at 18:00. | ||
|
||
- **Azimuth** is the direction of the sun _around_ the up/down axis. | ||
|
||
## Rendering | ||
|
||
- **Width** and **Height** define the resolution of your rendered image. | ||
|
||
- **DOF Distance** is how far into your scene the focus plane lies. | ||
|
||
- **DOF Magnitude** is how strong the DOF effect is. | ||
|
||
- **Samples/Frame** describes how many samples are taken per frame. `1` is one sample per pixel, per frame. If the interactivity of the editor is slow or | ||
choppy, you can reduce this to improve your framerate. Similarly, if you want to converge the scene faster, you can increase it (though increasing it is only | ||
effective until you're GPU bound). | ||
|
||
- **Take Screenshot** will download a screenshot. | ||
|
||
## Scene | ||
|
||
- **Copy URL** copies the current scene to the clipboard and updates the URL. For now, this is the only way to save and share your scene. Feel free to paste it | ||
into a text file to save it longer term. Yes, there are absolutely plans to improve this. | ||
|
||
- **Clear Scene** clears the scene of all voxels save one. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
|
||
<html> | ||
<head> | ||
<script src='static/bundle.js' defer></script> | ||
<style> | ||
body { | ||
background: #333; | ||
font-family: normal 16px system-ui, sans-serif; | ||
color: white; | ||
font-size: 90%; | ||
} | ||
table { | ||
border-collapse: collapse; | ||
} | ||
a { | ||
color: white; | ||
} | ||
.no-user-select { | ||
user-select: none; | ||
-webkit-user-select: none; | ||
-ms-user-select: none; | ||
-webkit-touch-callout: none; | ||
-o-user-select: none; | ||
-moz-user-select: none; | ||
} | ||
.center { | ||
position: fixed; | ||
width: 100%; | ||
height: 100%; | ||
top: 0px; | ||
left: 0px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
#stats { | ||
position: fixed; | ||
bottom: 8px; | ||
right: 8px; | ||
background: rgba(0,0,0,0.8); | ||
color: white; | ||
border-radius: 3px; | ||
padding: 8px; | ||
} | ||
#help-button { | ||
position: fixed; | ||
bottom: 8px; | ||
left: 8px; | ||
color: white; | ||
background: rgba(0,0,0,0.8); | ||
border-radius: 5px; | ||
padding: 8px; | ||
cursor: pointer; | ||
color: lime; | ||
} | ||
#help { | ||
background: rgba(0,0,0,0.8); | ||
border-radius: 3px; | ||
padding: 8px; | ||
font-size: 80%; | ||
display: none; | ||
position: fixed; | ||
bottom: 8px; | ||
left: 8px; | ||
} | ||
#help table { | ||
font-size: inherit; | ||
} | ||
#help td { | ||
font-size: inherit; | ||
color: white; | ||
padding: 4px; | ||
padding-left: 0px; | ||
padding-right: 8px; | ||
} | ||
#help tr { | ||
border-top: 1px solid gray; | ||
border-bottom: 1px solid gray; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class='center'> | ||
<canvas id='render-canvas'></canvas> | ||
</div> | ||
<div id='stats' class='no-user-select'></div> | ||
<div id='help' class='no-user-select'> | ||
<div style='width: 100%; cursor: pointer; text-align: right; color: lime'>✖</div> | ||
<br> | ||
Controls | ||
<br><br> | ||
<table> | ||
<tr><td>Left mouse button</td><td>Place voxel</td></tr> | ||
<tr><td>Shift + left mouse button</td><td>Remove voxel</td></tr> | ||
<tr><td>Control + left mouse button</td><td>Copy voxel</td></tr> | ||
<tr><td>Right mouse button + drag</td><td>Rotate camera</td></tr> | ||
<tr><td>Mouse wheel</td><td>Zoom</td></tr> | ||
<tr><td>H key</td><td>Hide/show controls</td></tr> | ||
</table> | ||
<br> | ||
<a href='https://github.com/wwwtyro/vixel' target='_blank'>More information</a> | ||
</div> | ||
<div id='help-button'>help</div> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.