Author Topic: JPCT-ae + GoogleTango = Occlusion/Stencil  (Read 137 times)

Offline ares91x

  • byte
  • *
  • Posts: 6
    • View Profile
JPCT-ae + GoogleTango = Occlusion/Stencil
« on: August 26, 2017, 11:48:45 am »
Hi everyone,
Im using Google Tango for a project and Im trying to find a way to hide(partialy or totaly) virtual object that are behind a real object.
I found this project http://www.modeso.ch/blog-posts/augmented-reality-using-tango-occlusion.html but this is in OpenGl and in C (I dont know both of them) and I was wondering if exists a similar way to implement that in JPCT-ae or something similar for example creating a stencil with the point coming from depth perception sensor of GoogleTango and than applying the stencil to the view in order to cover(not render) part of 3D object. So in few words how to create a stencil given some points (point coordinates are in 3D) and apply it to an view?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: JPCT-ae + GoogleTango = Occlusion/Stencil
« Reply #1 on: August 26, 2017, 10:55:34 pm »
You could create an Object3D based on your points, render it, clear the color buffer only (FrameBuffer.clearColorBufferOnly()) and render the scene. That will "hide" everything behind your (now no longer visible) object...if that's what you actually mean...

Offline ares91x

  • byte
  • *
  • Posts: 6
    • View Profile
Re: JPCT-ae + GoogleTango = Occlusion/Stencil
« Reply #2 on: August 29, 2017, 08:16:52 pm »
mmm yes this could work

Exists a way do create stencil in jpct?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: JPCT-ae + GoogleTango = Occlusion/Stencil
« Reply #3 on: August 30, 2017, 09:01:59 am »
A stencil buffer? No, there's no support for this.