08-20-2021, 12:08 PM
Hi,
I've started writing my own rendering step to show normals using geometry shader and an OverrideEffect. It's working fairly well, except that I need to filter the objects. For that I am using FilterObjectsFunction in the rendering step.
There I need to recognize the objects to show normals on (currently it's all using PBMaterial or MultiMapMaterial). That is easy to check, but I've noticed that RenderablePrimitiveBase has a property "Tag". This tag is always null so I was wondering how to populate this with a value (then it would be possible to filter the objects by anything I want - name, animations, selection etc.).
I am using MeshObjectNode to render most of the objects and they also have property Tag (which I am using to set some data for raycasts and selection). Is it possible to somehow inherit the Tag from SceneNode to RenderablePrimitiveBase?
I cannot use RenderQueue filtering since I cannot set an object into multiple queues and I cannot override MeshObjectNode to extend the method CollectRenderableObjects (it's sealed). Writing custom collection seems as an overkill as well.
Thanks,
Roman Janovsky
I've started writing my own rendering step to show normals using geometry shader and an OverrideEffect. It's working fairly well, except that I need to filter the objects. For that I am using FilterObjectsFunction in the rendering step.
There I need to recognize the objects to show normals on (currently it's all using PBMaterial or MultiMapMaterial). That is easy to check, but I've noticed that RenderablePrimitiveBase has a property "Tag". This tag is always null so I was wondering how to populate this with a value (then it would be possible to filter the objects by anything I want - name, animations, selection etc.).
I am using MeshObjectNode to render most of the objects and they also have property Tag (which I am using to set some data for raycasts and selection). Is it possible to somehow inherit the Tag from SceneNode to RenderablePrimitiveBase?
I cannot use RenderQueue filtering since I cannot set an object into multiple queues and I cannot override MeshObjectNode to extend the method CollectRenderableObjects (it's sealed). Writing custom collection seems as an overkill as well.
Thanks,
Roman Janovsky

