How we plan to make lightmaps in UE4

Interested how you do it. Can you explain in more detail? It doesn’t seem to be quite as straight-foward when I read this: Understanding Lightmapping in Unreal Engine | Unreal Engine 5.3 Documentation

It depends on which program you use as well. With 3ds Max i can have good results even by just flattening the UV’s since it sets the spacing between shells automatically. It can be a bit tricky if the mesh has chamfered edges but flatten does the job within seconds for simple objects.

Exactly. In most cases a simple flatgten is enough.
Ill make a short video, but it will have no sound as I dont have a decent microphone…

Cheers,

Flatten, not sure I understand what that means. Is there an equivalent in Maya?

I dont know anything about Maya’s UV tools so i cant help you there. What flatten does is you set an angle and it creates UV islands from faces depending on that value.

Hi,

Here you go :slight_smile:
It shows the unwrapping and the importing into UE4 and some lests in a level.
http://youtu.be/

Cheers,

Thanks so much for taking the time to show this! Certainly interesting. Does this work well for round objects too?

No problem :slight_smile:
On round or other odd/organic objects, there might be some scenarios where you have to make a handfull of clicks more.
I can make a video tomorrow. What it comes down to is just a series of flattenings instead of just one.
If things work out, I may be able to find a store that sells decent microphones, so i can actually talk you through. :slight_smile:
I can then also go a little bit deeper into the UV options…

Cheers,

After some research it seems the closest thing in Maya is “Automatic Mapping”. However, if you watch this:

He mentions at 5:22 that it’s not a good method for more complex meshes. I guess the Max unwrapper is just smarter? Then I could really see this working most of the time.

Yepp, thats almost identical.

for example:

That is the equivalent of adding a asecondUVW unwrap modifier in max.

That is equivalent to the small dialog with the “move” and “abandon” options in the video…

The same as I did…

True, but in max, as you could see, the padding is adjustable (which I did).
How to unwrap not-so-simple models without doing it all manually can be seen in the next video, as promised :slight_smile:

I never tried much with the maya uv editor. But my curiousity is kindled. I try to look into that tomorrow. :slight_smile:
But its safe to say that the max unwrapper does a decent job. And thats just with the simple flatten operation. No relax/stitch/peel was even touched…

Cheers,

For more complicated/organic models i sometimes use quick pelt(not even pelt with all the tweaking). Set seams by selecting loops of edges wherever you like > hit quick pelt > pack UV’s and done.

Hi,

I guess a lot of people are skilled when it comes to modelling and have a fairly good grasp of the graphite modeling tools, geometry modifiers, etc,
but are somewhat lost when it comes to the wealth of UV editor options (and Im sure this hold true for maya as well):

And I must admit: Tutorials on this part of max is hard to find.
Most unwrapping tutorials just show simple and/or manual unwraps.
I had to read through the autodesk manuals to learn about them…

Cheers,

Good point. Those UI’s have tons of useful tools.
Also it doesnt hurt to think outside the box sometimes. Even though it is not a static mesh, here’s how i had made the UV’s for my car:

It is easier to manipulate the vertices in the viewport. So you turn the mesh into a plane in the viewport, slap a planar UV modifier and then do minor adjustments in the UV editor. Then copy&paste that modifier to the original mesh. I got the idea from Zbrush’s UV mapper and it works. I could even make lightmap UV’s for it this way if i wanted to. :slight_smile:

Would you say Max does a better job than this?

Because it doesn’t look very useful at first glance. Way too many shells right.

It’s not like we’re lacking in UV options in Maya. The new Unfold3D unwrapping is certainly great. About time that something like that arrived in Maya. Lightmaps are always a bother though. There is the issue of lightmaps not matching up on adjacent meshes with differing UV complexity. Here’s a simple example.

Two meshes are selected, the upper has more faces than the other and so they need more space on the UV map:

It’s hard to match up the lightmaps. The upper one is 128 and the lower 64 which results in this:

Here are the UV’s which should be ok?

Well, thinking about that, it would probably make sense matching up the size of the UV’s on both meshes instead of trying to maximize UV space on each? Bit unefficient in terms of lightmaps resolution, but easier to work with.

