Skip to content
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

Track primitives with data analytics mode #510

Open
albertoesmp opened this issue Jan 22, 2025 · 0 comments
Open

Track primitives with data analytics mode #510

albertoesmp opened this issue Jan 22, 2025 · 0 comments

Comments

@albertoesmp
Copy link
Collaborator

There is one potential improvement to the ray tracing method based on computing the subray loop starting in the outer ring. If all the subrays on the outer ring hit the same triangle primitive, then there is no need to compute the other subrays. We need some quantifications to understand the improvement ratio for different simulations (i.e., the proportion of the execution that corresponds to single triangle hits).

To compute the previous quantifications we could extend the data analytics mode to associate the subrays with the primitive. Thus, we need two updates:

1) Updating the output vector to contain one more element that will identify the triangle.
See intensityCalc at https://github.com/3dgeo-heidelberg/helios/blob/dev/src/dataanalytics/HDA_PulseRecorder.h (note that [12] already gives the ring, [13] must be added to account for the primitive index) for documentation and FullWaveformPulseRunnable::operator() at https://github.com/3dgeo-heidelberg/helios/blob/dev/src/scanner/detector/FullWaveformPulseRunnable.cpp for initialization. For the intialization of each single vector see BaseEnergyModel::computeReceivedPower at https://github.com/3dgeo-heidelberg/helios/blob/dev/src/maths/model/BaseEnergyModel.cpp and ImprovedEnergyModel::computeTargetArea at https://github.com/3dgeo-heidelberg/helios/blob/dev/src/maths/model/ImprovedEnergyModel.cpp.

2) Write the corresponding id in this new component so it can be later parsed by a python script to compute the quantifications.
See the end of the FullWaveformPulseRunnable::handleSubray method at https://github.com/3dgeo-heidelberg/helios/blob/dev/src/scanner/detector/FullWaveformPulseRunnable.cpp for an example on how the coordinates are inserted. The idea is to take some identifier from the primitive in the ray intersection (i.e., intersect->prim) so each single triangle can be identified by the pair (object_id, primitive_id). Examples of IDs could be finding the index of the particular primitive in the vector of primitives in the scene part, the index in the vector of primitives of the scene itself, the centroid of the primitive (assuming each primitive has a different centroid), or perhaps using the address of the memory pointer itself as an id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant