-
Notifications
You must be signed in to change notification settings - Fork 25
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
3644e9a
commit f76a878
Showing
8 changed files
with
212 additions
and
98 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
__all__ = ["oconv"] | ||
__all__ = ["gendaymtx", "oconv", "rcontrib", "rtrace"] | ||
|
||
import oconv | ||
import gendaymtx, oconv, rcontrib, rtrace |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
__all__ = ["gridbased", "gendaymtx", "rcontrib"] | ||
__all__ = ["gridbased", "gendaymtx", "rcontrib", "oconv"] | ||
|
||
import gridbased, gendaymtx, rcontrib | ||
import gridbased, gendaymtx, rcontrib, oconv |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# coding=utf-8 | ||
"""Radiance oconv Parameters.""" | ||
from ._advancedparametersbase import AdvancedRadianceParameters | ||
|
||
|
||
# TODO: Implement -i and -b | ||
class OconvParameters(AdvancedRadianceParameters): | ||
u"""Radiance Parameters for rcontrib command including rtrace parameters. | ||
Read more: | ||
https://www.radiance-online.org/learning/documentation/manual-pages/pdfs/oconv.pdf | ||
Attributes: | ||
freeze: [-f] A Boolean to produce "a frozen octree containing all the scene | ||
information. Normally, only a reference to the scene files is stored | ||
in the octree, and changes to those files may invalidate the result. | ||
The freeze option is useful when the octree file's integrity and | ||
loading speed is more important than its size, or when the octree is | ||
to be relocated to another directory, and is especially useful for | ||
creating library objects for the "instance" primitive type. If the | ||
input octree is frozen, the output will be also. (default: True) | ||
resolution: [-r] An integer that "specifies the maximum octree resolution. | ||
This should be greater than or equal to the ratio of the largest and | ||
smallest dimensions in the scene (ie. surface size or distance between | ||
surfaces)" (default:16384) | ||
maxSetSize: [-n] An integer that "specifies the maximum surface set size | ||
for each voxel. Larger numbers result in quicker octree generation, | ||
but potentially slower rendering. Smaller values may or may not | ||
produce faster renderings, since the default number (6) is close to | ||
optimal for most scenes (Default: 6). | ||
turnOffWarns: [-w] A Boolean to suppress warnings (Default: False). | ||
* For the full list of attributes try self.keys | ||
** values between []'s indicate Radiance equivalent keys for advanced users | ||
Usage: | ||
# generate default oconv parameters | ||
ocvp = OconvParameters() | ||
# default values. | ||
print ocvp.toRadString() | ||
> -f | ||
# add modifiers file | ||
ocvp.turnOffWarns = True | ||
# check radiance parameters with the new values | ||
print ocvp.toRadString() | ||
> -f -w | ||
""" | ||
|
||
def __init__(self, freeze=True, resolution=None, maxSetSize=None, | ||
turnOffWarns=None): | ||
"""Init paramters.""" | ||
AdvancedRadianceParameters.__init__(self) | ||
|
||
# add parameters | ||
self.addRadianceBoolFlag('f', 'freeze octree', defaultValue=freeze, | ||
attributeName='freeze') | ||
self.addRadianceNumber('r', 'maximum octree resolution', | ||
defaultValue=resolution, checkPositive=True, | ||
attributeName='resolution') | ||
self.addRadianceNumber('n', 'maximum surface set size for each voxel', | ||
defaultValue=maxSetSize, checkPositive=True, | ||
attributeName='maxSetSize') | ||
self.addRadianceBoolFlag('w', 'suppress warnings', | ||
defaultValue=turnOffWarns, | ||
attributeName='turnOffWarns') |
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