Is it possible to load remote images or models dynamically

A bit of a long shot but… using Dynamic Instantiation (or any other method) is it possible to load a an asset (e.g. image or GLB) at runtime and create an instance of that in Spark AR?

@rbkavin has a great tutorial about instances

Dynamic instance/spawn in Spark AR v102+ With Full Explanation for the Code||Spawn objects|| Rbkavin - YouTube

1 Like

Thanks - I’d seen that video and it was a great help in understanding Dynamic Instantiation but unfortunately it relies on previously imported models.

I’m specifically interested in if it is possible to load a model from a remote server when the effect loads.

It used to be possible to load videos and images with the networking module, but not any more. I think it made the review process too unreliable because the author could swap out assets after the review was done. It’s the same for lens studio.

This is one of the strengths of web AR. I wish the web AR ecosystem had nice tooling like Spark and LS…

Thanks for the info. I figured as much but hoped I was missing something. It’s not really viable to add all assets to the Spark or LS effect in a world tracking scenario where different furniture items can be placed in a room where only a handful may be used out of a larger catalog of items (not just texture changes but model changes too).

Oh well - need to rethink things somewhat.

I had an idea that I didn’t execute because it was such and edge case, but theoretically you could use the deeplink module to send image data into the effect via a native app (ios or android). Then you could use that image data for vertex displacement on some primitive shapes, depending on what type of object it is. This approach has some serious limitations though. It will only work on facebook effects, and I’m not convinced the end result would look great. And since it’s vertex displacement, you basically need to write all of your material shaders from scratch.

Would love that but I think it’s so open to naughtiness.

A semi-solution, imo, would be for spark/facebook to have a separate drive which they can approve stuff on that could connect with spark.