Home Technical Talk

udk sizes/proportions confusion

polycounter lvl 12
Offline / Send Message
Count Vader polycounter lvl 12
So I'm starting out my first full UDK scene, and am currently doing research on how to best build/prep my models for Unreal.

I've practiced/researched enough that I pretty much get most of the major ideas behind building a modular enviroment, but one thing I can't seem to wrap my head around, is this power of 2 principle when it comes to sizing assets. I understand the reason for it, and how it contributes to easy modularity, but am unsure how to carry it over to modelling.

Am I supposed to ensure that all the XYZ dimensions of the major assets/sections of my scene are powers of 2? So each dimension can only be 2 or 4, or 8, 16, 32, 64..etc? This seems like it would fairly limiting when it comes to trying to respect the proportions of a concept, since in concept art things usually dont have dimensions that can each be translated to a power of 2 number while still retaining the correct proportions. It seems like trying to get the dimensions of everything to be powers of 2 could result in a lot of squeezing/stretching of proportions.

My question is then, do I always need to respect this power of 2 rule, or are there some cases where it can be disregarded (as long as the asset still conforms to the grid, obviously). Or should I try to find use power of 2 dimensions for everything, regardless if it compromises the proportions of the concept?

Someone please explain!? / link me to a comprehensive summation of all this crap about dimensions/powers of 2?

Note, I am pretty impaired when it comes to math so if there's some incredibly obvious thing that makes this all make sense that i've overlooked, please forgive me!

