#archived-lighting
1 messages Β· Page 43 of 1
how would I combat this? the cupboard can't be static because it's openable/interactable, But the light won't cast light on it probably because it's a baked light
Would the solution be to just make lights that hit/are close to interactable/moveable objects be realtime?
Oh potentially 'mixed' is best for lights that cast onto/near these types of objects.
You may want to ensure they are all static batched, but that is outside of my sphere of knowledge. But having them all as their own individual baked little objects is going to make for a crap ton of lightmaps being generated I would expect.
They don't have to actually BE static, but they need to be flagged in a way to flag them as to be part of GI. Its one of the Static options where you click to make an object static, or you can set it to contribute to GI on its MeshRenderer.
You also may want to make use of the Scale In Lightmap value on the MeshRenderer for those, so you can tell them to only use like .1f of a texture map
Keep in mind there are two aspects to baked lights. One is the direct shadows, the other is the bounced light.
I noticed I dont seem to be getting shadows in scene view
is that normal?
I had this off in urp lol
Okay so I remember why I turned it off now, It was when I started because I was getting this weird issue
What are we seeing here?
Look at the shadow of the wheelchair hard vanishing
and the table leg
When getting close
Another example
you have a shadow distance setting somewhere, I forget which that is related to though
You might also have an issue with your light having a near range value too high, or a bias setting
on the flashlight?
yea. I am not the best person to be answering, but these are the places I would look first
Ah near plane was too high on flashlight
Dropping it down fixed it
It was also set to hard shadows (whoops)
Grrr damn shadows
Okay, I found what's causing the bug
How could I make Area Light Range not overlap closeby Area Lights?
Because when one Area Light overlaps the range of a second, the second goes blank
Are you using urp?
There is a light limit
Yes, I do use URP
URP:
Light Settings
Forward: 0 - 8 additional lights per object.
Forward+: no limitation per object, but 256 (Desktop), 32 (Mobile), 16 (GL ES 3.0) per camera
Deferred: seems to have no limitation
Speaking of this?
I myself can't remember how I found mine one moment lol
On this
Double click the option in renderer list
This
Yeah
and could you come again with what should I set here please?
i'm not used with this types of settings
done
Now see how your lights are acting.
now should I do anything else?
or just continue
from what I've observer earlier, it's the Area Light Ranges that overlap
Let me test please
it's the same
Can you post a picture or short video of what the issue is?
I'm new to unity myself but had a similar issue so thought my solution may have helped but seems it's unrelated.
I tried to fix this the other day but couldn't figure it out, My lights go through my walls? and it leads to alot of strange looking things, this red light is a good example
What's the best way to combat this?
The walls are thick and double sided
This isnt the best example actually I think that red is just high reflection
Dropped the specular highlights to fix the stairs but as you can see the red light is going through the wall upto the staircase
little test area to explain what I mean
Oh figured it out, Have to crank the shadow str on the light
yeah, i can't find a fix for my problem
So my lights are randomly flickering all over my scene at seemingly random points?
Also happens in the build
turning shadows off fixes it
and im being spammed by this every second
if i turn shadows from my flashlight off it stops the flickering, The shadow atlas is the max size it will let me have it also
Gonna try baking the lights and see if that helps
Oh right.. because it's a door that opens, how the heck do I work around that
how can i make these lights give more of a pop?
right now they look dry afs
asf
i tried bloom but just looks off
im using URP
You probably should give a reference image of what you are trying to achieve
something more like this
That reference looks like mostly just a basic bloom on the light. One thing about bloom is it REALLY wants you to respect actual intensity. Like it will look better to have an overly intense light with a small amount of bloom on your scene, than a low intensity light with too much bloom.
What is the emission setting for your light texture?
Also, if you want a bit of realism your emitting light should have a texture to the emission, and not just be the exact same color on every square inch of your light.
This is assuming your post processing layer and project are set to support hdr
hm i see
im still new to light
so you're saying i should put an emission texture on my material?
do i just search on google "light textures"?
If you don't then, yes - you definitely need that for a proper glowing light. That will also make that emissive light render when you bake the scene
I would ignore the light texture for now, start with an actual emissive texture, and you probably need to make sure your URP settings support HDR
For proper bloom to work, you need overbrights to actually be a thing
Then just cranking up your emission intensity should cause bloom
In non-HDR colorspace the brightest anything can be is 1, 1, 1
bit confusing but i'll get there
In HDR it can be brighter than that, like 20, 20, 20
It will render to the monitor as white, but its actually much brighter than just white
Like in real life, if you take a photo of the sun, it will show up as white on film
yea i got HDR, i'd like my emissive materials to also give light, since its a neon city that's super important
But because of the brightness of the sun, it causes all kinds of bloom, lens effects, and global illumination
its not just white, its a VERY bright white
Crank up your lights emissive to like intensity 2, and then bake your scene
See what that does
You have bloom enabled?
Try cranking emissive way up to like intensity 10
You might not be set to have an HDR post processing
yea and these are my lighting settings
Lighting settings won't matter yet
okok
if you crank up your lights emissive and you aren't seeing bloom, then something is wrong
if i crank up bloom i see a shit ton of bloom but its ugly asf
Don't crank up bloom
crank up emissive
What does that do at extreme settings like intensity 100
lemme try that and bake it
No need to bake
you should see the bloom immediately
baking is for the GI, which will also need to be balanced
yea i dont see anything even with intensity at 100
that sounds like you are not in fact getting an HDR post processing
yea wtf
these are my URP settings
lemme see this
where is this exactly?
same as the previous settings, down under post processing
See if that makes any difference
nothing changed
if not, I am out of ideas
Yea, not sure. I am still relatively new to URP myself so not sure where you might be going wrong
maybe something to do with the main camera?
yea this is super weird because people seem to get crazy lighting out of URP
meanwhile my light feels dry
maybe if i create a new URP asset?
Wouldnt hurt to start a new project and just try to get a basic light working from scratch to make sure you know how it should work
Though someone here might have a guess why you are having so much trouble getting emissive lights to work
For these I would keep that threshold higher. Like 1, so only overbrights bloom. And intensity can be kept pretty low as its going to be unnatural. like .1
Higher scatter will basically simulate something that feels like volume light around it, higher values can be fine for that one, depending how hazy you want to glow to be.
i had HDRP still installed
looks a bit better now but the intensity isnt working still
If intensity of emissive isn't having a noticable effect, you definitely are not getting a proper HDR post - so something is missing somewhere
yea i think i'll reinstall URP
feels like im missing settings
i started project with HDRP then switched to URP midway, unity might have gotten confused
Not sure that is the issue, but having a clean project should at least make it easier to learn how to do this particular thing
created a new URP project to see and it looks way different it's actually insane
with only 0.25 the bloom looks gorgeous
so I'd say its the bloom that's broken
Or something about your post processing settings - URP has a lot of settings and its easy to break it π
im using cinenachine
maybe its because i didnt set up the post processing extension?
I'm not home right now but are you using cinemachine?
gl
Hi! I'm making a small room (like a storage/pantry) in Unity. When the player gets close to the door, the interior lights up smoothly. I'm currently using a Point Light, but when I increase the intensity, the light source becomes too obvious on the ceiling. I want the room to be softly lit without revealing where the light comes from. I'm looking for a realtime and fade-compatible solution. Any suggestions?
I want to softly light up the interior of a house without making the light source obvious. Is there anyone with knowledge on this or who can point me in the right direction?
fixed it
and the problem was actually simpler than it seems xd
was pondering on rebuilding the project at this point
basically i was missing a main camera on that scene
only took entire day
What is this shadow just appearing/disappearing and how do I fix it?
Hi. I'm using Unity with URP and I have a Spot Light attached to a lamp. The light only seems to illuminate the player model, but not the surrounding environment or the house interior. The light also appears with a weird blue/purple tint, and it's not casting realistic lighting in the scene. I checked my lighting settings, and I'm not sure if Global Illumination or baking is set up correctly. How can I make the lamp actually light up the environment properly?
you need to enable lighting
click the scene tab at top and then press on the light bulb
as you can see the yellow warning messages indicates that you disabled the lighting.
if you want dark scene you can simply disable the directional lighting gameobject instead
thank you π
I'm having this issue where the same scene is lit differently depending on if you start the game from the scene itself or from the main menu. There is no do not destroy on load stuff and the level is loaded asyncrhonously with a loading screen
but when I build it looks fine
I'm a real nube. Any idea what might be causing those smudging artifacts on the walls?
Things I've tried:
Doubling lightmap rez from 40 to 80.
Doubling lightmap padding from 2 to 4.
You are sure your UV1 channel doesn't have any overlapping faces? How are you generating your second uv map?
ok I have to confess that this is a sketchup model so I have no freaking clue what the topology or the unwrapping looks like.
can you elaborate on what you mean by "second" uv map in your question?
lightmapping needs a second uv map. You may want to read up on what lightmapping does before getting to deep into this.
There may be a setting on your model mesh importer in Unity to tell it to generate a UV 1 if the file is missing one
Its very possible to that your model has overlapping facing and other errors in it, hard to say
oh you are right
hard angle is 88, angle error is 8, area error is 15, min lightmap rez is 40, min object scale is 1, margin method is calculate. Generate Lightmap UVs is already ticked. Any suggestions?
Have your brought your mesh into something like Blender to make sure its actually all valid with valid normals and everything? The quality of this prefab sounds suspect to me
I have pretty good skills in Rhino3D and Sketchup, but I just started looking at Blender. I'm not up to the UV chapter in the tutorial yet.
Might also want to try some other export options and try different formats out of it
I would guess it has overlapping faces and/or weird normals
https://discussions.unity.com/t/lightmapping-troubleshooting-guide/895352
c.15 invalid texels
If you have UV overlap as mentioned they, as well as other artifacts, can show up in wrong places
c.9 and the debug overlays to help troubleshoot: https://docs.unity3d.com/Manual/GIVis.html
Thanks that doc is really helpful. I don't have a good conceptual model of why this is the case, but turning on render face 'both' (URP) helped a lot (but not entirely).
yeah, this is a great guide
The texel invalidity chapter should have helpful examples of how and why
And what the drawback is for using render face: both
Invalid texels are lightmap texture pixels with basically no lightmap data, so they grab the nearest valid texel's color
Exposed backfaces invalidate texels, which is supposed to inform the lightmapper that he surface is inside another geometry
Therefore it should spread the valid lightmap color, rather than drawing a shadow there
But invalid texels can also show up where they shouldn't
Possibly also if there are exposed backfaces where there shouldn't
Hello. While im baking my indoor scene on urp, im facing with these such lighting problems. How can i fix it?
Here is my lighting settings
Hi all, I am getting an extremely dark scene after recreating my library folder. (linked before after pics)
I checked the lighting debug link just above but none of it seems to be related. The lights all work, they're just giving an extremely dim light compared to before.
I detail things a bit more in this post https://discussions.unity.com/t/lighting-much-darker-after-resetting-library-folder/1653760
I'm not sure what to look into next for the cause. Anyone experienced something like that?
Here are the main error messages, about incompatible keyword spaces
figured it out, was due to me having previously messed with the realtime hlsl
That would've been tough for us to find
How'd you mess with it that caused this only later on?
Oh I see you detailed that in the post
haha yeah, I had to go through the journey of remembering my mess π
i am new to baked lighting in unity, and cant seem to figure out how to stop these black splotches from appearing on some static objects after baking, can someone help me?
the console keeps saying i have overlapping uvs, but im not sure how to fix it without going insane from searching through forums
is there a simple fix?
#archived-lighting message Chapter 9 of this guide and the debug view modes for you too
The guide can also be found in documentation now
Is there any way around to apply lights to specific rendering layers with 2d lights?
i want to seperate the effect of light on objects, but i heavily rely on sorting layers for my isometric game.
currently i don't see any options to apply 2dLights on a specific rendering layer yet the option is there for sprite renderers.
I'm not aware of one
Isometric games can use Y or custom axis depth sorting so sorting layers can be free to be used for other things
Hello everyonem i'm beginner and i have put some light on my scene and it's look like that, why i have random illumination and it's stop instant idk why ?
Per object pixel light limit from the look of the symptom but hard to say for sure without knowing render pipeline, rendering path or the shaders used
Are those cameras over every light?
Yes the cameras are useless it was for an light fog effect but im gonna remove it
Ok thank Iβll see
btw it's built in render pipeline
BiRP by default uses the forward rendering path which has a (configurable) light limit
If the shaders have a custom lighting model it may override the limit
Can i increase over the "limit" ?
Yes, from the graphics quality settings
oh nvm i fixed it, i changed my camera setting i switch rendering to deffered
If you change the rendering path, make sure to familiarize yourself with the differences between them. They are completely different ways of rendering lighting that have their benefits and limitations as well as potentially large impact on performance. Forward rendering is not the default without a reason, of course it has itβs limitations too. You can obviously change it back later but just want to point out that the choise of rendering path is not as trivial as you may think and can affect many things later on
Hi, guys. Does the APV (Adaptive Probe Volumes) pipeline somehow rely on the lightmap texel density of assets? Does increasing texel density in lightmaps affect the quality of the APV bake?
Not at all
Only probe spacing affects the "resolution" of apvs
Thx!
my level is tiled so tiles near the player can render differently. lightmapped shadows reveal the seams. it used to be worse, until I increased lightmap padding. increasing further isn't helping though. I've seen suggestions to combine meshes, but I assume that would break my player proximity visuals. anything else I should try?
Not much
What do you mean by "player proximity visuals"
tiles near the player highlight as a visual aid
There are other ways to do that kind of effect, at least
Like a shader for all objects that lets you highlight a tile shaped area
Or a shader for a decal projector or a fake decal that functions as an overlay to anything inside its volume
Otherwise you would be considering APVs which don't suffer from seams like lightmaps do
so combine meshes after all and try these shader ideas? I'll give it a try thanks
If you have the option to use APVs, that's an alternative to combining meshes and figuring out what kind of shader does what you need
So we're doing a PT kinda looping thing in our VR project where we additively load and unload scenes that share the same world space. we're hitting a big limitation with lightmap loading where the second we load the new scene in the background, the lightmaps for the current room just vanish and the environment lighting changes. Anyone got any ideas on allieviating this?
You are loading the same scene multiple times? Don't think that is doable if so.
You likely would want to have multiple, and pool then if it isn't possible. Would behave better than loading regardless
What can cause these strange colorful blobs on lightmaps (red arrows)? Notice how book (green arrow) don't have them. Image on the right shows that they have approximately same lightmap size. Both models have Generate Lightmap UV's turned ON. I tried different lighting settings for baking but had no luck figuring this out. Anyone knows what to do?
Here are my current settings
Many lightmapping problems manifest as colorful blobs
https://discussions.unity.com/t/lightmapping-troubleshooting-guide/895352
Mostly looks like c.18, could also be affected by c.10
Oh, thank you! I will take a look
Usually the more geometry seams you have, the more lightmapping issues you have and the less efficient the lightmap spacing is
Because every seam needs padding to prevent leaking
not really. Basically we have a corridor, a room, and variants of both that get loaded in and out as needed.
- The player enters corridor 1 through an opening, and moves through the corridor
- Room 1 gets additively loaded as the player approaches the door to the room.
- The door opens, showing Room 1.
- The player enters, The door closes, And Corridor 1 is unloaded
- Corridor 2 is loaded while the player does puzzles in the room.
- When the room puzzles are complete, the player moves through an opening into Corridor 2.
- The opening closes behind them, Room 1 is unloaded, and Room 2 is loaded as they move through Corridor 2. rinse, repeat.
That might still be an issue. I haven't tried doing that with scenes. But with Prefab Baker and loading any baked prefab more than once the lightmaps don't work properly.
Why are you loading and unloading the same scene though? Rather than enabled and disabling the gameobjects? Loading and unloading is going to cause all kind of allocation and garbage collection needlessly. Are you sure these rooms too large to keep in memory?
If you only have a few rooms doing this, I would definitely not be unloading them and would be recycling the one
Hi, guys. I'm having some issues while baking lighting with APVs. It seems that the bake has absolutely no effect on my interior, while the outside spheres appear to be baked correctly. How can I solve this issue? Can attach additional info if needed
Objects set to static, mesh renderers receive global illumination from light probes
Is there any way to change MeshRenderer.receiveGI in a build? This property is editor only.
Edit: it seems setting Renderer.lightmapIndex to the index of the desired lightmap is how you make a Renderer change from using light probes to using lightmaps at runtime.
We are using subtractive lighting mode and we are having a issue where shadow pass through other objects is there any solution to it?
Use shadowmask
Hello, we've been working on a project where we want to have real-time shadows and allow the player to toggle on/off lights and change their color/intensity as a customization feature. I'm starting to think this is just generally impossible. Lights disabled = ~1400 batches, enabled = ~15k. Obviously 15k batches is insane. We've tried all rendering paths, enable/disabled srp batcher, static batching, & dynamic batching. I plan to combine some of these meshes which should drop the batch count though however much I drop it, this will still be an issue. Is there anything we can do or does Unity just not support this kind of project?
If you're using SRP Batching (and you should) you don't have to stress over batches
SRP Batching decreases the cost of batches
Rendering paths beyond Forward decrease the cost of lights separately from that
Shadows will always be expensive regardless of batches
I was initially hoping for a simple answer to this but I believe the map is just generally unoptimized. Too many shadow casters, lights with large ranges. A lot of the map is separate meshes as we want the player to have freedom on customizing the wall/floor materials, which definitely doesn't help. We are redoing a bit of it right now. I'll come back here if it's something I can't solve, but definitely seems like a user error on our end.
Rarely simple answers to optimization
You can profile the performance analytically to find the problem areas, and also less analytically try toggling objects or effects to see how the performance changes
Like changing all light ranges at once or toggling shadows for them
Turned shadow casting off for a few mesh renderers & lowered the ranges from 12 to 8. Somehow went from ~11k batches to ~2k. Huge difference for little work, not complaining though!
hi i want to ask is there a way to make this baked lighting more look more clean, just like the screenshot the baked light on some part make the wall look dirty.
lighting option that i used right now
Lighting affects batches because when the material gets information from a different light from another material next to it, they can't be batched
But as mentioned SRP batching decreases the cost of separate batches so it's not that big of a deal
Deferred rendering doesn't affect batches at all with its lighting, but that doesn't always mean it's necessarily cheaper than Forward or Forward+
You could increase samples and decrease compression
As long as denoising and filtering settings are "okay" there is no need to tweak them as denoising effectiveness is limited by samples and compression
But ultimately getting a perfectly smooth baked light is pretty difficult
If an option it's better to have even a subtle texture on the wall that conceals the noise in the lightmap
Thank you for the help, I will try to increase the sample and disable compression
And I want to ask one more question my non static object became black after baking, I think it because I add light probe but not set it right yet is there a way to disable the light probe without rebaked the light? I have tried deleting the light probe it doesnt fix the issue
I think probes and lightmaps share the lighting cache so probably not
Although it's possible to overwrite them separately from C#
Usually not worth the hassle
If you have a GPU remember to bake with GPU so the bake should be orders of magnitude faster
Ok Thank you for the help, I dont have gpu so im sticking with cpu right now
Hello there ! I'm trying to bake a static lighting with a plane but as it's a single face, there's this issue. Is there any solution to fix this or I'm cooked and I've to create a specific mesh with 2 faces ?
It's probably a recurrent question here but couldn't find any solution to this ! Thanks in advance πΊ
Hi, gyus. I have this kind of result after scene baking. Why some of my objects have map checker on it while other simply don't? It's "Baked lightmaps" in debbuger mode. All assets are static, have uvs and some of them are even ticked to generate lightmap uvs
Generally they all should have checkers
If you say some of them have lightmap UV generation enabled, is it the case that the objects without it don't have checkers?
Or you are also baking APVs and those objects are using probes instead of lightmaps
Though in that case I guess they'd still have the grey checkers
Hi guys, can someone let mne know where migght the issue be here?
the shadows are extremly off for some reason, they're worse off in real time, this is how it looks in indirect baked mode, shadow masking looks slightly better but still doesn't solve the problem
Which render pipeline?
URP
Then you should be able to tweak the active URP asset to fix it
Increase shadow resolution, enable shadow filtering ("soft shadows") (in both the Asset and on light component), decrease shadow distance and/or add shadow cascades
Now there's also a separate soft shadow quality setting
In baked indirect mode the shadow you're seeing should be exactly the same as with realtime directional light
Some objects even with lightmaps generation don't have checkers. I also currently don't use APVs
damn, I guess that explains it, thank you for your time
Hopefully ^^
If there's more weirdness you can also use the frame debugger to see what exactly is being drawn on the shadowmaps and what the lights are "seeing" from their perspective
Shadowmasks when baking can have their own weirdness, but it should not be related to this specific issue
Well, doesn't seem to be causing an issue besides being an odd inconsistency?
Could check other lightmapping debug views too, like contributors/receivers,UV charts and UV overlap while at it
And also if you've also baked Realtime Global Illumination, that bakes a separate set of lightmaps using a different system that have their separate debug overlays (and separate issues)
It seems that there are still problems with it, cause objects without checkers aren't baked in a proper way if compare them with checkered assets(
Okay, can this be an issue?
Overlap check
It's one of the issues
Thx
Is this true for the walls and objects we see in the screenshot? They show pretty typical symptoms of having no proper lightmap UVs
Yep
Right under there are lightmap UV settings, you have to make sure the minimum lightmap resolution specified is not lower than the resolution you're baking with
Additionally the objects must not have a crazy scale, in the mesh or inherited in hierarchy
The scale often goes wrong on export/import
If the room is one mesh, the walls should not be modular like that
And there should be no internal geometry
Seams in geometry and wasted surface area both are problems for lightmap baking
It's LODS and collisions uvs overlaps with original asset UV. Is it an issue? Actual UV seems to have no overlaps π€
Possibly
I believe the lightmapper attempts to bake each LOD level separately
The LOD meshes probably could all share the level 0's lightmap, but if the lightmap UVs are auto-generated they won't fit the geometry of the other LOD levels
The room itself doesn't have LOD levels does it?
Yeap. Walls are clear from LODS
But they still clearly have issues
Yeap
Probably more fundamental ones, so I'd try focusing on that first
Probably requires a bunch of test bakes so I'd make another scene that has just the room, one chair, one table, one TV and one lamp
No point baking all of them each time
Then if you want to bake without LODs, or some similar test, it'll be much less work
Okay, thank you 4 your time β€οΈ
In this case I'd also confirm the scene is the right scale, using a default cube
The default cube is one metre tall so that helps determine if the room is room-size
That's correct
The simplified test scene will surely help
There's many variables with baked lighting so a lot of problem solving is typically doing a lot of test baking, tweaks, more test bakes
Comparing to what should work, like default meshes
Sometimes the number of baked objects can cause an issue on the lightmaps, so even just stripping the duplicate scene from all the extra rooms and furniture may give a clue with how it bakes then
Thanks. Will try to simplify things and then try to detect an issue π€
Do post if you find something that looks like a clue
Also when you start seeing some more specific issues the link here #archived-lighting message
will help identify them
So far we've just seen very vague UV overlaps and wrong scales that look like most of those issues
But without something more specific would have to assume the meshes themselves could be an issue
Or the baking settings, or some combination thereof
i have a question, will unity realtime specular from realtime lights will work at future like unity 7, 8, 9 when it will out, like i need that because i plan to use specular realtime effect in future
π
(using urp)
What do you mean by "realtime specular"? Whatever that is, if it exists now, it is very unlikely to disappear in future releases. I don't know whether the target version is decided upon yet, but unity have announced that they are working on unified render pipeline which would make URP redundant but that shouldn't remove any features, only add new ones.
ok thanks
Only lighting feature set to go away is Precomputed Realtime Global Illumination
If you can describe more specifically what kind of realtime specular you mean, we could say with more certainty
like just light reflections from smooth material (urp lit)
Not going anywhere fortunately
It's a basic feature of all physically based rendering
thanks
Anyone know how to fix this stuff caused by baking lights? π¨βπ³
Use more resolution in baking setting (for unity 6 and 2022.3)
And specify are you using urp
Thanks for the response! Yes I am using URP. My current lightmap res is 40. I Have tried adjusting it before, but I will try again and let you know how it goes
i recommend use 70
Trying it now. Get back to you in 82 years when it's finished
70 is WAY to much.
In outdoor scenes you should not use more than 20 and even this is to much.
Good to know. Any ideas on what's causing the funk?
i bake scenes with res of 10 - 20 and they look good.
Are your mountains one sided? so they have a open backface?
No they are full mountains
closed geometry? also at the bottom? ^^
No, on the bottom they are open. I'll try 10 rn
i think you have invalid texel artifacts. You can check this with the "scene debug view" > "invalid texel artifacts"
If this is true, check chapter 15 here: https://discussions.unity.com/t/lightmapping-troubleshooting-guide/895352/4
Low resolution can amplify baking artifacts by making each messed up texel bigger but I do not think it causes them
At least unless resolution is lower than the minimum lightmap resolution set in lightmap UV generation, which only causes UV overlap and light leaking
I'll check that once I find the setting. Thank you for your response
By default the minimum is 40 iirc, which is on the higher end
Resolution is of course relative to scene size and mesh's size in lightmap property
The problem started when i tried to undo all my lightmap data and reset, and then when I baked again it was all funky
I concur it most looks like invalid texels, but somewhat atypical
It is baking at 10 iirc rn from Kjarudi's advice
Did you "clear lighting cache" or do something else?
Sure let me look for that. Not quite sure how to find that
I don't think so, should I have? And if so, where can that be found?
After you've baked you can use the lightmap debug views https://docs.unity3d.com/Manual/GIVis.html
Dropdown on the Generate button
If you're also here to link people to chapter fifteen that must be easing my workload almost 50%!
Right now it is generating with 10 iirc. Would you recommend clearing the cache and restarting?
Yes, unless it's not a long bake then I'd let it run
Im back! Didnt read the unity discord for about 6 months! π
How can you tell if you have invalid artifacts through texel validity view? Or is that not the right view?
Also thank you guys for your help!! I usually work in 2D, so this is really appreciated
In Chapter 15 you see how it looks (red pixels = texel invalidity) if you are in debug mode
Finishing the bake could give a clue of the result before and after clearing cache, at 10 resolution
I'll check it out
Alright it has about 20 minutes left. Until then I'll check out this "chapter 15" y'all love so much
Changing multiple variables per test always muddies the conclusion a bit
If it was longer than like 3 minutes then I'd cancel, but that's subjective
Bro my bakes take hours hahaha
Looks like I have a lot of invalid texels
Also check UV overlap
That's a pretty crazy result
The debug views require a finished bake though I'm pretty sure
I'm gonna clear the cache
oh π π
For test bakes it helps the speed to bake smaller segments of the level first
And to use GPU baking if you have a GPU
Lowering resolution and samples also speeds things up but can introduce some artifacts that wouldn't otherwise be there
Yeah I'm using my GPU, it's a laptop 3060 though so still takes about 30 minutes per bake
Just based on this it looks like there might be overlapping geometry since the invalidity pattern is so speckled
And because it's repeating perfectly it suggests the lightmap UVs are not properly generated
The pattern is the grass sticking out
Hmmm I don't see any overlapping geometry but the debug view seems to change throughout the bake so I'm going to let a full bake happen and then I'll look at it again
The resolution wildly changing between geometries suggests also missing lightmap UVs, or if there are drastically different scale in lightmap properties per mesh, or if the meshes have different transform scales
Yeah the transforms vary between the inside of the map and the outside. The totally different res on the out side is not a playable space
I'll look into adding lightmap UVs. I've never done that before
It's a checkbox in mesh import settings
Dropdown below it lets you specify minimum lightmap resolution
Found it! I'll try that if it is still blocky after this bake. But for now, I am going to bed. Thanks again!
You functionally have to have lightmap UV generation on, or have manually created lightmap UVs for lightmapping to work properly
Good luck when you continue ^^
Update about checker trouble: i'm using better lit shader at some of my assets - that's why checker isn't displayed at debugger mode. If i change it to hdrpLit - checker goes back
@deft fiber
Good to know!
It's possible that the choice of shader affects baking results
Hi again. Seems to be common issue with baking. Got artifacts on seams after bake. Wall geometry is merged and thick enough. My baking parametrs:
Tried to tweak resolution and padding. Thought it change something, but issue stays
Your sample counts are very low
The defaults are 32, 512 and 256
I would also have a room or a corner next to it made of default cubes with default shaders and similar lighting, so you can compare and see if the mesh or shaders alter the baking result
Okay, i'll try
Thank you. That helped
Another trouble: some assets become completely black after i enter playmode. Seems that lightmaps are messed after i click playmode button
how do I fix this? idk what is this.
its like to that side its not lighten
every light has this issue in my scene
Seems to be a lightmaps compression issue
Try this
Could be the normal map for the material, how does it change if you change material / remove the normal map?
or the mesh itself has bad normals
hi
Volume Profile
left is PC, right is NDA platform
why volumetric fog option is completely missing from the same asset, when I'm checking it on NDA platform?
it works on other scenes
doesnt mean much as many things could be different
looks like you didn't mark your texture as normal map
Wdym?
does your normal map texture have "Normal Map" texture type?
Volumetrics could be disabled from the global settings, but not sure
#π₯βpost-processing or #archived-hdrp seems more appropriate
https://www.reddit.com/r/Unity3D/comments/1ixeddl/reflections_go_dark_on_play/
Looks to be this issue
Especially as Bakery is mentioned and it also can be spotted in your screenshot
Thanks for the help! Looks like generating lightmav UVs in the import settings set it straight
That solved all of the artefacts we were seeing?
Solved the visual errors. I'll let you know how it looks through debug view once this bake is done. Although, I'm not too worried about it , as long as it looks good and runs good
I don't work in Unity's HDRP often enough, but I'm really enjoying the lighting quality. I'm taking some of the assets from The Human Spaceflight Project and updating them for this render pipeline. I'm kinda exctied to see where this goes.
Was fixed with new scene creation and reimporting all as prefab π΅βπ«
How do you prevent unity from automatically rearranging your lightmap UVs?
The mesh importer has a switch on it telling Unity to create the second UV map. Does your imported model already have two? The auto-generate UV should be disabled by default
yes, though they're both the same layout. I do have auto-generate UVs disabled
Then Unity shouldn't be changing anything. Are you re-importing the model after making changes or something?
For what purpose?
not having shitty uv seams lol
it's apparently because I'm using enlighten
Hey lads, for some reason, when built, if I play, the sun source will work. But on other's pc, it wont, is there any reason why this happens?
do area lights only work on meshes that have uvs in the mesh? currently i calculate uvs in a fragment shader on the fly, but have noticed when i bake, my area lights dont seem to work but the other lights do
Area lights are baked only, so yeah. They need a proper lightmaps UV.
ah okay thanks! that explains it!
some didnt had
How do I fix this so reflection is more realistic? My reflection is realtime so I dont understand what is going on.
Bc ig reflection is aligned to center or smth but I dont want that
you will never get realistic reflections with reflection probes.
If you want realistic reflections on walls, you need Screen Space Reflections, but they are quite expensive.
but is there a way to make it better at least?
More Probes. Maybe one for each corridor.
ok thanks
But Reflection probes are more a thing for... maybe a weapon you hold in your hand.. to have the room reflected on the weapon.
They are not made to have reflections of the room on the walls.
What happend to my baked lightning? I changed to hard shadows and it does not show any light
oh so thats why it looks so bad
ok
(or planar reflections)
I still have no idea why some lights disappired
Thanks for help. The only way I had in mind was making new lights and deleting old ones.
yet everytime I generate lightning they disappears
So there is a bug that makes baked light disappear when I generate lightning
that sucks
I dont know how to fix it tho and I no wanna copy and paste it again
Just changed it to mixed and i will just switch it to baked
I have so many lights that its just pointless to fight with it
enable static on ur map and use reflections from realtime lights
or mixed
Ye but realtime lights use a lot of processing power, no?
Realtime reflections are "realistic", as long as your normal maps aren't messed up again
Reflection probes are a whole another deal
Likely yes
You should show your lighting baking settings
you mean this?
no I made sure my normal maps are good
Yes
This suggests that you are not baking lighting for this scene
If you do, this region below it is also relevant
So thats why my baked light was disappearing?
20k light probes in this scene/group.. i have no reference. is that too much if I'm trying to run this on phones?
also how much would you aim for?
How big is your scene?
For a single room its way to much, for a whole map its okay.
Yeah its a small part of a city with a mall you can enter. so probably okay then π
thanks
maybe share a screenshot so we can see the density ^^
sure
for example
I'm using Magic Light Probe to do this, probably haven't gotten the setting quite right yet though
(Also tried APV but i read it's more intensive and also got an "error" that it can't load it all in one go)
That looks like a lot
Most of them I expect are redundant because the lighting doesn't functionally change but there still are multiple probes in those spots
Even without probes it looks like a really big city to load in at once, with interiors and all
You will have to test it tough
The scene in general, and also with and without the probes
hmm.. what could i do to improve it? its not a too big city but i want to be able to enter the mall and keep walking around in and outside
Magic Light Probes probably lets you specify how many probes it places, and you can add or remove them otherwise also so that's a variable you have control over
Oh I thought you meant outside of the probes to improve the map
Large areas are often loaded and unloaded per zone
In a way that makes sense for the gameplay
Also have to still figure out MLP settings to get it right
So like by placing triggers or how would you do the loading/unloading?
There are multiple methods that are all situational
Triggers are good if the level has areas connected by specific points
Chunking is better if there are no specific points like that, but the player is more free to move between areas in a grid-like way
i guess not so good for this because of its openness
although.. perhaps at least the interior i could load/unload when leaving entering
But also if the player can move or rotate the camera, you must ensure the areas where they can look won't be unloaded
Interior/exterior separation is usually logical
Wouldn't it stutter each time this (de)activation happens though?
But this may introduce a pause to load during the transition
A lot of games utilize liminal spaces between two areas to hide loading in the background
also i don't have LODs. Adding those would probably boost it quite a bit?
liminal as in like a hallway etc
Yes
Loading screens that pause the game are used so the gameplay won't stutter during loading
What if everything is loaded in at the start and i just toggle meshrenderer enabled state?
Loading in the background will stutter only if the hardware can't handle that
Background loading will also place a time limit how long a slower device can take before the player reaches the area
Meshes outside of the camera's view aren't rendered to begin with so it's not a meaningful gain
You'd have to have another system running that would enable them which itself requires performance
So how am I saving performance by unloading them then?
The time it takes to load the scene initially, and any scripts that would be running in objects in unloaded areas
LODs help if there are many meshes on screen, especially due to distance
If your perspective is fixed that prevents the player from seeing very far and many objects at once, it will not help by itself much
(Aside from the initial load time...) Yea it's mostly just meshes(+colliders) so practically they can just stay loaded?
If there's no physics going on there either then yes
no, just static colliders like buildings etc so no physics unless the player walks there
These are typical techniques, and examples how they are situational
hmm wondering if lods will help enough to justify making them.. there arent that many meshes visible and theyre mostly rather simple. not sure about this metric
Like I said originally you will have to test performance first, to know if you even need to implement any of these optimizations
right
And when you do implement them, test again
And possible even by simulating optimizations before implementing them, such as by disabling specific meshes or effects
on my phone i currently get about 18ms of waiting for vblank
i think its 30fps(?)
well could be around 60fps if uncapped... and i still want to add npcs and other fun thingies
feels like i should optimize soon
yea true.. but iirc it said cpu time was around 15ms and gpu around 18ms (?) gotta check in a bit again
so thats just under 60fps
"Waiting for vblank" might mean you've already exceeded the maximum framerate so it's just waiting
Or it's unable to hit maximum fps, like 60, so it's targeting half of that and delaying until it's 30
You have to be meticulous about interpreting the profiler information
CPU Main Thread Frame ~15ms
CPU Render Thread Frame ~3ms
CPU Present Wait ~16ms
GPU Frame ~18ms
Oh yea it also says "Present limited"
Looking this up in the development build menu btw
I was getting 90-120 fps when i uncapped it and set my phone refresh rate to 120
Although i guess that makes it run too hot and now its constantly at a stable 60. cant seem to get 120 anymore π
I'll try to still optimize some things and test the probe stuff probably too soon
You may want to describe "this"
We don't know how it's meant to look
What type of light, and what shaders are the materials using
Nothing special tbh. I was getting everything from unity
But I copied and pasted it to different scene and the problem is also there
other scenes are good so its only for these assets ig?
so smth is doing it bc if I turn off the "Act5" it goes dark as it should be
ok... so
somehow the bookshelf is doing it??? π
but how π
it has a sun in its asset
omg that is so stupid
sorry
Im going to fix it now
Stupid problems will always be a part of the process
Scrutinizing each step that lead to the problem and removing objects temporarily to eliminate or confirm them as related is the exact right thing to do
Thanks for understanding
In fact we'll never become so smart that the stupid problems won't get us ^^
So only meticulous troubleshooting strategy will help
^^ I find I never stop running into a weird gotchas. I just get faster at making sense of them and fixing them.
I think a lot of people expect things to just work in rendering/lighting - but Unity is not Blender. There is a lot of trickery and tools for trickery to make realtime rendering at 120fps possible, and all of these headaches come from managing those tricks. Nearly every trick brings gotchas with it.
Hi everyone,
Does somebody else has difficulty to bake indirect lighting into APV's ?
Nothing besides the expected challenges
That's vey vague
when do i use this vs not use this? i put a volume in there and set it to static and stuff and it blew up my bake
"Blew up"?
really odd lighting like christmass lights but im guessing its fine to not use this tab?
What kind of "christmas lights"
If you are baking lighting the Environment profile should match the volume profile in your scene that defines the sky
Unless you have a particular reason to bake lighting with a sky profile that's not the same as the one your scene uses for realtime lighting
it seems fine now as long as i dont enable static lighting background clouds and static volumetric clouds
What you describe sounds like sample count problem, multiple importance sampling problem, problem baking animated shaders as static, or something else
Hard to guess with little to no information
environment samples?
Potentially
If you want to bake static lighting from clouds that are normally dynamic, I'd first check if HDRP has some relevant instructions for doing that
its not so much a want versus knowing which i should be doing
So i have this problem with my point lights
as you can see in the video it only works fine when i am the player is close to it Anybody knows how i can fix this problem?
https://www.youtube.com/watch?v=y_vw-jzuNs0
My Tutorial should help
This video deals with the common problem of flickering or invisible lights in Unity.
If you also have the problem that your Unity lights flicker or become invisible depending on the viewing angle, this is the video for you.
Fixing the problem of flickering or invisible lights in a few seconds with a few mouse clicks
If you are interested in g...
thanks man
The skybox will be the primary influence on shadow areas yeah, assuming you have no reflection probes
I do have a global reflection probe
Also I've marked both my terrains and the car as non-static and cleared the lighting data, but realtime shadow didn't apply
I'm using Mixed lighting
Why?
Shadow will be dark regardless no? Where are you thinking ambient light in those shadow areas will be coming from?
If you have your light set as baked only, and you set your car/terrain to non-static - I am surpirsed to have any shadow there at all
Your screenshot shows the light set to baked?
That's the reflection probe
Oooh
If your light is set to mixed, then its just going to be realtime for your non-static objects
But you see, I've marked both of them non-static, the light was mixed, and I cleared the lighting data
Then even if I change the skybox, the shadow stayed the same
The shadow without any baked data is just going to be the result of your light and any reflection probe reflections
So what are you expecting there vs what you are seeing?
If you have one light and no baked lighting... then your ground should be pitch black under the car, plus any possible reflection probe reflections added to that
I'm expecting something like this when the skybox changes with the Mixed lighting
Why though? Shouldn't there be a realtime shadow?
It is a realtime shadow, which is 100% shadow from a single point light
and light under the car will come from ambient, baking or reflections - there is no other source
If you have no ambient light source, no reflection and no baking, it should be 100% black in the shadow (unless you set your shadow color to be something other than black)
The ambient light source is skybox
I've changed the skybox to be bright, set everything to realtime including the reflection probes yet it's still like this
Skybox has to bake though
Oh
Because its a complex directional based thing
Unless you have some kind of realtime GI enabled (I know little about that, its too expensive and useless imo)
Which pipeline btw?
URP
You will want your terrain to be static if you want to bake using the skybox
You can still use mixed, and your main light can case shadows on it
So you can drive your car on the terrain and have it have a shadow
So this is how it looks right now, the terrain and the objects are marked as static
This is fully due to skybox , right?
That looks like only the skybox doing the lighting there yea
did you turn off your sun?
Something seems odd then, your sun should still be adding to the baked lighting
It's also marked as the sun source
Oh, rebaking it seems to work
So basically, I must bake the lighting in order to have the ambient lighting from skybox, which causes shadows?
yeah, skybox is a super complex light source
I see
definitely not getting that kind of lighting realtime
But if I wanted realtime shadows, what'd I have to do?
Compromise basically. Typically your car if it moves will be non-static and the ground will be static
What happens if you mark the car as not static, bake, and then move the car around?
The skybox lighting of the ground should exist everywhere, and your sun will add to that. What you will lose is the car blocking the skybox lighting of the ground - since that has to be baked and is not realtime
So the ground under the car will be a bit lighter than is natural
ive been stuck on importing for a while after ticking "generate lightmap UV's" for a single mesh. should i just kill it or wait for it to load?
I have never had it take that long, so feels like its stuck - but could be that is just a really big complex mesh?
ive never had it take this long either, but its not too complex. only a few hundred thousand tris i think
so i killed the editor but it's still trying to generate lightmap UV's?????
why is UnwrapCL still running??
i lied its a million tris
Never tried anything that big, though I would be a little concerned about it trying to unwrap that into something that will fit onto a single map
Like any islands at all, and you are boned
With a million tris, that is less than a pixel per triangle by a long shot
often when i make changes in 1 adaptive probe volume, it applies those changes to the other ones too, is that a bug?
Even if I set the car to static and bake and move the car around, the shadow follows
It's realtime although I don't want it to be
You don't want the car to be realtime?
For now no, I'll work on realtime shadows later
The shadow in mixed is going to be realtime, unless you change that shadow mode for that
The car and the terrain is set as static though
If the car will always be static, then by all means make it static
you will get more realistic skybox lighting that way
It currently is
But when I move it, the shadow moves
It's like the lighting isn't even baked
You rebaked after changes the static settings? And what are the actual static sub-selections? The checkbox is kind of fake, the "static" setting for a gameobject is actually an enum
I've set static for children also
And yes, I've rebaked
Oh, let me check
If your light is set to mixed, its going to be realtime still even for baked
Why?
For the shadow part of it. You will however be baking indirect lighting from your main light
Because that is what mixed is meant to be doing. It is giving you baked GI, but the shadow is dynamic since its expecting to have dynamic objects moving around effecting it
Oh, I see. Can I also ask what's GI shortly?
Global Illumination
light scattering
So your sun's direct light in mixed is realtime, which includes its direct shadow. The light bouncing off of what that direct light is hitting however gets baked, since its a much more complex thing that can't easily happen in real time
There are other lighting modes other than ShadowMask that you can look into
As well as ShadowMask mode has two options itself
Are you trying to make an outdoor scene where NOTHING dynamically casts shadows? Even the player and NPCs?
Hello guys, i've been struggling for days to bake some lights in a scene
It's a part of a map from Counter-Strike 2
Does anyone know why the floor has those weird shadows? there are no faces overlapping in the UV, i'm going crazy...
I figured it out, if anyone has a similar problem hit my DMs
Or you could just say it was texel invalidity
Does anyone know why this weird lighting problem is happening when I bake things? This first image is what my lights look like in real time, obviously you can't have many real time lights so I have to bake them(plus duh performance), but when I bake them they look absolutely abyssmal. I assume its something to do with the UVs of the meshes but I really can't tell because I already unwrapped them again and made sure they were exporting properly.
this is what they look like baked:
No Lightmap UVs generated, most likely
they are being generated, I already checked that fully
unless something about this is wrong
"active scene's lightmap resolution is less than the specified min lightmap resolution"
But first do confirm it using the debug view mode above
what's this supposed to be telling me
I have the lightmap res set to 10 texels, if I set this to anything less than 10 parts of the mesh start disappearing in this overlay debug mode so I assume thats what its for
you see your wall is extremly stretched which results in very bad lighting.
I also cant see any checkerboard on the torch which is a sign that the lightmap UV is not correct.
And, as far as i know, transparent Debug visuals means, that its not baked correctly
everything is transparent its meant to show UV overlay... and the wall is perfectly fine if you look at the screenshots, it uses triplanar mapping as most large terrain objects do, so the UVs are irrlevant.
the checkerboarding on the torch not being present is valid though, I'll see what I can change but I don't know how to fix that
This says there are no lightmaps, if it's UV overlap
Is it that one or some different one?
Lightmap debug views are only visible if you've baked the particular scene in the current editor session
Its UV overlap
also yeah after I baked it it looks like this
baking took a helluva a long time but it looks a little better I suppose
how to I make it so that the UVs are good?
The one thing that sticks out is the resolution warning
Lightmap UV generation settings must have the correct minimum lightmap resolution that you're baking with
Yes, but there seem to be issues where there are no overlaps, at least according to the two previous screenshots
So it might be a light leaking issue separate from that
so how do I fix that? if I could set the UVs manually I could fix light leaking myself
We haven't pinpointed why that's happening
95% of the time auto-generated lightmap UVs don't have any disadvantage over manually generated ones, and the manual process has its tricks
In this type of situation I'd view the lightmaps directly from the lighting window
It shows the UV islands on the lightmap texture, so you can spot things like lighting crossing over from adjacent UV islands
And I would try different lighting placements, often light proximity to geometry can cause unexpected results
You can bake just one segment of the wall and one torch at a time to speed testing up
Preferably in a new scene
why in a new scene? also when I look in the lighting window for the baked texture the islands for the torches are extremely small, how do I fix that?
I just have a bunch of textures, is this what you mean by lighting window?
also I dont even know how to tell which are the UVs for the torches
That is the one
It seems to be showing a mesh that doesn't have lightmap UVs generated for it
all the meshes except the floor and the wall have uvs generated
If you select a mesh renderer iirc it shows which lightmap it's using and also lets you open the preview window
Everything that gets lightmaps should have lightmap UVs
You can slide the exposure slider to reveal if dark areas are pure blackness, or just darker than the rest
How do I select the mesh renderer? I dont see anything about a lightmap here
bruh I'm stupid
Ok yeah the one that I took a picture of is the torch you are correct
but I have it set to generate lightmap UVs why is it just not doing that lol?
As long as you hit Apply in import settings after changing it, it should do it for all the objects within that mesh asset
I guess the alternative is that you have meshes from different assets
When you click the assigned mesh field in the Mesh Filter component, it shows which asset it is from in Project window
In this case I'd make the test scene with just a wall, a floor, a torch and a light, and by following their components' mesh references make sure each of them has lightmap UV generation enabled
well the actual prefab of the torch that is in the scene is an empty parent with the mesh prefab in it so that I could apply materials and positioning and the area light, but would that change anything
So we for sure aren't looking at another torch that comes from a different asset
Each bit and piece of the torch is a separate object, with its own lightmap UV?
I guess that might explain why the lightmaps are like that
I mean yeah? I could make it one mesh but then I wouldn't be able to apply materials to each part
You could with material slots
but they are all part of the same mesh prefab and I said to generate lightmap UVs on that prefab
material slots?
I'm looking into some runtime level generation and have been thinking about doing light baking at runtime (which is unsupported by Unity's lightmappers afaik). Preferably such a solution would be fast (only take 5-10 seconds on a moderatly powerful gaming PC) and work on PC, Mac and Linux. The only thing I've found so far is Bakery (https://assetstore.unity.com/packages/tools/level-design/bakery-gpu-lightmapper-122218) but it only runs on Nvidia cards. Does anyone have any ideas for alternatives, either finished libraries or just a paper or article on fast lightmap generation? Maybe you're working on something like this yourself?
@hollow comet Sadly if you want indirect/baked with procedural the best you can do is bake the parts first then use something like SEGI (Sonic ether) with a mix of fill lights and blending edges with decals if needed - not really any good solutions for it currently
Hello! Any ideas on how I can keep directional lights from bleeding through the walls and reflecting on indoor surfaces?
@modern trench Need more info to help. Do you have a wider screenshot to show your environment and light setup?
Sure π
the house is setup with light probes and reflection probes, no baked GI only realtime
the materials use the uber shader, metallic core
boosted the smoothness / min smoothness for more reflectivity on the floor
Is the game set indoors?
It looks like your reflection probes aren't baking the house correctly if they are inside the house. Is your house set to Reflection Static? What do the baked reflection probes look like?
Could it be reflecting the ceiling light instead of the directional light and you are mistaking one for the other?
nah happened before i added that light, its reflecting the moonlight which you can tell by walking around a bit
maybe the reflection probe volume is too big
does extend beyond the walls..
The Reflection Probe Volume only determines what inside of its range should use the reflection data; not what it actually reflects. What it reflects is set in the Reflection Probe Component's Capture Settings (Cull Mask, Clipping Planes, etc)
If you change the directional light color, does the reflection change too?
yes
It is definitely the directional light (moon/sun depending on time of day) π
Hmmm, no idea unless know more about the scene. π If your scene and project is small, you can DM me it and ill take a look tomorrow. π
what's your directional light setting?
That's greatly appreciated π However the project is unfortunately very big currently π
Hmmmm, that might not work. π
i think that's because shadow is turned off for that directional light
that's usually the case for these kind of bleed through
Good point. Does your directional light cast realtime shadows?
afraid so
and no duped lighting?
its being controlled by unistorm
Do the mesh renderers of your house have 'Two Sided' enabled in 'Cast Shadows' option?
that is also a good one
it does not.. should it?
Turn it on and see what happens. π
check the ceiling, if that happens to be a separate mesh
hehe my heart skipped a beat, but no joy π
well there are lots of separate pieces, its a modular house
take a picture of the house from above
Hmmm, I have to leave now but ill think about it tomorrow and will get back to you if anything pops to mind. π
does the ceiling looks invisible?
that looks fine to me
Thanks for the help though, andy, have a good one mate π
well, i thought the only visible part was from the inside of the house
Aha
well then, no clue lol
i'm stumped as well lol
figure I'll come back to it at some point to figure it out, maybe I'll get a clue somewhere along the road π
thanks though π
heh good luck
it disappears if i set shadow strength to 1 on the directional light
Is it possible to bake lightmaps at runtime? I'd like to build an in-game editor with ProBuilder's API and have the ability to bake lightmaps before saving the map. Kinda like Portal 2's level editor which bakes them when you compile it.
currently it's not possible to bake lightmaps at runtime - definitely a thing we would consider doing in the future and have gotten asked about
Aww that would've been nice
I might just consider a solution where the user can export their map, open it in Unity for baking and then compile as an asset bundle
Seems bounced light rays do not get blocked objects at all.. is this correct is there a way to achieve this?
You'd probably need something like a realtime voxel raytraced gi or something along the line
If i get what you want correctly
Yeah problem is bounced light bleeding through walls and floors
so basically no indirect multiplier for indoor lights..
hows the performance on SEGI then?
you need a beast pc
hehe figures
well atleast it runs at 60 fps on low with a 750 ti
thats not too shabby
well, the demo
too bad, the indirect lights really made the indoor scenes pop
try it out yourself
well ofc, but they require expensive calc since they replicate real lights
considering the way clustering works, could you not precalculate that one cluster should not bounce light to another cluster because an object is occluding it.. i dunno
i prolly misunderstood the way clustering works π
So todays problem to solve..
the indoor light is basically ignoring the wall unless i set the shadow bias ridiculously low.. at which point i start getting banding in the shadows
in illuminated areas*
@modern trench real-time gi will acknowledge shadow from directional light, however not from spotlight or pointlight. Duster shadowing (shadowed indirect lighting input) from pointlight and spotlight is costly in CPU hence it is not supported. In many cases using spotlight with real-time gi will be fine since the coverage can be limited and the leaking wouldn't be too noticeable. The specular from the moon or sun leaking is most likely an issue of shadow opacity not at 1. In PBR workflow it's recommended to never set shadow opacity below 1.
As for banding in shadow, check the directional light angle. If it's to extreme, you won't get good result. Second, check the Cascade distribution on the directional light and make sure you have the first Cascade to not cover to big of an area.
@pale pawn thanks. The shadow acne was caused by an indoor spot light with too low bias (which was the only setting that would remove the problem). So I added in some boxes set to shadow only in mesh renderer instead. I'm using the suburbs pack from the asset store, which while having the benefit of being modular, doesn't seem to be optimal for realtime GI
every wall piece is basically one plane for the inside wall and one for the outside wall.. in one mesh
just using them for prototyping anyway so im not fussed
meanwhile I've ran into a new problem π i have a day/night cycle in the game (using unistorm), and i've realised that having baked reflection probes isn't great in that regard
i need to re-render those when lighting conditions change, too often = bad framerate, too rarely = noticeable popping
so i'm considering dumping the reflection probes and just going with ssr
There's a bit of a learning curve in regards to realtime GI, but I'm enjoying it π Though information is a bit sparse and hard to come by
finding exactly the bits and pieces of information that my particular use case requires, that is
not just "this is how you do it", but also how to trouble shoot and figure out what and how things go wrong
One message removed from a suspended account.
One message removed from a suspended account.
that would be cool π sounds achievable but i have no idea.. i have yet to look at srp
for probes, you cannot render them "async" only time sliced per face then suffer a stall during the convolution. Work is being done on HDRP to optimise that case, so if using HDRP you don't worry so much
So you would only render the bare minimum change to the probe
HDRP certainly looks tempting, but I feel like I've jumped on the new bandwagons too soon too many times .. nothing more frustrating than hitting a road block and learning that its due to be fixed later sometime this year π
Not sure how much that would be something to fear in its current state
It's alright, just different workflow, asset files. Dust definitely settled on it though, and now it's just about making it all ready in time for 2019.3 so yep has rough edges. I've been using it for a while.
I'm definitely going to look into it and see if i can gauge how much pain making the transition might be π I'm using assets like the uber shader and CTS, not sure if/when the hdrp-updates for those will arrive
or, well, procedural worlds said theyre dropping a 2018.3 update in january maybe
do you roll your own terrain shaders?
No I just used Unity's terrain shader that ships with 2018.3 - it has a 8 layer HDRP variant. As for the rest, you will find almost nothing supports HDRP (and doesn't need to)
In the case of vegetation rendering, you will find there's support in Vegetation Studio Pro but it's a bit out there at the moment.
For example HDRP is faster and better looking with (IMHO except for the pixel displacement options) is usually always better than Uber
Uber uses some quite expensive pixel displacement stuff, and HDRP's pixel displacement is simplified for performance (which is what I want)
And there's the whole shader graph support in HDRP which means if it can't do something you can tell it to do it anyway.
But still, not polished (no real docs etc)
I took the plunge and upgraded the project to hdrp.. and boy am I glad I did π
it looks positively awesome
fps improved and some of the shadow issues i had went away
It's very configurable but lots to learn and be sure to package manager update it. Note most unity settings don't work. you need to use the asset files instead (same for any SRP)
Hehe yea im noticing docs are slightly out of date, as are samples and guides.. at the rate its being updated im sure thats gonna be the case for a good long while π
regarding docs, the docs team with Kat has just finished up LWRP docs I heard!
wonder if i can make a hdrp triplanar shader for terrain .. or maybe i should just avoid terrain alltogether
So congrats to them, and I feel sorry for them going into HDRP π
π
HDRP is fast
even triplanar is quite quick (but the nature of the beast is it will depend on how many textures you're burning through)
if you limit how much bandwidth you're spending (which is a core design tenet behind HDRP) you can start using nice things like triplanar.
it doesn't need to be on everything so YMMV
Not LWRP docs in general
Like Iβm nowhere near done
But a big new chunk is coming real soon
yea i'd only be using it on steep surfaces, eg mountains
there are people working on the hdrp docs though.. right? π
yes but expect the docs in 2019.3
hehe.. so no holding my breath π
because that's the release date for HDRP
however - all the docs are actually around just hard to find
latest might be on githib
hub
yea thats where i found the most complete docs
specifically inside the hdrp
not the old wiki docs
Yes - there are also people working on hdrp docs.
ah nice one.. i was using https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki
She is here, avoiding beer π
which was horrible to navigate π
Specifically, weβre a small team of people working across Hdrp, lwrp and Shader graph.
Weβre aligning a lot as we go, and working with UX and devs to make fixes in the product itself, not just write docs
Iβm the main writer for lwrp
my impression is that hdrp is still in a state of flux.. do you expect a lot of changes before it stabilizes?
Yes
Itβs a a fast-moving target.
Although, I canβt speak to performance stability, per se - not my area
It's grim in the trenches of documentation hell.
But for docs; as hippo said: expect them for 19.3.
Well I expected as much, but nice to have it confirmed π
dives to the floor as Unity programmers change something without telling the docs team.
My colleague is working their behind off in getting stuff updated on the wiki
It's nice to get a foot in early anyway
Haha, yes, @storm bolt, thatβs historically been the case
hehe yea sounds like you got some challenges ahead π
For hdrp and lwrp, itβs gotten so much better.
Both me and my colleague get pulled into so many discussions about what properties should be named and if the tooltips make sense and βbtw, weβre aiming to change this a month from nowβ. So in general, the amount of docs being pushed out is increasing
And all the behind-the-scenes things youβll never notice ;)
Now you've got me curious.
should not the domain experts be telling you what things are called? π
But big congrats for Team Kat on finishing LWRP docs π π β€
Nooo
btw, whats your affiliation with unity hippo? I see you all over the forums π
I'm a local landmark
π
Nooo!
Please don't say finished
They're not.
- Docs are never finished
- My update was purely for a chunk of shader docs
that's the spirit
I sitll have a lot on my to do for 19.1 - how the forward renderer works and differs from built-in
- explaining the lighting model
- updating the Asset doc, because we've redone UI
- giving ya'll a list of shader stripping keywords
All the things!
(I became friends with David H and the early unity team then stuck around for some reason as a mod - I do actually dev in Unity though and help staff out be it code, or just having Kat wince at my poor command of the mother tongue)
Also, Xeethrax; yes and no. I work closely with domain experts. But devs aren't always the best at... naming... things?
i can attest to that!
..being a dev π
im horrible at it, just horrible
also, good to know hippo π was just curious
IComparerThingyWotsit really doesn't lead the reader anywhere useful...
i havent had a look at the lwrp.. does it have its own set of shaders?
Read Kat's docs to find out!

