Home Technical Talk

Instancing environment pieces with linked/additional objects.

polycounter lvl 9
Offline / Send Message
tynew polycounter lvl 9
Hey guys,

I was wondering what methods do you guys use to quickly swap out modular pieces in Max environments, that have additional objects linked to a wall. For example a brick wall piece which has a cut open window which is one material, then wooden shutters which is a separate object with another material.

So if you ever wanted to swap out that modular piece for window type variants/no window you could do it in one go. 

I initially tried having pre-placed brick wall pieces that did not have a window, and using replace scripts but they have turned out quite buggy reloading the scene.

How does one approach this?

Image for example:

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    I would simply snap the solid wall to the windowed one, then delete the windowed one.

    I use Layers to help me organize assets like this. I would put the windowed walls in a different layer from the solid walls. Makes it easier to select/hide/freeze overlapping assets.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    If you're using UE4 you can do what Eric suggested by simply selecting a mesh in the content browser (that you want) and the one in the level(that you want to replace), clicking the arrow under Static Mesh in the details panel, and swapping out any static mesh for another.
  • tynew
    Options
    Offline / Send Message
    tynew polycounter lvl 9
    That might have come across a bit differently to how I was trying to explain it.

    Try this:

    In Max is there a way to mass replace instanced environment walls with a wall piece that has a linked window shutter to it?

    - Using substitute modifier and various scripts does not retain the linked window shutter.

    According to the 3dsmax Help file it says linking and instancing objects are not advised to go hand in hand. So I'm wondering how window shutter meshes or any kind of additional objects are placed as manually placing them for hundreds of walls seems impractical?

    Example (ignore script it breaks upon reloading max scene):
    I have this:

    But want to achieve this result in the image below without manually placing the walls AND manually placing the window shutter meshes (highlighted in green above image) to fill in the holes

  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    I'm not a max user and don't really know the terminology, but you would want everything to be combined into one object. So you replace wall-plain, with wall-window or wall-door etc... Some people call these sets and after you develop the basics, you can go in and add more and more pieces, look up any of Joel Burgess's GDC talks on modular level design to get a better idea.

    Also make sure your pivots correspond so the pieces match up. It is also adviseable to have these unique details on the same texture set in case you decide to put a window and a door on a section of wall. If you had a separate window and door material, you end up with an extra unique material and thus an extra draw call.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Why not break the link and attach the window mesh instead? As m4dcow says you should create a kit. So you might have, say, 10 different types of wall sections. Also, what engine are you going to be  using? 
  • Eric Chadwick
    Options
    Offline / Send Message
    Yeah. The game engine matters.

    If you're creating game assets, then you'll be assembling the buildings inside the game editor, not in Max. In Unity I would use Prefabs to solve this.

    But if you're rendering in Max, like maybe archviz, then you can get away with attaching pieces together. Because draw calls don't matter at all.
Sign In or Register to comment.