Home Unity

Unity Level Design Question

polycounter lvl 9
Offline / Send Message
apollo580 polycounter lvl 9

I’m working on a game that involves a spaceship that can be exited and entered. Basically I modeled the outside and now I will be working on the interior. My first question is how I should model the walls, should I model the floor as one giant piece and then the side walls as one piece and finally the roof as one piece? What is the best method? Or should I model the walls in chunks so I can reuse them and change the design and such?

 

My last question is how to go about connecting each section. In Zbrush I can model the walls and line them up but once I retopologize the walls might be slightly off since the vertices will be slightly off in the retoplogized model. How are sections usually connected in unity so they line up perfectly and sort of snap together? This is a 3D game btw. Any help will be appreciated 

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Interiors in games are almost always made as separate scenes from the exteriors. This is so you can easily remove unseen detail.

    Similar thing with each room. The entire interior of a ship (or game level) is one scene. But each room is a separate set of meshes. And you use Occluders in Unity to hide what is not immediately seen.

    Build the interior using modular pieces.
    http://wiki.polycount.com/wiki/Modular_environments
  • apollo580
    Options
    Offline / Send Message
    apollo580 polycounter lvl 9
    Interiors in games are almost always made as separate scenes from the exteriors. This is so you can easily remove unseen detail.

    Similar thing with each room. The entire interior of a ship (or game level) is one scene. But each room is a separate set of meshes. And you use Occluders in Unity to hide what is not immediately seen.

    Build the interior using modular pieces.
    http://wiki.polycount.com/wiki/Modular_environments
    I guess my question is how do they do it with games like Space Engineers? It seems to be a seamless transition from the inside of the ship to the outside. If I were to make it a seamless transition then would multiplayer still work since the characters are in 2 different scenes?
  • Eric Chadwick
    Options
    Offline / Send Message
    I haven't played Space Engineers. But looking at the video, I don't see any evidence to the contrary.

    In a game engine you can load parts of multiple scenes at the same time. It just makes things easier in terms of authoring and organization, as well as being able to unload whole areas when you don't need to see them.

    For example, distant ships don't need to render their interiors. Waste of rendering resources. Another example, when you're inside the cockpit, you don't need to render the engine room.

    Multiplayer works by each client only rendering what they alone need to see. However they share world-space updates. Physical interactions, score, time, etc. As little info as possible is sent between clients.

    How much data to send also depends on how much cheating you want to circumvent. People can make local changes to their assets to try to gain advantage, for example trying to make their ship's physics shape super small so it's harder to hit. Most games check this data on load, and periodically during play, to try to stop this kind of crap.

    Anyhow the loading and unloading of interior/exterior assets is done by the programmers. As an artist, all I need to do is divide things up into manageable chunks, and make sure assets line up properly.
  • RyanB
    Options
    Offline / Send Message
    More pieces = more drawcalls = more time on GPU = lower frame rate.

    Depending on what platform you intend to make your game on, you may be able to get away with lots of individual pieces.  But, on a mobile iOS game you would probably want to weld everything together as much as possible.  Don't aim for perfection, but try and reduce those drawcalls as much as you can.

    Each drawcall can take a variable amount of time that depends on the shader, the texture quality, texture size, lighting, etc. 

    Use the profiler and frame debugger to look for inefficient things in your game.

    As for sections, you will have seams but you can hide them in lots of different ways.  You can design the pieces in such a way that they divide on a natural seam.  There are also technical ways to hide seams.  I made a little thing I call the "magic blender" that blurs seams using a custom shader on a quad that I float over the seams.
  • Eric Chadwick
    Options
    Offline / Send Message
    Cool! How does that work, under the hood? Alpha blending with a gradient?
  • RyanB
    Options
    Offline / Send Message
    It's ridiculously simple but I can't give it away because I made it at work.  But here's a video showing it in action.  The left viewport is what the player will see, right viewport is scene view.  The blending gradient needs work and I plan to do it without any blurriness.  It can work on a single quad, unity plane or any irregular shaped mesh.
    https://youtu.be/f-a3dJTZsqM

  • Eric Chadwick
    Options
    Offline / Send Message
    Looks like alpha blending the gradient edges. You're probably thinking about using a noise pattern instead of a gradient, for more interesting edges. And world-space UVs, so you can scale the mesh and the texture does not get scaled too.
  • RyanB
    Options
    Offline / Send Message
    Looks like alpha blending the gradient edges. You're probably thinking about using a noise pattern instead of a gradient, for more interesting edges. And world-space UVs, so you can scale the mesh and the texture does not get scaled too.
    Various tricks.  Noise would work, but I have a technique I have used for 15+ years that I learned from a photo retouching book.  The human eye is sensitive to horizontal and vertical lines but not to random diagonals.  So, I create a bunch of random star shapes to cut out pieces of a texture then move the pieces over the lines.  This fools the eye without using any sort of blurring so you have a sharp image without any dips in the histogram from blurring (which is deleting information).  I hope to implement a similar pattern but for now the blurring is good enough.
  • RyanB
    Options
    Offline / Send Message
    One more video showing it updating on the fly.  In previous video I turned off the things that allow it to automatically update.  You can place it anywhere and it will use whatever is underneath it to blend.
    https://youtu.be/ugip0-1Dp6w

  • astraldata
    Options
    Offline / Send Message
    astraldata vertex
    After reading through this and after looking through other stuff regarding mesh/texture blending, I've not found a way to do something like that blending thing on a mesh instead of a terrain.

    I found a video here doing what I want, but on a terrain instead of a mesh.

    https://www.youtube.com/watch?v=pv8wjMGGGDM

    I know special shaders are involved that edit normals and sample the below texture, but I have no clue how to go about writing one that can do that on a terrain, much less one that can do that on a mesh, especially when the geometry is different, so any input on how to go about something like this would be completely awesome. I've seen some MegaSplat stuff that looks really cool, but it doesn't blend textures with meshes like the above video, it only blends textures with textures. My dream is to figure out a way to get the best of both worlds in a single shader.





  • astraldata
    Options
    Offline / Send Message
    astraldata vertex
    RyanB said:
    Looks like alpha blending the gradient edges. You're probably thinking about using a noise pattern instead of a gradient, for more interesting edges. And world-space UVs, so you can scale the mesh and the texture does not get scaled too.
    Various tricks.  Noise would work, but I have a technique I have used for 15+ years that I learned from a photo retouching book.  The human eye is sensitive to horizontal and vertical lines but not to random diagonals.  So, I create a bunch of random star shapes to cut out pieces of a texture then move the pieces over the lines.  This fools the eye without using any sort of blurring so you have a sharp image without any dips in the histogram from blurring (which is deleting information).  I hope to implement a similar pattern but for now the blurring is good enough.
    @RyanB

    I would totally love to see what you mean by this visually. It's hard to imagine how this could work to keep textures both seamless and crisp, but it really does sound interesting!
  • RyanB
    Options
    Offline / Send Message
    RyanB said:
    Looks like alpha blending the gradient edges. You're probably thinking about using a noise pattern instead of a gradient, for more interesting edges. And world-space UVs, so you can scale the mesh and the texture does not get scaled too.
    Various tricks.  Noise would work, but I have a technique I have used for 15+ years that I learned from a photo retouching book.  The human eye is sensitive to horizontal and vertical lines but not to random diagonals.  So, I create a bunch of random star shapes to cut out pieces of a texture then move the pieces over the lines.  This fools the eye without using any sort of blurring so you have a sharp image without any dips in the histogram from blurring (which is deleting information).  I hope to implement a similar pattern but for now the blurring is good enough.
    @RyanB

    I would totally love to see what you mean by this visually. It's hard to imagine how this could work to keep textures both seamless and crisp, but it really does sound interesting!
    Hey, I can't just be GIVING away all my tricks.

    Just kidding, I'll try and make a tutorial.
  • RyanB
  • astraldata
    Options
    Offline / Send Message
    astraldata vertex
    No worries, you still got most of us beat by lightyears with all the cool tricks you know, so thanks a ton man for sharing your knowledge! I love to pick your brain because it's clear you know so much cool stuff like this! This kind of stuff is SO damn useful to know because of how far-reaching it is. It's interesting that this concept can apply not only to seamless textures, but also to composition as well, since if you want something to stand out more, you make it either more vertical or more horizontal, angle-wise, relative to the rest of the image, and keep other things' lines at more random diagonals if you want them to be subdued.

    I think this also explains why I just can't STAND candy-cane stripes, but why I can also still somehow tolerate gaudy polka-dots. The polka-dots are usually arranged in diagonals from one another while stripes are always horizontal or vertical. The mind and eyes are so interesting sometimes!
  • RyanB
    Options
    Offline / Send Message
    Thanks, I'm glad you find it useful.

    It's interesting to read about the development of the human visual system and the way our eyes work.  If I had an extra 2 hours a day I would read biology textbooks but I gotta grind on Houdini and programming tutorials.

    It's hard to beat a striped barrier for visibility.  You can avoid using them if you create lots of contrast in your lighting.

Sign In or Register to comment.