• Welcome to Freedom Reborn Archive.
 

Building Meshes

Started by GogglesPizanno, August 09, 2008, 05:23:28 PM

Previous topic - Next topic

GogglesPizanno

Tommyboys map project has prompted me to try playing around with some building ideas I had. Unfortunately I have run into a small snag.

So i have my buildings built and converted into nif files. They can be placed on the map via FFedit, show up in game just fine, path finding works, cars crash into them (when placed in the middle of the street), they cast shadows... But they don't take any damage no matter how much you throw at them. The are super impervious mega buildings (which is funny cause for testing they only have 10 health)

The template is just a copy and rename of an existing building template. The nif file appears to have all the right pieces in it. Does anyone know of some other weird quirk or setting I'm missing?

tommyboy

The checklist for buildings for me goes:
1. Boundingbox for the building. Sounds like you have this.
2. 'buildingname_destruction' version. A special version that is a 'group' of sections shaped to resemble the original. Each section has its own linked boundingbox. As the building takes damage the game engine causes sections to drop down out of sight, and spawns rubble. No '_destruction' version, no  visible damage done, though IIRC you can still destroy the building.
3. I usually copy an existing building's template in the 'templates' tab of the editor, which is just as you are doing..obviously the 'type' should be 'building', not generic or anything else.
4. A copy of 'template.txt' in the building's folder, just containing the name.

Unfortunately the '_destruction' versions can really only be made in Max (though lightwave, or other 3d software that can export .obj could give nifskope fodder, too) as you have to slice up the original mesh into sections, cap any holes, retexture new 'internal' polys with the appropriate tga, and make and limk the boundingboxes, then use 'group' to create a group called 'building'.

Other than that, nothing springs to mind.

If you wanted to upload one of your buildings to rapidshare or somewhere, I'll take a look as I'm playing with buildings a lot at the moment.

ow_tiobe_sb

Quote from: tommyboy on August 09, 2008, 05:39:30 PM
Unfortunately the '_destruction' versions can really only be made in Max (though lightwave, or other 3d software that can export .obj could give nifskope fodder, too) as you have to slice up the original mesh into sections, cap any holes, retexture new 'internal' polys with the appropriate tga, and make and limk the boundingboxes, then use 'group' to create a group called 'building'.
Actually, I posted about making new buildings with gmax (which can be done) some time ago (Ignore the comments about .max files--I believe I lost my mind halfway through my explanation.).  With the NIF exporters for gmax, one can replicate every step you've described, Tom.  gmax can also import .3ds files, just in case you are using Blender (which can export to .3ds) and the Blender NIF exporters, Goggles.  Good luck.  Let me know if there is anything I can do to help. :)

EDIT: Perhaps I'll put together a "Building Building Meshes with gmax" tutorial in the very near future. ;)

ow_tiobe_sb
Phantom Bunburyist and Fop o' th' Morning

GogglesPizanno

So with the help of ow_tiobe_sb and tommyboy, I overcame some of my bigger issues.
As a result Ive made a little more headway on what I'll call my "building_versatile' nif.

I figured there are enough people here that can skope amazingly well, and there are often complaints about the lack of buildings and textures, that I thought what if I tried modeling a building mesh after tommyboys multi piece approach so people could skope their own buildings. Its still in the early stages (and I haven't even contemplated damage versions other than just a single building that falls in one piece when it gets destroyed... but baby steps.

Here is a quick test I threw together tonight just using some stock pieces I created (dont mind the texturing, cause I have little skill there at all when trying to do it from scratch).

Its built on the concept of "floors" so each floor is textured independently rather than needing a single building texture. That allows multi level buildings that could be varied in look greatly by manipulating either pieces on each floor, or the entire floor as a whole. The downside, is that this increases the nif size and the texture sizes (depending on how much stuff is added) but given some of the file sizes and complexity of things the community has been doing (tommyboys New York map) I think it less an issue these days.


style


cmdrkoenig67

Dang!  That's great, Goggles...I've had Max for over a year now and I still can't make anything usable (I, myself have wanted to make buildings and objects for maps)...I'm so envious.

Dana  :banghead: :banghead: :banghead:

tommyboy

Looks good, and a good concept too.

C4

Great job Goggles.  :thumbup:

Blkcasanova247

That's pretty awesome! :thumbup:

ow_tiobe_sb

Nice work, Goggles.  If I am not much mistaken (and I may be), you should make certain that the bottom surface of the foundation of your building is situated at the coordinates [0,0,0].  Based on your NIFSkope WIP pic, it appears that your foundation is located slightly below the x- and y-axes (however, that could be an optical illusion).

I look forward to seeing this released. :)

ow_tiobe_sb
Phantom Bunburyist and Fop o' th' Morning

GogglesPizanno

QuoteIf I am not much mistaken (and I may be), you should make certain that the bottom surface of the foundation of your building is situated at the coordinates [0,0,0].  Based on your NIFSkope WIP pic, it appears that your foundation is located slightly below the x- and y-axes

You are right.
I took the screen shot prior to adjusting it.

Protomorph

That is pretty neat! And Randy's Sharkmen are on parade!

GogglesPizanno

It's an update!
Yay!

After some bumps in design, I made a little more headway on this. The shot below basically shows what can be done with the building in nifscope just by hiding/unhiding and adjusting scale and textures (pay no attention to my temporary ugly textures). Downside is that I still cannot for the life of me get gmax to slice the objects up into damaged versions without problems, so as of now the it falls gloriously in one single piece when health gets to 0.

