Giter Club home page Giter Club logo

Comments (7)

ponchio avatar ponchio commented on May 30, 2024

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).

from relight.

ruven avatar ruven commented on May 30, 2024

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.

from relight.

ponchio avatar ponchio commented on May 30, 2024

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).

from relight.

ruven avatar ruven commented on May 30, 2024

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: relight-cli -b rbf -p 9 -q 50 and generated the reconstruction using
relight-cli -D raking.png -L 0:0:1 ./info.json from within the folder.

test.zip

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.

from relight.

ponchio avatar ponchio commented on May 30, 2024

I left a stupid debug value in the code. Should work now.
About QT: it migh have something to do with libjpeg version installed with QT and system or, maybe more likely, just some path missing: QT looks for a specific plugin folder where its libjpeg is supposed to be found.
I am working in 20.04.

from relight.

ruven avatar ruven commented on May 30, 2024

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!

from relight.

ponchio avatar ponchio commented on May 30, 2024

from relight.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.