Skip to content

Commit 75baf3b

Browse files
authored
Merge pull request #66 from rnd-team-dev/r0.19.0
R0.19.0-RC
2 parents 5e64e7d + 8d002a7 commit 75baf3b

97 files changed

Lines changed: 225 additions & 96 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.rst

Lines changed: 28 additions & 1 deletion

README.rst

Lines changed: 10 additions & 7 deletions

docs/npoptix_geometry.rst

Lines changed: 2 additions & 0 deletions

examples/1_basics/2_beziers.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
2-
With ``Beziers`` geometry you can setup all control points and segments
3-
can be placed independently in contrast to other curve geometries where
4-
all data points are connected or interpolated with a single curve.
2+
With ``Beziers`` geometry you can setup all control points so all
3+
segments are independent, in contrast to other curve geometries where
4+
you setup data points to be connected or interpolated with a single curve.
55
66
This example shows how to:
77
- create a large set of independent bezier segments
@@ -68,7 +68,8 @@ def main():
6868
rt.set_background(0.99) # white background
6969
rt.set_ambient(0.15) # dim ambient light
7070

71-
rt.set_data("curve", pos=xyz, r=r, c=c, geom="Beziers")
71+
#rt.set_data("curve", pos=xyz, r=r, c=c, geom="Beziers")
72+
rt.set_data("curve", pos=xyz, r=r, c=c, geom="BezierRocaps") # much faster on long segments typically used for such hair-like objects
7273

