Possible to add 2D Sprites into ARSCNView 3D scenes?

Hello All:

We have an application with an implementation of AR mode with 2D Sprites (ARSKView with sprites.)

We would now like to start adding 3D objects into the scene. My first thought was to simply transition from ARSKView to ARSCNView, but it's clear that all the sprite functionality in ARSKView does not work at all in ARSCNView.

So, it appears one can only use one or the other scene classes, and display either sprites (only) or 3D objects (only).

Has anyone else run into this limitation? Any suggestions from others about how to get around this? I would prefer to preserve all our sprite coding into ARSKView and not "reinvent the world" using 3D objects somehow (and re-invent sprite-like behaviour for most objects, which we want to keep).

Thanks,

Dan Pronovost

Replies

I think you can render a SpriteKit scene as a texture on e.g. a plane geometry in ARSCNView: https://developer.apple.com/documentation/scenekit/scnmaterialproperty

A texture, in turn, can come from any of several sources, such as an image object, a URL to an image file, a specially formatted image or set of images for use as a cube map, or even animated content provided by Core Animation, SpriteKit, or AVFoundation—for the full set of options, see the contents property.

  • Interesting idea... thank you for the suggestion!

Add a Comment