Jump to content


Photo

Modular Building Techniques


91 replies to this topic

#26 Lux

Lux

    Advanced Member

  • Member
  • PipPipPip
  • 1575 posts

Posted 24 May 2013 - 04:00 AM

Hey, I'm just getting in to the DR editor so these question may seem obvious to you so please pardon me for being daft :)


As to .ASE creation, directory tree placement, import and export, etc. I was looking for this information in a wiki or something but can't locate it so I'm guessing it has to be gleaned from experimentation?

Is there a link somewhere that has this information?

I've found this and this, though there aren't really any specifics as to .ASE import/export process other than very general information.

I have some questions on this process:

1) Do you have to select the geometry and then "Scripts > Convert to ASE" prior to "Scripts > Export ASE"? If not, what is "Convert to ASE" because at least in the editor it doesn't seem to change the model or do anything though I'm sure it does which is why I'm asking.

2) Can the geometry selected for ASE export be anywhere on your current map or does it need translated to the origin (corner bottom, center, etc) prior to export?
Reason I ask this is because it was mentioned that you should create a map or a series of maps that contain different types of architecture. Do you need to keep the Origin area clear for "new module" creation
and then after the model is exported, translate the particular model away from the origin OR does the option under "Scripts > Export ASE > just check the box for "center objects at 0,0,0 origin" take care of that so
the model can be anywhere on your map and that will give it a center origin on export? (I realize this should not be done for models that rotate or have a rotational point/axis)

3) How do you "Import ASE"? There is no option in any of the menus for this so I'm guessing this is done through the normal "right-click > create model" process? If this is the case then when we export ASE models and it asks the directory path where we want to export it, we have to pick one of the .pk4s like "tdm_models01.pk4 > models > darkmod > <yourfoldernameforyourASEstuff>"? I don't see any way to point the model viewer at other relevant directories so the ASE have to be in this .pk4?

4) How do we export ASE models to a directory that is in .pk4 compressed archive? Are all of the .pk4s in our Doom3/darkmod directory supposed to be unpacked in to their directory structure? Will the model viewer know where to find stuff then or are we just suppose to create the directory outside of the .pk4 in the darkmod directory?

5) Is there a way to do this WITH lighting or entities in place in the module? I realize the light vertex may have to be moved to correct rotational errors but can this be done? Will prefab work for this if not ASE? (I realize you don't want the same rooms with the same entities all over the place in your level however if the objects can all be placed at once, some deleted, rotated, translated, etc, some added in after import, this can still save large chunks of time)

Kinda thinking along the lines of "kitchen_ensemble" or "bedroom_ensemble" SETS of entities/models where you have typical bedroom stuff, 1 or 2 beds, nightstand, desk, rug, candles, speakers, lights, etc. and they're in a packed group, maybe a single 8grid row/column apart, all at origin 0 for the floor of the room -- and you can just import the SET and then move/rotate/delete or add other pieces to add uniqueness. Like doing a group import of a kitchen package one time and then situating stuff where you want it and then adding in some individual flavor. Is this possible?


Thanks.



EDIT: I answered #3 & #4, I created a directory "Doom3 > darkmod > models > darkmod > <yourmodelfoldername>" BUT I had to restart DarkRadiant before the directory would show up in the model editor. After restart my directory structure now appears in DR and I can export to and import from that folder so I've answered the fourth question there.

Edited by Lux, 25 May 2013 - 04:18 PM.


#27 Lux

Lux

    Advanced Member

  • Member
  • PipPipPip
  • 1575 posts

Posted 24 May 2013 - 04:02 AM

<snip>
Please delete. Forum lag post, sorry.

Edited by Lux, 24 May 2013 - 05:03 AM.


#28 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5375 posts

Posted 24 May 2013 - 05:41 AM

BUT I had to restart DarkRadiant before the directory would show up in the model editor.

Or you use File -> reload models :smile:
2.) Yes, it can be anywhere. The script takes the center of the highlighted object as origin.
5.) Use prefabs for this purpose.
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#29 Lux

Lux

    Advanced Member

  • Member
  • PipPipPip
  • 1575 posts

Posted 24 May 2013 - 06:14 AM

The script takes the center of the highlighted object as origin.


Only when you check the box right? This isn't default behavior is it?

5.) Use prefabs for this purpose.


Thank you.

#30 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5375 posts

Posted 24 May 2013 - 01:28 PM

Yep, check the box. If you are using linux you can use my updated version of the script. You can find it on bugs.thedarkmod.com. It provides the option to keep the origin of a func_static if only one is exported.
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#31 Capela