Replies

  • wahtye
    Options
    Offline / Send Message
    Hey,
    not really sure if I get your problem here, since it's past bedtime.

    While the power of 2 definitely helps building your scene, it limits you in the modeling way to much. I've never actually heard of anyone doing that to be honest.
    There's also no limitations in the UDK regarding this. The only rule regarding power of 2 that comes to mind would be textures, but not meshes.

    If you however refer to the grid itself, you can simply turn off / adjust the "power of 2"-grid snapping in the bottom right corner of your viewport, along with rotation and scaling snaps.

    JBV8wcv.jpg
  • Count Vader
    Options
    Offline / Send Message
    Count Vader polycounter lvl 12
    Both thiago kafke (note how the XYZ dimension are all powers of 2)
    boundingboxes2.jpg

    and philip k:

    tutorial3.jpg

    seem to emphasize this principle a lot for some reason
  • Harbinger
    Options
    Offline / Send Message
    Harbinger polycounter lvl 8
    The UDK grid scales to "powers of two", and everything snaps to the grid. So if you want easy, Lego like building modularity, build your modules with power of two dimensions with properly placed pivots, and your life will be much easier.

    With that said:

    1) Most games don't have walls thinner than 16 or 32 units, so you can pretty much ignore those small numbers. If you're working on a grid scale of 2, it's going to take forever to build stuff.

    2) You can, if needed, build in multiples of powers of two. By that I mean, a wall height could be 384 units, which is not a power of two itself, but it is a multiple of 128. So, setting your grid to 128 will allow those walls to snap just fine.

    3) Always work on the grid. When you set dress with small props (not modules), feel free to change the grid scale all the way down so you can fine tune placement. I wouldn't recommend turning the grid completely off.
  • Count Vader
    Options
    Offline / Send Message
    Count Vader polycounter lvl 12
    Harbinger wrote: »
    The UDK grid scales to "powers of two", and everything snaps to the grid. So if you want easy, Lego like building modularity, build your modules with power of two dimensions with properly placed pivots, and your life will be much easier.

    With that said:

    1) Most games don't have walls thinner than 16 or 32 units, so you can pretty much ignore those small numbers. If you're working on a grid scale of 2, it's going to take forever to build stuff.

    2) You can, if needed, build in multiples of powers of two. By that I mean, a wall height could be 384 units, which is not a power of two itself, but it is a multiple of 128. So, setting your grid to 128 will allow those walls to snap just fine.

    3) Always work on the grid. When you set dress with small props (not modules), feel free to change the grid scale all the way down so you can fine tune placement. I wouldn't recommend turning the grid completely off.

    As far as your first point - aren't walls generally just flat planes that don't have any thickness? What are the conditions where walls would have a certain thickness? Like, in a doorway or something?

    Anyways, I think it's becoming clearer - the power of 2 thing seems to be best for pieces that are used in larger-scope enviroments, like something that's a more open space that requires a lot of modularity and thus has to have pieces that can be easily repeated/fit together?

    And as far as smaller scope things go, like a hallway of a space ship or something, the power of 2 thing doesn't matter as much, as long as the major planes/edges of all the pieces conform to the grid, and have appropriate pivots?

    Is that about right?
  • McGreed
    Options
    Offline / Send Message
    McGreed polycounter lvl 15
    A wall can be a lot of things from a simple plane to a complex machine system.
    You might want to look at the wiki for modularity:
    http://wiki.polycount.com/CategoryEnvironmentModularity

    EDIT: Regarding when and where to use it, as already mentioned above, it's easier to plan and put a level together when you use the grid, as you will avoid having to look out of gaping holes and the like. For the environment like walls, floors, ceilings, it is better to use the grid and it's helpful for props as well, however its usually not that important to get that barrel to align perfectly, as it is with stationary elements.
  • Angry Beaver
    Options
    Offline / Send Message
    Angry Beaver polycounter lvl 7
    As a tip, the lighting engine in UDK likes sealed objects. floating planes are more prone to causing glitches and errors with lighting, so spending the time to make it a rectangular prism for a wall instead of a plane is recommended as the extra polys wont count for much. Plus by putting some "unused" sides on objects you'll find you can be a lot more liberal with how you use the modules to make environments.
  • Count Vader
    Options
    Offline / Send Message
    Count Vader polycounter lvl 12
    @McGreed,
    I definitely get why/how to use the grid for modular assets, I was more confused over why I tend to see a lot of assets in tutorials and stuff having power of 2 xyz dimensions, aka 256 units , 512 units, etc..

    @Angry Beaver
    I actually never knew that, thanks for the tip! So each wall section (assuming flat walls) should really be a box, or can it also be a plane with extruded edges? (aka no backface).
  • Harbinger
    Options
    Offline / Send Message
    Harbinger polycounter lvl 8
    I was more confused over why I tend to see a lot of assets in tutorials and stuff having power of 2 xyz dimensions, aka 256 units , 512 units, etc..

    Because those are the different scales that the UDK grid uses. Look in the bottom right corner, next to the four scale input boxes. The first box with a checkmark and a dropdown box is where you set your grid scale.
  • Count Vader
    Options
    Offline / Send Message
    Count Vader polycounter lvl 12
    Harbinger wrote: »
    Because those are the different scales that the UDK grid uses. Look in the bottom right corner, next to the four scale input boxes. The first box with a checkmark and a dropdown box is where you set your grid scale.

    But so essentially any size is usable as long as it is an even value (so that it can be placed on the grid)?
  • Harbinger
    Options
    Offline / Send Message
    Harbinger polycounter lvl 8
    Well, technically, any size possible can be used. But that's not typically best practice, and will make your life harder. It's not about "even" numbers, it's about multiples/powers of 2. Maybe a practical example would make this clear:

    1) Two wall modules, one with length 256 and one with length 512. Those two pieces will snap together easily on most grid scales, like 64.

    2) Two wall modules, one with length 300 and one with length 200, both even numbers. If you want to snap those together, you're going to probably end up on a grid scale of 1 or 2. So you're trying to make tiny adjustments to get things to align properly.

    I'd suggest simply trying it. Make a handful of cube "modules" in your 3D app, make some with dimensions like you posted above in Thiago's example, and some of a different scale, and see how they behave in UDK.
  • Count Vader
    Options
    Offline / Send Message
    Count Vader polycounter lvl 12
    Harbinger wrote: »
    Well, technically, any size possible can be used. But that's not typically best practice, and will make your life harder. It's not about "even" numbers, it's about multiples/powers of 2. Maybe a practical example would make this clear:

    1) Two wall modules, one with length 256 and one with length 512. Those two pieces will snap together easily on most grid scales, like 64.

    2) Two wall modules, one with length 300 and one with length 200, both even numbers. If you want to snap those together, you're going to probably end up on a grid scale of 1 or 2. So you're trying to make tiny adjustments to get things to align properly.

    I'd suggest simply trying it. Make a handful of cube "modules" in your 3D app, make some with dimensions like you posted above in Thiago's example, and some of a different scale, and see how they behave in UDK.

    Ok, so it seems like the reason to use powers of 2 is so that they can be easily combined with one another? This is understandable, but i'm confused as how to size things that don't have XYZ dimensions that are the ratio of say, 2:1:4 or something like that.

    Like if the concept calls for say, a doorway that is 200 units wide and 125 units tall. The nearest power of two numbers would be 256 and 128, which would seriously mess up the proportions. So how would I got about finding the proper 'udk-friendly' values to use in this instance?
  • mAlkAv!An
    Options
    Offline / Send Message
    mAlkAv!An polycounter lvl 5
    As said before, take values in between. You don't need to stick with power of 2 values only, but with multiples of your grid/a low power of 2.
    Regarding your example, a 64 Grid would allow for a doorway with 192x128 dimension.
  • Synthesizer
    Options
    Offline / Send Message
    Synthesizer polycounter lvl 11
    Another option is to make the door frame line up on the power of 2 grid while having the hole for the door a different size. You can see an example of that in Thiago's door frame model.
  • Count Vader
    Options
    Offline / Send Message
    Count Vader polycounter lvl 12
    Ok, I think I get it now. As long as the dimensions fit on a power of 2 grid scale, they're fine?

    EDIT: That is to say, not necessarily a grid scale of 2 but any grid scale in UDK since they're all powers of 2
Sign In or Register to comment.