Blender to Luisa Render #24
Replies: 1 comment 8 replies
-
Cool scene! However, the light transport in the scene looks quite difficult and I suspect rendering techniques like Stochastic Progressive Photon Mapping might be necessary. But anyway, I'll first look into the geometry/camera settings in the scene file. It might also help if you would not mind providing the original blender file (if it's not private/proprietary). Answers to your questions:
Luisa doesn't have a unit system inside. As long as the objects/cameras etc are using the same scale, the rendering should work fine.
It should not be a problem. The only requirement is that matrices need to be "affine", i.e., the last row being
This rebooting seems abnormal, even with a wrong scene setup. I'll look into this.
The
Yes, you can use position and rotation to specify the camera like this:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Mike, let's continue here with Questions regarding scenes and data coming from Blender.


I'm looking for a renderer (physically correct) which I could use for automotive lighting related data and therefore created a simple test scene. A bent light guide (with fake optics) and an area light to see how well the renderer can handle the complicated light distribution.
It looks like this in Cycles:
As you see, Cycles is not able to distribute the light.
I also tested Mitsuba,
but I'm not able to increase the samples as it hits a memory limit and either crashes or renders forever.
I analysed some of the sample scenes and started to manually assemble this scene for Luisa.
I exported the parts as obj and used the glass-of-water demo JSON file as a "base" to exchange with my data.
One thing which seems t be a problem, is the camera as in Blender it only has a position and a rotation but no "front".
I guess front in Luisa is a look at point or a vector pointing from the position towards the look at.
I used this code (what I found in the net) to separate the Blender camera matrix to the required data:
`if ob.type == "CAMERA":
It seems to generate valid numbers so I used those in my Luisa scene.
The rendered image is black however so something is wrong.
I noticed that all of the demo files I looked at, had very small camera positions (numbers smaller than 1 most of the time).
Are the units used in Blender matter in Luisa? As an engineer I use millimeters in Blender with a unit scale of 0.001. (As opposed to Meters and 1 in default Blender settings.)
Also, in the demo files the matrices for the meshes have default (0) values. My objects have a translation matrix. is that a problem?
Anyway, just to test if I can see something at all, I copied an environment setting out of the Dining-Room demo scene.
As soon as I do that, Luisa starts to render the image (no complaints about the JSON file or missing Textures) and around half the rendering suddenly reboots the machine (reproducible) . It has to do with my scene as the dining-room renders correctly.
I use the cuda backend. I also tried CPU but then I get another error message:
thread '<unnamed>' panicked at luisa_compute_backend_impl\src\cpu\llvm.rs:372[2024-02-26 18:11:53.639] [console] [:info29] Geometry built with 17822 triangles. [D:\a\LuisaRender\LuisaRender\src\base\geometry.cpp:23] : Could not find clang. Please set LUISA_CLANG_PATH to the path of clang++ executable note: run with
RUST_BACKTRACE=1environment variable to display a backtrace
(I would like to use CUDA anyway, so this is not really a problem for me. I only wanted to know if the sudden reboot comes from the use of the RTX card.)
EDIT: I forgot to mention, I use Z up in Blender but other packages mostly use Y up.
Here is my scene if you want to take a look:
LightGuide_Test.zip
I hope it's not too many questions at once...
EDIT: #3 I could solve. It was my mistake: in the dining_room scene the environment had a rotation around the Y axis (Y up).
I changed now this to a rotation around Z ( transform : SRT { rotate { 0, 0, 1, -65 } } ) and now it no longer crashes and reboots the machine. I can see now the environment but not my objects, so the camera is wrong. For the translation it would be easier if the camera in Luisa could handle position & rotation instead of position and front. Mitsuba uses also position and rotation so there it is a bit easier to convert.
Beta Was this translation helpful? Give feedback.
All reactions