SteamVR

SteamVR

SteamVR Workshop
Customize your SteamVR experience by finding new backgrounds, 3D environments, controllers and base station models.
Learn More
How to setup models in Blender for certain functionality
Hi, I'm trying to make two things in particular:
A door with a handle (animated like the Valve doors, with handles that move and are attached to the door),
And a key with a tag (the tag having gravity).

I know that with some objects on the Scripted Item Test Range, they have parts that have basic gravity (loops on the ends of the locomotion tool), which is what I'm looking for.

As for the door, I have no idea. The documentation I could find was unclear/ old, or for something like characters rather than things like doors.

Does anyone know how I could do this? Thanks!

Oh, and I want to make the key be able to be put in the door handle keyhole and then be turned. If the key could still have gravity somehow that would be nice.

I also tried exporting a model from blender but it gave an error:
Failed to find subtool: 'subtools/netgraph_subtool.dll'.
The model is just shown as the Error Text and nothing else. I tried exporting the entire scene from Blender.
Last edited by Nolan the Fox; 14 Mar, 2022 @ 11:30am
< >
Showing 1-15 of 25 comments
Rectus 13 14 Mar, 2022 @ 1:38pm 
Animated models need to be set up with a single armature, and the animations can only animate the bones in the armature, not the objects directly. The Source 2 tools can't import animations from FBX files exported from Blender, so you will have to use the Blender Source Tools addon to export separate DMX files for the model and each animation.

My old guide should still be relevant for this (ignore the FBX part and export the mesh the same way the animations are exported):
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=890780029

The strap on the locomotion tool uses cloth physics, which is extremely annoying and complicated to set up. The model editor shipped with SteamVR Home is out of date, and most of the cloth features are broken. If you really want to do it, the best option would probably be to set it up with the Alyx tools using this guide, and then copy over the compilled model to your SteamVR addon.
https://wiki.facepunch.com/sbox/Cloth_Physics
Nolan the Fox 8 14 Mar, 2022 @ 2:11pm 
Originally posted by Rectus:
Animated models need to be set up with a single armature, and the animations can only animate the bones in the armature, not the objects directly. The Source 2 tools can't import animations from FBX files exported from Blender, so you will have to use the Blender Source Tools addon to export separate DMX files for the model and each animation.

My old guide should still be relevant for this (ignore the FBX part and export the mesh the same way the animations are exported):
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=890780029

The strap on the locomotion tool uses cloth physics, which is extremely annoying and complicated to set up. The model editor shipped with SteamVR Home is out of date, and most of the cloth features are broken. If you really want to do it, the best option would probably be to set it up with the Alyx tools using this guide, and then copy over the compilled model to your SteamVR addon.
https://wiki.facepunch.com/sbox/Cloth_Physics
Ok, thank you.
Nolan the Fox 8 14 Mar, 2022 @ 2:22pm 
I am still kind of confused on how I should set up the armatures and animations.
https://photos.app.goo.gl/m1fSzsej8Xj2Pz3Q9
This is what I have, a door and a handle (separate objects).
I need to add each animation in the Action editor right? 3 Actions, Idle, Locked, and Open?
How should the armature be set up, though? Like the bones?

I wonder if there's a simpler way to achieve this, without having to make animations. I don't know.
Last edited by Nolan the Fox; 14 Mar, 2022 @ 2:25pm
Rectus 13 14 Mar, 2022 @ 2:31pm 
You usually want one bone for each moving part, located with the head at the pivot point of where it will be rotating from.

It is possible to do it without animated props. The easiest way would be making it out of Hammer meshes with each part being a func_door_rotating.
Nolan the Fox 8 14 Mar, 2022 @ 2:39pm 
Originally posted by Rectus:
You usually want one bone for each moving part, located with the head at the pivot point of where it will be rotating from.

It is possible to do it without animated props. The easiest way would be making it out of Hammer meshes with each part being a func_door_rotating.
Ok, thanks. So I could just make the handle a prop rotating, and the door, and somehow use logic to make them work with one another?

Also, I just tried it, I think I got it to work with the armature:
https://photos.app.goo.gl/6Y5Kx5Jz8DYX3Nvv9
Both the door and the handle have an armature modifier, a vertex group named the same as their respective bones, and the handle bone is connected to the door bone. The door and handle are still separate objects.
Nolan the Fox 8 14 Mar, 2022 @ 3:04pm 
Right, I've got my actions. Now I guess I can just export it.
https://photos.app.goo.gl/zNRB18DiCGcyP5bg9
Nolan the Fox 8 14 Mar, 2022 @ 3:39pm 
Originally posted by Rectus:
Animated models need to be set up with a single armature, and the animations can only animate the bones in the armature, not the objects directly. The Source 2 tools can't import animations from FBX files exported from Blender, so you will have to use the Blender Source Tools addon to export separate DMX files for the model and each animation.

My old guide should still be relevant for this (ignore the FBX part and export the mesh the same way the animations are exported):
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=890780029

The strap on the locomotion tool uses cloth physics, which is extremely annoying and complicated to set up. The model editor shipped with SteamVR Home is out of date, and most of the cloth features are broken. If you really want to do it, the best option would probably be to set it up with the Alyx tools using this guide, and then copy over the compilled model to your SteamVR addon.
https://wiki.facepunch.com/sbox/Cloth_Physics
I've imported it into Source's Model Editor and it has the animations, but all my materials say "error" and have the red wireframe error material. I tried making them with the names they have in Blender but it didn't change a thing.
Last edited by Nolan the Fox; 14 Mar, 2022 @ 3:40pm
Nolan the Fox 8 14 Mar, 2022 @ 4:54pm 
I got it to work now, but now I need to get the handle in as a bodygroup. I don't know how.

