Download

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):

sofa.jpg

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)

sofa-diffusemap.jpg

  • The lightmap:

sofa-lightmap.jpg

  • 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
sofa-play.jpg
-Printscreen in playing mode-

sofa-editor.jpg
-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:
Sofa UVMap-Color.jpg
Sofa-Color.jpg

I’ve colored any parts with different colors to make more clear the UVs belonging!

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 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!

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!

Could you upload it as an FBX for people that aren’t using Max?

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!

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.

You are right! added in the first post!

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?

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!

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
66bf0e0c236455b694f2ae0af7b970626f7f7be0.jpeg

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

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”.

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.

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

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!

I triangulate before baking the normal map, because not doing so can cause some errors if the different apps aren’t triangulating the same internally. I don’t like UVing a triangulated mesh, because it makes selecting edge loops harder.

For the low poly, all i did was create a cube with some edge loops, subdivided it, and then shrink-wrapped them around each cushion, and relaxed the mesh a tiny bit to reduce any areas where the geometry was too tight. Took maybe 10 minutes. I used cubes because they are easy to unwrap like a cardboard box.

When you model your high poly mesh it can help to keep the low-poly version in mind. For cushions for example, you probably have a version that would work as low-poly before you subdivide and add the wrinkle detail, so it can be a good practice to save a separate file whenever you are going to do certain changes so that you can go back and get the low-poly meshes if needed.

I’m getting addicted to this method but it’s not immediate as it seems! (or maybe is just because I’m a newbie xD ) can I ask you if you “multiply” your normal maps? I’m getting way better results than before even with first trials, but it not seems me so “bumby” as yours (I’m really envy! ahahahah)

That’s for sure but (I don’t know if for the other people is the same) I don’t model every object/piece of furniture I put in my scenes when I make renders with v-ray: more often I buy the models I need or (if I’m lucky) I find free versions of them, so I’d like to discuss about methods to reuse models that cg-artists use everyday! :wink:

A properly baked normal map should never be multiplied or adjusted besides layering or adding additional texture or details, you should never try to decrease or increase the intensity after a bake. I baked the texture with Substance Painter, just because it’s quick and easy and I could easily add a fabric texture or add details. But I’d also recommend using xNormal because it’s free, but the interface is a bit awkward. My guess for the intensity issue is either there’s an issue with how your are baking, or UE4 isn’t processing your normal map as a normal map, make sure the normal map looks blue in the material editor.

Honestly remodeling for UE4 isn’t too hard, and sometimes it is easier making a new model and UVing it for UE4 than trying to work around lightmap errors, making good UVs for lightmaps/UE4 with a high poly model, and long bake times. Plus better performance if you are doing real time stuff. I might be weird but I actually enjoy the process, wish I could make money doing it.

It’s actually not an issue to increase the intensity of a normal map or layer multiple ones, games do that all the time.