Home › Forums › General Questions › Annotations Occlusion
- This topic has 12 replies, 4 voices, and was last updated 5 years, 1 month ago by Alexander Kovelenov.
-
AuthorPosts
-
2019-09-17 at 11:40 pm #18942SargentoParticipant
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.
2019-09-18 at 1:58 am #18945SargentoParticipantThis 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.
2019-09-18 at 7:02 am #18953Yuri KovelenovStaffI’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.
2019-09-18 at 4:23 pm #18988SargentoParticipantAgreed 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.
Actually I disabled fade annotations as it looks better for this project.
Thanks.
2019-09-19 at 6:08 am #18994Yuri KovelenovStaff2019-09-19 at 9:18 pm #19031SargentoParticipantI 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.
2019-09-20 at 6:38 am #19044Yuri KovelenovStaffopacity 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!
2019-10-01 at 7:58 am #19626ryangonzalezParticipantI’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.
2019-10-01 at 5:05 pm #19673SargentoParticipantYou 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. :)2019-10-01 at 5:38 pm #19674SargentoParticipantI’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.
2019-10-03 at 7:44 am #19756ryangonzalezParticipantThank 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.
2019-10-03 at 6:56 pm #19815SargentoParticipantIf 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.2019-10-28 at 9:11 am #20735Alexander KovelenovStaff -
AuthorPosts
- You must be logged in to reply to this topic.