playcanvas / editor

Issue tracker for the PlayCanvas Editor
https://playcanvas.com/
154 stars 28 forks source link

Viewport setting - cull backfaces #1154

Open LeXXik opened 4 months ago

LeXXik commented 4 months ago

This is a feature request to add an option to cull backfaces in the Editor viewport, similar to the wireframe mode. I would like not to change the actual material properties. This will make it a bit easier when working in close environments.

Would be nice to be able to adjust near/far clip of the camera as well, but maybe not easy from UX side.

https://github.com/playcanvas/editor/assets/5677782/a3f1b976-2478-4313-bff0-723f6cf412cc

mvaligursky commented 4 months ago

Hi .. I'm not entirely sure what you mean here. By default, the backfaces are culled. Are you hoping to not cull them? That could be useful with wireframe to see them, but with a solid rendering, you would not see them as they face away?

LeXXik commented 4 months ago

Yeah, by default it is. But if the materials don't cull it, then the viewport will render back faces when the camera goes inside a mesh. So, the only way is to change the actual material properties. I would like to avoid it touching stuff the artists set, as I will definitely forget to revert it back later.

I tried the wireframe, and though it solves the original issue of losing object focus, the viewport becomes a bit too busy and it becomes hard to do a precise position, as you can't see if you are clipping a mesh:

image

mvaligursky commented 4 months ago

Yep that makes sense now, so your materials are set up as double sided.