the Creative Commons Attribution 4.0 License.
the Creative Commons Attribution 4.0 License.
PySubdiv: open-source geological modelling and reconstruction by non-manifold subdivision surfaces
Abstract. Sealed geological models are commonly used as an input to process simulations, for example in hydrogeological or geomechanical studies. Creating these meshes often requires tedious manual work – and it is, therefore, difficult to adjust a once-created model. In this work, we propose a flexible framework to create and interact with geological models using explicit surface representations. The essence of the work lies in the determination of the control mesh and the definition of semi-sharp creases values which, in combination, enable the representation of complex structural settings with a low number of control points. We achieve this flexibility through the adaptation of recent algorithms from the field of computer graphics to the specific requirements of geological modelling, specifically the representation of non-manifold topologies and sharp features. We combine the method with a swarm optimization approach to enable the automatic determination of vertex position and crease sharpness values. The result of this work is implemented in an open-source software (PySubdiv) for reconstructing geological structures while resulting in a model which is (1) sealed/watertight, (2) controllable with a control mesh, and (3) topologically similar to the main geological structure. Also, the reconstructed model may include a fewer number of vertices compared to the input geological structure which results in reducing the cost of modelling and simulation. Furthermore, the proposed method resolves some problems known from spline surfaces. In addition to enabling a manual adjustment of sealed geological models, the algorithm also provides a method for the integration of explicit surface representations in inverse frameworks and the consideration of uncertainties.
-
Notice on discussion status
The requested preprint has a corresponding peer-reviewed final revised paper. You are encouraged to refer to the final revised version.
-
Preprint
(1441 KB)
-
The requested preprint has a corresponding peer-reviewed final revised paper. You are encouraged to refer to the final revised version.
- Preprint
(1441 KB) - Metadata XML
- BibTeX
- EndNote
- Final revised paper
Journal article(s) based on this preprint
Interactive discussion
Status: closed
-
CEC1: 'Comment on egusphere-2022-685', Astrid Kerkweg, 15 Aug 2022
Dear authors,
in my role as Executive editor of GMD, I would like to bring to your attention our Editorial version 1.2: https://www.geosci-model-dev.net/12/2215/2019/
This highlights some requirements of papers published in GMD, which is also available on the GMD website in the ‘Manuscript Types’ section: http://www.geoscientific-model-development.net/submission/manuscript_types.html
In particular, please note that for your paper, the following requirement has not been met in the Discussions paper:
- "The main paper must give the model name and version number (or other unique identifier) in the title."
Please add a version number for PySubdiv in the title upon your revised submission to GMD.
Yours,
Astrid Kerkweg
Citation: https://doi.org/10.5194/egusphere-2022-685-CEC1 -
AC4: 'Reply on CEC1', Mohammad Moulaeifard, 20 Apr 2023
Dear Astrid,
Thanks for your comment. We already added the version number (1.0) to the updated version of this paper.
Best Regards,
MohammadCitation: https://doi.org/10.5194/egusphere-2022-685-AC4
-
RC1: 'Comment on egusphere-2022-685', Eric de Kemp, 28 Nov 2022
Overall this is a reasonable paper that presents an important contribution using a Python implementation of Subdivision Surface codes (PySubDiv), that are used to demonstrate the benefits of this technology extension. Having the code released in an open-source journal such as GMD is useful to the whole geo-modelling community. The application of Subdivision Surfaces for geology is particularly useful with many geological situations where discontinuities such as faults, unconformities and intrusive bodies are considered. However, There are some major issues with the paper in my opinion. The paper needs to become more distinctive from the Mathematical Geosciences paper from the same team with same lead author;
Mohammad Moulaeifard, Florian Wellmann, Simon Bernard, Miguel de la Varga, David Bommes, Subdivide and Conquer: Adapting Non-Manifold, Subdivision Surfaces to Surface-Based Representation and Reconstruction of Complex Geological Structures Math Geosci, 2022, https://doi.org/10.1007/s11004-022-10017-x
This will be a challenge because most of what this current submission to GMD offers has already been presented in Math Geosci, but does have the addition of Python demonstration codes to show the utility of the methods. The challenge is to make this paper a) state more clearly and concisely why we need these tools in the community for geological applications b) while making the code more accessible, and with a bit of effort on c) better user instructions. The paper tends to get into a lot of details without saying why Sub-division surfaces are so important and why our current state of the art (Implicit?) tools is not properly handling these situations. Why do we need to preserve sharp edges in some cases and smooth edges in others? Also importantly, when the whole geological modelling community is moving to implicit surfaces (level set derived) are we going to go back to explicit approaches, even if it means we get some accuracy benefits? So just a better context would be good. This is mostly in the Math Geosc paper but could be restated in this submission in a clear and unique manner that motivates the reader to continue.
I have tried to test all the python codes with limited success. The most crucial point was to do interactive editing and updating of the edge values (CSV) for crease sharpness (sharp -1 to smooth-0). I tested with Windows 10, using Pycharm, Anaconda, (Python v3.9 in virtual environment). It is important to provide working code to the perceived user community, which in my opinion would be dominantly windows users. It would also be helpful if a more detailed tutorial could be provided, perhaps with a bit more details such as in the main authors thesis, to help with editing processes for the graphics. These are currently quite cumbersome and cryptic. Please know that I was helped by two of my colleagues, Michael Hillier and Hossein Jodeiri who both have a pretty good understanding of 3D graphics and meshing issues as well as use of Python codes with various ML supported packages. So collectively we had a good go at trying to make things work putting in several days to troubleshoot and tweek without full success.
If the authors choose to update the useability of their codes, it will widen the user community for these tools and provide better discussions for those wishing to implement their proposed solutions.
The main PySubDiv.py interface code was slightly modified to run in a windows environment for attribute editing and mesh manipulation;
# import the necessary packages
import sys
import os
from PySubdiv.create_control_cage import control_cage
from PySubdiv.data import files
from qtpy import QtWidgets
os.environ['QT_API'] = 'pyqt5'
# starting the PyQT application
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
# EdK insert from QT forum
# https://forum.qt.io/topic/132110/pyqt-program-crashes-without-error-when-run-from-the-command-line
app = QtWidgets.QApplication.instance()
if app is None:
app = QtWidgets.QApplication(sys.argv)
# end of new insert EdK Nov. 15, 2020
window = control_cage.PySubdivGUI([])
window.main()
sys.exit(app.exec_())Note that despite this there was only limited functionality such as IO of meshes, selection of nodes, edges and partial meshes. There was no deletion of triangles or ways to polygonise a partial surface. Importantly there was no ability to update edge crease values (1-0).
All the SubDivision surface codes performed well but only generated smooth refined meshes or coarse grip frames. Not composite straight and smooth non-manifold object types. This is a big stumbling block at this stage since the users have no way to fully evaluate the utility or advantages of the code without a working application.
There are detailed comments in the attached PDF file and highlights with various colours. Red highlights are of most concern.
Detailed suggestions:
Clarify better distinction between NURB and sub-division surfaces. Could add a graphic with the 3D graphics rendering zoology. Showing spectrum of explicit approaches.
- 2L20, Swarm optimization, this is usually to resolve a minimization or loss function. Also for sparse data extension but how is it used here? Maybe a short line about it if it is important.
- 2 L41, Definitely needs a more in-depth introduction. Clearly indicating the nature of the 2 methods. Needs also some discussion as to where DSI (Explicit and Discrete Smooth Interpolation al la GoCad) and implicit modelling, methods fit into this problem domain. Much has been summed up in Wellmann, F. and Caumon, G2018, but the reader should get a quick summary.
Remember DSI was originally a response to the parametric approach (Manufacturing , Car Industry tools from Paul Bézier not fit for purpose of geology modelling). So, Mallet (DSI) using internal constrains with local and global smoothing approach while dual point co-kriging with 3D WEG emerged for geology applications. (BRGM Geomodeler precursor). Fundamentally we should get some background on why we have difficulty in representing geological structures and manipulating them to be more believable with computer approaches. Simple in the head not so simple in computer graphics and physical world for 3D printing.
- 3 L65 Reword and make clearer.
P.4 L95 - Reword. Bad grammar….Not clear.
P.5 L110 - Just by displaying what could be a relevant figure and some descriptive text does not guarantee clarity. I have no idea what is going on with this Loop algorithm as articulated.
P.6 L115 - Alot of more recent work has been done on this see :
P.7 L140 - ... between one and zero… indicating level of resistance to the subdivision algorithm with one having no effect and zero having no resistance thus accepting the full recursion and smoothing of the mesh?
This is worded awkwardly as I could interpret your meaning as the opposite parameterization, meaning 0 intuitively means no re-sampling ie. a sharp edge is respected and 1 would be full re-sampling. I think you want to say that 0 is full smoothing and 1 is sharp? Just make it clear so there is no doubt what the end members mean and note intermediate float values can be assigned as well. I think that is the case?
P.8 L150 Fig. 6 For (c) they all look smooth to me? The black lines are not very distinct from the dark blue ones. Try making them red and blue. The internal surface in(c) is not sharp at the CSV = 0.
- 8 L150 - What is a sub-division surface? That is what most geotypes like me will be asking. Most do not know. 1st make it more clear then you can highlight the benefits. Then you can prove your case. Then make sure the code works for your perceived user base. That means windows users as well.
P.8 L160 - But the explanation has to be sufficient to justify using all these terms so that people will not just get confused. Like me.
- 9 L165 - Maybe a simple flow diagram would help because first you need some idea of the geological feature shape, its topology etc. then you generate the control net or grip frame. Thne you invert/compute/remesh/estimate for the more accurate geobody.
- 9 L165 - You don't want to use perfume .... only on special occasions.
P.9 L170 - For geologists it is a bit disconcerting to say we need to 'estimate the control points' for geobody. We usually think of using existing control points as data to estimate the feature. This is in my opinion an expertise domain semantics problem. You will have to find a good solution so both communities a) graphics and b) geomodellers are not getting confused.
P.9 L170 - Not sure these are the appropriet references here since these authors don't go into this kind of detail on the problem I think you are presenting.Maybe add a more detailed ref?
P.9 L190 – ‘b’ is what? an arbitrary shape parameter, is it calculated or specified by the user?
P.10 L205 - define somewhere what are Min p & z in eq (7,9).
P.10 L215 - Where does Blender come into this? Do you call PySubdiv from inside Blender or just import the resultant surfaces?
- 11 L240 - a sentence more about what swarm optimization is doing beyond increasing 'efficiency' would be helpful.
- 12 L255 Fig. 7 - This is good but a visual of a simple surface from start to finish would also help. Maybe coming in the case study later in the paper?
P.12 L260 - This we call control points or 'stratigraphic and structural constraint points' i.e. picks.
P.13 L275 - Need to explain more details of what this angle is? IS it only the adjacent face normal angle? Maybe in the discussion highlight some issues with this aspect. Fault and horizon intersections for example, even in water tight models, may have erroneous small triangles that can be in similar orientation to an adjacent feature.
P16 L300 Fig. 10b - Try using a gray scale or white to red colour ramp. transparency when the distance rms is very low. normalize the distances between max and min values for better graphic results. Good to have a true distance scale. Shows deeper structures are more uncertain. Very difficult to see what is going on with dark blue regions.
P.18 L355 - Now a bigger issue! When we throw out the grid how do we do property modelling, flow simulation etc. Briefly describe the issues here and why subdivision surface provide a benefit in themselves for geological applications?
...but don't forget that subdivision surfaces are also based on B-Spline and NURB technology....piecewise polynomial basis pairs. See Loop 1987 M.Sc. thesis and Farin G for history.
P.18 L360 - Not all original observation points are respected, that is preserved. Only the mesh is the input.
Older references you may want to consider inserting:
- Habib and J. Warren: Edge and vertex insertion for a class of C1 subdivision surfaces, Computer Aided Geometric Design 16(4) (May 1999) p.223-247.
- Karciauskas and J. Peters: Point-augmented biquadratic C1 subdivision surfaces, Graphical Models, 77, p.18-26 [1]
- Peters and U. Reif: Subdivision Surfaces, Springer series Geometry and Computing monograph 3, 2008.
- Peters and U. Reif: Analysis of generalized B-spline subdivision algorithms, SIAM J of Numer. Anal. 32 (2) 1998, p.728-748
- Peters and U. Reif: The simplest subdivision scheme for smoothing polyhedra, ACM Transactions on Graphics 16(4) (October 1997) p.420-431,
- Ulrich Reif. 1995. A unified approach to subdivision algorithms near extraordinary vertices. Computer Aided Geometric Design. 12(2)153–174
- Jos Stam, "Exact Evaluation of Catmull-Clark Subdivision Surfaces at Arbitrary Parameter Values", Proceedings of SIGGRAPH'98. In Computer Graphics Proceedings, ACM SIGGRAPH, 1998, 395–404
- Zorin, Denis; Schr¨oder, Peter; Sweldens, Wim (1996). "Interpolating Subdivision for Meshes with Arbitrary Topology". Department of Computer Science, California Institute of Technology, Pasadena, CA 91125.
-
AC2: 'Reply on RC1', Mohammad Moulaeifard, 20 Apr 2023
Publisher’s note: this comment was edited on 20 April 2023. The following text is not identical to the original comment, but the adjustments were minor without effect on the scientific meaning.
Dear Erick,
Thanks for your time. I have carefully addressed all comments and suggestions made by you and revised my paper thoroughly. I hope you find the updated version satisfactory and suitable for publication. Please also note that for more clarification, all the changes applied to the paper are highlighted with yellow colour. I attached the answer to your comments as a PDF file.
Besides, I want to kindly mention the three points regarding the updated version of this paper:
1) I explained the differences between this paper and our previous paper. The main difference is that in this paper, we implement the automatic fitting for reconstruction using the augmented Lagrangian method. However, in the previous paper, we used manual fitting which is very time-consuming.2) PyVista uses PyQt for GUI, and unfortunately, due to the limitation of PyQt, the software cannot work well in Windows, Mac and Conda environment. Currently, the software can work well in Linux without the Anaconda. We really did our best to remove these limitations. We plan to improve the software in the near future by absorbing more sources of funding and hiring more people to help. compare to Gempy and GoCad, our software is very new. However, we generated the tutorial video as an introduction to our software and explained how people can use it.
It is possible to watch the video over this link:
https://rwth-aachen.sciebo.de/s/rXYuFEWtobp9b5C
3) we increased the quality of the paper of the paper by rephrasing, trimming the extra parts. It is worth mentioning that we used premium Grammarly for checking for grammatical errors.
Please see the PDF file for more comments.
With Best Regards,
Mohammad.
-
EC1: 'Comment on egusphere-2022-685', Mauro Cacace, 29 Nov 2022
Dear authors,
thanks for your submission to GMD. Based on the referee comment, and on my own reading, I agree that the manuscript has its own scientific merit and the topic fits with the journal scope. However, I would suggest to carefully address all comments raised by the reviewer, especially those dealing with a clarification and distinction from an already published manuscript as well as on improving the code portability to the end user.
Yours,
Mauro Cacace
Citation: https://doi.org/10.5194/egusphere-2022-685-EC1 -
AC1: 'Reply on EC1', Mohammad Moulaeifard, 20 Apr 2023
Dear Dr. Mauro Cacace,
Initially, we would like to express our sincere appreciation to the respected editors and reviewers for their valuable comments and suggestions on our paper. We have carefully addressed all comments and suggestions made by the respected reviewers and revised our manuscript thoroughly.
In particular, we explained the differences between this paper and our previous paper. In the previous paper we used manual method for the reconstruction. However, in the new paper we automatically reconstruct geological structures by solving non-linear problem (using augmented Lagrange method).
Also, we generated the tutorial video as an introduction to our software and explained how people can use it.
It is possible to watch the video over this link:
https://rwth-aachen.sciebo.de/s/rXYuFEWtobp9b5C
Besides, we increased the quality of the paper of the paper by rephrasing, trimming the extra parts. It is worth mentioning that we used premium Grammarly for checking for grammatical errors.Accordingly, a detailed point-to-point description of how we have addressed all the reviewers' concerns completely is represented in the following. We hope the respected reviewers find the updated version satisfactory and suitable for publication. Please also note that for more clarification, all the changes applied to the paper are highlighted with yellow color.
I will be in contact in case of any other inquiries.
Best Regards
Citation: https://doi.org/10.5194/egusphere-2022-685-AC1
-
AC1: 'Reply on EC1', Mohammad Moulaeifard, 20 Apr 2023
-
RC2: 'Comment on egusphere-2022-685', Guillaume Caumon, 06 Feb 2023
Preamble : I accepted to review this manuscript in January 2023, a few weeks after participating to the PhD committee of the firth author, and did not realize at that time that would mean reviewing a 4-month-old version of the work. I am not sure exactly what happened, as the editor did make a comment to the authors already, so I guess the authors have already started integrating some comments. Maybe this review is coming in too late, but I still hope the elements below and the annotated version of the manuscript will be somehow useful.
G Caumon – Feb 6, 2023.
This paper describes an open-source package for generating subdivision meshes from input geological models or data. Subdivision meshes have received little attention in subsurface modelling, so such a package is undoubtfully useful and should be published. However, I recommend major revisions, for the reasons highlighted below and in the attached annotated manuscript.
- The contributions of the paper would need to be made clearer, in particular wrt previous work on subdivision surfaces. This includes the recent paper of the authors (Moulaeifard et al, 2023) and also Chapter 7 of Mallet (2002), which briefly mentions variable edge sharpness in subdivision surfaces. As a strong focus is put on semi-sharp creases, some motivating geological examples could be mentioned early on (e.g., to model the hinges of kink folds, see for instance Caumon et al 2013).
- In the discussion, some references to TSplines would also be fair, as TSplines are another way to address some of the shortcomings of splines in terms of spatial adaptivity, see for instance Zhang et al. (2018).
- Some Figures could be improved: edge colors are difficult to see on Fig. 1; match caption and colors in Figs. 1 and 4; it would help to highlight the mesh on Figs 3 and 6. Also, it is strange to see a quad mesh on these two figures, whereas the paper defines only the triangular subdivision scheme.
- Maybe some of the details on the subdivision could be moved to an Appendix, as it seems redundant with Moulaeifard et al (2023). I have two questions on the subdivision. First, is there an implicit assumption about mesh quality? It seems to me that the edge refinement could lead to overlaps in some pathological mesh configurations (See drawing on page 6 of the annotated manuscript). I also suspect that some specific subdivision scheme is used for border edges, as Eq (3) is not directly applicable in that case.
- I don’t understand Section 2.4, which seems to be the most original aspect of the work. Probably adding (i) and (i-1) superscripts to symbols and merging with the iterative algorithmic description of Section 4 would help making the presentation more clear (in particular the meaning and the motivation for the constraint used for the optimization, as the constraint of Eq. (5) seems to be always honored from the definition of k.
- In Section 4, it would be nice to clarify what functions / features of PyVista are used. In particular, I don’t understand if the code needs an input non-manifold model from the start, or if it is able to compute non-manifold and watertight features from a “soup” of intersecting and non-conformable surfaces. Some more elements would be helpful.
- In the application section, it would help to compute how much the points were moved by the optimization process, as this is difficult to see from the figure. Plotting the error (before and after the optimization) on the initial mesh would probably be more meaningful than showing it on the output mesh, which probably has a coarser resolution. As visualization is challenging, this could maybe be provided as supplementary material in VTK format or similar?
- The discussion could possibly be enriched and expanded. For instance, are there convergence metrics in subdivision surfaces? Are there challenges to obtain correct watertight geological surfaces, and to what extent can PySubdiv help with that (or not)? Is there a trade-off to be found between the crease sharpness value and the density of the initial control mesh (i.e., could one compensate for the inappropriate choice of the other)?
- In the conclusion, I agree that there is a strong potential to the method to serve for geological inverse problems, but this should be phrased as a perspective.
- There is room for improvement on the form (equation symbols, integration of equations in the text), english writing style, see detailed remarks in the annotated manuscript.
References
Moulaeifard, M., Wellmann, F., Bernard, S., de la Varga, M., & Bommes, D. (2023). Subdivide and Conquer: Adapting Non-Manifold Subdivision Surfaces to Surface-Based Representation and Reconstruction of Complex Geological Structures. Mathematical Geosciences, 55(1), 81–111. https://doi.org/10.1007/s11004-022-10017-x
Mallet, J.-L. (2002). Geomodeling. Oxford University Press, USA.
Moulaeifard, M., Wellmann, F., Bernard, S., de la Varga, M., & Bommes, D. (2023). Subdivide and Conquer: Adapting Non-Manifold Subdivision Surfaces to Surface-Based Representation and Reconstruction of Complex Geological Structures. Mathematical Geosciences, 55(1), 81–111. https://doi.org/10.1007/s11004-022-10017-x
Zhang, Y., Zhong, D., Wu, B., Guan, T., Yue, P., & Wu, H. (2018). 3D Parametric Modeling of Complex Geological Structures for Geotechnical Engineering of Dam Foundation Based on T-Splines: 3D parametric geological modeling based on T-splines. Computer-Aided Civil and Infrastructure Engineering, 33(7), 545–570. https://doi.org/10.1111/mice.12343
-
AC3: 'Reply on RC2', Mohammad Moulaeifard, 20 Apr 2023
Publisher’s note: this comment was edited on 20 April 2023. The following text is not identical to the original comment, but the adjustments were minor without effect on the scientific meaning.
Dear Guillaume,
Thanks for your time. I have carefully addressed all comments and suggestions made by you and revised my paper thoroughly. I hope you find the updated version satisfactory and suitable for publication. Please also note that for more clarification, all the changes applied to the paper are highlighted with yellow colour. I attached the answer to your comments as a PDF file.
Besides, I want to kindly mention the three points regarding the updated version of this paper:
1) I explained the differences between this paper and our previous paper. The main difference is that in this paper, we implement the automatic fitting for reconstruction using the augmented Lagrangian method. However, in the previous paper, we used manual fitting which is very time-consuming.2) PyVista uses PyQt for GUI, and unfortunately, due to the limitation of PyQt, the software cannot work well in Windows, Mac and Conda environment. Currently, the software can work well in Linux without the Anaconda. We really did our best to remove these limitations. We plan to improve the software in the near future by absorbing more sources of funding and hiring more people to help. compare to Gempy and GoCad, our software is very new. However, we generated the tutorial video as an introduction to our software and explained how people can use it.
It is possible to watch the video over this link:
https://rwth-aachen.sciebo.de/s/rXYuFEWtobp9b5C
3) we increased the quality of the paper of the paper by rephrasing, trimming the extra parts. It is worth mentioning that we used premium Grammarly for checking for grammatical errors.
Please see the PDF file for more comments.
Best Regards,
Mohammad
Interactive discussion
Status: closed
-
CEC1: 'Comment on egusphere-2022-685', Astrid Kerkweg, 15 Aug 2022
Dear authors,
in my role as Executive editor of GMD, I would like to bring to your attention our Editorial version 1.2: https://www.geosci-model-dev.net/12/2215/2019/
This highlights some requirements of papers published in GMD, which is also available on the GMD website in the ‘Manuscript Types’ section: http://www.geoscientific-model-development.net/submission/manuscript_types.html
In particular, please note that for your paper, the following requirement has not been met in the Discussions paper:
- "The main paper must give the model name and version number (or other unique identifier) in the title."
Please add a version number for PySubdiv in the title upon your revised submission to GMD.
Yours,
Astrid Kerkweg
Citation: https://doi.org/10.5194/egusphere-2022-685-CEC1 -
AC4: 'Reply on CEC1', Mohammad Moulaeifard, 20 Apr 2023
Dear Astrid,
Thanks for your comment. We already added the version number (1.0) to the updated version of this paper.
Best Regards,
MohammadCitation: https://doi.org/10.5194/egusphere-2022-685-AC4
-
RC1: 'Comment on egusphere-2022-685', Eric de Kemp, 28 Nov 2022
Overall this is a reasonable paper that presents an important contribution using a Python implementation of Subdivision Surface codes (PySubDiv), that are used to demonstrate the benefits of this technology extension. Having the code released in an open-source journal such as GMD is useful to the whole geo-modelling community. The application of Subdivision Surfaces for geology is particularly useful with many geological situations where discontinuities such as faults, unconformities and intrusive bodies are considered. However, There are some major issues with the paper in my opinion. The paper needs to become more distinctive from the Mathematical Geosciences paper from the same team with same lead author;
Mohammad Moulaeifard, Florian Wellmann, Simon Bernard, Miguel de la Varga, David Bommes, Subdivide and Conquer: Adapting Non-Manifold, Subdivision Surfaces to Surface-Based Representation and Reconstruction of Complex Geological Structures Math Geosci, 2022, https://doi.org/10.1007/s11004-022-10017-x
This will be a challenge because most of what this current submission to GMD offers has already been presented in Math Geosci, but does have the addition of Python demonstration codes to show the utility of the methods. The challenge is to make this paper a) state more clearly and concisely why we need these tools in the community for geological applications b) while making the code more accessible, and with a bit of effort on c) better user instructions. The paper tends to get into a lot of details without saying why Sub-division surfaces are so important and why our current state of the art (Implicit?) tools is not properly handling these situations. Why do we need to preserve sharp edges in some cases and smooth edges in others? Also importantly, when the whole geological modelling community is moving to implicit surfaces (level set derived) are we going to go back to explicit approaches, even if it means we get some accuracy benefits? So just a better context would be good. This is mostly in the Math Geosc paper but could be restated in this submission in a clear and unique manner that motivates the reader to continue.
I have tried to test all the python codes with limited success. The most crucial point was to do interactive editing and updating of the edge values (CSV) for crease sharpness (sharp -1 to smooth-0). I tested with Windows 10, using Pycharm, Anaconda, (Python v3.9 in virtual environment). It is important to provide working code to the perceived user community, which in my opinion would be dominantly windows users. It would also be helpful if a more detailed tutorial could be provided, perhaps with a bit more details such as in the main authors thesis, to help with editing processes for the graphics. These are currently quite cumbersome and cryptic. Please know that I was helped by two of my colleagues, Michael Hillier and Hossein Jodeiri who both have a pretty good understanding of 3D graphics and meshing issues as well as use of Python codes with various ML supported packages. So collectively we had a good go at trying to make things work putting in several days to troubleshoot and tweek without full success.
If the authors choose to update the useability of their codes, it will widen the user community for these tools and provide better discussions for those wishing to implement their proposed solutions.
The main PySubDiv.py interface code was slightly modified to run in a windows environment for attribute editing and mesh manipulation;
# import the necessary packages
import sys
import os
from PySubdiv.create_control_cage import control_cage
from PySubdiv.data import files
from qtpy import QtWidgets
os.environ['QT_API'] = 'pyqt5'
# starting the PyQT application
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
# EdK insert from QT forum
# https://forum.qt.io/topic/132110/pyqt-program-crashes-without-error-when-run-from-the-command-line
app = QtWidgets.QApplication.instance()
if app is None:
app = QtWidgets.QApplication(sys.argv)
# end of new insert EdK Nov. 15, 2020
window = control_cage.PySubdivGUI([])
window.main()
sys.exit(app.exec_())Note that despite this there was only limited functionality such as IO of meshes, selection of nodes, edges and partial meshes. There was no deletion of triangles or ways to polygonise a partial surface. Importantly there was no ability to update edge crease values (1-0).
All the SubDivision surface codes performed well but only generated smooth refined meshes or coarse grip frames. Not composite straight and smooth non-manifold object types. This is a big stumbling block at this stage since the users have no way to fully evaluate the utility or advantages of the code without a working application.
There are detailed comments in the attached PDF file and highlights with various colours. Red highlights are of most concern.
Detailed suggestions:
Clarify better distinction between NURB and sub-division surfaces. Could add a graphic with the 3D graphics rendering zoology. Showing spectrum of explicit approaches.
- 2L20, Swarm optimization, this is usually to resolve a minimization or loss function. Also for sparse data extension but how is it used here? Maybe a short line about it if it is important.
- 2 L41, Definitely needs a more in-depth introduction. Clearly indicating the nature of the 2 methods. Needs also some discussion as to where DSI (Explicit and Discrete Smooth Interpolation al la GoCad) and implicit modelling, methods fit into this problem domain. Much has been summed up in Wellmann, F. and Caumon, G2018, but the reader should get a quick summary.
Remember DSI was originally a response to the parametric approach (Manufacturing , Car Industry tools from Paul Bézier not fit for purpose of geology modelling). So, Mallet (DSI) using internal constrains with local and global smoothing approach while dual point co-kriging with 3D WEG emerged for geology applications. (BRGM Geomodeler precursor). Fundamentally we should get some background on why we have difficulty in representing geological structures and manipulating them to be more believable with computer approaches. Simple in the head not so simple in computer graphics and physical world for 3D printing.
- 3 L65 Reword and make clearer.
P.4 L95 - Reword. Bad grammar….Not clear.
P.5 L110 - Just by displaying what could be a relevant figure and some descriptive text does not guarantee clarity. I have no idea what is going on with this Loop algorithm as articulated.
P.6 L115 - Alot of more recent work has been done on this see :
P.7 L140 - ... between one and zero… indicating level of resistance to the subdivision algorithm with one having no effect and zero having no resistance thus accepting the full recursion and smoothing of the mesh?
This is worded awkwardly as I could interpret your meaning as the opposite parameterization, meaning 0 intuitively means no re-sampling ie. a sharp edge is respected and 1 would be full re-sampling. I think you want to say that 0 is full smoothing and 1 is sharp? Just make it clear so there is no doubt what the end members mean and note intermediate float values can be assigned as well. I think that is the case?
P.8 L150 Fig. 6 For (c) they all look smooth to me? The black lines are not very distinct from the dark blue ones. Try making them red and blue. The internal surface in(c) is not sharp at the CSV = 0.
- 8 L150 - What is a sub-division surface? That is what most geotypes like me will be asking. Most do not know. 1st make it more clear then you can highlight the benefits. Then you can prove your case. Then make sure the code works for your perceived user base. That means windows users as well.
P.8 L160 - But the explanation has to be sufficient to justify using all these terms so that people will not just get confused. Like me.
- 9 L165 - Maybe a simple flow diagram would help because first you need some idea of the geological feature shape, its topology etc. then you generate the control net or grip frame. Thne you invert/compute/remesh/estimate for the more accurate geobody.
- 9 L165 - You don't want to use perfume .... only on special occasions.
P.9 L170 - For geologists it is a bit disconcerting to say we need to 'estimate the control points' for geobody. We usually think of using existing control points as data to estimate the feature. This is in my opinion an expertise domain semantics problem. You will have to find a good solution so both communities a) graphics and b) geomodellers are not getting confused.
P.9 L170 - Not sure these are the appropriet references here since these authors don't go into this kind of detail on the problem I think you are presenting.Maybe add a more detailed ref?
P.9 L190 – ‘b’ is what? an arbitrary shape parameter, is it calculated or specified by the user?
P.10 L205 - define somewhere what are Min p & z in eq (7,9).
P.10 L215 - Where does Blender come into this? Do you call PySubdiv from inside Blender or just import the resultant surfaces?
- 11 L240 - a sentence more about what swarm optimization is doing beyond increasing 'efficiency' would be helpful.
- 12 L255 Fig. 7 - This is good but a visual of a simple surface from start to finish would also help. Maybe coming in the case study later in the paper?
P.12 L260 - This we call control points or 'stratigraphic and structural constraint points' i.e. picks.
P.13 L275 - Need to explain more details of what this angle is? IS it only the adjacent face normal angle? Maybe in the discussion highlight some issues with this aspect. Fault and horizon intersections for example, even in water tight models, may have erroneous small triangles that can be in similar orientation to an adjacent feature.
P16 L300 Fig. 10b - Try using a gray scale or white to red colour ramp. transparency when the distance rms is very low. normalize the distances between max and min values for better graphic results. Good to have a true distance scale. Shows deeper structures are more uncertain. Very difficult to see what is going on with dark blue regions.
P.18 L355 - Now a bigger issue! When we throw out the grid how do we do property modelling, flow simulation etc. Briefly describe the issues here and why subdivision surface provide a benefit in themselves for geological applications?
...but don't forget that subdivision surfaces are also based on B-Spline and NURB technology....piecewise polynomial basis pairs. See Loop 1987 M.Sc. thesis and Farin G for history.
P.18 L360 - Not all original observation points are respected, that is preserved. Only the mesh is the input.
Older references you may want to consider inserting:
- Habib and J. Warren: Edge and vertex insertion for a class of C1 subdivision surfaces, Computer Aided Geometric Design 16(4) (May 1999) p.223-247.
- Karciauskas and J. Peters: Point-augmented biquadratic C1 subdivision surfaces, Graphical Models, 77, p.18-26 [1]
- Peters and U. Reif: Subdivision Surfaces, Springer series Geometry and Computing monograph 3, 2008.
- Peters and U. Reif: Analysis of generalized B-spline subdivision algorithms, SIAM J of Numer. Anal. 32 (2) 1998, p.728-748
- Peters and U. Reif: The simplest subdivision scheme for smoothing polyhedra, ACM Transactions on Graphics 16(4) (October 1997) p.420-431,
- Ulrich Reif. 1995. A unified approach to subdivision algorithms near extraordinary vertices. Computer Aided Geometric Design. 12(2)153–174
- Jos Stam, "Exact Evaluation of Catmull-Clark Subdivision Surfaces at Arbitrary Parameter Values", Proceedings of SIGGRAPH'98. In Computer Graphics Proceedings, ACM SIGGRAPH, 1998, 395–404
- Zorin, Denis; Schr¨oder, Peter; Sweldens, Wim (1996). "Interpolating Subdivision for Meshes with Arbitrary Topology". Department of Computer Science, California Institute of Technology, Pasadena, CA 91125.
-
AC2: 'Reply on RC1', Mohammad Moulaeifard, 20 Apr 2023
Publisher’s note: this comment was edited on 20 April 2023. The following text is not identical to the original comment, but the adjustments were minor without effect on the scientific meaning.
Dear Erick,
Thanks for your time. I have carefully addressed all comments and suggestions made by you and revised my paper thoroughly. I hope you find the updated version satisfactory and suitable for publication. Please also note that for more clarification, all the changes applied to the paper are highlighted with yellow colour. I attached the answer to your comments as a PDF file.
Besides, I want to kindly mention the three points regarding the updated version of this paper:
1) I explained the differences between this paper and our previous paper. The main difference is that in this paper, we implement the automatic fitting for reconstruction using the augmented Lagrangian method. However, in the previous paper, we used manual fitting which is very time-consuming.2) PyVista uses PyQt for GUI, and unfortunately, due to the limitation of PyQt, the software cannot work well in Windows, Mac and Conda environment. Currently, the software can work well in Linux without the Anaconda. We really did our best to remove these limitations. We plan to improve the software in the near future by absorbing more sources of funding and hiring more people to help. compare to Gempy and GoCad, our software is very new. However, we generated the tutorial video as an introduction to our software and explained how people can use it.
It is possible to watch the video over this link:
https://rwth-aachen.sciebo.de/s/rXYuFEWtobp9b5C
3) we increased the quality of the paper of the paper by rephrasing, trimming the extra parts. It is worth mentioning that we used premium Grammarly for checking for grammatical errors.
Please see the PDF file for more comments.
With Best Regards,
Mohammad.
-
EC1: 'Comment on egusphere-2022-685', Mauro Cacace, 29 Nov 2022
Dear authors,
thanks for your submission to GMD. Based on the referee comment, and on my own reading, I agree that the manuscript has its own scientific merit and the topic fits with the journal scope. However, I would suggest to carefully address all comments raised by the reviewer, especially those dealing with a clarification and distinction from an already published manuscript as well as on improving the code portability to the end user.
Yours,
Mauro Cacace
Citation: https://doi.org/10.5194/egusphere-2022-685-EC1 -
AC1: 'Reply on EC1', Mohammad Moulaeifard, 20 Apr 2023
Dear Dr. Mauro Cacace,
Initially, we would like to express our sincere appreciation to the respected editors and reviewers for their valuable comments and suggestions on our paper. We have carefully addressed all comments and suggestions made by the respected reviewers and revised our manuscript thoroughly.
In particular, we explained the differences between this paper and our previous paper. In the previous paper we used manual method for the reconstruction. However, in the new paper we automatically reconstruct geological structures by solving non-linear problem (using augmented Lagrange method).
Also, we generated the tutorial video as an introduction to our software and explained how people can use it.
It is possible to watch the video over this link:
https://rwth-aachen.sciebo.de/s/rXYuFEWtobp9b5C
Besides, we increased the quality of the paper of the paper by rephrasing, trimming the extra parts. It is worth mentioning that we used premium Grammarly for checking for grammatical errors.Accordingly, a detailed point-to-point description of how we have addressed all the reviewers' concerns completely is represented in the following. We hope the respected reviewers find the updated version satisfactory and suitable for publication. Please also note that for more clarification, all the changes applied to the paper are highlighted with yellow color.
I will be in contact in case of any other inquiries.
Best Regards
Citation: https://doi.org/10.5194/egusphere-2022-685-AC1
-
AC1: 'Reply on EC1', Mohammad Moulaeifard, 20 Apr 2023
-
RC2: 'Comment on egusphere-2022-685', Guillaume Caumon, 06 Feb 2023
Preamble : I accepted to review this manuscript in January 2023, a few weeks after participating to the PhD committee of the firth author, and did not realize at that time that would mean reviewing a 4-month-old version of the work. I am not sure exactly what happened, as the editor did make a comment to the authors already, so I guess the authors have already started integrating some comments. Maybe this review is coming in too late, but I still hope the elements below and the annotated version of the manuscript will be somehow useful.
G Caumon – Feb 6, 2023.
This paper describes an open-source package for generating subdivision meshes from input geological models or data. Subdivision meshes have received little attention in subsurface modelling, so such a package is undoubtfully useful and should be published. However, I recommend major revisions, for the reasons highlighted below and in the attached annotated manuscript.
- The contributions of the paper would need to be made clearer, in particular wrt previous work on subdivision surfaces. This includes the recent paper of the authors (Moulaeifard et al, 2023) and also Chapter 7 of Mallet (2002), which briefly mentions variable edge sharpness in subdivision surfaces. As a strong focus is put on semi-sharp creases, some motivating geological examples could be mentioned early on (e.g., to model the hinges of kink folds, see for instance Caumon et al 2013).
- In the discussion, some references to TSplines would also be fair, as TSplines are another way to address some of the shortcomings of splines in terms of spatial adaptivity, see for instance Zhang et al. (2018).
- Some Figures could be improved: edge colors are difficult to see on Fig. 1; match caption and colors in Figs. 1 and 4; it would help to highlight the mesh on Figs 3 and 6. Also, it is strange to see a quad mesh on these two figures, whereas the paper defines only the triangular subdivision scheme.
- Maybe some of the details on the subdivision could be moved to an Appendix, as it seems redundant with Moulaeifard et al (2023). I have two questions on the subdivision. First, is there an implicit assumption about mesh quality? It seems to me that the edge refinement could lead to overlaps in some pathological mesh configurations (See drawing on page 6 of the annotated manuscript). I also suspect that some specific subdivision scheme is used for border edges, as Eq (3) is not directly applicable in that case.
- I don’t understand Section 2.4, which seems to be the most original aspect of the work. Probably adding (i) and (i-1) superscripts to symbols and merging with the iterative algorithmic description of Section 4 would help making the presentation more clear (in particular the meaning and the motivation for the constraint used for the optimization, as the constraint of Eq. (5) seems to be always honored from the definition of k.
- In Section 4, it would be nice to clarify what functions / features of PyVista are used. In particular, I don’t understand if the code needs an input non-manifold model from the start, or if it is able to compute non-manifold and watertight features from a “soup” of intersecting and non-conformable surfaces. Some more elements would be helpful.
- In the application section, it would help to compute how much the points were moved by the optimization process, as this is difficult to see from the figure. Plotting the error (before and after the optimization) on the initial mesh would probably be more meaningful than showing it on the output mesh, which probably has a coarser resolution. As visualization is challenging, this could maybe be provided as supplementary material in VTK format or similar?
- The discussion could possibly be enriched and expanded. For instance, are there convergence metrics in subdivision surfaces? Are there challenges to obtain correct watertight geological surfaces, and to what extent can PySubdiv help with that (or not)? Is there a trade-off to be found between the crease sharpness value and the density of the initial control mesh (i.e., could one compensate for the inappropriate choice of the other)?
- In the conclusion, I agree that there is a strong potential to the method to serve for geological inverse problems, but this should be phrased as a perspective.
- There is room for improvement on the form (equation symbols, integration of equations in the text), english writing style, see detailed remarks in the annotated manuscript.
References
Moulaeifard, M., Wellmann, F., Bernard, S., de la Varga, M., & Bommes, D. (2023). Subdivide and Conquer: Adapting Non-Manifold Subdivision Surfaces to Surface-Based Representation and Reconstruction of Complex Geological Structures. Mathematical Geosciences, 55(1), 81–111. https://doi.org/10.1007/s11004-022-10017-x
Mallet, J.-L. (2002). Geomodeling. Oxford University Press, USA.
Moulaeifard, M., Wellmann, F., Bernard, S., de la Varga, M., & Bommes, D. (2023). Subdivide and Conquer: Adapting Non-Manifold Subdivision Surfaces to Surface-Based Representation and Reconstruction of Complex Geological Structures. Mathematical Geosciences, 55(1), 81–111. https://doi.org/10.1007/s11004-022-10017-x
Zhang, Y., Zhong, D., Wu, B., Guan, T., Yue, P., & Wu, H. (2018). 3D Parametric Modeling of Complex Geological Structures for Geotechnical Engineering of Dam Foundation Based on T-Splines: 3D parametric geological modeling based on T-splines. Computer-Aided Civil and Infrastructure Engineering, 33(7), 545–570. https://doi.org/10.1111/mice.12343
-
AC3: 'Reply on RC2', Mohammad Moulaeifard, 20 Apr 2023
Publisher’s note: this comment was edited on 20 April 2023. The following text is not identical to the original comment, but the adjustments were minor without effect on the scientific meaning.
Dear Guillaume,
Thanks for your time. I have carefully addressed all comments and suggestions made by you and revised my paper thoroughly. I hope you find the updated version satisfactory and suitable for publication. Please also note that for more clarification, all the changes applied to the paper are highlighted with yellow colour. I attached the answer to your comments as a PDF file.
Besides, I want to kindly mention the three points regarding the updated version of this paper:
1) I explained the differences between this paper and our previous paper. The main difference is that in this paper, we implement the automatic fitting for reconstruction using the augmented Lagrangian method. However, in the previous paper, we used manual fitting which is very time-consuming.2) PyVista uses PyQt for GUI, and unfortunately, due to the limitation of PyQt, the software cannot work well in Windows, Mac and Conda environment. Currently, the software can work well in Linux without the Anaconda. We really did our best to remove these limitations. We plan to improve the software in the near future by absorbing more sources of funding and hiring more people to help. compare to Gempy and GoCad, our software is very new. However, we generated the tutorial video as an introduction to our software and explained how people can use it.
It is possible to watch the video over this link:
https://rwth-aachen.sciebo.de/s/rXYuFEWtobp9b5C
3) we increased the quality of the paper of the paper by rephrasing, trimming the extra parts. It is worth mentioning that we used premium Grammarly for checking for grammatical errors.
Please see the PDF file for more comments.
Best Regards,
Mohammad
Peer review completion
Journal article(s) based on this preprint
Data sets
3D-URG : 3D gravity constrained structural model of the Upper Rhine Graben Freymark, J., Bott [Sippel], J., Scheck-Wenderoth, M., Bär, K., Stiller, M., Fritsche, J.-G., Kracht, M., Gomez Dacal, M. https://doi.org/10.5281/zenodo.6878051
Model code and software
PySubdiv Simon Bernard, Mohammad Moulaeifard, Florian Wellmann https://github.com/SimBe-hub/PySubdiv
Viewed
HTML | XML | Total | BibTeX | EndNote | |
---|---|---|---|---|---|
677 | 213 | 25 | 915 | 8 | 8 |
- HTML: 677
- PDF: 213
- XML: 25
- Total: 915
- BibTeX: 8
- EndNote: 8
Viewed (geographical distribution)
Country | # | Views | % |
---|
Total: | 0 |
HTML: | 0 |
PDF: | 0 |
XML: | 0 |
- 1
Mohammad Moulaeifard
Simon Bernard
Florian Wellmann
The requested preprint has a corresponding peer-reviewed final revised paper. You are encouraged to refer to the final revised version.
- Preprint
(1441 KB) - Metadata XML