Comments (13)
This is a know issue. Currently, only the Interaction<DynamicBuffer<Packet<float, 8>>>
type has bindings for the packet_*
variants. This will be fixed in a later version of Mitsuba 2, involving changes in to the enoki library as well.
The Custom plugin feature has only been tested with gpu_*
variants of the renderer. If your machine supports it, I would strongly recommend to use the GPU variants for this. As stated in the doc, this feature only really makes sense with wavefront modes for performance reason.
from mitsuba2.
With small corrections( final plugin class), I was able to render in scalar_*
variant. gpu_rgb
and gpu_spectral
variants give me following error.
Traceback (most recent call last):
File "test_light_src.py", line 40, in <module>
scene = load_file(filename, num_bounces=num_bounces, num_samples=num_samples, resolution=resolution)
RuntimeError: [xml.cpp:1058] Error while loading "gelsight_model/mitsuba2_visual_illumination_model.xml" (near line 118, col 4): could not instantiate emitter plugin of type "mypoint": TypeError: Unable to convert function return value to a Python type! The signature was
[xml.cpp:1058] (self: mitsuba.core.Properties, arg0: str) -> object
[xml.cpp:1058]
[xml.cpp:1058] At:
[xml.cpp:1058] /home/arpit/projects/sensor_optim/myEmitters.py(24): __init__
[xml.cpp:1058] test_light_src.py(37): <lambda>
[xml.cpp:1058] test_light_src.py(40): <module>
from mitsuba2.
The issue being with this line:
self.m_world_transform = AnimatedTransform(props["to_world"])
it would be intersting to print the return value of props["to_world"]
.
Also, two things I would like to mention here:
- If I remember correctly, there is a know issue with the python constructor of custom python plugin class regarding reading fields from the
props
object. This is on my TODO list. AnimatedTransform
haven't been tested much (not at all on GPU, not sure it even works). This is also on my TODO list
from mitsuba2.
I also checked direct_integrator.py
using hello.xml
with gpu_rgb
. I get similar error for register_integrator
as well.
from mitsuba2.
I just tested this, it works fine for me.
Could you give me more information: compiler, OS, python version, ... and a full log so I can look into it?
Thanks!
from mitsuba2.
False alarm regarding hello.xml
. The error was because of not using xml properties in hello.xml integrator.
However, I am still getting an error for the custom emitter. For gpu_*
variants, if I use python print statement, I don't see any output on the screen. How do I print the type of props["to_world"]
?
from mitsuba2.
This is the smallest scene, which I am creating.
When I query props["intensity"]
in my emitter plugin cstor, I get following output
RegularSpectrum[
distr = ContinuousDistribution[
size = 95,
range = [360, 830],
integral = 3.70309,
pdf = [0.00441316, 0.00467105, 0.00492895, 0.00482895, 0.00472895, .. 85 skipped .., 0.00491663, 0.00517598, 0.00543533, 0.00557121, 0.00570709]
]
]
However, it doesn't have Texture
class functions like eval
.
It seems to be opaquely casted into mitsuba.core.Object
which these member functions only.
from mitsuba2.
Is this in gpu_rgb
mode? If it is, you should get a UniformSpectrum
instead of RegularSpectrum
.
from mitsuba2.
This is probably a bug in the bindings of Properties
. I will try to look into this ASAP.
from mitsuba2.
I added bindings for ScalarTransform4f
in 7599c2e which were necessary in Properties
.
I was able to load a scene file with you custom mypoint
emitter successfully, and the constructor seems to be read all the properties correctly now (intensity
included).
Let me know if this fixes your issue.
from mitsuba2.
My previous post was with scalar_rgb
. I tried after pulling your changes with both scalar_rgb
and gpu_rgb
. I get UniformSpectrum[value=[1.000000]]
with gpu_rgb
.
Loading scene works with proper transform in both variants. However, rendering fails with custom plugin. Both spectrum
don't have methods of Texture
class like eval
.
from mitsuba2.
Could you try again with 53a6b96?
Thanks for reporting all those issues. This custom plugin feature hasn't been tested much so far...
from mitsuba2.
Thanks! This does the magic. I am now able to call texture functions from spectrum and render scenes.
from mitsuba2.
Related Issues (20)
- [🔨 compilation issue] 'cmake -GNinja' step HOT 3
- [❔ other question] How to convert/extract enoki.autodiff_cuda.Float32 type array from Bitmap class? HOT 4
- [❔ other question]runtime API error = 0719 HOT 1
- [🐛 bug report] importing Pytorch after mitsuba => Segmentation fault (core dumped) HOT 1
- [❔ other question] Performance on Windows much lower than Linux? HOT 5
- [🐛 bug report] hdrfilm.cpp: duplicate channel detection HOT 3
- [❔ other question] how to uninstall mitsuba2 in linux? HOT 4
- The examples of Differentiable rendering applications HOT 2
- [🐛 bug report] OptiX "arithmetic involving uninitialized variable!" with Certain Scenes HOT 1
- [✨ feature request] Tutorial on differential rendering material acquisition HOT 1
- Something about code HOT 1
- Caught a critical exception: main [properties.cpp:401] └1∩Æ∞☺
- [✨ feature request] Does the mitsuba2 support bsdf for cloth model? HOT 1
- 用java或C++用物件導向的概念設計程式解下面的問題:讀取一組時間,計算出時針與分針的夾角,時間的格式是0:00到12:00,小時數可能為1或2位數,分鐘數總是2位數,00到59之間。輸出腳讀為0到180之間的值,角度的精確度到千分之一。例如9:00是90.000度,不是-90,也不是270,2:00則是60 HOT 1
- Rendered polarized images' intensity doesn't change according to the change of polarization angle- [❔ other question] HOT 1
- [❔ other question] setting the variant("llvm_spectral_polarized"), the code didn't work HOT 2
- [❔ other question]How can we output UV map in python? HOT 1
- - [❔ other question] I want to optimize the values in the transform component of my sensor plugin HOT 1
- Unable to compile: Windows 10: Visual Studio Community 2022 HOT 1
- White noise in spectral rendering - [❔ other question] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mitsuba2.