Capela

    Advanced Member

  • Member
  • PipPipPip
  • 582 posts

Posted 24 May 2013 - 02:46 PM

@ Capela: Here is an example of the Modular Building Technique

Posted Image

Posted Image

What I've done is create a corridor with some detailed arches inside it. I new I would need another corridor later on in my map so I cloned it. In theory I now have two corridors for the time and effort of one. To avoid bland repetition I have given each corridor different textures, furnishings and decorations. This only took a few minutes. As you can see all the furniture and decorations are just copy and paste jobs.

I have also tried to keep all modules the same size so they fit together perfectly eg 150x150. However in the examples shown the modules are rectangular. So all I did was double the length so it is now 300x150.


Ok i see what you mean. Sometimes i like to ge way from the map im working and do something like a bulding or some facades that will decide later if i use it or not, and thats work that others can use if they wanted ofcourse. If the community embrasse this kinda a project, we need some kind of rules i think, as you mention the 150x150 size grid for example, a comon site for people put their work so others could download it..etc....So what is your opinion about this.!!!

#32 Fieldmedic

Fieldmedic

    Advanced Member

  • Member
  • PipPipPip
  • 893 posts

Posted 24 May 2013 - 05:02 PM

It's not necessary to restrict oneself to just one grid size. Different architecture erquires different sizes. But as the mappers release their work, you will be able to collect all modules in one big repository

#33 Sir Taffsalot

Sir Taffsalot

    Member

  • Member
  • PipPipPip
  • 1549 posts

Posted 25 May 2013 - 12:48 AM

I've kept to the 150x150 grid size very loosely. Some rooms are smaller and some are larger. A gap in between modules? No problem. Time for a narrow corridor to join the two. Modules overlapping? Just delete part of the overlapping module. I find this gives my museum a more organic feel and makes it feel less blocky.

So while sticking to a grid size does make life easier, I see no reason to stick to it religiously.
"I believe that what doesn't kill you simply makes you... stranger"

The Joker

#34 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5600 posts

Posted 18 June 2013 - 03:02 PM

*
POPULAR

Had a few hours to spare today.

Why not build modules from a reference? It is difficult to invent cool-looking architecture if you are not a trained architect. That's why mappers need to shamelessly steal ide... ehm.. be inspired by real locations.

The finnish national museum would be a nice place to do some taffing. Looks Bridgeporte-y enough at least for me.
Posted Image

Google street view is handy for collecting close up reference images. I recommend it to mappers. Just click yourself to your favourite medieval street or otherwise interesting location and map away.
Posted Image

Building 128x128x128 facade modules according to the reference:
Posted Image

This took a few hours to do. I could already speed-build something simple with these pieces, but need some modules... Few pieces more and I could recreate the whole facade of the museum in TDM.
Posted Image

I get the grime modules for the same trouble as usual. Fun thing with working with reference images is that I could just create similar kind of grime as in the reference pics.

My idea here is to show mappers to see how there really are repetetive features in buildings. You only need spot these features and build one of each of them, and you could create the whole building with the modules in very short time by simply cloning pieces around.
Here is how I think about taking this building apart:
Posted Image
The tower is also easy to break apart. A lazy mapper could replace some unique features with something they built already: like the doorway under the stairs could be replaced with a window module in the first floor, or the arch just at the base of the tower could be replaced with second floor arches seen just below the bay window.

As you can see, there isn't that much work if you build with a clever work flow. Recreating this completely by hand would be very time-consuming.
  • Springheel, Melan, Obsttorte and 2 others like this
Clipper
-The mapper's best friend.

#35 Sir Taffsalot

Sir Taffsalot

    Member

  • Member
  • PipPipPip
  • 1549 posts

Posted 19 June 2013 - 02:07 AM

That's what I did with my cathedral in the city area of VFAT1.

vfat_cat.JPG

It's only made up of three parts. The entrance, the main body of the cathedral and a tower for the corners. You save lots of time and see pleasing results in a just a few hours. Easy.

And yes, Google street view is the mappers best friend. However, if you have the time and money I recommend going to a nice historical city for a weekend break. Not only is this fun but nothing can beat seeing a nice old building in person and taking your own personal pictures.
"I believe that what doesn't kill you simply makes you... stranger"

The Joker

#36 Byrgius

Byrgius

    Member

  • Member
  • PipPip
  • 57 posts

Posted 27 June 2013 - 04:04 PM

I have two questions.

