simonbs,
@simonbs@mastodon.social avatar

My contribution to society is an app that puts the user in a permanent rain of confetti 🎉 😄

Screen recording of the Apple Vision Pro simulator showing the user moving around a museum while covered in cofetti.

simonbs,
@simonbs@mastodon.social avatar

Testing a naive approach to make it seem as though the confetti is lying on the ground. It's two particle emitters: one that makes the confetti fall and one that spawns confetti on the ground.

It's not perfect but maybe it's good enough to make the effect feel more convincing 😃

video/mp4

simonbs,
@simonbs@mastodon.social avatar

Tried enabling lightning on the confetti and... I'm not sure I like it? I had expected the confetti to look more convincing but it just seems... Darker 🤷‍♂️

video/mp4

schwa,
@schwa@mastodon.social avatar

deleted_by_author

  • Loading...
  • simonbs,
    @simonbs@mastodon.social avatar

    @schwa "Try on a device" 🥺

    schwa,
    @schwa@mastodon.social avatar

    deleted_by_author

  • Loading...
  • simonbs,
    @simonbs@mastodon.social avatar

    @schwa I can't justify the travel expenses to go to a lab just to test this app 😄

    grork,
    @grork@mastodon.social avatar

    @simonbs can you control the speed here? Like allow people to tap a button and have the motion slow like in a movie (e.g., matrix) so you can look/wander around the confetti, and then click again to get it going.

    I don't think you can do 'gestures' here, so you can't do a finger click thing

    simonbs,
    @simonbs@mastodon.social avatar
    markv,
    @markv@mastodon.social avatar

    @simonbs Thank god the museum isn't on fire 👀

    averyvine,

    @simonbs I can’t wait to experience this kind of stuff myself, such an interesting new category of experiences to discover. Love seeing all of the posts!

    integerpoet,
    @integerpoet@sfba.social avatar

    @simonbs The “robotic” camera movements are sufficiently distracting that I feel like the confetti might be more convincing without them. Maybe a clip in which the camera is stationary for 30 seconds?

    simonbs,
    @simonbs@mastodon.social avatar

    @integerpoet Sorry, you’ll have to live with my robotic camera movements for now.

    skoda,
    @skoda@mastodon.social avatar

    @simonbs It’s absolutely convincing. Said this about game development, but it applies here as well:

    https://mastodon.social/@skoda/111764004970055800

    simonbs,
    @simonbs@mastodon.social avatar

    Anyone want a confetti cannon for their Apple Vision Pro? 😄 🎉

    simonbs,
    @simonbs@mastodon.social avatar

    Can we show a classic SwiftUI window in an immersive space? 🤔

    I’d like to show a window that hosts a few controls to customize the cannon.

    cdoncarroll,
    @cdoncarroll@mstdn.social avatar

    @simonbs yes.

    simonbs,
    @simonbs@mastodon.social avatar

    @cdoncarroll Excellent! Will need to figure out how to do that then 😄

    simonbs,
    @simonbs@mastodon.social avatar

    What I'd really like is to show a classic SwiftUI window and ensure that it cannot be closed because I can't find a good way to let users restore the window once it's closed 🤔

    nighthawk,
    @nighthawk@aus.social avatar

    @simonbs If you don’t want it to be closed then maybe it shouldn’t be a window but just a view. Like attaching a control panel with buttons to the cannon.

    simonbs,
    @simonbs@mastodon.social avatar

    @nighthawk That’s what I’ve ended up doing but then I don’t get the default controls for moving and resizing a window. I hoped there was a way to get those for RealityView attachments, alas.

    nighthawk,
    @nighthawk@aus.social avatar

    @simonbs I went down a similar route with the control panel in my immersive space. Experimented with a window but in actual use I preferred the simple fixed position and have that slightly out of the way, rather than having to manage the window which always spawned in your face and you had to move it out of the way. Would indeed be nice to customise where windows are located when they spawn.

    andyq,

    @simonbs If you are using a RealityView here, you can create attachments which return a SwiftUI view - is that what you were after?

    simonbs,
    @simonbs@mastodon.social avatar

    @andyq I am using a RealityView. I haven’t looked into attachments but maybe that’s the way to go about it. However, I was planning to have a window that’s moved independently of the 3D model. Not sure if that’s possible with attachments.

    andyq,

    @simonbs somthing like:
    RealityView { content, attachments in

    } update: { content, attachments in
    if let att = attachments.entity(for: "window”) {
    att.position = [0, 0.1, 0]
    content.entities[0].addChild(att, preservingWorldTransform: true)
    }
    } attachments: {
    Attachment(id: "window”) {
    VStack {

    }
    }

    simonbs,
    @simonbs@mastodon.social avatar

    @andyq Tried this but it doesn't behave like a standard window on visionOS, which is what I'm going for.

    andyq,

    @simonbs Ahhhhhhh!

    simonbs,
    @simonbs@mastodon.social avatar

    @andyq Turns out standard windows don’t behave like I want them to when presenting along an immersive space. I think I’ll go for an attachment like you suggested. It seems there are no approach that gives me exactly what I want but an attachment seems to come closest.

    simonbs,
    @simonbs@mastodon.social avatar

    If there is anyone experienced with RealityKit out there who has ideas for how I can make this look more realistic, then I’m all ears 😃

    I have a feeling that there are some features in the framework that I’m not taking proper advantage of.

    cameronmcefee,
    @cameronmcefee@mastodon.social avatar

    @simonbs while the confetti is packed together it has more mass and flies faster and farther. Moving through the air, it will start to expand and shed outer layers, losing momentum.

    the confetti needs to come out at a higher velocity as a “ball” and then when it hits the “wall” of air and begins to expand, it needs to slow way down and start to drop

    cameronmcefee,
    @cameronmcefee@mastodon.social avatar

    @simonbs right now it looks like liquid bubbling out of a sporadically pressurized faucet

    simonbs,
    @simonbs@mastodon.social avatar

    @cameronmcefee I hear what you’re saying. I’m not sure a particle emitter can produce this effect. I think I’d have to get fancy with multiple particle emitters to create each phase of the effect.

    cameronmcefee,
    @cameronmcefee@mastodon.social avatar

    @simonbs understood, I’ve never looked at RealityKit so I’m just back-seat animating, sorry

    stuart,

    @simonbs Love it! Materials are your friend, have a play with PhysicallyBasedMaterial as that brings reflections and lighting to the mix in an “easy” way

    simonbs,
    @simonbs@mastodon.social avatar

    @stuart Good idea! I had postponed this because I couldn't find a way to get it working with the 3D software I use but now I found a way to modify the materials of my ModelEntity on runtime 😄

    hyperbolic,

    @simonbs very nice! Did you make the cannon with Reality Composer?

    simonbs,
    @simonbs@mastodon.social avatar

    @hyperbolic Nah, I based it on a model that I found online and edited in spline.design 😊

    hyperbolic,

    @simonbs Ah nice! I’ll have a look into that. Thanks 🙏

    ratkins,
    @ratkins@mastodon.social avatar

    @simonbs Thanks, now I have something stuck in my eye.

    simonbs,
    @simonbs@mastodon.social avatar

    Added a tiny settings view that let users to choose between being surrounded by confetti or FIRING THE CONFETTI CANNON! 🎉 😄

    Recording of Apple Vision Pro simulator showing user surrounded by confetti. Then the user selects the “Cannon” setting after which a 3D cannon appears that the user fires.

    grork,
    @grork@mastodon.social avatar

    @simonbs Does the confetti interact with the ‘room’ you’re in? like, bounce off / pile up out a counter?

    simonbs,
    @simonbs@mastodon.social avatar

    @grork No.

    simonbs,
    @simonbs@mastodon.social avatar

    I have got spatial audio working for the cannon. Please note that audio from the simulator is not included in recordings, so you will just have to take my word for it when I say that it works 😄

    video/mp4

    simonbs,
    @simonbs@mastodon.social avatar

    My confetti app now has an app icon 😃

    video/mp4

    CWilbur,
    @CWilbur@sfba.social avatar

    @simonbs You could add as sound track like the Beatles “Birthday” that dims in volume when you move away but gets louder again when the confetti-maker finds you.

    simonbs,
    @simonbs@mastodon.social avatar

    Thinking about wrapping this up, maybe with one or two more types of confetti, and seeing if Apple will let me put it on the store for a dollar or two to help finance my future Apple Vision Pro purchase 😄

    Adam,

    @simonbs can it also be rain, and interact with the environment?

    simonbs,
    @simonbs@mastodon.social avatar

    @Adam Theoretically, yes l, but plane detection isn’t available in the Vision Pro simulator so I don’t really want to start exploring that before I have a headset.

    arno_app,

    @simonbs to be honest: This a fun idea - do it!

    Maybe add something like a firework or so. I guess people will love this for a dollar or two.

    simonbs,
    @simonbs@mastodon.social avatar

    @arno_app Thanks! I’m not sure if the particle emitters I use on visionOS can do fireworks 🤔

    mikaelacaron,
    @mikaelacaron@swiftdevs.space avatar

    @simonbs with this, what are the actual particles? Like rectangle images? Or are they 3d entities?

    simonbs,
    @simonbs@mastodon.social avatar

    @mikaelacaron Yeah, it’s just 2D images. Do you think it would look better with 3D models?

    mikaelacaron,
    @mikaelacaron@swiftdevs.space avatar

    @simonbs I wasn’t sure! Just curious!

    simonbs,
    @simonbs@mastodon.social avatar

    @mikaelacaron If I can figure out how to create some super simple 3D models then I can try it out 😀

    simonbs,
    @simonbs@mastodon.social avatar

    @mikaelacaron Do you know if ParticleEmitterComponent actually supports 3D particles? I don't see anything but the image property to specify the shape of the particle 🤔

    18+ Starfia,
    @Starfia@mastodon.social avatar

    @simonbs

    And people say climate change isn't real.

    WarnerCrocker,
    @WarnerCrocker@mastodon.social avatar

    @simonbs And you don’t have to clean up the mess!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • cubers
  • rosin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • slotface
  • osvaldo12
  • kavyap
  • khanakhh
  • Durango
  • megavids
  • everett
  • tacticalgear
  • modclub
  • normalnudes
  • ngwrru68w68
  • cisconetworking
  • tester
  • GTA5RPClips
  • Leos
  • anitta
  • provamag3
  • JUstTest
  • lostlight
  • All magazines