-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault when using relight-cli -L parameter #47
Comments
The -D parameter was ignored using instead the output parameter... sorry, I fixed it in the latest commit. relight-cli -D test.jpg -L 1:0.5:0.5 rtifolder/info.json This should workd ("/info.json" is optional). Notice how x, y and z are supposed to be a directions, (a normalized unit vector), if it's not it get normalized, for example your parameter 1:0.5:1 becames actually 0.666:0.333:0.666 (indeed middle right a bit upper direction). |
Thanks! It no longer crashes, but it still doesn't seem to be working properly. So, if I've understood correctly an xyz vector of 0:0:1 would be a light source pointing down from directly above and 1:0:0 would be raking from the right? No matter what vector I give, I only get a black image. Also, I notice that you cannot save to JPEG - only PNG seems to work. |
Strange, I made a test using the linux portable version and it works properly (and can save both jpg and png) on a sample dataset (HSH). Could you share dataset (with exact command line)? It could be a dataset problem, but it might also be a library problem (libjpeg and in general QT dependencies). |
Ah, it looks like an issue with the type of basis function used to create the RTI. I just tried with HSH and it works as it should. RBF, however, doesn't work. Try this example, which I created using RBF: There's also possibly a QT issue somewhere. I tried on another machine running Ubuntu 22.04 (the first machine was Ubuntu 20.04) and this time was also able to export as JPEG. |
I left a stupid debug value in the code. Should work now. |
Thanks, it now works for RBF! Can you confirm exactly how the -L parameter works? If I've understood correctly, the vector is the direction towards the light source, right? So 0:0:1 is a light from directly above? 1:0:1 would be a light at 45deg elevation from the middle? And 0:1:0.2 would be a low raking light from the top of the object? Is that correct? I also tested with PTM format (relight converted from an old PTM file), but I'm getting color casting, so there's maybe another debug value somewhere there too! |
You are qualitatively right on the light directions., but you should work
with unit length (x^2 + y^2 + z^2 = 1) vectors on the surface of an
emisphere (z > 0).
Send me the sample and I will debug the PTM conversion problem....
…On Mon, Jun 27, 2022 at 12:47 PM Ruven ***@***.***> wrote:
Thanks, it now works for RBF!
Can you confirm exactly how the -L parameter works? If I've understood
correctly, the vector is the direction towards the light source, right? So
0:0:1 is a light from directly above? 1:0:1 would be a light at 45deg
elevation from the middle? And 0:1:0.2 would be a low raking light from the
top of the object? Is that correct?
I also tested with PTM format (relight converted from an old PTM file),
but I'm getting color casting, so there's maybe another debug value
somewhere there too!
—
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUDV2YUNTSF4MD54ACXYODVRGBDNANCNFSM5ZUQMUYA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I keep getting segfaults when using relight-cli's
-L
parameter.I'd like to be able to generate an image corresponding to an arbitrary x,y,z light position. I've tried with various configurations and what I presume to be the correct parameters:
-D test.jpg -L 1:0.5:1
which should give an image with lighting from the middle right (is that how x,y,z work?). However, no matter what parameters I give I get a segfault. Does this functionality in fact work? If so, how should it be used?(I'm using the latest Github commit and compiling on Linux)
The text was updated successfully, but these errors were encountered: