-
-
Notifications
You must be signed in to change notification settings - Fork 891
Add Custom Nebula Textures Plug-in #4003
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
base: master
Are you sure you want to change the base?
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
This is an automatically generated QA checklist based on modified files. |
@10110111 @alex-w @gzotti Do you have any suggestions for conflicts between custom texture rendering and original texture rendering? Should we let users choose to turn off the original texture and then display the custom texture, or use some algorithm to detect and compare the texture area and then turn off the conflicting texture? Should it add a json for custom configuration? Or can it directly modify the original texture json and add a key to distinguish between the original and customized ones? |
Please fix compilation of the code |
I am not sure: Can we handle user catalogs independently? There is probably infrastructure for more, but just one "default" nebula catalog. Maybe users could make (manually) a copy of default and then replace whatever they want to replace. Or they just want to use this welcome plugin to then contribute their own images of so far not included DSOs. Given the very latest developments, you need this plugin to platesolve/fit the image with stars, and then apply some de-starring filter to extract the nebula alone. (Unless image is of a cluster of course.) |
I think it would be cool for astronomical photographers to be able to map their images in the software without having to deal with complex file editing. Rather than just giving developers predefined tools It would be better to have separate user-defined json and image storage and management, and allow users to choose to hide conflicting original textures (by algorithm). Another question is that the following formula still has a slight position deviation when calculating the four corners based on wcs fits. Does it also involve the calculation of parameters such as A_0_0, B_0_0, AP_0_0, BP_0_0? Maybe it is related to field of view distortion? I just started to get started, so it would be great if you could help me take a look.
|
Sorry, will be of no help here. Not my field. For fitting, you may want to disable aberration (to show mean positions). Small-angle (telescope) images should usually be OK, for large images it is not enough to have the corner coords, but need to take lens distortion into account. |
Perhaps another use is to allow users to analyze their own images and then locate the position in Stellarium, which would be a very practical function
This can of course be explained to the user in advance, my plan is that most of the image (within 2-3 degrees) can be displayed accurately |
From the log:
Compilation the qt5-based edition is broken |
wcslib works well for converting pixel to RA/Dec. Stellarsolver is also good for it. New: |
Hello @ultrapre! Thank you for proposing of the feature. |
I fully agree this is hard to read and follow. To me it appears even more features were planned but then not completed. |
Anyone know how to disable rendering a selected image in the default texture? |
Alexander invented some trick to hide M1 before 1054. Maybe you can go a similar way based on other conditions? Or you will have to add a scriptable function setVisible(QString imgName_or_JSONkey, bool visible). Sorry, I am not enough familiar in this section and would have to study the code again myself. |
It is best to have a UI that can manage turning each texture on or off. |
The display of M1 is not related to the method of manipulating the display separately, as this also uses the filtering criteria in the data stellarium/nebulae/default/textures.json Line 14 in 3c8d3c4
|
If there is no built-in way and you need it, you may need to add a key "visible" which should default to true. Then add the setVisible() command as outlined above. While you are exploring, everything about minResolution and probably other fields need better documentation IMO. |
Please review the code changes in core. |
Yes, it's enough |
Could we consider adding an option in the future that is turned off by default, but can be turned on after consulting with the user, giving the image to Stellarium, using CC BY 3.0 or CC BY 4.0 copyright, and then the official can use these images as materials. It is even possible to develop a community in the future, similar to the Creative Workshop in Steam games, where users can freely choose mods provided by others. |
This requires server storage and a multimedia community, although uploading to a designated interface is easy to achieve. Anyway, such functionality can be envisioned in the future, as it is not currently required for this standalone software and the first version of the plugin. |
@ultrapre any news? |
Soon, sorry! |
Reply and new work:
SpinBoxes' positions keep the same as images' direction. As long as the image keeps the observer’s view (not mirrored), it can be rendered properly in planetarium software. The image can be rotated in any direction around its normal vector — its corner orientation doesn’t matter if the coordinates are right. Of course, most standard celestial image follows up-north, down-south, left-east and right-west, so called Right Ascension.
Good, the new commit approves it.
Good, the new commit approves it.
However, AngleSpinBox seems to be a SpinBox-based for Int but not Double. |
The AngleSpinbox can do both, depending on its format settings. The practical thing is you can set the mouse cursor in the minutes or seconds field and use the wheel to adjust values. Try it e.g. in the location panel. |
@@ -0,0 +1,276 @@ | |||
#include "PlateSolver.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems this header is now missing. Also, don't forget the source file header (author, license, ...)
double lng = CRVAL1 + dlng; | ||
|
||
// Normalize the celestial longitude | ||
if (CRVAL1 >= 0.0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You apply the fmod(lng, 360) below and make sure it's [0...360]. These lines seem redundant.
} | ||
} | ||
|
||
lng = std::fmod(lng, 360.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could apply lng=StelUtils::fmodpos(lng, 360.0);
if(!cusTile) return; | ||
if(!defTile) return; | ||
|
||
for (int i = 0; i < defTile->getSubTiles().size(); ++i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and elsewhere, please adhere to our coding style for braces, these usually go on new lines.
In the else clause below, if it's just one statement, it can go without braces.
double dlng = R2D * std::atan2(y, x); | ||
double lng = CRVAL1 + dlng; | ||
|
||
// Normalize the celestial longitude |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant that this, line 109-117 can go away as it's redundant with the following mod operation. And with fmodpos used in line 119, you can delete lines 120-122 as well.
I've restructured the code today and have mostly completed the decoupling work. I apologize if this caused any confusion with the previous reviews — I really appreciate your input. From this point on, there shouldn't be any major architectural changes. I'll continue refining the earlier suggestions as I move forward. |
Can I submit a paper of NebulaTextures-Plugin to JOSS (Journal of Open Source Software) ? Would you have any suggestions? |
Of course! As reference paper about Stellarium, please cite our 2021 JSA paper. (See homepage for link and reference.) You may need to explain celestial coordinates and basic concepts of "platesolving" to the OS community, or what is behind software trickery for the readers from the astronomical fields, it's always a balance to find. Or the experience of how to add something into an existing program. |
And don't forget to update your plugin (PR) with a reference link to the paper once it has appeared. |
For amateur astronomers to parse their own nebula images and use them as textures.
By inputting photos and Astrometry.net's API to Plate-solve images online, and calculating the four corner coordinates, finally rendering textures of custom nebula images.
The project is work-in-progress, welcome guiding and joining.
Plan:
Initial functional points: