f3d
f3d copied to clipboard
Add an option to control backface culling
Context F3D is used to render different kind of geometries, most of them contain oriented faces with a concept of backfaces and frontfaces. F3D currently always show the backface but it would be useful to control that behavior.
Suggested Solution
- Add a CLI and libf3d option to control the behavior
- Use the option in vtkF3DRenderer to set the backface flag on the actors
- VTK API to use: https://vtk.org/doc/nightly/html/classvtkProperty.html#a19e98e81aba936017e8b9eeb26658d75
I think that would be pretty trivial to add, wdyt @Meakk ?
Yes, it's just a flag on the actors
Here's a file I create for testing: backface.zip
And the visualization in ParaView:
- Front/Back display:
- With backface culling:
- In f3d:
From a related discussion on Discord we've also got an .obj file with cubes from @theuser021: backface-cubes.zip
MeshLab rendering options for reference:
- single (back facing dark)
- double (back facing same color as front facing)
- cull (back facing not displayed)
- fancy (two different colors)
Improved the issue.
Is anyone working on this? I would love to be able to help out + its a feature I really want to have!
Well go for it! Are you on discord already?
https://discord.f3d.app
Just joined! Thanks!
any news on this one @Raghav-B ?
@mwestphal I'm really sorry, I completely missed your messages on Discord. I know this a really simple feature that can be added in a couple of hours but I really haven't had the bandwidth these past 2 months due to some personal issues. I would have really liked to help out with this but it would be better if you could assign this to someone else if you need this done timely.
No worries:)
Im working on it :)