Edit: I tried adding the doors to a test map and try them out, but they won't move. They won't even glow when you put your controller over them. I don't know why. I'm using a prop_door_rotating.
Last edited by Nolan the Fox; 14 Mar, 2022 @ 5:42pm
Nolan the Fox 8 14 Mar, 2022 @ 6:14pm 
Also, every time I make a new material, when I first save it, it says, '[material's name].vmat' is overriden by a leafier Mod.
What does that mean?
Rectus 13 15 Mar, 2022 @ 2:12am 
Originally posted by Fox G∆MING/Nolan the Fox:
I got it to work now, but now I need to get the handle in as a bodygroup. I don't know how.

Edit: I tried adding the doors to a test map and try them out, but they won't move. They won't even glow when you put your controller over them. I don't know why. I'm using a prop_door_rotating.

I don't think prop_door_rotating works. You would have to make any door logic yourself.



Originally posted by Fox G∆MING/Nolan the Fox:
Also, every time I make a new material, when I first save it, it says, '[material's name].vmat' is overriden by a leafier Mod.
What does that mean?

You need to save the material inside the folder of the current addon.
Nolan the Fox 8 15 Mar, 2022 @ 9:26am 
Originally posted by Rectus:
Originally posted by Fox G∆MING/Nolan the Fox:
I got it to work now, but now I need to get the handle in as a bodygroup. I don't know how.

Edit: I tried adding the doors to a test map and try them out, but they won't move. They won't even glow when you put your controller over them. I don't know why. I'm using a prop_door_rotating.

I don't think prop_door_rotating works. You would have to make any door logic yourself.



Originally posted by Fox G∆MING/Nolan the Fox:
Also, every time I make a new material, when I first save it, it says, '[material's name].vmat' is overriden by a leafier Mod.
What does that mean?

You need to save the material inside the folder of the current addon.
Ah, alright. I used it in another map with a model and it did work. Part of the c17 Asset Pack. I even copied the keys from it and pasted it on my door and it didn't work, so I don't know what's up with that. The c17 door would work though.

Ok, thanks. I have, which is the strange thing.

I ended up importing in everything, and, well, the scale seems off. I should have just made the map in Source. I thought it might be less painful to do it in Blender. I guess not. Some of the models also have really weird lighting/shading issues, which I can only describe as making them look like salami, lol. There are dark spots and white spots all over the mesh.

Either way, thanks for your help! I'm sure I could apply this to future projects.


One other random comment/question, but on my other maps, your scripted item test range files seem to have broken or something. I built an elevator in a couple of my maps and it would work fine but then for a while now the gravity seems to be broken. The elevator'll move up and you'll stay in place, and not go up. It used to work, but not now. I don't know why, I didn't even change anything. I just came back to the map in SteamVR one day and it wasn't working on any of them.
Last edited by Nolan the Fox; 15 Mar, 2022 @ 9:29am
Rectus 13 15 Mar, 2022 @ 9:43am 
Originally posted by Fox G∆MING/Nolan the Fox:

One other random comment/question, but on my other maps, your scripted item test range files seem to have broken or something. I built an elevator in a couple of my maps and it would work fine but then for a while now the gravity seems to be broken. The elevator'll move up and you'll stay in place, and not go up. It used to work, but not now. I don't know why, I didn't even change anything. I just came back to the map in SteamVR one day and it wasn't working on any of them.

I haven't updated the map since 2020. I might have set the default settings to not to do forced player locomotion, which would break elevators. It should be changeable in the settings menu. Do all the other locomotion features work?
Nolan the Fox 8 15 Mar, 2022 @ 9:58am 
Originally posted by Rectus:
Originally posted by Fox G∆MING/Nolan the Fox:

One other random comment/question, but on my other maps, your scripted item test range files seem to have broken or something. I built an elevator in a couple of my maps and it would work fine but then for a while now the gravity seems to be broken. The elevator'll move up and you'll stay in place, and not go up. It used to work, but not now. I don't know why, I didn't even change anything. I just came back to the map in SteamVR one day and it wasn't working on any of them.

I haven't updated the map since 2020. I might have set the default settings to not to do forced player locomotion, which would break elevators. It should be changeable in the settings menu. Do all the other locomotion features work?
Let me check. I think they do.
Nolan the Fox 8 15 Mar, 2022 @ 10:09am 
Originally posted by Rectus:
Originally posted by Fox G∆MING/Nolan the Fox:

One other random comment/question, but on my other maps, your scripted item test range files seem to have broken or something. I built an elevator in a couple of my maps and it would work fine but then for a while now the gravity seems to be broken. The elevator'll move up and you'll stay in place, and not go up. It used to work, but not now. I don't know why, I didn't even change anything. I just came back to the map in SteamVR one day and it wasn't working on any of them.

I haven't updated the map since 2020. I might have set the default settings to not to do forced player locomotion, which would break elevators. It should be changeable in the settings menu. Do all the other locomotion features work?
The other things seem to.
The elevator on your map seems to work for a bit, but as it goes up you slowly sink through it until you are stuck midair.
Rectus 13 15 Mar, 2022 @ 10:18am 
The locomotion system was never very reliable, not sure if it is possible to fix without acutal support from Valve. One thing that might affect it is frame rate, make sure you're not running slow.
< >
Showing 1-15 of 25 comments
Per page: 1530 50