Musgrove Texture Issues
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.
Musgrove Texture Issues
Hi there
The Dimension, lacunarity, Octaves and Intensity values don't appear to be working in the Blender Musgrove Texture?
(See attached files)
Cheers
The Dimension, lacunarity, Octaves and Intensity values don't appear to be working in the Blender Musgrove Texture?
(See attached files)
Cheers
- Attachments
-
- Test Musgrove.blend
- (1.79 MiB) Downloaded 230 times
Re: Musgrove Texture Issues
@BYOB
Thank you
I don't think the Noise Depth is working on the Marble texture, either. (attached Files)
Thank you
I don't think the Noise Depth is working on the Marble texture, either. (attached Files)
- Attachments
-
- Test MARBLE.blend
- (1.78 MiB) Downloaded 224 times
Re: Musgrove Texture Issues
@B.Y.O.B
Thank you
Thank you
Re: Musgrove Texture Issues
@B/Y.O.B
In the Blender Marble Texture, the Noise depth appears to be doing some strange stuff at a value of 29 and above.
(attached files).
In the Blender Marble Texture, the Noise depth appears to be doing some strange stuff at a value of 29 and above.
(attached files).
- Attachments
-
- Test MARBLE.blend
- (1.78 MiB) Downloaded 205 times
Re: Musgrove Texture Issues
I suspect the problem is here: https://github.com/LuxCoreRender/LuxCor ... .cpp#L1399
(the noise depth is called "oct" in the code)
In this code, a signed integer 1 is bit-shifted to the left by oct + 1 places. Since an integer typically has 32 bits, the maximum we can shift is by 31, and since 1 is added to oct in the equation, oct should be limited to 30. And indeed, in the original Blender UI for the old marble texture, the noise depth is limited to 30.
Now, I'm not sure why the code would make problems from oct = 29 on like in your example. Maybe that problem is elsewhere.
One thing I noticed is that the integers should be unsigned (u suffix), but I'm not sure if the compiler automatically detects and fixes this.
So the expression would be:
Code: Select all
((float)(1u << oct) / (float)((1u << (oct + 1)) - 1))
Re: Musgrove Texture Issues
@B.Y.O.B
Thank you for the explanation
Could the input be restricted to a maximum of 29?
Thank you for the explanation
Could the input be restricted to a maximum of 29?
Re: Musgrove Texture Issues
It should be max. 30 and the other bug causing it to fail at 29 should be found and fixed.
Re: Musgrove Texture Issues
Since fscale is multiplied by 2 each loop iteration, it just gets very big. This causes the call of noisefunc() to return NAN at around iteration 29. When x, y, z are bigger values, maybe even sooner.
I don't know how/if the Blender developers dealt with this.
I would suggest to lower the max. noise depth even further to mitigate the problem, maybe to a max of 25. Note that most of the time, much lower noise depth values will be used, as the difference between them gets indistinguishable at low numbers like 8 or so.
I don't know how/if the Blender developers dealt with this.
I would suggest to lower the max. noise depth even further to mitigate the problem, maybe to a max of 25. Note that most of the time, much lower noise depth values will be used, as the difference between them gets indistinguishable at low numbers like 8 or so.