Skip to content

Commit

Permalink
add files
Browse files Browse the repository at this point in the history
  • Loading branch information
beatreichenbach committed Apr 22, 2023
1 parent 1f0deef commit db8d65f
Show file tree
Hide file tree
Showing 505 changed files with 37,648 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,15 @@ dmypy.json

# Pyre type checker
.pyre/

# PyCharm
.idea/

# node
node_modules
coverage
.map

# Project specific
todo.md
_version.py
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
# flare
Physically-Based Lens Flare Tool
# Realflare
Render complex lens flares from real and accurate lens prescriptions using a ray tracing algorithm that simulates light passing through a camera lens.

For detailed installation instructions, configuration options, and a demo, please visit
[beatreichenbach.github.io/realflare](https://beatreichenbach.github.io/realflare)


## Installation

Requires [Python 3.10](https://www.python.org/downloads/windows)

### Manual
1. `pip install realflare@https://github.com/beatreichenbach/realflare/archive/refs/heads/main.zip`
2. `python -m realflare --gui`

### Automatic (Windows)
1. Download (save link as) [setup.bat](https://raw.githubusercontent.com/beatreichenbach/realflare/main/setup.bat)
2. Place the file in a folder where you'd like to install Realflare. For example C:\Users\beat\Desktop\Realflare
3. Doubleclick setup.bat to install in the current folder
4. Doubleclick run.bat to launch the tool

## License

MIT License

Copyright (c) 2023 Beat Reichenbach

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

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 OR COPYRIGHT HOLDERS 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.
15 changes: 15 additions & 0 deletions benchmark/benchmark.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import os

import qt_extensions
import PySide2
import numpy
import pyopencl
import PyOpenColorIO


if 'REALFLARE_REBUILD' in os.environ:
del os.environ['REALFLARE_REBUILD']


with open('/output/output.md', 'w') as f:
f.write('hello')
225 changes: 225 additions & 0 deletions benchmark/projects/benchmark_v0.0.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
{
"flare": {
"light_intensity": 0.0,
"light_color": [
0.0,
0.0,
0.0,
1.0
],
"light_position": [
0.5,
0.5
],
"lens": {
"sensor_size": [
36,
24
],
"prescription_path": "$RES/model/Nikon/ai_50_135mm.json",
"glasses_path": "$RES/glass/schott",
"abbe_nr_adjustment": 0.0,
"min_area": 0.1,
"coating_lens_elements": [
[
544,
1.3406841906625615
],
[
558,
1.2804426192457654
],
[
460,
1.3679662398033106
],
[
690,
1.3442672791527703
],
[
488,
1.3372880201402626
],
[
430,
1.2789086474207918
],
[
526,
1.2740810193447802
],
[
540,
1.3781994300681473
],
[
676,
1.239703875920382
],
[
590,
1.3678558854309486
],
[
539,
1.3626980111330682
],
[
518,
1.3114071959361029
],
[
561,
1.2594154689626544
],
[
685,
1.2227530947430407
],
[
462,
1.3140982872288973
],
[
534,
1.2259782557452525
],
[
639,
1.3232809066119522
],
[
456,
1.3151681208041581
],
[
422,
1.2273210675221529
],
[
447,
1.322707436859361
],
[
393,
1.2437871169818249
],
[
522,
1.221928583902217
],
[
610,
1.2775311943212895
],
[
475,
1.2976845068034422
],
[
674,
1.2495692308252901
],
[
596,
1.2567697247497693
],
[
475,
1.3193258147031959
],
[
488,
1.2955278585234893
],
[
645,
1.2902243930587711
],
[
526,
1.316133708286473
]
]
},
"starburst": {
"aperture": {
"fstop": 8.0,
"file": "",
"blades": 64,
"softness": 0.0
},
"intensity": 1.0,
"lens_distance": 0.1,
"blur": 0.0,
"rotation": 0.0,
"rotation_weighting": 1.0,
"fadeout": [
0.75,
1.0
],
"scale": [
1.0,
1.0
]
},
"ghost": {
"aperture": {
"fstop": 2.0,
"file": "",
"blades": 64,
"softness": 0.01
},
"fstop": 0.0
}
},
"render": {
"output_path": "D:/files/dev/027_flare/render/wavelengths_v002.exr",
"colorspace": "ACES - ACEScg",
"quality": {
"resolution": [
1920,
1080
],
"bin_size": 64,
"anti_aliasing": 4,
"wavelength_count": 5,
"wavelength_sub_count": 8,
"grid_count": 129,
"grid_length": 60.0,
"cull_percentage": 0.0,
"starburst": {
"resolution": [
256,
256
],
"samples": 200
},
"ghost": {
"resolution": [
512,
512
]
}
},
"disable_starburst": false,
"disable_ghosts": false,
"debug_ghosts": false,
"debug_ghost": 3,
"diagram": {
"resolution": [
2048,
1024
],
"debug_ghost": 10,
"light_position": 0.0,
"grid_count": 9,
"grid_length": 20.0,
"column_offset": 0
}
},
"elements": [
"FLARE"
]
}
Binary file added docs/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/flare.mp4
Binary file not shown.
Binary file added docs/assets/hero.mp4
Binary file not shown.
Binary file added docs/assets/images/flare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/spotlight/mainwindow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/spotlight/presets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/spotlight/starburst.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/spotlight/viewer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions docs/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions docs/assets/wordmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/guides/creating-a-flare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Creating a flare
Peace is a lie. There is only Passion.
2 changes: 2 additions & 0 deletions docs/guides/creating-a-prescription.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Creating a prescription
Through Passion, I gain Strength.
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Home
template: home.html
---
26 changes: 26 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Getting Started

!!! warning

This tool is currently in a pre-release stage and is undergoing active development.

Follow me on [Twitter](https://twitter.com/artofbeat) for the latest updates. A BETA version should be available soon!


!!! info

Realflare uses [sentry.io](https://sentry.io) to collect usage data. If you install realflare you will automatically send crash reports. This is extremely helpful to automatically detect bugs and fix them.

## Installation

Requires [Python 3.10](https://www.python.org/downloads/windows)

### Manual
1. `pip install realflare@https://github.com/beatreichenbach/realflare/archive/refs/heads/main.zip`
2. `python -m realflare --gui`

### Automatic (Windows)
1. Download (save link as) [setup.bat](https://raw.githubusercontent.com/beatreichenbach/realflare/main/setup.bat)
2. Place the file in a folder where you'd like to install Realflare. For example C:\Users\beat\Desktop\Realflare
3. Doubleclick setup.bat to install in the current folder
4. Doubleclick run.bat to launch the tool
Loading

0 comments on commit db8d65f

Please sign in to comment.