#material slots?
1 messages · Page 1 of 1 (latest)
blender
Then yes, "material slots"
There's two concerns to consider
If your lightmap resolution is 10, that means 10 lightmap texels (texture pixels) per unit
If your torch is shorter than one unit, or close to that size in world space, then one lightmap texel may cover entire parts of the torch
Which causes light leaking
So then do I just like make it bigger in blender and then apply the scale and shrink it in unity?
The second concern is that lightmapping really works with continuous geometry, not separate overlapping bits of geometry, so if the pieces of the torch are kinda inside each other there isn't much of a way to generate lightmap UVs for them that'd "make sense"
Possibly but that's very messy
Imported meshes shouldn't have weird transform scales so you can keep track of their true transform size
"Size in lightmap" would be the setting to tweak
It could work, but with this kind of mesh it would be an inefficient brute-force solution
Most of your level's lightmap space would be spent on individual prongs of each torch
Ok so, just combine all the parts, texture it like I would any other object whilst its unwrapped, and then adjust the scale inside the lightmap to ensure that everything fits?
Also, where is the Size in Lightmap setting
Is that just what this is?
Mesh renderer
But before you adjust it, I'd use the UV charts view, or any view that lets you see the lightmap resolution per baked object
And just to check are your lights baked or mixed, and are you also baking Realtime GI?
No realtime GI, lights are all baked, and this is what the UV charts looks like
Ok holy crap that was definitely the problem
So, lightmap texels are extremely big relative to the mesh size
Likely due to wrong import size
If you don't export correctly, object size will be off by a factor of 100
As we see here
Best not to crop screenshots unnecessarily so details like these can be spotted
there are things about the project I don't want to be public knowledge but sure
how do I fix this 100 scale thing in the future, it has happened to me several times
adjusting the scale properly I get this
https://polynook.com/learn/how-to-export-models-from-blender-to-unity
Check the correct boxes when exporting, or use an export script / plugin
Or you can later apply a scale multiplier in import settings, and scale down your objects in prefab/scene
alright
The wall's lightmap UV is pretty terrible also
yeah but that doesn't use UVs so it doesn't matter
Doesn't use them?
Also, here you have warnings that your Max Lightmap Size is too low, in lighting settings
Max Lightmap Size only determines when a lightmap is split into another texture, not how much lightmap space will be used
triplanar mapping, applies a texture across a surface at a constant size regardless of UV
It can be only used for base textures
Lightmaps still need to be UV mapped the traditional way
clearly not because they work fine with the baked lighting as is
and I implemented triplanar mapping so that I didn't have to do exactly what you're saying I have to
With the current lighting conditions it will not reveal an issue
Triplanar mapping is a separate thing, it cannot be used for lightmapping at all
why does the light on the wall look completely fine then
The issue is that the horizontal resolution is way too low, so it's stretched out
And the vertical resolution is way too high, so it wastes lightmap space
The light of the torches is smooth enough that the horizontal stepping won't appear
That means the excess vertical resolution is not necessary
Or it means that as soon as you have light or shadow that isn't so smooth, the stepping appears
I'll cross that bridge when I come to it, it would take so long to fix the UVs of this level that I'd prefer not to
fixing the torch is fine for now
As long as it's not a problem, it's fine to let it be
But important to understand why it's a potential issue
fair enough
also this is taking like 45 minutes just to render one torch on the wall, is that because of the segmented torch or is it always this slow?
The torches now have much more lightmap texels to render
It doesn't look excessive, but it's possible that one of the pieces had the right (or maybe too big) size, lots of lightmap texels and now has more than a hundreds times of that
But from what I see the wall is the bigger culprit
It's lightmap resolution vertically is absurd, and it's big
Should I turn down the scale on it or something?
You could split it into smaller segments that are less stretched, and then decrease the scale in lightmap a lot
I assume they're just cubes you are stretching about
yes
that would take even longer than just fixing the UVs
and changing the scale made it worse, as soon as I made the scale smaller the time it took to bake jumped to tens of days
Scale of what in this case?
scale of lightmap on the walls
Doesn't make a lot of sense to me
Smaller scale on lightmap means less texels to bake
thats what I thought too but if I set it to 0.1 the ETA for baking starts at a month and gets bigger rapidly
I still recommend a more limited test scene
Where you're not baking the whole level each time, and can scale the wall and floor however needed
Or better yet substitute then with some unity primitive quads for the test
It would let you test baking the torch without also getting potential issues from the walls while at it
And then it lets you troubleshoot the walls without taking 45 minutes to do so, or at least by process of elimination telling you exactly what mesh and what setting really is ballooning the bake time
ok the sun rises in about 20 minutes for me, so I'll whip it up really quick and then I'll be back tomorrow
Eliminating unaccounted influences is crucial for effectively analysing issues
Also, occasionally do "clear lighting cache" between bakes and even restart the editor
When things happen that don't seem to make sense to us, they should be tested empirically
Otherwise it's easy to waste time due to dismissing potential causes on a hunch, and to not learn what the issue was or how to solve it later if solving it accidentally while trying out multiple things
Or causing more conflated issues while at it
much nicer baked lighting