Like, concerning things you'll never notice:
I was writing docs for LWRP SHaders. I noticed that the same property had three different names; one in each Shader, depending on the type of LIghting used. Asked our QA why, since my verbose description was identical for each.
-> cross-team/area discussions, align with HDRP -> Shaders now named similarly; UI now named similarly; property now the same name across Shaders (in both pipelines)
And yes, LWRP comes with LIt, Simple Lit, Baked Lit, Unlit, Particles Lit, Particles Simple Lit, Particles Unlit and some AutoDesk Interactive Shaders.
cool, so you sorta double as a QA for devs naming conventions π
Yes.
It's pretty cool that you're creating consistency for developers, so we can do more without these bumps in the road.
I feel the sudden pressure to make sure my grammar is okay.
I'd argue that the use of 'the' is redundant in the above sentence!
I have that effect on people.
π
Back in my raiding days, a guildy actually thought I was perpetually mad at him because I used a full stop.
I guess texting is torture eh? π
Haha π
Honestly, my fat thumbs keep getting me in a whirl of trouble - "I thought you were good with writing" - well apparently not on an iPhone!
I can relate.. whenever you start being grammatically correct, it sounds somehow formal and creates a more serious tone.
At least you don't press the entire phone like I do.
I truly hate texting on a phone
especially with touch screen keyboards
add autocorrect on top and the frustration peaks
@full pawn one day u will 'ave to let ur hair down and just say somefing tottally sloppy.. its like junk food with bad spelling, horrific punctuation and more!
Let ... go
Tis liberating, honestly.
...innit
u bri'ish?
Yep unfortunately. I'd use correct grammar but I can't given the state of brexit. Somehow it's all gone pete tong.
lmao π
Brexit is all over norwegian news papers. Mostly about how it affects us, of course.
going to london in a couple of weeks actually
Nice! well not nice, since there's not much nice about London really, unless you go to a nice bit. But at least the weather is reliably pants.
(feel guilty chatting here OT lol)
somehow we tend to luck out on the weather π been going every year for 9 years now
Yeah? how come
Oh, right. Yes, sorry about that. I shan't stray from topic!
work thing, gaming convention
just continue in ot bit if you want
Aye π
Hi all. I'm a programmer and I'm trying, for the first time ever to learn Unitys Lighting. Are there any in-depth resources you would recommend besides the official docs?
I liked catlikecoding's walk through
looks like he's got walkthroughs for both the legacy pipeline (which I enjoyed) and the new SRP stuff
Specific section where he starts going into lighting - https://catlikecoding.com/unity/tutorials/rendering/part-4/
might be too basic if you're familiar with some of these concepts from other engines
I'm trying the GPU Lightmapper on a fairly simple scene (sponza) and I instantly get the errror on unity 2018.3.2f1 OpenCL Error. Falling back to CPU lightmapper. Error callback from context: CL_OUT_OF_RESOURCES
With a 2080Ti and ridiculously low settings, any idea what could be the cause ? I managed to bake yesterday on the default HDRP example scene but today, nothing
I worked on some other irrelevant stuff and tried again and now it works, so it's fixed I guess :x
Comes with the sample project. The documents currently is for built in renderer, but the base knowledge are still going to be relevant.
@dapper brook what gpu do you have
It needs a ton of vram
Oh nm
You sad 2080ti
Iβm stupid lol
I would recommend Radeon 7 for it since it is based on Radeon rays and the extra vram
Plus Vegaβs performance in blender if you use that is great
But if it ends up defaulting to cpu that likely means vram maxed out
You also need a certain driver version for nvidia gpus if Iβm not mistaken
I don't really recommend picking up hardware to solve Unity's PLM right now as the PLM is likely to cancel its jobs for other reasons, so bug reports if any would be a safer move if you already have a card with a decent amount of ram.
Can someone help explain how mixed lights are supposed to work to me? I feel like I'm missing a huge piece of information based on what I've read and experimented with.
The house I have is completely static,, every object in or a part of the house is marked as static (double checked Lightmap static is checked as well) with the only dynamic object being the character.
When the lights are set to baked, I get roughly 3-400 draw calls. When I set them to mixed, then generate lighting, I get 3k-4k draw calls as if everything is being treated as dynamic in real time lighting.
Shouldn't I be getting something only slight above the baked lighting since everything should be baked except for the character object? I'm in 2019b1 and using Progressive GPU.
