Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
3bbbe213
Commit
3bbbe213
authored
14 years ago
by
Constantin Rahn
Browse files
Options
Downloads
Patches
Plain Diff
Added some more parameter for Anti Aliasing
parent
4ae49303
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
render_povray/__init__.py
+23
-8
23 additions, 8 deletions
render_povray/__init__.py
render_povray/render.py
+9
-5
9 additions, 5 deletions
render_povray/render.py
render_povray/ui.py
+14
-3
14 additions, 3 deletions
render_povray/ui.py
with
46 additions
and
16 deletions
render_povray/__init__.py
+
23
−
8
View file @
3bbbe213
...
...
@@ -110,6 +110,18 @@ def register():
name
=
"
Antialias Threshold
"
,
description
=
"
Tolerance for sub-pixels
"
,
min
=
0.0
,
max
=
1.0
,
soft_min
=
0.05
,
soft_max
=
0.5
,
default
=
0.1
)
Scene
.
pov_jitter_enable
=
BoolProperty
(
name
=
"
Jitter
"
,
description
=
"
Enable Jittering. Adds noise into the sampling process (it should be avoided to use jitter in animation).
"
,
default
=
True
)
Scene
.
pov_jitter_amount
=
FloatProperty
(
name
=
"
Jitter Amount
"
,
description
=
"
Amount of jittering.
"
,
min
=
0.0
,
max
=
1.0
,
soft_min
=
0.01
,
soft_max
=
1.0
,
default
=
1.0
)
Scene
.
pov_antialias_gamma
=
FloatProperty
(
name
=
"
Antialias Gamma
"
,
description
=
"
POV-Ray compares gamma-adjusted values for super sampling. Antialias Gamma sets the Gamma before comparison.
"
,
min
=
0.0
,
max
=
5.0
,
soft_min
=
0.01
,
soft_max
=
2.5
,
default
=
2.5
)
Scene
.
pov_max_trace_level
=
IntProperty
(
name
=
"
Max Trace Level
"
,
description
=
"
Number of reflections/refractions allowed on ray path
"
,
min
=
1
,
max
=
256
,
default
=
5
)
...
...
@@ -296,14 +308,17 @@ def unregister():
del
Scene
.
pov_media_color
# MR
del
Scene
.
pov_baking_enable
# MR
del
Scene
.
pov_max_trace_level
# MR
del
Scene
.
pov_antialias_enable
# CR
del
Scene
.
pov_antialias_method
# CR
del
Scene
.
pov_antialias_depth
# CR
del
Scene
.
pov_antialias_threshold
# CR
del
Scene
.
pov_command_line_switches
# CR
del
Scene
.
pov_indentation_character
# CR
del
Scene
.
pov_indentation_spaces
# CR
del
Scene
.
pov_comments_enable
# CR
del
Scene
.
pov_antialias_enable
# CR
del
Scene
.
pov_antialias_method
# CR
del
Scene
.
pov_antialias_depth
# CR
del
Scene
.
pov_antialias_threshold
# CR
del
Scene
.
pov_antialias_gamma
# CR
del
Scene
.
pov_jitter_enable
# CR
del
Scene
.
pov_jitter_amount
# CR
del
Scene
.
pov_command_line_switches
# CR
del
Scene
.
pov_indentation_character
# CR
del
Scene
.
pov_indentation_spaces
# CR
del
Scene
.
pov_comments_enable
# CR
del
Mat
.
pov_irid_enable
# MR
del
Mat
.
pov_mirror_use_IOR
# MR
del
Mat
.
pov_mirror_metallic
# MR
...
...
This diff is collapsed.
Click to expand it.
render_povray/render.py
+
9
−
5
View file @
3bbbe213
...
...
@@ -1410,8 +1410,9 @@ def write_pov_ini(filename_ini, filename_pov, filename_image):
y
=
int
(
render
.
resolution_y
*
render
.
resolution_percentage
*
0.01
)
file
=
open
(
filename_ini
.
name
,
'
w
'
)
file
.
write
(
"
Input_File_Name=
'
%s
'
\n
"
%
filename_pov
.
name
)
file
.
write
(
"
Output_File_Name=
'
%s
'
\n
"
%
filename_image
.
name
)
file
.
write
(
'
Version=3.7
\n
'
)
file
.
write
(
'
Input_File_Name=
\'
%s
\'\n
'
%
filename_pov
.
name
)
file
.
write
(
'
Output_File_Name=
\'
%s
\'\n
'
%
filename_image
.
name
)
file
.
write
(
'
Width=%d
\n
'
%
x
)
file
.
write
(
'
Height=%d
\n
'
%
y
)
...
...
@@ -1437,15 +1438,18 @@ def write_pov_ini(filename_ini, filename_pov, filename_image):
# aa_mapping = {'5': 2, '8': 3, '11': 4, '16': 5} # method 2 (recursive) with higher max subdiv forced because no mipmapping in POV-Ray needs higher sampling.
method
=
{
'
0
'
:
1
,
'
1
'
:
2
}
file
.
write
(
'
Antialias=on
\n
'
)
print
(
"
Method:
"
+
str
(
scene
.
pov_antialias_method
))
file
.
write
(
'
Sampling_Method=%s
\n
'
%
method
[
scene
.
pov_antialias_method
])
file
.
write
(
'
Antialias_Depth=%d
\n
'
%
scene
.
pov_antialias_depth
)
file
.
write
(
'
Antialias_Threshold=%.3g
\n
'
%
scene
.
pov_antialias_threshold
)
file
.
write
(
'
Jitter=off
\n
'
)
#prevent animation flicker
file
.
write
(
'
Antialias_Gamma=%.3g
\n
'
%
scene
.
pov_antialias_gamma
)
if
scene
.
pov_jitter_enable
:
file
.
write
(
'
Jitter=on
\n
'
)
file
.
write
(
'
Jitter_Amount=%3g
\n
'
%
scene
.
pov_jitter_amount
)
else
:
file
.
write
(
'
Jitter=off
\n
'
)
#prevent animation flicker
else
:
file
.
write
(
'
Antialias=off
\n
'
)
file
.
write
(
'
Version=3.7
'
)
#print('ini file closed %s' % file.closed)
file
.
close
()
#print('ini file closed %s' % file.closed)
...
...
This diff is collapsed.
Click to expand it.
render_povray/ui.py
+
14
−
3
View file @
3bbbe213
...
...
@@ -303,12 +303,23 @@ class RENDER_PT_povray_antialias(RenderButtonsPanel, bpy.types.Panel):
col
=
split
.
column
()
col
.
prop
(
scene
,
"
pov_antialias_method
"
,
text
=
""
)
col
=
split
.
column
()
col
.
prop
(
scene
,
"
pov_jitter_enable
"
,
text
=
"
Jitter
"
)
split
=
layout
.
split
()
col
=
split
.
column
()
col
.
prop
(
scene
,
"
pov_antialias_depth
"
,
text
=
"
Depth
"
)
col
.
prop
(
scene
,
"
pov_antialias_depth
"
,
text
=
"
AA Depth
"
)
sub
=
split
.
column
()
sub
.
prop
(
scene
,
"
pov_jitter_amount
"
,
text
=
"
Jitter Amount
"
)
if
scene
.
pov_jitter_enable
:
sub
.
enabled
=
True
else
:
sub
.
enabled
=
False
split
=
layout
.
split
()
col
=
split
.
column
()
col
.
prop
(
scene
,
"
pov_antialias_threshold
"
,
text
=
"
AA Threshold
"
)
col
=
split
.
column
()
col
.
prop
(
scene
,
"
pov_antialias_
threshold
"
,
text
=
"
Threshold
"
)
col
.
prop
(
scene
,
"
pov_antialias_
gamma
"
,
text
=
"
AA Gamma
"
)
class
RENDER_PT_povray_radiosity
(
RenderButtonsPanel
,
bpy
.
types
.
Panel
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment