Search Unity

Question ProBuilder: a couple questions

Discussion in 'World Building' started by CodeSmile, Sep 17, 2022.

  1. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,975
    I'm just using ProBuilder like I would use a CSG (Quake) editor for mapping. I noticed a couple things that make some operations unnecessarily complex but perhaps I'm missing something. Hence these questions, I hope someone can answer them:
    • Is there a way to create new shapes "Lightmap Static" on by default (on the ProBuilder MeshFilter)? I keep finding "pitch black" shapes after lightmap baking because this flag is off by default.
    • When drawing a new shape (perspective camera) I often hit the confines of the camera - that means either cancelling the shape or tweaking its size afterwards because I cannot move the camera while drawing and the shape won't grow beyond camera bounds. Is there a workaround to that, or a best practice?
    • Is there a way to set the pivot "bottom center"? That would make positioning easier for things that are placed on the floor.
    • Is there an option to scale a shape's size along one, two or all three axis? Particularly when working with cubes that would come in handy. PS: using the transform scale is not an option because that will also scale UV.
     
    Querke likes this.
  2. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    613
    1. Try Preferences > ProBuilder. If it’s not there than I would simply have a parent transform where you can switch the static flags off and on and say “change for children”.
    2. Unfortunately no, but you can select edges for easy shape manipulation. Otherwise, you can make a small shape and scale it afterwards (more on that in answer 4)
    3. ProBuilder has no way of knowing what the bottom of your shape is, so no (tbf that is solveable though)
    However you can:
    - Select a bottom vertex, ProBuilder > set pivot, then set your transform.y to 0
    - ProBuilder > center pivot, then set transform.x and transform.z to 0
    - ProBuilder > Freeze Transform
    4. Set your transform to (0, 0, 0), scale it and use Freeze Transform. Freeze Transform resets the scale of a mesh to (1, 1, 1) while keeping its size as is.

    Some of these explanations may not make sense. Just try them out one by one and play a little with the suggested options, they will make more sense with trial and error.
     
    CodeSmile likes this.
  3. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,975
    Thanks for those tips! It all makes sense in my head at least. I'll be sure to check them out. Nice parrot btw. :D
     
    CaseyHofland likes this.
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,975
    1. I must have missed that because I was specifically looking for "lightmap static":
    upload_2022-9-27_16-33-34.png

    3. That worked! I can make that a prefab cube and copy/paste, then scale as needed.
    4. Unfortunately, this also scales UV resulting in stretched textures.
     
  5. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    613
    Aaah I thought it might, wasn't sure. Then I'm afraid you gotta funk in the ProBuilder UV editor.