mastodon.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
The original server operated by the Mastodon gGmbH non-profit

Administered by:

Server stats:

357K
active users

Brandon

Another feedback - FB12577394 - I think the use of skyboxes to create immersive spaces is going to be immensely commonplace. Having an easy-to-use API to build a skybox and use it as a generated shape could help accelerate development. Right now, creating a skybox is loading a texture, applying it to an unlit material, generating a sphere, inverting the sphere, and placing the sphere.

@branfonk not just skyboxes. I couldn’t figure out a way to apply a material to the back faces of any object using RealityKit. Perhaps I missed something, but duplicating the entity with this scale trick was the only way that worked

@stuart I’m no 3D expert, but I think this is the best technique, or inverting the normals so they point inward. In general, I think this is an area where additional APIs could help; building out an immersive space is awesome to have so much control over the environment, but I’m going to guess that most apps are going to want to enclose the user in a virtual environment entirely, at least in `.progressive` or `.full`, and this is the only technique I’ve seen to do that with an image.

@branfonk there’s options on an SCNMaterial that allow you to manage culling and whether it’s double sided. These just haven’t made it to RealityKit. For my purposes here’s the setup I ended up with. They *may* be a way to get a geometry shader involved, but still, it shouldn’t be that complex.

@mrdeerwhale

Perhaps you've got some insight on a "better" way to achieving inverted/double sided meshes using shader graphs?

@stuart I did try to just reverse the normals on a one sided mesh in RCP and that didn’t yield any result, other than a weird shading. The culling is maybe based purely on vertex winding order which wouldn’t be something we can alter via material. For some reason I recall seeing somewhere that double sided wasn’t possible for ShaderGraphMaterial although I may have imagined that. So I guess just make two meshes with opposite normals is the stopgap. If I find specifics I’ll share.

@stuart or yeah your method of scaling -1 works better than loading a separate mesh with reversed normals if it gives reliable results

@stuart This seems like the best approach for the time being, though I’m curious if any other solutions come up on this. I pulled this idea from one of the WWDC slack sessions, and I also see it’s what was used in the “World” and “Destination Video” visionOS sample code. I’d love to see some improvements on ease of creating skyboxes and objects that surround a user as I think that will be super common in immersive spaces.