Home Technical Talk

Steel Beams, Girders, Steel Trusses - modeling, texturing, LOD's, advice and tips ?

polycounter lvl 11
Offline / Send Message
cupsster polycounter lvl 11
Hello there polycounters!
I would like to ask you how to best approach modeling and texturing steel beams constructions, girders and structured steel trusses.
I'd be glad if you could share some info on topic, I'm mainly interested in this things:
  • general UV layout for material
  • unwrapping strategy for lightmapping (how to get best results)
  • material tips and tricks how to get most texel density without going crazy with texture sizes and UV islands
  • collision objects creation (specific for me I need to be able to go through holes and collide in believable manner)
  • LOD strategy, where to cheat
My current engine of choice is UE4 (thus info could be related to any engine).
Please feel free to post examples of meshes along with UV layout if you can, I'm very visual based type (picture worth of thousand words).

Example structures what I'm trying to create. 





Thank you! :)

Replies

  • Eric Chadwick
    Title could use a question mark at the end to let people know you are seeking answers. Current title looks like you'll be dispensing knowledge, but when i get in here it's a bit of a letdown. Others might see this the same way. Use the ? character to your advantage!

    What research have you done so far? Lots of games have made these kinds of models. I would look at GTA5 for example.

    I know we have some stuff on the wiki too in the modular section. Have you examined any of this yet?
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    Agreed on the anti-climatic title :)

    Yes, this would definitely be suited to creating a modular kit.

    There is an extensive section on lightmapping in the Unreal docs. That's the first place you should look as it gives many examples of when/why to use different unwrapping methods for lightmapping.
  • cupsster
    Offline / Send Message
    cupsster polycounter lvl 11
    Title could use a question mark at the end to let people know you are seeking answers. Current title looks like you'll be dispensing knowledge, but when i get in here it's a bit of a letdown. Others might see this the same way. Use the ? character to your advantage!

    What research have you done so far? Lots of games have made these kinds of models. I would look at GTA5 for example.

    I know we have some stuff on the wiki too in the modular section. Have you examined any of this yet?
    Retitled to take advantage of it :)
     I went through that WIKI section already (usually my first place where I look before annoying people here), most probably I would go modular way for pieces that are modular in real life as well. I assume to use vertex paint properly to break texture tilling as with modular pieces it might get obvious pretty quickly, I would need to to add some extra loops just for sole purpose of using vertex paint on meshes. unfortunately does not have GTA5 so no bacon for me... 

    Agreed on the anti-climatic title :)

    Yes, this would definitely be suited to creating a modular kit.

    There is an extensive section on lightmapping in the Unreal docs. That's the first place you should look as it gives many examples of when/why to use different unwrapping methods for lightmapping.
    I looked there as well and they are using quite large padding value, for me most puzzling part is how to unwrap this properly to not have excessive bleeding. 
    Should I go with snapping vertices to power of 2 pixels while unwrapping? Need to search for anyone done this before.
    As well I'm trying to understand how to choose proper lightmap size. I'm still pretty new to UE4. Is there any way to visualize texel density of lightmap like Unity is doing it? I'd love to know how where is option for that if it exist within engine.
  • Mark Dygert
    Splines and the sweep modifier.
    It has built in I-Beam, L-Beam, T-Beam and box shapes built in and if those don't work, you can define a custom shape. It makes your UV layout for you also, good stuff.
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    depending on your expected draw distances etc. you might find it better to build larger modules rather than lots of independent pieces - it'll let you LOD things down much more efficiently
  • cupsster
    Offline / Send Message
    cupsster polycounter lvl 11
    @Mark, my initial approach was with Sweep mod as it have multiple advantages as you stated above. So far this workflow worked for me. 
    @poopipe That's what I'm wondering, I do not want to bring UE to it's knees only due excessive draw call count so I'll be definitively looking into ways how to attach as much meshes as I can into single unit. Might create some variations just for edge or non repeating parts.

    On the other side I'm intensively looking into UE lightmapping strategy, for sure I do not want any edge bleed nor wasted texture space or too much texel density (better spend that on more critical surfaces). From experimentation I see I can set lightmap resolution in UE to non power of 2 dimensions. In that case I'm not sure what penalty I would be facing. Does anyone know? Only thing that came to my mind might be texture streaming (still tearing through ALL UE documentation to gain as much insight as I can prior committing myself to final meshes).

    From what I read so far I gain this insight:
    - UV distortion does not matter that much for lightmaps (this might be case to case thing)
    - to leave min 2px optimally 4px of space between UV shells (looks like lightmap compression format in UE is operating on 4px at a time [2x2])
    - there is no way for me to actually see generated lightmaps to troubleshoot
    - make shell split in places when lighting might change considerably on mesh, eg. hard corners, to not "wrap around light" in this areas as in case of low res and small lightmap
    - it would be good for me if I snap shell vertices to pixels (compression + not aligned edges = edge bleeding) 

    Q1: I'm working in 3DS Max + TexTools, is there any other script that could speed up my workflow in this regard?
    Q2: When you unwrapping for lightmap do you set expected UE lightmap resolution prior unwrap and work directly on that resolution?
    Q3: Can I somehow use non square texture size for lightmap as some longer meshes could benefit from this on multiple fronts?
  • Eric Chadwick
    PolyUnwrapper is an excellent toolset for working with UVs in 3ds Max, highly recommended.
  • cupsster
    Offline / Send Message
    cupsster polycounter lvl 11
    PolyUnwrapper is an excellent toolset for working with UVs in 3ds Max, highly recommended.
    Going to check it out now. Thank you Eric.

    EDIT: Must add, it fits lightmapping workflow for rectangular shells perfectly! I owe you beer man :)
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    Modular pieces are Instances so they are only called once (as are the associated texture maps)

    Lightmap UVs on  longer parts doesn't matter as you can non-uniformly scale out of ratio.

    Lightmaps can be a pain on modular parts. The best thing to do is take what you've learned from the UE docs and do some testing. It's time well spent as I always find this the best way to learn: get the basics, test, discover error, research, learn, test, etc...

    Q2: When you unwrapping for lightmap do you set expected UE lightmap resolution prior unwrap and work directly on that resolution?

    Default LM res in UE4 is 64. So if you intend to use the grid in the UV editor then the formula is 1/64=0.0156
    Use this as your grid spacing and you can snap UVs to the grid which is helpful when laying out LMs.
    LM res is something you have to test out yourself on various assets.


    Q3: Can I somehow use non square texture size for lightmap as some longer meshes could benefit from this on multiple fronts?

    Yes, if you want. The engine auto-assembles all lightmaps on to a large atlas so 2:1 is fine.

    One very important thing to note about UE lightmaps is that the engine adds a 1 pixel border around your lightmaps which can lead you to pull your hair out if you are not aware of it.(especially on modular pieces)
    the workaround is to add 2 to every asset's LM res within the static mesh edit preview window(so 64 becomes 66) to compensate for this.

  • cupsster
    Offline / Send Message
    cupsster polycounter lvl 11
    @musashidan Thank you for that last tip about UE adding that 1px to lightmap that is the kind of info I'm searching for that isn't stated in docs. :-) (I will need to redo some unwraps now to take that into account), I finally found way to look at lightmaps for some visual insight what is going on. They can be accessed from "World Settings" panel under section Lightmass > Lightmaps. You can right lick on them and select "View Lightmap" to open it in texture editor.
    On top of that I as well bumped "Packed Light and Shadow Map Texture Size" to 2k (might increase it to 4k later on) to minimize state switches on GPU while rendering (not sure but it might help a bit with performance).
    And you are right to get it to point I'm happy I will need to run some iteration on my assets. I'll start with most simple mesh I have.
    I have question tho, If I do LODs do I need to provide each LOD with lightmap UVs as well? In Unity (where I'm coming from) engine is doing reprojection and pulling lightmap data from highest LOD. I'm wondering how UE does this...
  • Michael_Ingrassia
  • cupsster
    Offline / Send Message
    cupsster polycounter lvl 11
    Models are no issue here, nor quantum of pieces. Purpose is to learn something new and/if possible be smart about it. :p I'm aware there is plethora of this stuff on market.
Sign In or Register to comment.