7374
rt.setup_camera("cam1", # cam_type="DoF",
7475
eye=[-6, 4, 5], target=[0, -0.6, 0],

examples/1_basics/6_denoising.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,14 @@ def main():
6868
# Denoiser can use various inputs. By default it is raw RGB and surface
6969
# albedo, but not always it results with the optimal output quality.
7070
# Try one of the below settings and find best configuration for your scene.
71-
#rt.set_int("denoiser_kind", DenoiserKind.Rgb.value)
71+
rt.set_int("denoiser_kind", DenoiserKind.Rgb.value)
7272
#rt.set_int("denoiser_kind", DenoiserKind.RgbAlbedo.value)
73-
rt.set_int("denoiser_kind", DenoiserKind.RgbAlbedoNormal.value)
73+
#rt.set_int("denoiser_kind", DenoiserKind.RgbAlbedoNormal.value)
7474

75-
#rt.add_postproc("Denoiser")
7675
#rt.add_postproc("DenoiserHDR")
7776
#rt.add_postproc("DenoiserUp2x")
78-
rt.add_postproc("OIDenoiser")
79-
#rt.add_postproc("OIDenoiserHDR")
77+
#rt.add_postproc("OIDenoiser")
78+
rt.add_postproc("OIDenoiserHDR")
8079

8180
# Postprocessing stages are applied after AI denoiser (even if configured
8281
# in a different order).

examples/1_basics/7_ambient_and_background.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ def main():
1010

1111
# make some data first:
1212
n = 200
13-
b = 4
14-
k = 9.1
15-
l = 1.1
16-
m = 7.1
13+
b = 16
14+
k = 9.11
15+
l = 1.13
16+
m = 7.17
1717

18-
r0 = 0.06
18+
r0 = 0.04
1919
q = 11
2020

2121
x = np.sin(np.linspace(0, 2*b*k*np.pi, b*n))
@@ -28,7 +28,7 @@ def main():
2828
# create and configure, show the window later
2929
rt = TkOptiX()
3030

31-
rt.set_param(min_accumulation_step=4, max_accumulation_frames=64)
31+
rt.set_param(min_accumulation_step=4, max_accumulation_frames=640)
3232
rt.setup_material("plastic", m_plastic)
3333

3434
rt.setup_camera("dof_cam", cam_type="DoF",
@@ -104,10 +104,10 @@ def main():
104104
################################################################################
105105

106106
# create a plot of parametric curve calculated above, and open the window
107-
rt.set_data("plot", pos=pos, r=r, c=0.94, geom="BezierChain", mat="plastic")
107+
#rt.set_data("plot", pos=pos, r=r, c=0.94, geom="BezierChain", mat="plastic")
108108
#rt.set_data("plot", pos=pos, r=r, c=0.94, geom="Ribbon", mat="plastic")
109109
#rt.set_data("plot", pos=pos, r=r, c=0.94, geom="BSplineQuad", mat="plastic")
110-
#rt.set_data("plot", pos=pos, r=r, c=0.94, geom="BSplineCubic", mat="plastic")
110+
rt.set_data("plot", pos=pos, r=r, c=0.94, geom="BSplineCubic", mat="plastic")
111111
#rt.set_data("plot", pos=pos, r=r, c=0.94, geom="SegmentChain", mat="plastic")
112112

113113
rt.start()

plotoptix/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
__author__ = "Robert Sulej, R&D Team <dev@rnd.team>"
1414
__status__ = "beta"
15-
__version__ = "0.18.4"
16-
__date__ = "12 Feb 2025"
15+
__version__ = "0.19.0-rc"
16+
__date__ = "25 Jan 2026"
1717

1818
import logging
1919

plotoptix/_load_lib.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,10 @@ def _load_optix_win():
294294
optix.set_noise_threshold.argtypes = [c_float]
295295
optix.set_noise_threshold.restype = c_bool
296296

297-
optix.setup_camera.argtypes = [c_wchar_p, c_int, c_int, c_void_p, c_void_p, c_void_p, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_bool, c_wchar_p, c_bool]
297+
optix.setup_camera.argtypes = [c_wchar_p, c_int, c_int, c_void_p, c_void_p, c_void_p, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_bool, c_wchar_p, c_bool]
298298
optix.setup_camera.restype = c_int
299299

300-
optix.update_camera.argtypes = [c_wchar_p, c_void_p, c_void_p, c_void_p, c_float, c_float, c_float, c_float, c_float, c_float, c_float]
300+
optix.update_camera.argtypes = [c_wchar_p, c_void_p, c_void_p, c_void_p, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float, c_float]
301301
optix.update_camera.restype = c_bool
302302

303303
optix.fit_camera.argtypes = [c_uint, c_wchar_p, c_float]
@@ -488,7 +488,7 @@ def _load_optix_win():
488488
optix.set_max_accumulation_frames.argtypes = [c_int]
489489
optix.set_max_accumulation_frames.restype = c_bool
490490

491-
optix.encoder_create.argtypes = [c_int, c_int, c_int, c_int, c_int]
491+
optix.encoder_create.argtypes = [c_int, c_int, c_int, c_int, c_int, c_int]
492492
optix.encoder_create.restype = c_bool
493493

494494
optix.encoder_start.argtypes = [c_wchar_p, c_uint]
@@ -951,19 +951,19 @@ def get_noise_threshold(self): return self._optix.get_noise_threshold()
951951

952952
def set_noise_threshold(self, thr): return self._optix.set_noise_threshold(thr)
953953

954-
def setup_camera(self, name, camera_type, work_distribution, eye, target, up, aperture_r, aperture_fract, focal_scale, chroma_l, chroma_t, fov, rxy, cx, cy, sensor_height, blur, glock, textures, make_current):
954+
def setup_camera(self, name, camera_type, work_distribution, eye, target, up, aperture_r, aperture_fract, focal_scale, swirl_scale, bokeh_vignette, chroma_l, chroma_t, fov, rxy, cx, cy, sensor_height, blur, glock, textures, make_current):
955955
return self._optix.setup_camera_ptr(name, camera_type, work_distribution,
956956
IntPtr.__overloads__[Int64](eye),
957957
IntPtr.__overloads__[Int64](target),
958958
IntPtr.__overloads__[Int64](up),
959-
aperture_r, aperture_fract, focal_scale, chroma_l, chroma_t, fov, rxy, cx, cy, sensor_height, blur, glock, textures, make_current)
959+
aperture_r, aperture_fract, focal_scale, swirl_scale, bokeh_vignette, chroma_l, chroma_t, fov, rxy, cx, cy, sensor_height, blur, glock, textures, make_current)
960960

961-
def update_camera(self, name, eye, target, up, aperture_r, focal_scale, fov, rxy, cx, cy, sensor_height):
961+
def update_camera(self, name, eye, target, up, aperture_r, focal_scale, swirl_scale, bokeh_vignette, fov, rxy, cx, cy, sensor_height):
962962
return self._optix.update_camera_ptr(name,
963963
IntPtr.__overloads__[Int64](eye),
964964
IntPtr.__overloads__[Int64](target),
965965
IntPtr.__overloads__[Int64](up),
966-
aperture_r, focal_scale, fov, rxy, cx, cy, sensor_height)
966+
aperture_r, focal_scale, swirl_scale, bokeh_vignette, fov, rxy, cx, cy, sensor_height)
967967

