Announcement

Collapse
No announcement yet.

Lets create a complex lightmap - Open discussion

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lets create a complex lightmap - Open discussion

    Hi everyone,
    as many of us I'm coming from a 3dsmax/vray reality and during my first time on unreal I had to learn and understand a complete new topic: unwrap the objects to make diffuse and lightmaps!
    Now months (almost a year) have passed, I learnt some unwrap methods, I experimented, I met many other problems but still I have doubts that I'm doing a correct unwrap and in particular facing complex objects!

    I opened this thread to discuss with you about it using a similar scheme I've seen here on the forum (over all raghu's lightmass thread):

    Click image for larger version

Name:	sofa.jpg
Views:	1
Size:	129.3 KB
ID:	1181339

    I use to export the object with 3ds in a generic fbx (I don't change any setting) and open the fbx exported in Blender, where I work to the diffuse and the lightmaps: in this experimental case the maps that I'd create would be like this
    • The diffuse map was already on the downloaded file and even if really complex it seems to work pretty well for the use of tileable texture (I'm not really caring of this one at the moment)


    Click image for larger version

Name:	sofa-diffusemap.jpg
Views:	1
Size:	87.0 KB
ID:	1181340

    • The lightmap:

    Click image for larger version

Name:	sofa-lightmap.jpg
Views:	1
Size:	501.8 KB
ID:	1181333
    • Pillows: I set the seams to have for each pillow the "cap" above and below, and the central part cut another time to split it like a sort of rectuangular; the ribbons are left attached to the caps
    • Frame: the main tube has a seam running through all its lenght to open it, then there are seams at every turn to divide the stright parts from the turning parts; the secondary tubes have 2 seams instead of 1 to open them; obviously I put a seam for every intersection between the main and the secondaries
    • Foots: really easy ones, splitted in two cups (above and below) and I put a seam through the central part to open it
    • Base frame: in the original file is not perfectly modeled, but I tried to split the planes and put a seam at every turn to split the central parts in many sub-parts (like the main tube with straights and turns); in this particular case it should be remodeled but since it's barely visible under all the pillows I left it as it is for now


    And this is the result in a unreal file (world setting: lighting scale 0.3; indirect bounces 20; indirect quality 10; indirect smooth 1; no compress lightmaps; no .ini file tweaked; medium quality build) with a simple material (diffuse color 0.855,0.855,0.855; specular 0; roughness 1) and lightmap resolution at 512
    Click image for larger version

Name:	sofa-play.jpg
Views:	1
Size:	253.4 KB
ID:	1181335
    -Printscreen in playing mode-


    Click image for larger version

Name:	sofa-editor.jpg
Views:	1
Size:	338.5 KB
ID:	1181337
    -Printscreen in editor-

    I know there is even the possibility to remodel the sofa with few meshes and bake the normals to fake all the details, but I'd like to make clear before how exactly is made a good unwrap, if there are some kind of rules or tricks that the
    more experts want to share with the newbies

    EDIT1:
    Click image for larger version

Name:	Sofa UVMap-Color.jpg
Views:	1
Size:	828.2 KB
ID:	1181585
    Click image for larger version

Name:	Sofa-Color.jpg
Views:	1
Size:	279.8 KB
ID:	1181586

    I've colored any parts with different colors to make more clear the UVs belonging!
    Last edited by Hainzgrimmer; 05-03-2016, 06:32 AM.

  • #2
    It looks like the cushions are unwrapped correctly, but there's a bunch of small UV islands that I'm not sure what they go to, if they're part of a larger piece then they would get better results by attaching them to the larger pieces. As for the frame, it's long and in some cases you might have to add a loop in the middle so you can split long skinny objects in the UV's to make better use of the space.

    In other UV news, the new 2017 version of 3ds Max has a big UV editor improvment which includes better overall tools and improvements with the algorithm for unfolding and for packing. It also works much faster with objects with high poly counts.

    Comment


    • #3
      I was going to download the mesh and take a look, but I'm getting this message from the hosting site:

      Enter decryption key
      To access this folder/file, you will need its Decryption key.
      If you do not have the key, contact the creator of the link.

      Comment


      • #4
        Originally posted by ZacD View Post
        I was going to download the mesh and take a look, but I'm getting this message from the hosting site:

        Enter decryption key
        To access this folder/file, you will need its Decryption key.
        If you do not have the key, contact the creator of the link.
        Sorry guys: first time using mega and I took the wrong link! Now should work!

        Originally posted by darthviper107 View Post
        It looks like the cushions are unwrapped correctly, but there's a bunch of small UV islands that I'm not sure what they go to, if they're part of a larger piece then they would get better results by attaching them to the larger pieces. As for the frame, it's long and in some cases you might have to add a loop in the middle so you can split long skinny objects in the UV's to make better use of the space.

        In other UV news, the new 2017 version of 3ds Max has a big UV editor improvment which includes better overall tools and improvements with the algorithm for unfolding and for packing. It also works much faster with objects with high poly counts.
        I'll surely try the new 3ds max as soon as I can! the little UVs aren't from the pillows but little part like foots and turns of the base frame! as soon as I can I'll post a couple of screen to make it more understandable!
        Last edited by Hainzgrimmer; 05-02-2016, 04:14 AM.

        Comment


        • #5
          Could you upload it as an FBX for people that aren't using Max?

          Comment


          • #6
            You could've just made a lightmap for each cushion... not the end of the world for small archviz scenes!!! Imo the lightmap contains too much stuff that even with a huger res it won't clear up!

            Comment


            • #7
              Peltmapping is probaly the best way in this case to make seamleass mapping coordinates for lightmaps. Attached is a screenshot of one of your pillows. There are plenty of tutorials on youtube. It´s that fancy looking UV feature shown in the max 2017 videos. But it exists since max, I think it was 2012.
              Attached Files

              Comment


              • #8
                Originally posted by ZacD View Post
                Could you upload it as an FBX for people that aren't using Max?
                You are right! added in the first post!

                Originally posted by heartlessphil View Post
                You could've just made a lightmap for each cushion... not the end of the world for small archviz scenes!!! Imo the lightmap contains too much stuff that even with a huger res it won't clear up!
                I'm gonna try even this one but my doubt is: won't it be too heavier for the building lights, compared to the "all in one fbx" option? surely in a small scene won't be significative, but if we have an entire house interior to project (with many objects as furniture/decoration and so on) and I apply this principle (for any complex object that causes troubles) what will happen? meaning: building time is affected by number of items or by meshes to be calculated?

                Originally posted by netfrag-sam View Post
                Peltmapping is probaly the best way in this case to make seamleass mapping coordinates for lightmaps. Attached is a screenshot of one of your pillows. There are plenty of tutorials on youtube. It´s that fancy looking UV feature shown in the max 2017 videos. But it exists since max, I think it was 2012.
                I'll try this one too! questions:
                - would I be able to set different seams on different channels? for example I would use a diffuse map existant or simple flattened one, and for the lightmap use the peltmapping: I can figure peltmap need different seams so is there a way to not lose the seams for the diffusemap^
                - using peltmapping would improve quality even using an fbx unique for all the sofa or I should follow the suggestion of heartlessphil and make separated fbx for every pillow?



                On the first post I added some screenshots to make more clear on the lightmap wich UVs belongs to what!

                Comment


                • #9
                  Originally posted by Hainzgrimmer View Post

                  I'll try this one too! questions:
                  - would I be able to set different seams on different channels? for example I would use a diffuse map existant or simple flattened one, and for the lightmap use the peltmapping: I can figure peltmap need different seams so is there a way to not lose the seams for the diffusemap^
                  - using peltmapping would improve quality even using an fbx unique for all the sofa or I should follow the suggestion of heartlessphil and make separated fbx for every pillow?
                  Yes, you can. In every type of mapping in max you can set a map channel (index). You can have as many as you want (well haven´t tried if there is a limit in the UE engine). I usually use channel 1 for my diffuse textures and set my unwrapping for the lightmaps to channel 2. In UE the channels start at 0. So channel 1 in max is channel 0 in UE and channel 2 in max is channel 1 in UE. When importing the fbx I turn the "generate lightmap UVs"option off, so no further channel is created on import. If you import that way the imported mesh will have the option generate lightmap uvs off and the default channel for lightmaps is 1 wich is channel 2 in max. So like this you can have whatever coordinates you want for your diffuse map default set to 0 and have the model to automatically use your unwrapped coordinates wich you created in max as channel 2. Bit confusing I know but i works pretty nice that way. Now if you need even more coordinates every further coordinate i set to 3, 4 or beyond in max. In the "Texture coordinate" node in the UE material editor you can set whatever UV coordinate index you want.

                  Of course you can set you unwrapped lightmap coordinates to any possible coordinate channel or index (it´s the same). But if they are not channel 2 in max you´ll have to manually change the channel of each imported fbx in UE. One little thing. If you have an uwrapper set to channel 2 make sure a channel one exists somehow even if you don´t need it. Otherwise channel 2 is not present when importing to UE.

                  Regarding your second question. Well it depends. It´s easier to unwrap if you split it up. But in general you can get the same result when keeping just one object. I for my part would split up the mesh in max by element. Unwrap each seperately. Attach all parts together again. Add another unwrapper on the assembled mesh and use this one to layout the different coordinates (by id) before exporting it to UE. On the other hand bringing a mesh over in pieces gives you the advantages to set the size of the Lightmap for each object seperately. Many smaller lightmaps are probabely better than one huge in case you need really huge lightmaps. Anyway I would go with a single mesh it ´s easier to handle .
                  Last edited by netfrag-sam; 05-03-2016, 07:11 AM.

                  Comment


                  • #10
                    Originally posted by netfrag-sam View Post
                    Yes, you can. In every type of mapping in max you can set a map channel (index). You can have as many as you want (well haven´t tried if there is a limit in the UE engine). I usually use channel 1 for my diffuse textures and set my unwrapping for the lightmaps to channel 2. In UE the channels start at 0. So channel 1 in max is channel 0 in UE and channel 2 in max is channel 1 in UE. When importing the fbx I turn the "generate lightmap UVs"option off, so no further channel is created on import. If you import that way the imported mesh will have the option generate lightmap uvs off and the default channel for lightmaps is 1 wich is channel 2 in max. So like this you can have whatever coordinates you want for your diffuse map default set to 0 and have the model to automatically use your unwrapped coordinates wich you created in max as channel 2. Bit confusing I know but i works pretty nice that way. Now if you need even more coordinates every further coordinate i set to 3, 4 or beyond in max. In the "Texture coordinate" node in the UE material editor you can set whatever UV coordinate index you want.

                    Of course you can set you unwrapped lightmap coordinates to any possible coordinate channel or index (it´s the same). But if they are not channel 2 in max you´ll have to manually change the channel of each imported fbx in UE. One little thing. If you have an uwrapper set to channel 2 make sure a channel one exists somehow even if you don´t need it. Otherwise channel 2 is not present when importing to UE.

                    Regarding your second question. Well it depends. It´s easier to unwrap if you split it up. But in general you can get the same result when keeping just one object. I for my part would split up the mesh in max by element. Unwrap each seperately. Attach all parts together again. Add another unwrapper on the assembled mesh and use this one to layout the different coordinates (by id) before exporting it to UE. On the other hand bringing a mesh over in pieces gives you the advantages to set the size of the Lightmap for each object seperately. Many smaller lightmaps are probabely better than one huge in case you need really huge lightmaps. Anyway I would go with a single mesh it ´s easier to handle .
                    Sorry I think I was misunderstood: I knew about the channels, what I wanted to know was if the seams I set on a static mesh on channel 1 (for example) can be set different on channel 2 without losing the ones on the first channel! and for seams I mean these ones
                    Click image for larger version

Name:	Seam.jpg
Views:	1
Size:	203.5 KB
ID:	1105874

                    Surely your idea of peltmap all apart and, only at the end, attach all together is interesting! I'll try it!

                    Comment


                    • #11
                      Well you can copy the coordinates from let´s say channel 1 to channel 2 by adding another unwrapper. Once you set this new unwrapper to channel 2 it will ask you to move the coordinates. If you choose move you will have the same coordinates including the green map seems in channel 2. Btw. Coordinates in channel 1 are untouched by this action. It should rather be called copy than move.

                      Those green map seems can unfortunately not be used as blue peel seems. At least I haven´t found a way. Once a Pelt is commited those Peel seems are gone. But you could probabely quickly recreate them by using edge loops and convert those to to peel seems with "convert edge selection to seems".

                      Comment


                      • #12
                        Sometimes for the small parts, I'll scale them up so that they get more detail even though they won't be the correct scale compared to the large sections, but in your case the issue with those small pieces is that they might be smaller than a pixel.

                        Comment


                        • #13
                          UV unwraping problem has been bothering me for a long time, especially for complex objects.Thx a lot Hainzgrimmer!

                          Comment


                          • #14
                            I decided to make a low poly mesh and bake it down, the main advantage for someone doing arch vis is you can use much lower light maps for most things (if you want nice contact shadows, you still need a pretty light resolution light map, but for anything else low resolution is fine). I used a 512 lightmap on the couch, and the Lightroom: Interior Day Light content example map. Low poly sofa is 30k tris. I did not use any textures, but you could easily add a tiling fabric texture. Normal map is 4096x4096, but honest 2048 holds up just as well at 1440p, even with close ups.





                            Tomorrow I'm going to unwrap the original mesh, the FBX file is triangulated so it's a pain to UV or fix, and trying to remove it isn't perfect.

                            A few tips, for light map UVs, the less seams the better. More seams means more padding between the islands, which basically forces the texel density to be lower. Less seams also means less places for artifacts.

                            EDIT: One more image 1080p, with contact shadows.



                            I'll upload the low poly and normal map tomorrow as well.
                            Last edited by ZacD; 05-04-2016, 01:43 AM.

                            Comment


                            • #15
                              Originally posted by ZacD View Post
                              I decided to make a low poly mesh and bake it down, the main advantage for someone doing arch vis is you can use much lower light maps for most things (if you want nice contact shadows, you still need a pretty light resolution light map, but for anything else low resolution is fine). I used a 512 lightmap on the couch, and the Lightroom: Interior Day Light content example map. Low poly sofa is 30k tris. I did not use any textures, but you could easily add a tiling fabric texture. Normal map is 4096x4096, but honest 2048 holds up just as well at 1440p, even with close ups.





                              Tomorrow I'm going to unwrap the original mesh, the FBX file is triangulated so it's a pain to UV or fix, and trying to remove it isn't perfect.

                              A few tips, for light map UVs, the less seams the better. More seams means more padding between the islands, which basically forces the texel density to be lower. Less seams also means less places for artifacts.

                              EDIT: One more image 1080p, with contact shadows.



                              I'll upload the low poly and normal map tomorrow as well.
                              This is huge!!! It's an exeptional work!!!
                              Quick questions:
                              - have you made a low poly version of the pillows from 0 (you modeled them)? or did you use a method to optimize them? in this last case I tried in past the decimation (in Blender) or the ProOptimize (in 3dsMax) but I hadn't liked so much the results (your meshes in the first post are simply perfect!), can I ask you which method did you use?

                              - this may be a dumb question: is better to "quadrify" the models before start working on them and at leave the "triangulate process" to unreal when we import them? in this case the "quadrify" command in 3ds max works pretty well so we could use it before start working!

                              Comment

                              Working...
                              X