Announcement

Collapse
No announcement yet.

Get material id or shader set name of vrmesh based on image coordinates

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get material id or shader set name of vrmesh based on image coordinates

    Using pickPlugins() function we can get Node objects intersected at the given pixel. We interested in getting information about the material assigned to the clicked object. Usually it's not a big deal, but if we use GeomMeshFile with VRMesh that has multiple materials assigned to it, it's not so trivial. The assigned material will actually always be MtlMulti. It would be nice to have a function that would give some additional information about the picked object like material id or shader set name. Is there such a function available in the API or are there any plans to implement it?

    We also tried to use a workaround and create a RenderChannelExtraTexInt with material_id from the sampler. It would work for CPU, but it is currently not supported on the GPU (and that's what we have to use). It also has some performance overhead and affects the interactivity, because of the extra image buffer that must be updated. So some special function would be probably a better solution.

  • #2
    Hello,
    We will try to add material info to pickPlugins.
    Best,
    Stan

    Comment


    • #3
      Hello Stan,

      thanks for the good news, looking forward for nightly builds with this feature!

      Best regards,
      Alex

      Comment

      Working...
      X