Sorry, I’m going off topic here. This isn’t a lightmaps support thread.

That is not neccessarily an issue.

Well, also not necessarily. The main thing is that the faces of a mesh remain proportional in the UV map, except for some exceptions :rolleyes:
That is the beauty of an abstract [0…1] interval coordinate space. The “size” is not fixed per se. That is what you set with the lightmap resolution.
If two meshes efficiently use the entire UV space, the “bigger” mesh gets less detail per face.
But how big is that face in gameplay? The dial of a radio doesnt need much light information, right? Hmm what if I scale the radio up to the size of a house and the dial becomes the size of a truck wheel?

I made some wall segments, one 500 units long, one 1000 units long. Both use the same texture. While I achieved homogenous texture density by scaling beyond the [0…1] UV range,
the lightmap resoluton were so similar in result, I left the values the same…
I guess I can pack that into a video too :slight_smile: Maybe I make it a series “wrapping your head about unwrapping your models” :stuck_out_tongue:

Cheers,

Well I just need to keep texel density in mind with lightmaps just as much with normal textures. Pretty obvious actually, don’t know why I skipped on that. I could double texel density in the UV’s and then get away with half the lightmap resolution, right?

About the scaling past 0-1 range, is that allowed in UE4? If so I had no idea. Or maybe I just misunderstand :slight_smile:

The way I do mapping, if I don’t care much about it, I use Automatic Flatten in 3ds Max. It does a better job than the tool in UE4, but usually that will give you crappy results. If I’m going to do it by had, I’ll create my seams in Edit Poly by detaching polygons to elements or by selecting edges and splitting them, the tools for working with and creating seams in the Unwrap modifier are really bad so this way there will be seams wherever the mesh is open. After that, I use Clear UV’s on my UV channel. Then in the Unwrap modifier there’s a few tools I can use, one is Quick Peel, which goes through an algorithm to try and flatten out the pieces, doesn’t necessarily give a good result though. The other way is using Relax, set it to Relax By Face instead of Relax By Edge and it can give good results sometimes.
If neither of those methods work, then I export it out to Unfold3D, which is an extra program, but its flattening algorithm is the best, as long as you have your seams then it’ll flatten it perfectly, it also has a better packing algorithm than the packing tool in 3ds Max. I don’t always use Unfold3D though, since it means exporting and importing the mesh back, but sometimes it’s the only way to get things working well. I recently found out Softimage and Maya now of Unfold3D integrated for doing unwrapping, so if you’re using those programs then you’re all good.

After that, the main deal is making sure that you don’t have too much geometry in your mesh, since you need enough space between UV islands for bleeding.

Well, its not forbidden for textures. There you can do pretty much anything you want with your UVs.
Only the lightmap UVs need to be non overlapping and need sufficient padding around the UV islands.
One thing that I didnt show in the video though: When you arrange your lightmap UVs you should make them “pixel snap”…
Now that seems weird as the UV space is just a [0…1] interval. For this you have to keep your intended lightmap resolution in mind and align the faces near values that will fall onto pixxels later.
Its a bit hard to describe, but imagine you have a mesh wher you know "im gonna use a 64 lightmap, then horizontal/vertical lines should be at 1/64 intervals. This way a lightmap pixel is later not spread across several faces.

Unless I have misunderstood you, its the other way around. If you doublethe density in the lightmap (shrinking everything down), the you have to increase the lightmap resolution to compensate.
A lightmap of 64 that is fully used is as dense as a 128 lightmap that only uses a quarter of its [0…1] space.

Of course if you mean in the sense “doubling the density” on the the surface, then you are correct…

Cheers,

Yeah that’s a better way to describe it, but I believe we are on the same page.

Texel density is a setting in my Nightshade UV editor inside Maya. If I increase that density, the UV’s get scaled up.

Flatten Mapping in 3ds max works, but as darthviper said, it almost always gives crappy results. Even more if your mesh is complex / rounded. But it can also yield poor results even if your mesh is blocky, because auto flatten doesn’t aligns UVs edges with lightmap texels. Also it usually generates more UV charts than necessary (more lightmapping seams).

But still I use it, because the alternative is manual mapping, which is… veeeeery time consuming.