Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

This is an awesome thing to have exist, thanks so much for this.

However a limitation I've run into while experimenting with it to double check what it can achieve, is no matter what I can't seem to get 'backface culling' to work for it (so you can see through the back of something, e.g. to achieve targeted toon outline with black texture+backface culled). I've tested different material settings (using blender), editing the file itself with a text editor (""doubleSided" : true," exists which I thought my be the term required, but true or false changes nothing), all the blend modes, searched through here/the forum thread in-case, etc. 

Would appreciate knowing if this is a hard limitation, something I missed, or something that just needs to be parsed from the file in a possible update. Note that this worked without issues in the babylon.js sandbox.

(+1)

Hi! Thanks for trying out the addon.

One of my goals for this addon is to use the exposed C3 SDK, to keep compatibility with C3 as time goes on. The impact of that is some limitations, due to C3 limitations around how C3 limits changes to the webgl render, fragment and vertex shaders. So, in those regards, material settings in blender are generally not supported. Only simple base color texture is allowed in the render. In addition, C3 does not enable webgl render back face culling (through debug, I have found that it is disabled, just as an experiment I have tried forcing enabling it globally, but other C3 non-3DObject objects are not rendered correctly.) There are also other C3 issues around transparency and ordering.

I imagine it works well in the sandbox, since babylon supports full Metallic-Roughness PBR model.

If you want to share a project, so we can experiment, let me know.

The only _slow_ way I know of doing this, would be doing back face culling on the CPU during render in the addon, which would chew up a lot of CPU perf.

Thanks a lot for the thorough response.

Yeah I imagined it wouldn't be able to do much relative to blender materials, but I also imagined backface culling was about as regular as it gets to the point of expecting that be the default, so was surprised when I couldn't get it.

Yeah that CPU culling doesn't sound like a possible solution to be trading that much performance away. When you say force enabling of back face culling causes issues with non-3DObject objects, does that mean if your project just uses 3DObject's then, this could be an option? Or does your followup comment mean there'd also be further issues introduced if trying to take advantage of 3d located particle sprites too like in your 3DMeshPoint example?

I've got a blender, gltf, and minimal project (the model in it) here. Also a minor and not so minor thing, in the editor the 3d model textures are softened-but it does respect the nearest/point setting when you play the scene so it's not a big problem if that can't be resolved. However also, maybe a limitation of C3, possibly a rendering option though, but the softening of the texture also softens the alpha, and this causes that to pierce through other object as seen here (the left side has separated objects where as the right sides are merged so you can see it pierces per object).

Would be awesome if you could make some advancements with this as backface culling is an especially valuable technique when having to work with a more restrictively performant 3D environment, but I can understand if it might not be possible. Appreciate you're still willing to try and tackle it/have already made attempts.

(+1)

Here's a hack method - note how it effects the rotating C3 sprite though! I also have not tried with varying the camera, but I imagine it should be ok.

https://sendgb.com/S4TioXPcFh

Thanks so much for that :) . Looking at it it seems everything by default for some reason is backfacing (you can see the text rendered, even if on a '2D' layer, disappears with back culling).

It'll be a bit awkward, and limiting/additional steps+triangles required (duplicated and normals flipped) to fix areas of a model you actually need to see both sides of. However for the scope of the game I'm wanting to make, this solution will allow me the end result I'm looking for so thank you very much for that. The trick required to finish the effect is having to flip all 3DObject normals before exporting, that way you can hide the 'front facing' faces (that are now back facing), and hide front-facing instead. This way regular construct objects (at least besides construct 3d shapes) will stay visible.