-
While utilizing the cuda_spectral variant in Mitsuba for rendering, I encountered a persistent TypeError that is blocking progress. The error details are as follows:
The error suggests a type mismatch when invoking the translate() function, which expects an argument of type mitsuba.cuda_spectral.ScalarPoint3f. However, even though the argument type appears to be correct, the function call fails. Here's the relevant section of the code: Despite using ScalarPoint3f for the translation vector, the translate() function does not seem to accept it, leading to a TypeError. Thank you for your assistance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hello @Manvir05, From your screenshot, it's difficult to tell where the types By the way, you said that:
But the error message says that the function expects If this doesn't solve it, please post a minimum example (code, not screenshot) that reproduces the error. |
Beta Was this translation helpful? Give feedback.
-
Hi @Manvir05, Just to add to what @merlinND said, if you've pulled from the latest Specifically, with respect to transforms, the operations
The reason for this change was that historically, users would try something like origin = params['PerspectiveCamera.to_world']
# Previously, this was still a static method call
rotation = origin.rotate([0.0, 1.0, 0.0], theta) and then be confused as to why the rotation was not applied to the original transform. Anyway, I hope that's issue but otherwise let us know. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, it worked!
…On Mon, 1 Jul 2024 at 10:41, Merlin Nimier-David ***@***.***> wrote:
I didn't know about this, could very well be it!
—
Reply to this email directly, view it on GitHub
<#1212 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJQOBTPRYDAD5Z6TEUFXNITZKEI4RAVCNFSM6AAAAABKCGKSKGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TSMRTGEYTS>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
Hi @Manvir05,
Just to add to what @merlinND said, if you've pulled from the latest
master
then there has been a breaking change relative to past releases.Specifically, with respect to transforms, the operations
translate
,scale
,rotate
etc. are now instance methods rather than static methods. i.e. You will have to callT().translate(...)
The reason for this change was that historically, users would try something like
and then be confused as to why the rotation was not applied to the original transform. Anyway, I hope that's issue but otherwise …