Instancing error
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Re: Instancing error
kintuX, can you test the following BlendLuxCore dev versions?
This is the current master (I guess it will crash on your system):
https://www.dropbox.com/s/fooqxxttd0tbf ... l.zip?dl=1
And this is a version that does not do framebuffer updates:
https://www.dropbox.com/s/7brsp8cw46qsk ... R.zip?dl=1
Can you do a final render with this one and see if it also crashes?
It will show no image, it would help me to know if it crashes because of my recent changes to framebuffer import.
This is the current master (I guess it will crash on your system):
https://www.dropbox.com/s/fooqxxttd0tbf ... l.zip?dl=1
And this is a version that does not do framebuffer updates:
https://www.dropbox.com/s/7brsp8cw46qsk ... R.zip?dl=1
Can you do a final render with this one and see if it also crashes?
It will show no image, it would help me to know if it crashes because of my recent changes to framebuffer import.
Re: Instancing error
Hi all,
I've tested with your fist build (from last post) and it renders a big instance when it should'nt. Also gives no error.
With the no framebuffer build there is no error also, and no image
I've tested with your fist build (from last post) and it renders a big instance when it should'nt. Also gives no error.
With the no framebuffer build there is no error also, and no image
Re: Instancing error
I can reproduce it.
So it's not crashing anymore?
Re: Instancing error
Not crashing for me.
Thanks
Thanks
Re: Instancing error
Dade: Do you know a good way to make a non-invertible matrix invertible?
My naive approach:
Is this a super stupid idea and will I run into problems with this approach later?
I'm basically adding a random epsilon from the range [1e-5 to (2 * 1e-5)] to each value.
I have a feeling that I only have to do this with the scale components, but I'm not sure.
(Are the scale components the following in LuxCore? (0, 0), (1, 1) and (2, 2)?)
edit: I had a look how Blender solves this problem in its "invert_safe()" method:
They use a fixed epsilon of 1e-8 and if the matrix is still not invertible after the added epsilon, they fall back to the identity matrix.
My naive approach:
Code: Select all
l = [matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],
matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],
matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],
matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]]
if matrix.determinant() == 0:
# The matrix is non-invertible. This can happen if e.g. the scale on one axis is 0.
# Prevent a RuntimeError from LuxCore by adding a small random epsilon.
from random import random
return [float(i) + (1e-5 + random() * 1e-5) for i in l]
I'm basically adding a random epsilon from the range [1e-5 to (2 * 1e-5)] to each value.
I have a feeling that I only have to do this with the scale components, but I'm not sure.
(Are the scale components the following in LuxCore? (0, 0), (1, 1) and (2, 2)?)
edit: I had a look how Blender solves this problem in its "invert_safe()" method:
Code: Select all
mat[0][0] += eps;
mat[1][1] += eps;
mat[2][2] += eps;
mat[3][3] += eps;
if (UNLIKELY(det = determinant_m4(mat)) == 0.0f) {
unit_m4(mat);
det = 1.0f;
}
Re: Instancing error
Ok, tested & here are results:B.Y.O.B. wrote: ↑Thu Feb 15, 2018 4:11 pm kintuX, can you test the following BlendLuxCore dev versions?
This is the current master (I guess it will crash on your system):
https://www.dropbox.com/s/fooqxxttd0tbf ... l.zip?dl=1
And this is a version that does not do framebuffer updates:
https://www.dropbox.com/s/7brsp8cw46qsk ... R.zip?dl=1
Can you do a final render with this one and see if it also crashes?
It will show no image, it would help me to know if it crashes because of my recent changes to framebuffer import.
1. The current master
a) Yes, it crashes every time as soon as i start render, but only after engine is switched from CPU PT to OCL PT (even on most simple scene: sun+camera).
b) If i start directly using OCL PT, it starts rendering but crashes after render is force stopped (esc).
c) It also crashes if i only switch the engines couple of times & then want to render (f12) - no matter which engine is chosen.
2. No framebuffer version
CPU PT - it runs but nothing is shown (blank buffer/UV image editor Render result)
OCL PT - same here, nothing shown (blank) - then, after couple of times of stopping it, it just crashed
...
OH Purging Orphan data every time before i start rendering seems to solve crashing issues... what the guess there's something buggy in my system, specifically Blender installation.
Cleared Temp folder, caches, config. preferences & startup... still got the same results.
...
New Blender 2.79a installation with only basic addons (officially supplied) & LuxCore, used old startup.blend:
1. Master OCL Works fine
2. No FrameBuffer
Always blank buffer,
a) Crashes even on an empty scene when switching from Cycles (Purge Orphan data helps),
b) Crashes when stopping CPU render
c) OCL seems fine (except for the blank buffer)
Basically i need to troubleshoot my system first sorry for taking your time & everything
Re: Instancing error
I take it that Cycles (or other renderers) do not crash?
Do you have overclocked components, changed RAM timings, undervolted components or anything else like this which could cause system instability?
You could also try running LuxMark and see if that also crashes.
Also make sure that you have the latest graphics driver.
Do you have overclocked components, changed RAM timings, undervolted components or anything else like this which could cause system instability?
You could also try running LuxMark and see if that also crashes.
Also make sure that you have the latest graphics driver.
Re: Instancing error
1. No, nothing of the above. Other engines run fine.B.Y.O.B. wrote: ↑Thu Feb 15, 2018 9:04 pm I take it that Cycles (or other renderers) do not crash?
Do you have overclocked components, changed RAM timings, undervolted components or anything else like this which could cause system instability?
You could also try running LuxMark and see if that also crashes.
Also make sure that you have the latest graphics driver.
2. LuxMark ran fine last i checked.
3. Am not using the latest drivers. Last time i installed (Dec. 2017) one of the cards was left without OCL capability. Will test again with the latest.
But as i wrote, your latest OCL build works, if i purge orphan data before starting a render. Just now tested again & again & again... it's a scene file i posted in Object Motion Blur bug (nothing special). But i also had similar problems before, starting with Blender 2.79aRC i simply wish i could get to the bottom of it...
Re: Instancing error
Hi all,
I've tested at work and still crashes.
Regards
Edit: I'm downloading latest drivers, just in case.
Edit2:Well, with latest drivers the crash has gone, but I get the big instance, like on the other computer.
Edit3:Sorry, has returned, it seems a bit random.
I've tested at work and still crashes.
Regards
Edit: I'm downloading latest drivers, just in case.
Edit2:Well, with latest drivers the crash has gone, but I get the big instance, like on the other computer.
Edit3:Sorry, has returned, it seems a bit random.
Last edited by Asticles on Fri Feb 16, 2018 12:32 pm, edited 1 time in total.
Re: Instancing error
The big instance is a bug in BlendLuxCore (that I already fixed).
It is caused by the following:
- the dupli object is exported once without any transformation
- This is then passed to a fast LuxCore function that duplicates it a few thousand times
- At last the original, un-transformed dupli object from the first step is deleted
In your case, step 2 fails and the code never reaches step 3.
But as I said, it's already fixed.
It is caused by the following:
- the dupli object is exported once without any transformation
- This is then passed to a fast LuxCore function that duplicates it a few thousand times
- At last the original, un-transformed dupli object from the first step is deleted
In your case, step 2 fails and the code never reaches step 3.
But as I said, it's already fixed.