1. How do you actually scale the built-in models?

I've tried with 'Rotate and scale...' but the scale options are disabled when selecting a model.

2. How do you make 1D surfaces for decals?

I tried with thinnest possible cube (0.125) but it leaves odd edges around.

tzl1l.png


#37 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5600 posts

Posted 27 June 2013 - 04:08 PM

1) You do not scale the models. You choose a grid size 128 or something else and stick with it. I mean, the modules are 128 units wide, for example.

2) You use patches for decals.
Clipper
-The mapper's best friend.

#38 Byrgius

Byrgius

    Member

  • Member
  • PipPip
  • 57 posts

Posted 27 June 2013 - 04:40 PM

1) You do not scale the models. You choose a grid size 128 or something else and stick with it. I mean, the modules are 128 units wide, for example.


I used a standard model of doorframe and tried all mansion door models that fit the color of the frame, but none of them fits the frame, so how do I fix that?

tzl1l.png


#39 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5600 posts

Posted 27 June 2013 - 04:45 PM

Make your own doorframe? It is a nice and quick mapper excercise.
Clipper
-The mapper's best friend.

#40 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12156 posts

Posted 27 June 2013 - 05:28 PM

1 - You can scale the included models using the "rotation" spawnarg. For example "rotation" "0.5 0 0 0 0.5 0 0 0 0.5" scales the model to half size in the xyz directions. You have to be careful with it, though, since the shadow mesh doesn't get scaled, and the renderer might think the scaled model isn't visible on the screen, so it disappears.

#41 Bastoc

Bastoc

    Member

  • Member
  • PipPip
  • 36 posts

Posted 08 December 2013 - 06:44 AM

Great stuff! Other noobies might want to have a look, maybe add to important editing list? Now I am wondering, where should I look learn how to convert from func_static to .ase? And then to make skins? On the wiki I found articles about modelling and skins, but with Blender. Is it possible to make everything from DR (provided it is simple geometry, you don't need Blender)? Thanks.
  • Jasp likes this
Jared, is that you ?
Must be rats...

#42 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5600 posts

Posted 08 December 2013 - 06:58 AM

DR has an ase exporter.
It as easy as

1) make model in DR.
2) choose your new model
3) scripts/export ase
4) choose location to save it
5) file/reload models
6) insert model and find you new ase model.

To make skin, you basically make a skins folder in you darkmod folder
make a filename.skin
The contents of the file should be like this:
skin hammer_invisible
{
model  models/darkmod/weapons/hammer.lwo
models/weapons/hammer textures/common/nodraw
models/weapons/hammerhead textures/common/nodraw
}

This a skin called hammer_invisible.
It works for model called models/darkmod/weapons/hammer.lwo

It replaces the following materials with texture/common/nodraw:
models/weapons/hammer
models/weapons/hammerhead

You could easily do a golden hammer, but replacing the texture/common/nodraw with textures/darkmod/metal/flat/gold01

You could explore the lich_queens_demise.pk4 for examples of AI skinning (the lich queen and the invisible ghosts) or module skinning (window modules with dark or lit windows.)
  • Jasp and Bastoc like this
Clipper
-The mapper's best friend.

#43 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36758 posts

Posted 08 December 2013 - 08:57 AM

Is there a trick to making modular prefabs that mix models and brushwork? I'm trying to make some modular buildings that mix the two, but then I can't seem to rotate them without the models getting out of place.

#44 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5600 posts

Posted 08 December 2013 - 09:17 AM

Not that I know of. Why make a mix of models and brushwork?

Either make modular .ase models or just func_statics, that capture a feature of the house, like shown in
http://forums.thedar...post__p__313678

Then mash them together. func_statics allow you to adjust the pieces later, but you lose the memory benefits of models, and you are prone to object corruption if that bug still exists.

I would stick to .ase models, then build the majority of the house with those. Later, you can hide defects or add a layer of hand-crafted func_static pieces, or even better, more ase models.

The whole idea of modular building is to save effort: every single piece you build, you design so that you can simply clone it for more, and you save time and effort, once you begin to have a comprehensive collection of good modules. The downside of the technique is that one needs more discipline, must learn how to design good modules and how to hide or avoid defects like texture seams and overlapping modules (z-fighting).
Clipper
-The mapper's best friend.

#45 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36758 posts

Posted 08 December 2013 - 12:25 PM

