We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Annotations Occlusion

Home Forums General Questions Annotations Occlusion

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #18942
    Sargento
    Participant

    Hello again.
    I’m placing some annotations but they appear as occluded even when they are visible. It seems that the occlusion is considered by the bounding box of the object instead of the geometry itself.

    I’m sending you a couple of images. The first image shows the annotation visible and the second one shows the annotation faded, it is behaving as occluded even when it is perfectly visible to the camera.

    Is there a workaround to fix this?

    Another question: is it possible to evaluate when an object is occluded?
    I’m planning to create my own HTML annotations and bind them to empty objects using bind element puzzle and fade them (or hide) when occluded.

    Thanks.

    #18945
    Sargento
    Participant

    This is what I’m working on for testing purposes: A Bird’s house https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:33210a9027/applications/sgt_Casa_Pajarera_01/sgt_Casa_Pajarera_01.html

    I noticed that mouse wheel (zoom) doesn’t work when hovering an annotation, so I added the next CSS text to the v3d-annotation CSS class: pointer-events: none;

    I think that that CSS rule should be added when inserting the annotation puzzle as well as the current rules.

    #18953

    I’m placing some annotations but they appear as occluded even when they are visible. It seems that the occlusion is considered by the bounding box of the object instead of the geometry itself.

    Yes, due to performance reasons, the visibility of annotations is calculated on the basis of bounding boxes. This produces rough results yet it’s fast.

    Is there a workaround to fix this?

    To disable fading occluded annotation, switch off the “fade annotations” checkbox in this puzzle: https://www.soft8soft.com/docs/manual/en/puzzles/Initialization.html#configure_application

    is it possible to evaluate when an object is occluded?

    I think it is possible to implement sort of raytracing through all the triangles for maximum precision, but it would require some hardcore JavaScript coding.

    This is what I’m working on for testing purposes: A Bird’s house

    Looks very nice!

    I think that that CSS rule should be added when inserting the annotation puzzle as well as the current rules.

    Agreed that it would be a good addition. However, this CSS property would disable mouse clicks as well, making annotations non-expandable. :wacko:

    Chief 3D Verger | LinkedIn | Twitter

    #18988
    Sargento
    Participant

    Agreed that it would be a good addition. However, this CSS property would disable mouse clicks as well, making annotations non-expandable.

    That’s true. Didn’t think about it as I’m not using mouse events. :scratch:

    Actually I disabled fade annotations as it looks better for this project.

    Thanks.

    #18994

    :good:

    Chief 3D Verger | LinkedIn | Twitter

    #19031
    Sargento
    Participant

    I had to separate objects and modify boundaries to get a better result about fading annotations for this project. Now I’m happy with the results.

    Have a question: annotation opacity varies from 1 (when visible) to 0.25 (when occluded). I was wondering if it is possible to modify opacity to 0.0 when occluded.

    Regards.

    #19044

    opacity varies from 1 (when visible) to 0.25 (when occluded). I was wondering if it is possible to modify opacity to 0.0 when occluded.

    Unfortunately this parameter is not configurable at the moment. I’ve created a task in our dev tracker to make it possible in the future. Thanks for the feedback!

    Chief 3D Verger | LinkedIn | Twitter

    #19626
    ryangonzalez
    Participant

    I’m planning to create my own HTML annotations and bind them to empty objects using bind element puzzle and fade them (or hide) when occluded.
    Thanks.

    Hello, I am new to this space and am following this with great interest. Just wondering if you would be able to offer any tips, or share your workflow with how to make your own HTML annotations and bind them to objects in the Verge3D project.

    I figured out how to add HTML to the normal text annotation in the puzzle but the text box rotates with the model and gets clipped depending on the model’s orientation. Instead, I am trying to figure out how to trigger a lightbox with a photo, or iframe inside.

    Would appreciate any tips or workflow insights! Thank you.

    #19673
    Sargento
    Participant

    You should use HTML/bind puzzle to do that.
    First, you have to create the element using HTML inside your HTML document. You can use CSS as well to adjust its appearance. Don’t forget to assign an unique ID to that element.
    Create another object inside your 3D scene (could be an empty object) then use the HTML/bind puzzle to attach the HTML object to the 3D object.
    It’s pretty easy. :)

    #19674
    Sargento
    Participant

    I’m sending you a ZIP file. Just extract it inside verge3D/applications folder.

    I added 2 empties: EmptyAnnotation and EmptyHTML in the scene.
    Created an HTML element inside the html document (image included).
    Then added the puzzles (image included).

    Hope this helps.

    Regards.

    :good:

    #19756
    ryangonzalez
    Participant

    Thank you so much for the tips and sample files. It’s very clear now how I should proceed, especially the tip with the Blender empties.

    My next step will be to figure out if I can make the html annotation appear centered in the screen, rather than attached to the empty.

    Thanks again for the help. I will share my results back here.

    #19815
    Sargento
    Participant

    If you need a fixed position element, that’s easy as well:
    – Crate the HTML element on your html document.
    – Position it at the center of the canvas ( using CSS, as usual ).
    – Use any 3D objects as button. Just like any html/js web document. There is the Events/when clicked puzzle to do that.
    – On that puzzle there is a do connector. You can use a HTML/set style puzzle to show (unhide) the html element.

    #20735

    Hi,
    We’re going to improve the rendering of Annotations in the upcoming version of Verge3D –

    Soft8Soft Tech Chief
    X | FB | LinkedIn

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.