Comments (23)
@stuffmatic: It seems to work now. First it didn't and now it does, really strange. Not sure what happend. Anyway, this is going to be great.
from fspy.
Hello @simonbjork and @stuffmatic,
This sounds like a fairly easy feature to implement (especially since v1.0.3 includes a command line interface already).
@stuffmatic
Would you mind if I fork and add this feature and merge it back in? (I also want this feature myself).
David
from fspy.
Wow, that sounds great @david-cattermole! I have a Nuke importer from fspy done, would love to write an exporter as well :).
I wonder, if you add the argument to launch with a filepath, do you think you can save that filepath in the project somehow as well, so we could query it from python like the other project variables?
from fspy.
I'm aiming to release a new fSpy version soon(ish), with some improvements and fixes. I'll look into adding support for launching with an image path. While I really appreciate your offer @david-cattermole, it's probably easier if I have a look at it.
I have a Nuke importer from fspy done, would love to write an exporter as well :).
Cool! Is this something you're planning to release? @simonbjork
I wonder, if you add the argument to launch with a filepath, do you think you can save that filepath in the project somehow as well, so we could query it from python like the other project variables?
Do you have a specific use case in mind @simonbjork? I'm not yet convinced that storing the entire file path is a good idea, since there's so guarantee it remains valid. If you need to access the image data, its embedded in the project file.
from fspy.
@stuffmatic : Yes, I plan to release it, it's pretty much done and working. It would be nice to release it as a kit though with both the exporter and importer. Basically it would work like this:
exporter: Select a read node in nuke. Run the exporter and fspy will launch with the image path and load the image. If possible it could also send the filmback data as well.
importer: Run the importer and browse to the fspy project file. Import the camera and setup a basic scene. Also it would link in the image so we would get a nice preview. I also plan to do this for Modo, and then we can setup an image backround from the original file.
Both modo and nuke use linked media so we can't store any actual pixel data. So if I were to use the data that is in the project file, I would need to save a new file which isn't ideal. I'm fine if the path is no longer valid, that's something for importer scripts to handle.
from fspy.
I'm aiming to release a new fSpy version soon(ish), with some improvements and fixes. I'll look into adding support for launching with an image path. While I really appreciate your offer @david-cattermole, it's probably easier if I have a look at it.
Sure @stuffmatic, I understand.
For reference, I'd probably use fSpy as an executable in my mmSolver project:
david-cattermole/mayaMatchMoveSolver#121
Unfortunately I cannot combine fSpy code with mmSolver, due to license conflicts (GPL vs LGPL).
I am also looking to write an importer/exporter, but for Maya. I wouldn't mind having the original file path inside the project file (or the exported JSON file).
For Maya integration my workflow would be:
-
In Maya, select a camera with an image plane or pop-up a GUI prompting for an image file.
-
Maya Python script then launches fSpy with image file path (as a separate process).
-
In fSpy, use fSpy to calculate the camera matrix.
-
In fSpy, user saves the project file, or exports a Camera Parameter JSON file.
-
In Maya, the user selects the camera, opens tool and chooses the fSpy project file path.
-
In Maya, we parse the project/camera parameters JSON file and convert it to a transform matrix and set it on the selected camera.
The intent is for fSpy to be used quickly with minimal effort.
At step 2, it would be good if a fSpy flag could automatically save the project file to a specified file path as well. This way the user just needs to press "CTRL + S" and we can detect the process has exited.
The above workflow would be integrated into my mmSolver project, however if you're interested, I could probably contribute by adding an export format for Maya (as .mel)?
The .mel file would create a new camera with the expected values. If an image file path was also given then the tool could create an image plane with the original file path. It's possible to be invalid, but it's better than nothing and in the common use-case I'd expect the file to exist.
from fspy.
I've just published 1.1.0-beta.1 which supports passing a path to an image or project when launching the app like so:
[fSpy executable] open [path to image or project]
I'll have to think some more about if storing image paths in project files and passing a preferred project path on launch can be done in some reasonable way.
Both modo and nuke use linked media so we can't store any actual pixel data. So if I were to use the data that is in the project file, I would need to save a new file which isn't ideal.
@simonbjork This is how the Blender imported works, i.e it extracts the image data from the project file, saves it to a temp file and loads that file.
from fspy.
Thanks a lot @stuffmatic, I'll give it a try later today!
Regarding the filepaths: I do think it would be really useful to save the original filepath. It would be hidden in the fpsy file so you would only find it if you really were looking for it. Also, this issue is not specific to fpsy, it's for pretty much every importer. In a importer script you just look if the file exists and if it does you import it.
Having a separate file (that is also stored locally) would not be great at least in vfx. Files need to be stored on the server and in the original format etc. So in the current version a user would first need to import the fspy project then import the footage. So with the filepath we could get this down to 1 step instead of 2.
from fspy.
@stuffmatic : I just did some tests and I can't get it to work. I tried with:
fSpy.exe open D:\room.jpg
fSpy.exe open D:/room.jpg
fSpy.exe --open D:/room.jpg
But none seems to work, it just stops at the menu saying Drop an image or project here. I also tried opening a project file via the open argument and that didn't work as well.
from fspy.
@simonbjork I've only done testing on my mac so far and it seems to work for valid files. However, I did just realize that no error message is shown when passing an invalid path. Will look into this.
To rule out the possibility that special characters are causing issues, could you try quoting the path, "D:\room.jpg"
, or referencing a file in the same directory as the executable, room.jpg
?
from fspy.
I tested both, but unfortunately still no luck.
I get this in the terminal, don't know if it's related:
(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false". It will change to be "true" in Electron 9. For more information please check https://github.com/electron/electron/issues/18397
from fspy.
@simonbjork I just published a new beta version with improved error reporting if the path passed at launch cannot be opened. It would be great if you could try again and report what you're seeing in the terminal.
from fspy.
Do you have a list of supported image formats?
from fspy.
@simonbjork Good to hear that it works! Let me know if you see any interesting error messages. fSpy is based on Electron, so it can handle any image formats that chromium can handle. I don't have a list at the moment, but any format you can expect a modern web browser to handle.
from fspy.
Hm, I just tried again and now it doesn't work. Exact same command.
It's strange, when it does work fspy starts in a small window, when it doesn't work it starts in full-screen. No error messages. It feels random.
from fspy.
@simonbjork Are you sure you're running the same fSpy version for all tests? The version number is shown in the top right corner of the start screen
from fspy.
from fspy.
If you pass an invalid image path, like any random string, on purpose, do you get an error message? @simonbjork
from fspy.
from fspy.
I did a few more tests and it stopped working again.
However, I then cleared the ../AppData/Roaming/fSpy directory, and now it seems to work. I think :).
from fspy.
@simonbjork Let me know if you see the issue again
from fspy.
Hey! I was working on basically the same tool as @simonbjork -a Nuke importer/exporter for fSpy - when I found this thread.
I've tested out the fSpy open "filename"
command in 1.1.0-beta3 and 1.1.0-beta2 and found the same issue where in fullscreen/maximised mode the image is loaded from the path I give it, and in non-maximised/floating mode it loads fine.
For me the behavior seems pretty clear though, not random: fSpy saves the window state from the last time, and then returns to that. i.e. if it was maximised it opens maximised, if it was floating when last closed, it opens up as a floating window. Didn't seem random or anything. Clearing the AppData directory didn't seem to help it though.
Also, might be worth adding the "open" command to the help message you get with fSpy -h
from fspy.
@simonbjork I had a go at forking the repo to fix the intermittent loading behavior, and a couple other changes. I've not done any electron development before, so it's all pretty minor.
There's some Windows binaries for it here if you wanted to test it out. (note that I had to change the command from fSpy open <filename>
to fSpy --open <filename>
)
Pull request for this one is here.
from fspy.
Related Issues (20)
- After UV projection,How can I solve the problem of exporting to FBX without texture HOT 1
- Feature request: browser version / React component
- Fspy Glitch HOT 1
- Can't build, can't run
- Incorrect calculation of focal length HOT 3
- Seperate Reference height and scene origin
- Can't see fonts under "File"
- AVIF Support
- Slider for overlay opacity
- The display compositor is frequently crashing UBUNTU
- Application Error - 0xc0000005
- Blender 4.0 HOT 4
- Feature Request: camera match for 360 panorama photos
- Release on flathub
- Pressing shift permanently enables precision mode
- Fspy does not work on MacOS 14.4.1 HOT 6
- Fspy doesn't work Blender 4 HOT 3
- AppImage fails to launch HOT 1
- Storex :; pricing details >>
- App Cannot Launch HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fspy.