Can more than one model be brought into a scene by the end user?

Hi, I was trying to figure out if there was a way for a user to call in more than one model at a time into an AR scene. For example one button would make a model of a house show up that could be scaled and rotated, then maybe another couple buttons for a car or a tree maybe and put them into the scene as well. I’ve seen some recent Google at products do this with AR core and unity and was just wondering if it were possible in spark AR. Better yet could it be made with patches if it were possible. Any thoughts or feedback would be appreciated.Thanks :+1:

IG and Facebook are a little tedious with custom UI so buttons is quite tricky. The native UI could propose your different options but not on the same scene. Tap to add something on the scene looks like a good option

The phrasing is a little vague, but here’s what the docs say about custom UI:

2.6. Custom controls. Effects must not use custom buttons, keyboards, pickers or sliders - effects may use the native UI picker and slider only.

So it’s true that there’s a rule against custom UI, but I think it only applies to the standard 2d screen blocking type of UI - flat buttons and whatnot. You can create some 3D UI in world space and create tap triggers. One thing to note is that you can’t dynamically spawn new geometry in Spark, so all of your objects will need to exist in the scene graph even before they appear in the scene.

1 Like

Thanks for the quick response guys!
So the UI is less of an issue to me as the adding models/geometry; as you pointed out Josh, there’s workarounds like screen taps or long taps etc…
So Josh is what you’re saying that if I wanted to drop in like 4 houses then the 4 houses would already have to be created together as one imported file then I’d have to parse out visibility? Or am I misunderstanding? Thanks again!

You could make instances of the house by dragging the asset into the scene graph multiple times. If there are multiple unique houses then they can be imported as separate files, no problem. The main point is that you won’t be able to tell Spark to make a new house at runtime - you can only toggle visibility (or scale or whatever)


So if I wanted to allow the user to put multiple instances of a house then in theory the only way to do it is to have multiple instances of the houses already in the filter and to turn the visibility on and off, correct?
There’s no telling Spark through code nor patches to create new instances if I’m understanding you.
Would there be a way to cheat that using render passes? thanks again!

1 Like

no unfortunately no way to “create” scene assets when the effect is launched, everything has to be in the base project :frowning:
So yes in theory if you want the user to put up to 10 houses for example, you’d need 10 of them in your scene and toggle them on one by one.

1 Like

Seems like dynamic instantiation is coming soon… [Scripting] Scene.create / Scene.delete


haha yeah I saw that today, exciting stuff :B

1 Like

Wow that is exciting, thanks for the heads up guys!

Hey guys, so I’m resurrecting this post because I’ve been testing different ways to do this but I got stunted earlier in the process than I thought.
I cut down my project quite a bit so I’m not even trying to have multiple instances of object any more.
Basically I’m starting off with the 3D stickers example after starting off with my own from scratch attempts that ended in failure, and what I get stopped at is how to have each object ( or sticker in the example) have it’s own independent coordinates.
I kept trying to put objects in their own Null objects and give them their own patches, but nothing has worked. Does this mean the only way to make give objects independent movements in space and visibility is through javascript? thanks

mmmh, no I think you should be able to affect them independently. I just opened the 3d sticker template to see what base you’re starting off with and it should work. You’d basically need to add some logic involving the Picker UI (delete their script version and add the patch instead, you should get a pulse signal from it for each option selected). Since you want each option to move individually, you need to retool their screen pans etc to include an “AND” check, that will be connected to the Picker UI as a block to the other options.

Sorry for being late to enter this party,

My first ever effect has a custom buttons from the first time i uploaded it and after 3rd update, it’s still live in my instagram. which means it had been reviewed 4 times (launch, update 1, 2 and 3).

This is the link of my filter:

It’s just a basic beauty/makeup/lut filter, nothing fancy.

I knew about the static text and custom controls rule, but I tried to test it myself to see how strict the rules are, and find a good balance to justify the use of custom buttons and static text by making the 2d text moving and parented to a rectangle in canvas (the text is static, but the rectangle parent position is animated), plus adding some extra animation combination.

somehow it works! I think they make that rule to avoid a cheap/quick and dirty/obnoxious buttons that are not representing instagram ui design, covering the main ui (such as boomerang, handsfree, etc) or replacing the main ui’s function. however it’s just my assumption, it could also simply because i was somehow lucky, or get a pass because I also utilize the picker for lut and slider for intensity where if I put those custom button function in the picker, it would make the user confused because it’s not that intuitive if a filter has too many ui picker that does different functions.

That’s also what i wrote in the instruction note for reviewer, which is to tap picker to choose lut, adjust slider for the intensity and tap additional options on screen to try different combination. tapping them will toggle each element’s visibility before taking photos or videos using the front camera. Buttons will automatically disappear when user switch to back camera, taking photos or videos.

as we can see in the video below, i even named them “Button” with interactive indicator using sdf, added blinking instruction, and entrance animation which make them obvious that it is a custom ui. yet still it gets approval. what do you guys think? is it pure luck? reviewer mistake? or what?

1 Like

I have seen some effects that completely cover the camera feed and are 100% custom UI. The one I’m thinking of in particular is a drum machine that does some really cool stuff with the audio capabilities. It’s not even remotely an AR effect, but somehow it got through. The reviewers are pretty inconsistent with their judgements, so it’s possible that this one will get through just fine. I wouldn’t say that proves a rule though.