Annotations Occlusion

Home Forums General Questions Annotations Occlusion

This topic contains 11 replies, has 3 voices, and was last updated by Avatar Sargento 2 weeks, 4 days ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #18942
    Avatar
    Sargento
    Newbie

    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.

    Attachments:
    You must be logged in to view attached files.
    #18945
    Avatar
    Sargento
    Newbie

    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
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    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:

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #18988
    Avatar
    Sargento
    Newbie

    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.

    • This reply was modified 1 month ago by Avatar Sargento.
    #18994
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    :good:

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #19031
    Avatar
    Sargento
    Newbie

    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
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    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!

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #19626

    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.

    Attachments:
    You must be logged in to view attached files.
    #19673
    Avatar
    Sargento
    Newbie

    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
    Avatar
    Sargento
    Newbie

    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:

    Attachments:
    You must be logged in to view attached files.
    #19756

    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
    Avatar
    Sargento
    Newbie

    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.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.