968968
def fit_camera(self, handle, geo_name, scale): return self._optix.fit_camera(handle, geo_name, scale)
969969

@@ -1135,9 +1135,9 @@ def get_max_accumulation_frames(self): return self._optix.get_max_accumulation_f
11351135

11361136
def set_max_accumulation_frames(self, n): return self._optix.set_max_accumulation_frames(n)
11371137

1138-
def encoder_create(self, fps, bit_rate, idr_rate, profile, preset):
1138+
def encoder_create(self, fps, bit_rate, idr_rate, codec, profile, preset):
11391139
if self._encoder_available:
1140-
return self._optix.encoder_create(fps, bit_rate, idr_rate, profile, preset)
1140+
return self._optix.encoder_create(fps, bit_rate, idr_rate, codec, profile, preset)
11411141
else: return False
11421142

11431143
def encoder_start(self, output_name, n_frames): return self._optix.encoder_start(output_name, n_frames)
@@ -1731,14 +1731,16 @@ def get_noise_threshold(self): return self._optix.get_noise_threshold()
17311731

17321732
def set_noise_threshold(self, thr): return self._optix.set_noise_threshold(thr)
17331733

1734-
def setup_camera(self, name, camera_type, work_distribution, eye, target, up, aperture_r, aperture_fract, focal_scale, chroma_l, chroma_t, fov, rxy, cx, cy, sensor_height, blur, glock, textures, make_current):
1734+
def setup_camera(self, name, camera_type, work_distribution, eye, target, up, aperture_r, aperture_fract, focal_scale, swirl_scale, bokeh_vignette, chroma_l, chroma_t, fov, rxy, cx, cy, sensor_height, blur, glock, textures, make_current):
17351735
return self._optix.setup_camera_ptr(name, camera_type, work_distribution,
17361736
IntPtr(eye),
17371737
IntPtr(target),
17381738
IntPtr(up),
17391739
float(aperture_r),
17401740
float(aperture_fract),
17411741
float(focal_scale),
1742+
float(swirl_scale),
1743+
float(bokeh_vignette),
17421744
float(chroma_l),
17431745
float(chroma_t),
17441746
float(fov),
@@ -1749,13 +1751,15 @@ def setup_camera(self, name, camera_type, work_distribution, eye, target, up, ap
17491751
float(blur),
17501752
glock, textures, make_current)
17511753

1752-
def update_camera(self, name, eye, target, up, aperture_r, focal_scale, fov, rxy, cx, cy, sensor_height):
1754+
def update_camera(self, name, eye, target, up, aperture_r, focal_scale, swirl_scale, bokeh_vignette, fov, rxy, cx, cy, sensor_height):
17531755
return self._optix.update_camera_ptr(name,
17541756
IntPtr(eye),
17551757
IntPtr(target),
17561758
IntPtr(up),
17571759
float(aperture_r),
17581760
float(focal_scale),
1761+
float(swirl_scale),
1762+
float(bokeh_vignette),
17591763
float(fov),
17601764
float(rxy),
17611765
float(cx),
@@ -1944,9 +1948,9 @@ def get_max_accumulation_frames(self): return self._optix.get_max_accumulation_f
19441948

19451949
def set_max_accumulation_frames(self, n): return self._optix.set_max_accumulation_frames(n)
19461950

1947-
def encoder_create(self, fps, bit_rate, idr_rate, profile, preset):
1951+
def encoder_create(self, fps, bit_rate, idr_rate, codec, profile, preset):
19481952
if self._encoder_available:
1949-
return self._optix.encoder_create(fps, bit_rate, idr_rate, profile, preset)
1953+
return self._optix.encoder_create(fps, bit_rate, idr_rate, codec, profile, preset)
19501954
else: return False
19511955

19521956
def encoder_start(self, output_name, n_frames): return self._optix.encoder_start(output_name, n_frames)

plotoptix/bin/RnD.SharpEncoder.dll

1 KB
Binary file not shown.

plotoptix/bin/RnD.SharpOptiX.dll

3 KB
Binary file not shown.

0 commit comments

Comments
 (0)