- Each "floor" is independent and can be assigned its own unique texture.
- Each texture does each side individually, so you can customize down to a specific side of a specific floor
- There are currently 4 "Square" roof types, there is also a couple versions of round buildings (not shown)
- There are individual Pillars in square, round, and greek style
- There is an independent ledge object so the ledges can be sized independently
- Multiple "buildings" can be pasted into a single ninode to build things more complex than just big rectangles

If anyone can think of any kind of "universal" type of object or building component that would work, feel free to make suggestions.
My goal is to get a single floor nif done with all the objects placed and hidden, along with TGA templates for each component.
When this will be released... who knows, as I tend to start and stop on this stuff...  :P



Lunarman

wow, amazing work there. I can think of some great maps these could be used in.

djfredski

 :o  Outstanding :thumbup:

tommyboy

Looking really good there.
With regard to the damaged versions, it may be that the versatile nature is whats mitigating against it.
Unfortunately damaged versions need their sections labeled, attached to a bounding box and then all 'group'ed together. I can't see how you can have that, and hexxable/'skopable parts.
I hope there's a way round it, because I'd very much like to see this implemented.

GogglesPizanno

Actually that isn't the problem I'm having. I think I can make the damage versions work (it definitely takes a bit more planning and moving things around in nifskope though). The problem for me is way more basic than that. I just cant get the actual process for breaking up the mesh.

Ive played with the whole Slice Plane thing and can get the mesh sliced, but I always end up with holes and missing triangles, and vertexes going places unexpected... and don't even get me started on the texturing part. My 3D stuff is fairly basic and limited to simple modeling. Anything beyond that and I start to get bogged down with confusion.

So if any one of the meshers out there would be interested in slicing up a cube-ish nif file and working out the texturing for the "damaged" sides, I would love to be able to test out a proof of concept for a fully destructible building that was skopeable.

cmdrkoenig67

Great looking building meshes, Goggles.  I hope the issues can be worked out.

Dana

tommyboy

Quote from: GogglesPizanno on September 09, 2008, 10:20:52 PM
Ive played with the whole Slice Plane thing and can get the mesh sliced, but I always end up with holes and missing triangles, and vertexes going places unexpected... and don't even get me started on the texturing part. My 3D stuff is fairly basic and limited to simple modeling. Anything beyond that and I start to get bogged down with confusion.

So if any one of the meshers out there would be interested in slicing up a cube-ish nif file and working out the texturing for the "damaged" sides, I would love to be able to test out a proof of concept for a fully destructible building that was skopeable.

Yes, it's a pain.
I've got my own method, which I now present for public perusal. It's using 3dsmax, obviously. Dunno how different Gmax, Wings etc would be.

1. Build model of building, UVmap, texture. At this stage I find it helpful to include a tiny plane hidden inside which is mapped to 'dest_building.tga', so that texture is already 'in' the scene. Save, export etc.

2. Now save the max model as 'name_destruction', a separate max file from your original work.

3. Switch to top view, select all polygons in 'editable mesh' 'polygon' modifier.

4. In 'edit geometry' rollout, select 'slice plane' and tick 'split'. Line the plane up with the model so its pointing straight up and down ie vertical, then click on 'slice', and it should do so. Repeat until you have sliced out a few sections, I usually do 4 or 5 very simple shapes.

5. Now, un-select all polys in 'editable mesh,' then carefully re-select all the polys in only one segment, (which is where the simple shapes and top down view come into their own). Once you have them all selected, in 'edit geometry' click on 'detach', 'as clone' and name it 'section1'. Do the same for all the other sections, till you have your original model and 'section1' to 'section5' (or however many you've done.).

6. Hide everything except 'section1'. Apply modifier 'cap holes'. Apply above it another 'editable mesh' modifier and open up to 'polygon', and there should already be the new 'capped' poly's just added which are pre-selected. If they aren't, then select them manually.

7. Still in the 'editable mesh' modifier with the capped polys selected, click 'detach' (and if necessary 'as clone'). Apply a 'Uvwmap' modifier, and an 'unwrap uvw' to line up the mapping and in the materials rollout assign 'dest_building.tga' to the capped polys. Usually on large buildings you will need to 'tile' the texture in the materials rollout. Check in the renderer to see that everything looks ok and all textures are assigned correctly. If necessary, 'attach' the capped polys back onto the main 'section1'. Check the rendering again.

8. If all looks OK, go to the topmost modifier in the stack, and 'collapse to'. Check in renderer to make sure all textures are still what they should be, where they should be.

9. Clone 'section1', and name the clone 'boundingbox'. Link this boundingbox to section1. If necessary on complex models, use 'optimize' to get the polycount down, or if you prefer, make your own low poly boundinbox and link it to section1.

10. repeat steps 6-9 for all other sections, till you have them all textured and each section with its own boundingbox linked to it, and only it.

11. Delete the original model, and the original model's boundingbox (if there was one, and there should have been).

12. Unhide all your sections and hide all boundingboxes, select everything and use 'group' to create a group. Name the group 'building'. Save, and export as 'name of building_destruction'.

That's what I've been doing, and it seems to work, with destroyable sections and bits left that are stand-upon-able-until-they-too-are-destroyed.
The worst part for me is texturing the 'inside' parts exposed when segments collapse, but even this is becoming easier with practice.