Announcement

Collapse
No announcement yet.

VR Dev - How to get models ready to make them interactive? (Specifically Buttons)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by MostHost LA View Post
    I would go a completely different route first to prevent VR from lagging.

    Normal maps.
    You just apply a different normal map to the button when it's up possibly with tessellation if that works right in VR.
    and you swap that material normal map out when its pressed.

    That way you arey't calling in animations and wasting resources to do the same thing that a decent size normal map (loaded once for all the buttons since they are the same) can do.
    Meaning you can have way more phones in the scene then you could otherwise by making them animated with separate animations.

    Otherwise, the bone manipulation would be a better way to go.
    you just define a press length, a press duration and a starting place (vectors) and you interp between them to make it smooth.
    it's not easy, mostly because defining the space length on a moving object gets complicated.
    you could use local offsets on the bones though - costs more then world space I believe but gives you easier math.

    either way because you want this to happen on every phone and you want players to interact you may need to make sure you can replicate the button press across networks too.
    there's a lot to it or nothing at all depending on how you want to go about it.
    Thank you for your help. I'll try out your suggestions and find one that works the best for this project. I never would have thought such a simple component would be so ambitious, oi vey.

    Leave a comment:


  • replied
    I would go a completely different route first to prevent VR from lagging.

    Normal maps.
    You just apply a different normal map to the button when it's up possibly with tessellation if that works right in VR.
    and you swap that material normal map out when its pressed.

    That way you arey't calling in animations and wasting resources to do the same thing that a decent size normal map (loaded once for all the buttons since they are the same) can do.
    Meaning you can have way more phones in the scene then you could otherwise by making them animated with separate animations.

    Otherwise, the bone manipulation would be a better way to go.
    you just define a press length, a press duration and a starting place (vectors) and you interp between them to make it smooth.
    it's not easy, mostly because defining the space length on a moving object gets complicated.
    you could use local offsets on the bones though - costs more then world space I believe but gives you easier math.

    either way because you want this to happen on every phone and you want players to interact you may need to make sure you can replicate the button press across networks too.
    there's a lot to it or nothing at all depending on how you want to go about it.

    Leave a comment:


  • replied
    Originally posted by MostHost LA View Post
    You can either manipulate the bone or play an animation

    Manipulating the bone is harder but may be less expensive file size wise.
    playing an animation is pretty simple, you can attach the anim BP to the skeletal mesh and have the animations play out depending on variables you pass to them.

    You could even do it all in BP via montages since it's just a button press sort of thing.

    It really all depends on your usage case.

    What is the intended use? Who will be using it and what buttons will they press?
    keyboard, mouse, screen, controller - etc.

    Based on that you can figure out which rout to take and how to code it.

    The general idea is that every player would be given a phone. With the 0-9 buttons being pressable. Players would be using the Vive Controllers/Index Knuckles/Oculus Hands to interact with the buttons and handset.

    The actors are set to be moveable, and I need to anchor down at least the buttons to the mesh, as well as make them pushable by the player.

    I'm trying to make it intricate, as it is a main feature of the project I am working on, but boy howdy has it stumped me. Thank you again.

    Leave a comment:


  • replied
    You can either manipulate the bone or play an animation

    Manipulating the bone is harder but may be less expensive file size wise.
    playing an animation is pretty simple, you can attach the anim BP to the skeletal mesh and have the animations play out depending on variables you pass to them.

    You could even do it all in BP via montages since it's just a button press sort of thing.

    It really all depends on your usage case.

    What is the intended use? Who will be using it and what buttons will they press?
    keyboard, mouse, screen, controller - etc.

    Based on that you can figure out which rout to take and how to code it.

    Leave a comment:


  • replied
    Originally posted by Enter Reality View Post
    You can either set the animation inside UE4, but you need to export the buttons separately, one by one, so that you can create the animation setup for each one, or you can rig the entire phone, assigning a joint for each button, then bake the animation for each of the button and export it into UE4.

    For the first option I suggest to create a BP for each button, and adding an OnBeginOverlap event, that will trigger the button animation.
    For the animation of the button you can simply use a timeline, so that you will move the button on its vertical axis.

    For the second option, you can also create a BP with the same OnBegin Overlap, but for the animation you need to create the entire thing using an Animation Blueprint, and create the setup there in order to trigger the animations, accordingly to what button is pressed.
    Thank you for the reply.

    I think I will go with the second option, I have rigged the buttons on the phone with Armatures. To clarify, when you say bake the animations do you mean create the pressing animations in Blender, or animate the rigged mesh in Unreal?

    Looks like I ended up doing the first option, as separating meshes creates, well, new mesh.

    Is there an easy way of getting all these buttons and the handset attached? Parent/Child?

    I really do appreciate the help.
    Last edited by Jman552; 07-08-2019, 08:17 PM.

    Leave a comment:


  • replied
    You can either set the animation inside UE4, but you need to export the buttons separately, one by one, so that you can create the animation setup for each one, or you can rig the entire phone, assigning a joint for each button, then bake the animation for each of the button and export it into UE4.

    For the first option I suggest to create a BP for each button, and adding an OnBeginOverlap event, that will trigger the button animation.
    For the animation of the button you can simply use a timeline, so that you will move the button on its vertical axis.

    For the second option, you can also create a BP with the same OnBegin Overlap, but for the animation you need to create the entire thing using an Animation Blueprint, and create the setup there in order to trigger the animations, accordingly to what button is pressed.

    Leave a comment:


  • VR Dev - How to get models ready to make them interactive? (Specifically Buttons)

    Hello, I apologize if this is a stupid question.

    To give some context, I made a phone model in blender, and I want the buttons to be pressable by the player. As in, sink into the phone and actually look like a button.

    Would I need to import animations I create into UE4? Or would I have to set up the model in a way so that they are able to move, but don't have any animations set per say? If so, how would I go about doing it?

    Pic related, it's the phone base. Just to provide some idea of what I'm dealing with.

    I would appreciate any pointers you'd be able to give me. Thank you.
Working...
X