Lightmap UV generation needs to improve

The size of individual islands is getting a bit ridiculous on some meshes. At the very least I’d like to be able to control the spacing. We’ve been using the lightmap UVs as a generic UV unwrapper for purposes other than lighting and it would be nice to have some build options related to how the islands are laid out, grouped, etc. In fact, being able to unwrap a second UV set in addition to the lighting with different settings would be fantastic.

Over three quarters of this UV map is empty space.

If you find any automatic method that works well I’ll give you $1,000

Well, this the price you pay for automated unwrapping.
While it workd for some meshes quite well, usually models like this tend to produce clutter, as shown in your screenshot.

I think the automatic lightmap generation tool in UE is sufficient enough for a quick build.
When it comes to creating the game-ready lightmaps for the mesh, there is no way around crwating them in a 3d application.

There you can manually create the lightmaps and also scalethe islands according to importance. The underside of the chair needs probably less resolution than the top side, etc.
That is something no automatd too can ever achieve because it does not know your intentions with the mesh and its plecment scenarios.

If you create th UV maps in a regular 3D modelling application, you can add multiple UV channels for textures and lightmaps.

I guess you seek for a way around the time consuming unwrapping. But there is no way around it…


Only 1000 …pff :smiley:

PPS: Actually, I know one. No joke… The (automated) unwrapping tools from MODO are just awesome. !!

As you may know I’m a plugin developer, so the key word here is programmatic. :slight_smile: It’s close to what I need, it’d just be nice to scale everything up or set a minimum island size. A lot of the polygons that are split out in that mesh are adjacent to something - seaming them would alone reduce a huge amount of the wasted space.

I guess I’ll go digging and see if I can’t override the process manually without changing the engine.

This request isn’t about lightmaps, it’s about the unwrapper. We use it as a baking target for an external renderer. :slight_smile:

As it stands the results are being immensely wasted. I have to generate a 4k texture and spend quite a while rendering it just to get slightly good results on most meshes. Can you imagine if the UV set above was being used for the diffuse? 95% of the model is projected into 5% of the texture.

If anyone can point me in the direction of a solid unwrapping library that would also be a good solution.

The “correct” unwrapping depends on information/decossions that cannot be derived from the mesh topology.
If the “island threshold” is angle based, it will create connected islands on near flat surfaces, but surfaces like the back rest of your chair will produce clutter.

And the engine doent know its a chair. How should it then know that the underside will probably never receive much light or be seen at all…?

I don’t really care, I just want the option to unwrap to new UV channels on request with control over the padding.

Then get an indie version of MODO :slight_smile:


(If this model was a table, then I would scale the selected part down. to get more space for detail on the rest of the model.
If its a carport, then the underside would need indeed the space it currently has. Table or carport, no automatic unwrapper could ever sense that…)

I’m not sure Modo will like me reselling their product with my plugin. :slight_smile:

C’mon guys stop debunking my feature request.

The issue with automatic tools is that they use an angle setting to figure out where to unwrap, so in the case of your complex chair, it’s separating out pieces that don’t actually need to be separated. It’s something that an artist will know how to do better but it would take a very intelligent program to be able to do that automatically.

A sentient program. Due to the ambigous nature of the task. :stuck_out_tongue:

I’m sure someone could figure it out if they had enough time and money. Might be something similar to how Zbrush can do auto-topology, you need to take into account edge loops and angles and stuff like that.

Maybe, just maybe one day we’ll have a program so incredibly, fearsomely intelligent that can increment numbers and make another UV channel. It’s crazy but a guy can dream.

While all you wisearses are here, does anyone know if it’s possible to override and change the shading model of a material instance in code? It seems to be locked down.

As I said, Modo is the name :stuck_out_tongue:
You could make your Plugin work together with Modo at least… Their SDK uis available.
Also since Modo 10 it has really good support for UE4 (Unreal shader export, etc). :smiley:

In one of my meshes I have 3 different texture UV maps and two lightmap UVs… The model has several hero sides :stuck_out_tongue:

Well, like I said, my plugin is an external renderer for baking textures. My users will likely have no clue about UV unwrapping. Unfortunately the situation is that I can’t guarantee the user doesn’t have overlapping UVs but a lot of the time the UVs generated by UE could be improved very easily by at least reducing the padding or better yet indicating areas of importance. It’d be nice to unhook it from the lightmap UVs as well, as that has the possibility of being regenerated and needlessly invalidating baking results.

I’m going through the code now so if I find anything useful I’ll post it. I find a lot of the time the top google result for questions I ask is the question I asked. :slight_smile:

To change the shading model of a material, cast to UMaterialInstance *.

((UMaterialInstance *)MyMaterialInterface)->BasePropertyOverrides.bOverride_ShadingModel = true;
((UMaterialInstance *)MyMaterialInterface)->BasePropertyOverrides.ShadingModel = EMaterialShadingModel::MSM_Unlit;