Crash180 Posted March 4 Share Posted March 4 I am trying to figure out how to modify/create functional doors (not load doors) and haven't found much in the way of resources. I saw one for 3ds MAX but I am using Blender. So I experimented by importing a Painted Door, removing the broken glass and then exporting it. I pasted in the missing branches that were removed from importing and was able to bring it in game but it had no collision and I could not interact with it. I pasted in the collision from the source file and that didn't work. I created my own collision and I was able to interact with it but it did not move and I could walk through it. I am looking for any advice or guides that can help me out. Link to comment Share on other sites More sharing options...
robotized Posted March 5 Share Posted March 5 If editing in Blender is messing with nif structure, then use original nif. From edited nif copy branch on the BSTriShape of the door and paste it in the original. Then save the original with different name - this will be your custom door. Nif of doors have animations - sequences for opening /closing of the door. BSTriShape of the door must go under the NiNode that is animated. I'm not sure how important this is, but I'm guessing if you copy a new BSTriShape and remove the existing one, you have to make appropriate changes to the NiDefaultAVObjectPalette. The name is entered manually, for AVObject you enter the number, which is in front of the BSTriShape. I'm by no means an expert in this kind of editing, so hopefully I'm not wrong about these things. Also for simple edits, maybe you can consider using Outfit Studio, because I think it doesn't mess with the nif structure. Like if you want to remove vertices from a mesh. Speaking of, when removing part of the mesh, it leaves a hole, but the collision is still there so in the game bullets will not go through. In NifSkope you can assign new material to the BSTriShape and edit the UV if necessary. Link to comment Share on other sites More sharing options...
pepperman35 Posted March 5 Share Posted March 5 I don't use blender but I would imagine that blender has a way to export animated objects as well as static objects. When you export a door from 3ds max you have to select the animated one so explore that in blender. Link to comment Share on other sites More sharing options...
RoNin1971 Posted March 6 Share Posted March 6 I created a few in Blender. Just the model. exported to 3ds, made an animated-static as collision and did the animation with Gamebryo style [edit: With Nifskope]. (using vanilla vault doors as example). its a bit of work, but it does the trick. edit: Robotized is fairly correct. It is usually the quickest way to copy and replace an original door. It does depend on the animation sequence though. Just take a good look at a few 'vanilla' versions as example. (The ones with gamebryo animation (as that's defined inside the nif). It should be possible to export .hkx data from 3DS, but I never tried. I prefer the gamebryo method. From Blender it depends on what you are using as exporter. I would recommend PyNifly (https://github.com/BadDogSkyrim/PyNifly) It is the most useful plugin around for this kind of work. The latest versions even seem to support some animation, but as I'm sticking to an older version I have no idea how much and what kind. (I'm guessing gamebryo) Doors, however, are usually the same size as they need to fit the same hole. They frequently open/close in a similar fashion, leaving just the 'design' to be different. That makes the 'copy&replace mesh' method a very viable one. Link to comment Share on other sites More sharing options...
Crash180 Posted March 7 Author Share Posted March 7 Thank you robotized. You were not wrong. I now have a working door without glass. Small steps. The door did animate without the AVObject edit but it seems best to do it since the original one was. My next experiment was that since objects can pass through the window opening I would put a board across it which means replacing the collision. I made the collision as I have done others but it breaks it somehow and I can walk through the door again. I can use the Painted Door without windows to get the full collision and that works but I am curious why it breaks when replaced. I don't have 3DS so I am using Blender 3.5.1 and Pynifly 4.3. Before selecting this combo I tried the newest of both and some in between and if I remember right they all stripped NiNodes, Collisions, ConnectionPoints and now NiControllerManager. Editor Markers to get imported. I always have to remake or paste back in what I need. Don't know if this is a limitation of Blender or Pynifly. Link to comment Share on other sites More sharing options...
robotized Posted March 7 Share Posted March 7 Can't tell you anything on creating collision. If objects and bullets go through, then the part where the glass was did not have collision to begin with. If you want this part of the door to have collision, use the nif of a similar door, which doesn't have glass - for example PaintedWoodDoor01.nif. Put the BSTriShape of your edited door there instead. Some doors have door knob animations as well. And if you are making a workshop door, make sure you use the nif of one, because it contains connect points for snapping the doors in place. Link to comment Share on other sites More sharing options...
RoNin1971 Posted March 7 Share Posted March 7 it depends on what you replaced. The doors usually have 'multiple' collisions. But it only looks like that. I think they use proxies or something. Anyway, you can't replace a part Just everything or you can add a new piece. Link to comment Share on other sites More sharing options...
pepperman35 Posted March 7 Share Posted March 7 Procedurally speaking, one can get carried away with collisions which at the end of the day add very little. If we take PaintedWoodDoorWin01.nif as the example, one could separate the mesh into four separate meshes: wooden door, the glass windows, the brass hardware of the animating wooden door, and the brass hardware of the stationary (static) component. You could assign collision materials to each of these four meshes: wooden door (wood); the glass windows (glass); the brass hardware of the animating wooden door (metal) and the brass hardware of the stationary (static) component (metal). In doing this, one would hear a different sound when each of these components were shot in game. But is the juice worth the squeeze? Granted, separated these out could have a secondary benefit by enabling more detailed textures to be applied to those components. For this example, I’d separate the glass panes and assign a BSEffectsShaderProperty (see Res01ModernDoorStorm01Static.nif) as an example. I may or may not separated the brass components, depending on whether I wanted a more detailed texture there. I’d likely make only one collision (a box having 96 x 5.758 x 168 game units for the width, depth, and height) for the entire thing and assign a wood collision material to it. This would give you collision for the entire wooden part of the door, yet allow you to see through the glass. If my OCD was getting the best of me, I might make a box or cylinder collision component to cover the door knob. Link to comment Share on other sites More sharing options...
RoNin1971 Posted March 7 Share Posted March 7 hmmm, I don't see how a more complex collision helps with textures. It is more likely the other way around. For example, I just did a few subwaytunnels. One 'part' or 'mesh' within those nifs is a piece of railroad. The texture covers the entire mesh. Both the wood and the steel beams. Using the mesh to create the collision you can however only assign either wood or metal. Not both. To do so you would need to split the mesh, to separate the wood from the metal. Many textures & meshes are like that. Although creating a big box with the size of the door will work just as good and hardly anyone will ever notice the metal sounds like wood. One of my first mods was the wide vault door, as a modders resource. That one works like any other vault door, with just a 'box' for the collision. It's almost fully metal, so that's ok, but it has a window too. It probably sounds like metal, but I never shot at it You could use that one as example. Although it is different from most normal doors, as it works (& looks) exactly like the Vault 111 doors. The most important thing I learned with that is that you need an 'animated-static' for the collision to be moveable. Using a regular static doesn't work, even though it looks like it does in CK, but no go in-game. These are typically purple of color in CK. BTW: if you look at the collision of a door with CK, you will notice the red (static) & purple (door) all together. Inside the nif you will however find multiple BhkCollisionObjects. Each of these refers to a part of it, but in the end there is only 1 piece of collision data containing it all. So, you can't delete and replace a part of it. Just delete and replace ALL of it. (you can use quite a lot of various copied collisions to 'construct' something.) Link to comment Share on other sites More sharing options...
Crash180 Posted March 7 Author Share Posted March 7 I replaced the collision in the same node as the BSTriShape door model itself. Guessing it broke some link. I'll see if there is another collision I overlooked. Was asking because I have a little OCD and I will want the correct sounds on most elements. The challenge for me is to not go down the rabbit hole. I spend too much time as it is making things just right in a post apocalyptic world. Thank you everyone. This has been very helpful. Link to comment Share on other sites More sharing options...
Recommended Posts