Well, brushwork has the benefit of being extremely easy to modify with different textures, whereas making uvmaps and alternate skins for models is far more time-consuming. What I'm trying to do is make a series of mix and match modules for tudor buildings, where each floor is modular, so I can quickly construct a cityscape by stacking different modules. At the moment, I have one model version of the bottom floor for decorative buildings, and a model/brush version that can be used for buildings that can be entered (it has a working door, frex). The layers above that are currently a mix of brushwork (walls/beams&windows) and models (brackets and supports).

But when I load up one of the mid-levels and then rotate it, the support beams underneath get all shifted around.

How would you recommend handling something like that?

Attached Thumbnails

  • tudor_layers01.jpg


#46 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5600 posts

Posted 08 December 2013 - 01:07 PM

I would recommend not making floors modular, but making FACADES modular. That way you could build a building of any shape.

The support beams could be a module sized attachment. By this I mean, making a single facade module, let's say 128x128 units. Then make a beam module that fits this particular module and can just be placed on it.

Look here, a quick mockup
Posted Image
128x128 facade pieces with plaster texture. The support beam module is the one with wood texture.
Caulk denotes a corner module, that makes the facade modules fit together.

Hopefully this makes sense. I have not made exterior modules, only interior, but it should work in principle. You just need to think about the module design.
Clipper
-The mapper's best friend.

#47 RJFerret

RJFerret

    Advanced Member

  • Member
  • PipPipPip
  • 1066 posts

Posted 08 December 2013 - 01:43 PM

But when I load up one of the mid-levels and then rotate it, the support beams underneath get all shifted around.


This was the first pain point I learned, the usual design method of copy/modify can't be done here. The first prefab I loaded into DR essentially exploded in all different directions when I turned it.

As crippling as it sounds, until such time as DR gains the ability to rotate around a common axis, it seems faster to build everything uniquely, then to spend time trying to build an element, then have to rebuild the element (and hopefully not miss a piece that got misplaced) every time you try to use it.
"The measure of a man's character is what he would do if he knew he never would be found out."
- Baron Thomas Babington Macauley

#48 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5375 posts

Posted 08 December 2013 - 02:35 PM

I used a standard model of doorframe and tried all mansion door models that fit the color of the frame, but none of them fits the frame, so how do I fix that?

There is a door prefab fitting into the default doorframes (96x48). Use the skin spawnarg to swap the texture.
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#49 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3669 posts

Posted 03 January 2014 - 03:53 PM

DR has an ase exporter.
It as easy as

1) make model in DR.
2) choose your new model
3) scripts/export ase
4) choose location to save it
5) file/reload models
6) insert model and find you new ase model.


I'm having trouble getting this to work. I can export an ase but how do I do step 6 (find your ase model)? When I right-click->Create Model I don't get a file browser, I get the DR entity explorer which is organised by def files. My saved .ase hasn't magically appeared yet no matter where I try to save it. Sure I must be missing something basic...

EDIT: Also, my .ase file is 6x the size of the map I exported it from! Does it embed the textures too? If so, how to avoid ballooning a map with multiple copies of textures used in several .ases?

EDIT2: I see my first question was answered on the first post on this page. Missed that last night, I'll go try it again.

Edited by SteveL, 04 January 2014 - 04:01 AM.


#50 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36758 posts

Posted 20 December 2014 - 08:32 PM

*
POPULAR

I would recommend not making floors modular, but making FACADES modular.

 

 

 

 

 

 

I went back to experimenting with this, and using strictly model facades instead of trying to make an entire map 'block'.  The results have been a lot more impressive.  I've created a series of facades--regular walls, corners, dead ends, doors, etc--that all connect together.  A mapper builds out his rooms on a 128x128 grid, using simple 4-unit brush walls to seal things.  Then these modules can be inserted in front of the walls as needed.

 

module1.jpg

 

Unlike Sotha, I built my facades in Lightwave.  It took me about a week of working on them to get this far...much of that time was in figuring out how to line them up seamlessly, and working (and reworking and reworking) the uvmaps so they lined up perfectly.  I've learned that the best route is to copy a 128x128 square from DR into Lightwave, center it, and then build the facades so that their origin is exactly at the center of that square.  This will ensure that even corner pieces will line up perfectly.

 

I've already got seven skins working, and could conceivably add many more; a few examples of how different these modules can look are below.

Attached Thumbnails

  • darkmod_2014-12-20_17.03.54.jpg
  • darkmod_2014-12-20_17.10.28.jpg
  • darkmod_2014-12-20_16.58.03.jpg
  • darkmod_2014-12-20_20.37.23.jpg

  • Bikerdude, Melan, jaxa and 7 others like this



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users