What determines which options are shown on the "Blending Methods" dropdown?

23 views
Skip to first unread message

Andy Baker

unread,
Jan 16, 2021, 9:43:40 AM1/16/21
to COLIBRI VR
I followed the code and got as far as the IsRenderingMethodCompatible method but this was a little opaque so I thought I would ask here instead.

I've followed the getting started videos and when I get to the rendering stage, I had either zero or two options in the blending methods dropdown.

It seems that the choices made in earlier stages affect this list but there's no mention of this in the video or the docs.

In fact the aquisition video doesn't offer much guidance as to it's various options. It tells you that you can change various settings but makes no mention of why you would want to.

Is it possible to have a bit more detail in the written docs on this topic? Or just clarify here. I might be able to tweak the docs and send a PR myself once I understand better.

Greg de Dinechin

unread,
Jan 31, 2022, 2:36:27 PM1/31/22
to COLIBRI VR
Hi,

Thanks for your message, and again, very sorry for not having answered the forum this past year.

You're absolutely right, the options shown in the Blending Methods dropdown depend on the return value of IsRenderingMethodCompatible. What this function does is check each item in the sceneRepresentationMethods of the RenderingMethod, to see whether the scene representation assets (textures, meshes...) required to render the scene using this method have correctly been bundled during the processing stage.

For example:
  • The TexturedFocalSurfaces method requires an array of color textures and an array of meshes (one per image). Therefore, in the overriden InitializeLinks function of TexturedFocalSurfaces (here), we add the ColorTextureArray and PerViewMeshesFS processing methods to the list of sceneRepresentationMethods, to specify that the rendering method requires the corresponding bundled assets.
  • The ULRGlobalMesh method requires an array of color textures, an array of depth textures, and a single global mesh. Therefore, in the overriden InitializeLinks function of ULRGlobalMesh (here), we use the function of the ULR helper (here) to add the ColorTextureArray, GlobalMeshEF, and DepthTextureArray processing methods to the list of sceneRepresentationMethods, to specify that the rendering method requires the corresponding bundled assets.
Therefore, if you do not see the option that you want in the blending methods dropdown, check the assets bundled during the processing stage: it is likely that some are missing if you compare them to those specified in the rendering method's overriden InitializeLinks function.

I'll try to update the online docs quickly to provide more information on this subject. I agree that it could be helpful to mention the assets required by each method somewhere in the documentation. And providing guidance during the acquisition stage is a good idea as well, I'll see if I can find a way to implement this in a transparent way.

Thanks again for your feedback!

Greg
Reply all
Reply to author
Forward
0 new messages