#archived-lighting
1 messages · Page 40 of 1
The map file has a fallback baked shadow for when real time sun lighting is disabled
Ahhh, yeah either way I’m not entirely sure how to get those. The WoW export tool certainly doesn’t have that option
I believe so yeah
I may just be thoroughly confused this is my first time using unity and I've never had a lighting issue like this before so I apologize if my answers are misguided
but I believe so
You can always generate your own less realistic baked lighting.
Just make a script to raycast from every point on the terrain in a specific vector and save it to a texture
I’m not sure if VRChat supports stuff like that, also I don’t have the slightest clue how to do that 😂
You don't do it in vrchat
You do it in unity and save the texture
and apply it in your shader.
Either way I’m not sure I have the skill level to do things like that 😅 and I’m pretty pleased with how the light baking from bakery looks as well
I appreciate the suggestion though
In that case since the dark area looks like a shadow, I'd start poking at your active realtime light sources to see if changing them changes the dark artifact also
And poking at the ground mesh similarly
Placing a default cube to see if it's affected too would be a clue
I don't know what rendering features you are using but disabling them while hunting for this issue would be smart
That was my assumption too although I'm not quite sure how to fix it while keeping my current orientation.
It looks like it could be a shadow of the trees or a shadow of the ground itself
Shadow color is the color of the ambient light from your sky, so you could intensify that
Or alternatively experiment with disabling shadows on the ground or some other objects, but I doubt that'll work very well
And to try to rotate the sun just slightly
But mostly ambient light is what seems you should be controlling
Hi, I am trying to make a game where the player needs to avoid dark places and solve puzzles like redirecting the sunlight with mirrors to open path. The problem is I don't know how can I make a reflectable light. There are no rectangular light in unity (or thats what I know). I searched the internet but only found something called light volumes. What should I do?
What's the connection of reflectable light and rectangular light?
There are rectangular lights by the name of "area lights", which HDRP can render as realtime but URP only as pre-baked
The thing is, normal light bounces realtime like spotlight etc. But they are not rectangular and hard to use.
I am trying to make a mobile game so hdrp won't do. Thank you for the answer
Realtime lights don't "bounce" at all, unless perhaps if you're using the realtime GI system
But even then the light scatters rather than being reflected like from a mirror
Oh, I didn't know that
For a mirrorable light you'd need some entirely custom system for approximating it, perhaps raycasts from the mirror's edge vertices that can determine where the light hits and which could be used to create the light shaft as a mesh
Not an easy task though
Detecting when something is in darkness is also pretty difficult
Light and dark are calculated in realtime by the GPU and it's not designed to share this data
So systems for detecting light and dark also tend to work using approximations of the lighting that run parallel to the real lighting
I also think of creating new light. Maybe some transparent shader to imitiate a beam.
I did that by calculating average pixel color of the tile.
And yeah there were very less sources about calculating light intensity.
It tends to gives different values for same light-distance but different color tiles.
but it works
If your game is 2D and tile based the calculations can be simpler, but hardly easy
No its 3d :C
I mean, when you generate lightmaps, they appear in the scene folder and their names start from "Lightmap-". And in inspector under Texture Type all these maps should be marked as Lightmap, Directional Lightmap and Shadowmask. But they are marked as Default and i need to reassign everything by myself. Why does it happen?
That's good clarification
https://discussions.unity.com/t/significant-urp-lightmapping-apv-discrepancy-between-6000-0-11f1-vs-6000-0-3f1/1487591
It's likely this, related to new texture import preset behaviour
thank you, will read this
So I made a fake, fast realtime GI system for my flashlight as ssgi doesn't really work because of the low light intensity (or I don't know how to use it)
I want to improve it but I don't know how to implement colorbleed
Will this need to be a screen space shader effect?
Hello everyone! Can someone tell me why my lights arent working? They just dont work
When I launch the game they are all off
You should provide more information, what render pipeline you are using, which renderer, what kind of lights, how many.
Because some have limitations how many they can support with shadows.
For those who run into a similar issue as me who want more control over the intensity of their light probes for stylistic reasons I have found a stupidly simple solution.... After youve baked your scene lights to look the way you want, just go to your static directional light, lower the intensity, and then ONLY bake your light probes. Your environment wont change at all and with this you can adjust how intense the lighting is on dynamic objects to your liking, if you wanna make stuff look SUPER surreal you could even give the light probe lighting an entirely different color lmfao
Cant believe i didnt see this suggested on any reddit threads or anything lmao
What kind of colorbleed?
I mean to imitate bounce lighting
I am imitating it with point lights but would need the colors of meshes to bleed out to simulate a sweet looking system
There is no info online
Ah
SSGI is your best bet, but with muted environment colors and dim lights it might not have much of an impact
The effect would be pronounced only if you have some very noticeable bright colors in the environment
You could tint your fake bounce lights using a predefined color in a component
When your light hits an object, or the bounce ray hits an object, you'd do GetComponent from the collision to get the color stored in the surface gameobject, and use that as the light's color
Getting the actual color of the texture on the mesh is technically possible, but there's no built in way to raycast against meshes so it'd likely be prohibitively difficult and not improve the look much
A screen space effect is an option but would practically mean making your own version of SSGI
It could be uniquely tailored to your use case, but it'd be a real graphics engineering challenge
i cant find out how to fix this please help!!
Yeah I tried ssgi at some point in the past but it gave me a very subtle effect, virtually non existent
I can try again but I am sceptical
Yeah I thought of exactly that, but that would only work with very small lights placed on the surface of the mesh
And then I'd need to have a lot of them for each mesh I hit
Something ridiculous
Cause I can't use a dark browb light with a large radius
I even tried and it looked extremely wrong, predictably
I might try ssgi with bloom, maybe that does the job (doubtful tho). I turned off bloom cause it's pretty expensive and doesn't have an effect really for me. Maybe it would with some bounce light
If bloom is expensive, SSGI probably will be too
Anyway, since your cave is dark and lights are dim there probably won't be much benefit to tinted bounce lighting
Yeah you're probably right
I didn't test bloom performance, but it's supposed to be an expensive effect
It had no effect because the only light source is coming from the player forward so I don't look at it directly
But maybe it would have an effect on ssgi
I will try again
this happens when using realtime lighting, anyone know a fix?
(using urp)
It's known to be an expensive effect on mobile devices
You're using HDRP so it shouldn't make that big of a dent relatively
Realtime pixel light limits per object
You can increase the light limit in quality settings, or limit how many meshes are lit by each light by slicing meshes into parts and limiting light ranges
Or consider using deferred or forward+ rendering path
Hey all, new around here, I'm having a nightmare of a time trying to fix a mesh import script I forked and modified. Previously on Unity 2021, on Windows, I was able to bake lighting. Since then I've upgraded the project to 2022 LTS and moved to Fedora Linux as my OS. The errors I'm specifically getting are:
[PathTracer] AddGeometry job with hash: 4179463b4b5a4582ced26501f07810c0 failed with exit code 5.
... repeats for every "invalid mesh"
[PathTracer] Failed to add geometry for mesh 'demo-worldspawn#0-planks_a[797]'
Some notes about the problem.
- To explain the problem itself, I forked a TrenchBroom importer to use as a level editor for rapid prototyping / to nail a look and have been making minor tweaks here and there, but nothing iirc that would cause errors like this.
- For some reason, the only mesh that my generator produces that works is a quad. Every time there's a fanned mesh, the thing simply refuses to bake lighting.
- If no UV2s are baked I can bake lighting, but as you'd imagine it kind of looks like ass.
I'm kind of pulling hairs trying to fix this because it seems like it should work. Looking at the raw mesh data in the debugger there's no NaN values or anything weird for the UVs, the vertices are fine, the normals and tangents are generated using the built in unity tools. It just will not let me bake lighting
so, ssgi does fuck all
literally no difference
bloom gives me a subtle effect but I'd say it looks slightly worse
so no benefits from either
and ssgi impacts performance too
Just for reference, the left image is a mesh that can have lighting baked, and the right image is one that cannot.
thanks!! ill try this rn
Could be worth reporting a bug if the lightmapper devs might look at it
I'm going to wipe out my changes to the mesh importer first to make sure it's not something to do with my modifications (which I don't think it is, but we'll see)
Welp, pulling from main didn't fix it, it's probably a bug
Especially if it did work in a previous unity version
Maybe it's an error in your mesh generator, but the solution might get found anyway if the QA team takes up the issue
where is mesh importer
Specifically the model tab
https://docs.unity3d.com/Manual/FBXImporter-Model.html
is probably what you're looking for
thx!!
Hi guys ! I have a problem with 2D URP lighting (Unity 6) in my little 2.5D top-down game.
- I have a scene with 2D Lights + Shadow Caster 2D
- Sprites are correctly depth sorted by Renderer 2D settings -> transp. sort mode -> custom axis (0,1,0)
Problem: the 2D light system does not care about the sprite sorting points and my custom sorting axis at all - as you can see in the left picture: The Crystal in the foreground picks up a shadow from a behind object, see (A)
The only workarounds I found: composite shadow caster OR excluding the own sorting layer from the shadow caster targets (same result). But as you can see on the right side (B) - now objects that have their sprite sorting point fully inside the shadow, still don't receive a shadow. Actually no shadows at all from the composite group or on the same sorting layer.
Question: is there any support in Unity for correctly lighting 2.5D games ? An elegant way I can solve this ?
I only found one post from 2023 that seems super complicated and hacky: https://discussions.unity.com/t/2-5d-geometric-shadows/928850
but I don't understand much there - this is my 1st game. ;)
Also I was hoping, that we have a more elegant solution now in 2025 / Unity 6 ?
(I have my custom-lit 2D URP shader in shader graph - if adding something here helps ? But I guess the light map is already baked together per sorting layer ?)
Please help 
can i somehow disable the skybox light in hdrp ? i dont want closed spaces to be lit, but i also dont want the skybox to be black (which happens when i disable exposure)
and why the f are lights in hdrp not working except you set them to an exorbitant value
Increase near plane in the shadows settings
Directional light shadow settings specifically
The correct method to occlude indirect light locally would be to bake lighting with light probes and reflection probes
Alternatively indirect lighting controller can be used to tone down ambient and reflections within a volume
To understand light intensities in HDRP you need to understand physical light units which you should base on your light sources on
The f why they might not appear despite having correct values suggests your exposure is not correct relative to the intensities
is there any support in Unity for correctly lighting 2.5D games ? An elegant way I can solve this ?
No
The 2d lighting system is designed entirely for "flat" 2d games
It's up to just luck if workarounds for isometric or 2.5d games happen to work
any way to fix this weird lightning?
Yea, stop trying to clear baked data and use actually functional normal maps
I use normal maps and have them ob like 0.5-1.5× each so nothing to Special
Ima try to set them to 1x each maybe that'll Work
It looks like the normal maps have totally wrong values
Possibly if they're not imported as type: normal map
Normal map intensity should not be over 1 in normal circumstances
If the normal map is so intense it seems to create black or glossy cavities, that means it's too much
You are supposed to get light from the sky on your objects, unless you've disabled ambient and specular lighting from the lighting window
im mildly confused. I installed unity 3 days ago. the "Map" was for the texture right? Like it looks more realistic when you higher the level
Normal map texture's type has to be "normal map" in the asset's import settings
im pretty sure it is normal map yes
Can you show a screenshot of that setting?
Im not at home, don't think I can offer this right now. im sorry 
Higher normal map intensity doesn't make it "more realistic" but less once the normals start turning inward and glitching out the lighting
The most realistic setting is generally multiplier of 1 since it shows the normal map as it was calculated
sooo i should put them all to 1×
But often less than 1 can be better, if the normal map is not properly generated or if you get too harsh shadows
I tried out more than 1× earlier and it looked more realistic tho, am I just idk fashion blind or could it be cause it felt darker and more texture got showen or smth?
In your video the normal map is so intense your light is glitching out
That much I can say for sure
well that is already good to know
well it is still a prettx big jump. ground normal map is 0.5, brick normal map is also 0.5 and the brigde in the back which isnt in the ss has 0.8
okay i lowered the smoothness and it looks atleast a bit better now
why tf is this so overcomplicated why can't i just do it like before xD
What do you mean by "like before"?
well before i just disabled the environment light (from the skybox) rn i don't understand why the skybox turns dark (no matter what i do with the indirect light controller)
Were you using different systems in that before scenario, or all the same ones as now
Like something other than HDRP for example
yes i was not using hdrp.
That's a pretty relevant detail
i know
What render pipeline was it then?
i dont know, but i worked with urp and built in and both work? and there is only urp now
so obv urp
BiRP is there too but not actively promoted in the Hub (or developed)
Just the same BiRP and URP let you change the sky but also its ambient and specular lighting all separately from the sky settings
In HDRP the sky and the light from it are one and the same, unless you override it with the indirect light controller volume
In all render pipelines baking lighting is the most correct way to occlude indirect lighting locally if you want it to be accurate
HDRP is complex, but not overcomplicated for what it does
To use it you have to prepare to learn that complexity, and work with its features rather than against them
well i dont want to bake lights, it takes too long, i rather do realtime lighting, and an easy way to make light look realisitc in closed rooms was to disable the skybox light, but i also want to use hdrp because of the rest of the features ._. well
So use the indirect light controller volume
What's the issue with that?
what should i do there? (if i set reflection lighting multiplier to 0 the whole scene turns white)
The whole scene or just the room? Generally an indirect lighting controller would be on a local volume so the outside of the room is not in the dark
If a large part of the screen is very dark and another very bright, adaptive exposure can blow the brightness totally out of proportion when attempting to compensate
even with a local one it, if i am in a dark space and look into a bright one the screen turns white
So it's working as intended
yes but its unusable and useless
Right now the interior is absolutely 100% dark, and the outside is relatively blazingly bright as lit by the sun
The simplest fix might be to reduce the brightness of both the sky and the directional light
To bring them closer to the dark interior, or vice versa
The main problem here is that you don't understand how exposure and physical light units work
the main problem is that it doesnt work
Like I said understanding them is a necessary prerequisite
its a unity problem too. if i install hdrp and open it, from the start directional light works fine, but for point lights you have to set it to 1000000000000, it's just confusing
That is not a problem, but intended and explained by the docs I linked
then its intended but stupid
because the slider for the intensity is way too small to make light visible
Do you know what exposure is?
yes but the directional light increases too.
man just admit its confusing, everyone i know was confused by this
It sounds like HDRP may not be for you
ok what do you expect to be the response to this
If you do not know how to get real world correct light values in your interior room (which first would require you do not remove 100% of the ambient light), you can reduce the intensity of your sun and sky like I suggested
But when doing that you are not working with the system, but against it
HDRP opens up tons of power and options. But this comes with complexity and a need to deeply understand how things work.
If you don't have the patience to learn how to use the systems as intended, then I concur HDRP is not for you
So if you’re not committed to that, URP is a perfectly fine choice.
If you do not know how to use HDRP to its strengths, but instead treat its features as problems, then it will not help you achieve better graphical fidelity either
Why is lightning so difficult?
Trying to bake with probes for indoors but damn dude the results aren't resulting
i just want you to explain to me one thing
the slider is set to it's max value. how do i make the light visible without increasing it further? i saw at least 10 reddit posts and unity forum posts of ppl being confused by this
You can type any value in the field, or click and drag the field instead of the slider
Other units like Ev100 are much more effective at representing high intensities than Lumen
i know that but this is just confusing
However if I was abandoning realistic light units I'd rather make the sky and the sun darker, rather than all the punctual lights brighter
You and the redditors are confused because you are unfamiliar with the system
Unity didn't invent physical light units or real world accurate exposure, it's an industry standard of photorealistic rendering that they support
bro. my point the whole time is that this is objectively confusing when you first start hdrp, and the lights are dark and the slider is on the max value
if everyone is confused there is a problem regardless if you can solve it when you understand it, its not user friendly
Sure
For URP I think it should be a reasonable assumption that you can just go in and build stuff intuitively
But that's not and never was a realistic standard for HDRP because it is not holding back the complexity at all, it's only concerned in supporting industry standard graphics workflows and providing the most features
Anyone who has used HDRP will tell you that you have to study it first to use it effectively
In my opinion you also figure out first how it will help your project
It doesn't give you "better graphics", it gives you better tools for graphics
yes. but they could have just increased the slider + default value and ppl wouldn't be confused, idk why it even is like that rn. i tried to figure out what i did wrong only to find out hundreds of ppl were confused by this. that's avoidable. i am not trying to be rude, i agree with what you say but this issue just wasted me a lot of time
The system tries to help you
This icon tells you what kind of a light the intensity value represents
If you force it above that it turns into a warning
Because this high intensities are not typical
"the system tries to help you" might be the most untrue sentence i ever heard regardless of unity XD
yes exactly, but below that the light doesnt even show up
thats my whole point
In this case it has correctly warned you that you're not approaching the physical light units correctly
I hope not to be rude either but the reason you're wasting time is because you're trying to use a system that requires knowledge and instructions by skipping the knowledge and instructions
The warning can't force you to read the documentation about light units and exposure
i think you still dont understand my problem
I could try one more time
man, if even in the sample scenes lights have to be set to far exceed this, then i am not the problem
Why do you think that is incorrect?
are you trolling?
if i want to create a LIGHT and i am warned that its extremely bright even tho its not, its surely incorrect
The reason it doesn't show up is because that's exactly how it'd be in reality
ok now iam sure you are trolling
so lights are forbidden to be used in unity
gotchu
No, it's because of how the light is simulated
Broad daylight is extremely bright, way more so than our intuition would tell us
one last time.
If street lights were on during a sunny day, despite being very bright lights, you would not see them light up anything
This is true in real life and HDRP, though not BiRP or URP
if i am ALWAYS warned and the slider is ALWAYS useless if you want to make the light visible then it IS AN ISSUE
HDRP expects you to know this, but they put the warning there as a hint anyway since many don't
99% of ppl use directional lights and would expect the range of the other lights to be in the range of being visible, or the lights are always useless
It's the correct result when simulating physical lights, I don't know what Unity could do more to rectify this
You can make the lamps unrealistically bright so they show up in daylight, or you can make daylight darker
It's not the intended way to do it, but nothing stops you
if i disable the directional light its still invisible
Not just the sun, but the sky is bright as well
ok. lets assume i have a medium dark scene without directional light. and want to add a light that is visible
i have to go above the slider max
so its "unintended"
What is "medium dark"?
i forgot the english word
not bright but not dark
global illumination works but i cant add the light because if i increase its not reccommended beause its too bright
There are very specific light values what the sky and directional light would emit realistically, and it would determine the visibility of lamps
There is no "medium" light level conceptually
And if adaptive exposure is on you can't trust just your eyes when tweaking it, because it compensates
If using fixed exposure instead, you also can't trust your eyes because the brightness of all light is relative to that exposure level and only to that exposure level
It's not intuitive because there's not really a way physical light rendering can be represented in an intuitive way
every user uses a directional light and sky. so lights would in all usecases be useless if you use the reccomended values
Useless is a very subjective term, the system on its own cares only about accurate simulation
If a street light was on in the day example, the system shouldn't try to bring its light into visible range, because that's not right
It should be nearly invisible because that'd be real world accurate
If you as an author need to bend the rules to make an exception to that, you are free to do so
But Unity should not do that exception for you
then why make it harder for users who want to use light without the scene being dark?
in all my projects i used a light in a "bright" scene, and here unity says dont do that
It's either harder for people who don't understand physically accurate lighting, or incorrect for people who do such as lighting professionals
I think this is the crux of the issue
so as a conclusion: you can not use lights in a scene that is not completely dark?
(because unity warns me so i am not supposed to)
No, conclusion is you need to understand how the tools work and are meant to be used
Then you can bend the rules as you prefer
Know when you're working with the system, and when you're working against it
bro i just want to have a dynamic light in a bright scene
A good method is to determine a "baseline", such as lamps that have real world accurate intensities in your scene, then tweak your natural light and exposure relative to the lamps
Or determine a fixed exposure as your baseline and tweak lamps and natural lights relative to that
this is a unity sample water scene.
what would YOU do to make the light i created there visible (it is because i set the value to 1e+07)
the water is an example i could have just used a plane for ground
Or natural light as your baseline and lamps and exposure relative to that
This is the one you've been doing, which in my opinion is probably not the easiest of the three
First ask yourself if you want your lighting to be realistic or not
To make a lamp illuminate something in broad daylight, in reality it'd need the power of an industrial flood light
If it doesn't make logical sense for your lamp to be that powerful, then you accept that realism for these light intensities is out the window and just make it as bright as it needs to be
But when dealing with such drastic brightnesses, you might want to swap to fixed exposure at least temporarily
Otherwise you will not see the light get brighterm just the sky get darker as you increase intensity which may throw you off
Since HDRP is physically accurate, your first assumption should always be "what kind of physical light source is this in the scene", not just thoughtlessly adding light
in almost all cases of people using unity they will create unrealisticly bright lights, thats what ppl do in games
They should use URP or BiRP
I think Unity's UX needs to be much better in most places
But it's not Unity's problem that people dive into HDRP with no idea how it's meant to be used and no patience to learn
It's an advanced tool
First time I used HDRP nothing seemed to make sense and I fumbled around with light values and exposures just the same as you
And then I went to read what it all means
Rather than condemning it as a bad tool
can we pls stop this now. i never say you are wrong i just said the slider should be bigger. unity just makes it harder for ppl that dont use it "realistically" i want to use hdrp because everything else is great
this reminds me of non convex mesh colliders, unity doesnt allow users to make rigidbodies collide, yes it would be bad performance but then why do you not just allow it with a warning, i had to install an asset from github for that crap
The slider includes almost all real world light sources, and discourages incorrect use, yet doesn't lock you out of it
So in that case I think it's perfect
People who get confused and go googling around have an opportunity to pause and look for the resources they direly need at that precipice
Other parts of unity aren't that great in that regard, like the nonconvex collider thing
at least one thing we can agree on
btw hdrp is fckn beautiful
unity requires you to install so many assets for things that are a no brainer for the default engine
In my view the editor UI/UX itself should guide you towards best practices, not always requiring studying beforehand
But HDRP is way too complex and broad to be made simple, it needs to be treated with a different respect
one TINY little example, my favorite asset is the scene dropdown menu
What is that?
a dropdown in the top toolbar to quickly switch scenes
Do you have a link? I wonder if it's better than relying on the recent scenes dropdown
cant find it rn (it creates a small button next to the play and pause button that opens a dropdown of either all scenes in the build profile or a set list)
i havent used it in this project
It certainly is, despite how much work it can be
I hope you find the time to study more of it, so it'll be easier
There's whole a lot of information like a whole ebook about making proper and correct HDRP lamps
well i dont think i will be a pro at it but i will have to learn more for my project
in unity it feels like most games are just low effort when it comes to lighting, they all look so cheap
idk if it's just me
then i see tutorials or samples that look pretty and still have ok frames
and wonder why
It's easy to do better with just a little study and practice, since it seems many developers have done none and just winged it
I don't know why there's little interest for the topic, but it seems like an opportunity to me
And for me anyway it's fun
Easier to learn than something like coding, and you see immediate improvement with every new thing you figure out
btw, my game is a movement shooter that will have maps with different artstyles (for example one cartoon one 8bit and so on) and with each map i will release a set of weapons with that graphic style and effects
i think this hasnt been done before lol
the idea came from pixelgun3d which has thousands of guns,
anyway i played the pc version and it had reflections and global illumination, but this didn't help the game because it looks pretty bad, its a mobile game after all. especially the lighting. which created the idea of finally making a "fun" shooter with good lighting and effects like a lot of glowing stuff that you saw on the screenshot, and i thought hdrp would be a great idea for that
Sounds like a rather original idea ^^
I know I've already been cautioning you about HDRP the whole night but I'd also add the warning that HDRP is only designed for physical lights and realistic cameras
Doing anything outside of that like stylized graphics, custom lighting or 2.5D can be a pain
i mean i would do stuff like cartoon/anime shaders and stuff like that, but beyond that idk
It's best to explore the styles with art tests to see what it's like before you commit to making the whole project in HDRP
Cartoon shaders are non-physical custom lighting which you may run into issues with
hmmm that could become a problem indeed
but i think there are already assets out there for hdrp if i want to prevent a headache for me
Is there a way to get a list of lights that are casting light on a specific renderer? I know I can do distance checks, but that would not take into account obstacles.
Obstacles, like excluding shadowed lights?
Excluding lights that are within range, but whose light is being occluded from hitting the renderer due to other geometry in the way
No, that kind of information does not exist
Wouldn't it have to exist for the render pipeline to render shadow maps?
If the bounds of a renderer component intersect with the bounds of a light component, the renderer executes light calculations
It may be possible to access the list of each of those intersections but it doesn't seem to be available with any existing renderer class method
When rendering the shadow maps the light renders all objects in its view, it has no method of occlusion culling to know which objects it does not see
It's basically a camera, which also does not have that kind of information without a separate occlusion culling system
The resulting shadowmap is just plain depth data, there's no information for any pixel which object it belongs to
So in other words your only option is to make your own occlusion detection script that aligns with the light, but otherwise works entirely separately from it
Thanks for the answer. Trying to piece it together in my mind.
All rendering calculations happen on the GPU anyway, so even if they were useful they'd be very cumbersome to try to access in CPU side scripts
In pic 2, would the shadow for the unity ball still get drawn?
No, but the light doesn't "know" whether the ball is occluded or not
It only knows that it's one among the objects it will process for rendering
But since it fails the depth test against the wall, drawing it is skipped
ok, so would it draw the shadow for each object in depth order, furthest to nearest?
ahh
It draws the depth buffer, using each object's vertex information
A shadowmap is basically just a depth buffer so there's nothing to do after that I believe
What is your original goal?
ok, so i took the default Unity HDRP Indoor scene and disabled all lights except that spotlight. It appears it still renders the shadow map for the ball. but likely because it got batched with the other geometry.
My goal is to implement a mechanic related to how much light is hitting the player. My original plan involves raycasting from a set of detection points on the player to lights within range, which works, but just wanted to see if there was another way.
Shadowmaps are per light, which "naively" includes every renderer whose bounds intersect with its own
Rather than per object, not related to batching
I understand that it's per light. But aren't they getting drawn as a batch?
Probably not
Fair enough. i'm happy with the raycasting and it performs well.
Technically yes, but SRP batching takes effect after the object has been included in the list of meshes to render
It doesn't affect that determination itself
hi guys, i have a scene in unity HDRP that supposed to have a physically based sky which is a global volume, and a directional light that acts like a moon, in the first picture you can see that in the viewport the sky is visible, however ingame the stars and the moon disc is not visible at all,
what could be the possible issue?
p.s
- i have changed both the player and camera scene render clipping planes to 300000 but still doesnt work
-i have volumetric fog in my scene but i tried to switched them off during runtime but it still doesnt work
thank you for your assistance,
Can you show the Inspector for your main camera?
Another thing you can do is open Window > Analysis > Rendering Debugger. Click on Volume at the bottom left. Set Camera to Main Camera. Under Component select Sky > Visual Environment. The Sky Type under the Result column should be 4 (Physically Based Sky).
If it's not, this should show what is setting the Visual Environment.
this is what myrendering debugger is showing
here is the inspector of the main camera present in the scene
i have a seperate camera for the player it self
you're using two Cameras in HDRP? or do you mean a Cinemachine camera?
i meant, there is 1 default in the scene that i cant remove, and 1 camera for the player itself
I don't understand. Do you have one camera that looks like this or two?
You could try adding an Exposure override to your volume to see if that could be the issue
if it's set to specific modes, it could turn everything very dark
no the picture i sent is the default camera in the scene, im just pointing out that i have a seperate camera for the player model
Ok, suggest reviewing the Exposure override first
here is my exposure overried
yep and it looks fine enough in the viewport scene
i do have other volume and its an empty using a volume component to mimic a fog
but when i turned it off it still doesnt show the sky nor the moon disc
this is my global volume setting
hmm.. if you type "t: volume" in the Hierarchy search, can you confirm how many volumes you have?
just those 2
If it were me, I would probably start disabling things one at a time until I figured out why it was not appearing. or i might use the frame debugger to see if the moon disc ever gets rendered and possibly gets drawn over by something.
well i tried that but to no avail
here can be seen that the cube is clipping with the distance
the cube is supposed to be longer
i chaged the camera in the scene to render 400k clipping plane and also the player prefab but doesnt seem to work 😵💫
lightmap looking like someone did something.. what did i do wrong?
First issue looks like no proper lightmap uvs
https://discussions.unity.com/t/lightmapping-troubleshooting-guide/895352 c.9
the top of my normal map is acting strange... what am i doing wrong?
the top of the sprite illuminates differently on each side
it seems to go from bottom-right to top-left in highlighting
Can you provide normal map asset itself
the png?
Yes
this is the sprite sheet
(havent done the other sprites yet)
oh! i figured it out
i needed to deselect sRGB color texture
Right
Usually you import normal maps as type: normal map
Trying to fix this with clipping distance doesn't make sense to me
The the sky is rendered everywhere beyond clipping distance
so with a very close clipping distance the sky should appear more, not less
ah, that would make sense... lmao
@jagged jungle I wonder how you are stacking your multiple cameras
HDRP only supports a single Camera setup by default. If you need to use more than one camera at the same time, use one the following alternatives:
Custom Passes
Graphics Compositor
i checked generate lightmap uvs
drastically increased the samples, still really splatty
ok so the issue was an old ui in the player prefab thats causing it to block the moon disc and star texture
but somehow the lights from global volume and the directional light still managed to get through
as for the "stacking camera" im not sure, i have at least 1 default camera on each scene i make and i cannot remove them otherwise my Playercamera would show no display rendering
well now the lampposts are glowing at an infinite brightness and the bake time is going up and up and up
and the spotlights i set onto mixed + static arent being included in the bake?
found out why
it was above the lamppost model
I FIXED THE LIGHTING BUGS
im proud of myself
If you have two active cameras,your FPS will be murdered. So best to get that sorted out.
Hi all, running into an issue where an emissive material isn't casting any light. I've checked all the standard stuff (it's static, contributing to GI, all that stuff) but it's still not playing nice. Are there any other possible causes for this issue that I haven't checked?
For further info: the lighting worked perfectly fine when the bulbs were exported as individual meshes from blender, but after joining all of the bulbs together with the wire into a single object, it stopped working.
You shouldn't need to have a camera per scene
If you've only loaded the scene without a player to have a camera on, there normally would be no need to use the game window at all
Alternatively you can keep the player prefab there temporarily, or even better have a separate additively loaded scene that has your player prefab or camera in it
As HDRP opposes camera stacking, you wouldn't use a second camera for UI or viewmodels
@fringe plume btw this camera stacking limitation is another example of those typical HDRP stumbling stones
Stacking cameras for UI and viewmodels is a very common technique, but HDRP has technical reasons not to support it directly which by themselves are not good or bad, just the way they've built the system with its own tradeoffs
And even if camera stacking may be the most popular method, it's not necessarily the best just because of that
Like for example in my opinion manipulating viewmodel scale and position gives you much less problems with shadows and rendering, a more convincing depth effect and exactly the same forced perspective illusion
if you mean that, my guns are physical, so they dont have their own first person viewmodel, the other player sees the exact gun the local player has (no second camera) and i always render the ui with the same camera, idk if that is wrong lol
I don't mean it as necessarily relevant to what either of us are working on
But conceptually I think it's a fitting example of what we discussed earlier, how an engine's features end up getting pitted against popular or intuitive workflows
yeah you are right
i personally think it's more important to make common workflows easy than realism
but yes, yes then switch to urp, i know
Unity keeps crashing when I bake lighting with adaptive probe volumes with this city asset in the scene. After it creates probe volume bricks, it stops for a while then closes.
What version of Unity and pipeline?
sorry for late reply, 6000.0.42f1 with URP on a Mac
could anyone help me figure out what's causing these diamond shapes shadows on my terrain material? It's using just a basic URP lit shader from shader graph. I can't afford to increase the mesh density, but I was hoping there was something else I could do to at least blend things better
Have you tried creating a new scene witha few cubes in it, setup APV and bake? Would help establish whether this is a project-wide issue as opposed to a specific scene.
ill try that
It baked normally but I had to enable live updates in the subdivision preview in the rendering debugger, then it got stuck processing cell 1. I could still interact with the editor even though the progress bar stayed
I'm guessing you've done the obvious of restarting the editor?
yeah
Hmm. You could try going back a few versions of Unity and see if it works normally there.
certainly could be a bug.. there were baking issues in a few versions around 6000.2x
aight thanks
somethings up with my lighting, ive tried alot to fix it and nothing worked, i genuinely dont know whats wrong with it, its a minecraft model i ripped using mineways
With geometry seams like that I'm surprised it lightmaps at all
You might have to use APVs to get anywhere decent results
what are apvs?
Hello, I need help for some optimisation / have a better light / shadow, and faster import, etc…
So my game uses magica voxel .obj model, so they are in voxel.
My question is, what are the best settings for voxel objects ?
Like what are the best option for the obj lightmapping settings, for the general light / shadow etc...
I really lost in all of thoses options :/
Thanks :)
The lighting in my project went real weird out of nowhere. I switched pc's and when I booted up the project I only get these hard shadows. I'm not using a light map and I am in unity 6000.0.29f1
Oh and I am getting a bunch of SerializedObjectNotCreatableExceptions comming from UnityEditor.Rendering.Universal.BloomEditor.OnEnable () and UnityEditor.Rendering.Universal.ShadowsMidtonesHighlightsEditor.OnEnable ()
It's not an error, probably anyway
Even if you're not using baked/realtime GI or any type of lightmapping, you still need to Generate lighting from the lighting window
There aren't really "best settings"
It looks surprisingly good presuming those are lightmaps on your objects, since voxel type meshes usually do not lightmap accurately if at all
A more accurate and probably also efficient method is to use APVs instead of lightmaps
Lightmaps are spread across surface area, and broken up by seams
Voxel meshes have both in abundance, so a lot of lightmaps are required, a lot of padding is required and lighting is often discontinuous
Quick question, other than an increase in baking time, is there any major downside I should be aware of with having this many static baked point lights in a scene, and in such a tight cluster?
Ok thanks I will check with APVs :)
with shader graph, is there a way to apply shadow differently to an object? or perhaps even to just get the shadow information at a given pixel?
or do I need to write something for that?
None that I know of, as long as the lightmapper can handle it
If it seems to cause an issue, you can alternatively bake light from the emissive materials of the lamps, thought it may need more samples for similar accuracy
It's doable, but the tools don't support it directly
You'll need custom nodes that break open the lighting calculations for you to modify, such as this
https://github.com/Cyanilux/URP_ShaderGraphCustomLighting
Shader Graph's importable samples also include a custom lit node example shader graph, but it's incomplete
thanks for this info!
custom lighting and multi-pass shaders are really missing from shader graph, I understand why people use amplify
To make custom variants of the lit shader easy to create I think all Unity would have to do is complete the node lit sample
A lot of people need it and they're considering it, so it might even help to request it as a feature here https://portal.productboard.com/8ufdwj59ehtmsvxenjumxo82/c/454-didn-t-find-what-you-were-looking-for-
Node custom lit specifically
Node lit is a separate example that already exists, which includes all the properties and texture calculations but no lighting calculations
Both should be included templates, not downloadable examples
Hey guys, I have this realtime spot light going through the walls. My light settings are set to default and walls have lightmap UVs. What is the probable cause?
It needs shadows enabled
Don't work
Is it realtime, baked or mixed type light
And do you mean to use baked lightmaps
Its realtime. I do use baked lights in the scene but not this light.
Then lightmap UVs or Lighting Settings are not related to this issue
You would instead look into that your URP settings also allow shadows, and don't cut them off by distance too early
URP settings are also set to default. Changing depth bias or normal bias won't do nothing.
Meshes also need shadow casting enabled
For testing I'd make a new scene with default unity cubes and a new light, enable shadows and see if they appear
You should show the URP asset's inspector, and verify it's the asset that's in use in your project's quality settings
By default there are multiple, and iirc the lower graphics levels have URP assets that don't have shadows
Its still going through.
Those are not default meshes
here is with default mesh
Does the light have shadows enabled?
It does
That's not a good test
Custom shaders might disable shadow receiving (and renderers might disable shadow casting)
So you should have multiple default cubes in a positioned so they should be occluding the light from each other
Oh wait. It worked on test scene but don't work on my scene ??
Could you send a screenshot of the mesh object's settings?
but there is still leakage here
That's why I always suggest a brand new scene for testing
Here u go
The actual object placed in the scene
They are all same.
So, based on this the missing shadow issue was fixed
And now the problem is light bleeding instead?
It still doesn't work on my scene but that is too.
Have you tried restarting Unity and then checking your scene? Sometimes something gets stuck behind the scenes and needs a kick.
I'd just swap to a new scene and not bother worrying
There's nothing that I can think of that's scene specific and should affect realtime lights, with the possible exception of Lighting Data if the light is not actually of realtime type
Or indeed restart first
I haven't messed with anything either. Just did some baking that's all.
Nope..
Did you ever show the specific light's properties
Could it be that you've accidentally set the light in your scene to be baked?
Here is everything. You have my light settings too.
I see nothing weird here
One possible option is that you have too many shadowcasting lights
When that's the case lights randomly lose shadows
In another scene it might randomly pick a different set of lights to keep their shadows when culling them
I dont use directional light and all i have these emissive cealing materials whice are baked.
Directional light's shadow on a separate limit from additional light shadows
Emissive materials have no realtime shadows at all
So it'd be only up to number of light components with shadows on them
I will use limited realtime lights on this project. Any light that not moving will be baked.
How many shadow casting realtime (or mixed, or unbaked) lights do you have in your scene?
That's the only light i have, rest of'em just emissive materials.
So not really a workable theory
If you can get rid of the issue by swapping everything over to a new scene, that really seems like the most preferable option to me
Don't have to know what the issue was if it stays away
Sometimes things just break in an untraceable ways in scenes, lighting cache, URP assets, whole projects even
;// Thanks anyway, Ill try it but i think it will occur again.
I'd keep an eye out if it seems to occur with baking specifically
Seems to be the only clue we have
In the new scene too I mean
If it does I'd just fire up a new project, move the scene there and see if it breaks there too
Sometimes (often) all you can practically do is a process of elimination just to understand what affects the issue
Using that info hopefully either figure out what it is, or at least how to avoid it
A long shot but in my experience upgrading a project from 2022 version to Unity 6 breaks a lot of random things in weird ways
Happened more than once, and library deletion didn't fix it so I had no choice but to move assets into a new project
So you mean using light probe group, and in objet select 'Receive Global Illumination : Light Probes' ?
APVs are an alternative to light probes ("Light Probe Groups" specifically)
Light probes have only per-object accuracy, but APVs have per pixel so they're suitable for baking lighting for environmental meshes
hummm, and is it available for unity 2022.3.3 ?
It's not, requires Unity 6 (or HDRP for earlier editor versions)
oh... rip then x)
because the thing that i'm using for the multiplayer only work in unity 2022 :/
Thanks anyways :)
And quick last question, to optimize the object, and to not take 1h to import, what are the best settings for this object ?
Specifically the Lightmap UV's settings
like which checkbox to check, and what values for the lightmap settings
Checkboxes and settings can't save you here
Effective lightmapping requires meshes that have large flat areas and low vertex density
Those round blocky shapes simply cannot be either
Hey pretty people, anyone can link me a good tuto that explains why (on URP) directional light penetrates objects and how to make dark environments (like caves) get the correct lights.
Also, can I reach light zero some how? Even with no directional lights, my char still getting some kind of light
Shadow casting must be enabled on the directional light (and shadows must not be disabled elsewhere)
If shadows only appear close up, that is the shadow distance in URP asset
What is not lit by any light source is lit by the scene's ambient light, which you can configure in Lighting window
Smooth and metallic materials also get ambient reflections from the sky, or nearby reflection probes
To have ambient light outside but darkness inside in occluded areas in the same scene, it's expected to generate either realtime or baked GI lightmaps (and do everything those workflows require)
That sounds scary @deft fiber! Do you have any sources that I can learn those proccess to point out to me?
I thought that those things were simple and commom on game dev, it is weird the it doesnt have eaiser solutions
If you want your whole scene to be dark, that is simple
You can set ambient light and ambient reflection intensities to 0 from lighting window
(You may need to also Generate lighting with realtime GI and baked GI off to save the new environmental lighting permanently)
If you do need local darkness, you will also need baked lighting
It's a complex system and there isn't really a way to make it simple, so be prepared for that
The official video tutorial will give an idea what the process is like
https://youtu.be/KJ4fl-KBDR8
how do i fix baked lighting artifacts like this? I am using HDRP, the main Lighting settings are included also.
The lights in my scene are all Mixed lighting and I am using APVs if that helps.
My geometry is ProBuilder and is essentially perfectly grid aligned.
Why, using shadowmask baking mode everything, that is beyond realtime shadow distance, become shaded (dark)? I have been using this mode for a long time and changing distance from the objects did not change any lightning in the scene. No matter if the object is 10 or 500m it was being lit and shaded properly by mix directional light but not anymore
Update: disabling Render Graph solves the problem but not recommended by Unity. What is it?
Hi, I have this problem where shadows on edges look blurry and spotty like this, has anyone ever had this issue before?
I feel like it has something to with my lighting settings
It's SSAO, a renderer feature
Render Graph is a new backend system for developing render passes
It's not supposed to break (many) existing features, but in my experience projects that have been upgraded to Unity 6 from earlier versions may have wildly random rendering issues related to using it
Yes, something seems to be a little bit different. If I increase the shadow distance, mixed directional light starts to lit further, but I don’t need that distance shadows as it impacts performance of course. So if I don’t develope render passes I can disable it?
where is the light probe editing tool? tutorials doesn't show where to find them too.
the tutorials, including one by unity, already had the editing tools in the inspector, it doesn't exist on mine
I suppose yes
Like the infobox says, it's now in scene window along with the transform gizmo tools
Hello! Am i supposed to rebuild lighting after every single change i do to a lighting object? Say i build the lighting and then move a point object set to "mixed", do i have to rebuild it? I dont quite understand it? Thanks
Hi, could someone help me out with lightmapping?
The first image shows what my scene looks like with realtime lighting, the only thing that's missing, are shadows all the way at the back because the shadow draw distance is too short for them to show.
I want to bake a lightmap to solve this issue. I set my directional light to mixed so that my stadium uses the lightmap, and the players can cast realtime shadows. Baking results in the second image, which looks all washed out and it doesn't cast any shadows for the static objects.
The third image is the scene with the lightmap on and the directional light off, which I find odd, because if I understand lightmaps correctly, the entire point of it is to bake the information in your UVs, making the light redundant for static objects (unless I am completely misunderstanding lightmaps)
Thanks
Hello there! Sorry for the sizeable post, but I've been struggling for a long time with how to manage lights in a dynamic open world game, and I just want to check if my current plan is good or if I'm missing something. Is the following correct?
My scene:
I have a dynamic night/day/weather system as well as many smaller lights which can be turned on or off by the player.
My approach:
I'm using the Shadowmask lighting mode with baked Global Illumination enabled.
The sun and moon are mixed directional lights, and I've baked their indirect light with an APV, and I'm transitioning between several baked lighting scenarios to update the indirect lighting along with the time of day and weather during gameplay.
All lights in the scene which can be moved or turned on and off are Mixed and using Shadowmask Distance. They all have their Indirect Multiplier set to 0 as to not contribute indirect lighting. This should allow them to be turned on or off without shadows or indirect light still remaining when off.
Only lights that never turn off and which stay relatively stationary should contribute indirect lighting.
Since I use an APV, all renderers in the game have Receive Global Illumination set to Light Probes. This setting has no effect on how shadows are baked.
Am I missing anything? Would this work? Thanks a bunch in advance.
there's a part missing that we can't fill in so easily; not being able to configure multiple passes makes it so that e.g. the DepthNormal pass will not have correct normals if we use an unlit graph to do our lighting
I guess I will put that in the feature request
URP (or HDRP) don't use passes with the usual syntax, but as far as I understand everything that as doable should be doable with renderer features (or Custom Pass in HDRP)
Hey guys When I am trying to bake my lights "Light baking failed with error code 2 ('LoadShaders' failed with exit code: 3).
this error is showing how can i fix it?
yeah it is doable if you write the passes by hand, which I was trying to avoid (as it means writing the whole shader by hand)
How do I fix it?
how do i make the shadow caster receive the sorting order
My lighting keeps baking like this does anyone know a fix, theres no overlapping uvs
Looks like invalid texels
https://discussions.unity.com/t/lightmapping-troubleshooting-guide/895352 c. 15
ok ill look at that
would it happen to do with the fact my uvs are larger than the texture?
If you've set unity to generate lightmap UVs for the mesh in import settings, it would not
i dont know what that is
They would be in a different UV channel, so the texture UV's don't matter
Don't know what mesh import settings are? Or what lightmap UV's are?
mesh import settings
All imported assets have import settings that are shown in the Inspector when your click the asset in Project window
https://docs.unity3d.com/Manual/FBXImporter-Model.html
Meshes have import settings relevant to lightmap UVs
Generally your lightmaps would be even worse than that if you don't have lightmap UV generation enabled
But it's nonetheless important to have lightmap UVs in some way
Hi there, can anyone tell me why the Reflection probs field (realtime, every frame) is affecting my Enviroment Lighting? I'm totally new to Unity💀 👽
I want to save Enviroment Lighting and realtime reflections
When the object exits the range of the probe, you see the reflection of the sky (pink and blue), since the probe no longer overrides it
Your scene's environment lighting (magenta) is not related to reflections or reflection probes, but it would be overridden by the light probe group, if the light probe group has been baked
Reflection probes and scene's own reflection probe store specular environment lighting
Light probes and scene's own ambient probe store diffuse environment lighting
Nonmetallic materials are lit by diffuse lighting, as well as specular lighting if they're smoother than fully rough
Metallic materials are lit only by specular lighting

So i've got a custom 3D model of a hallway and I am experimenting with baked lighting by creating a emission material and putting it in gameobjects to try out, Why does it look off ? I've turned on generate uv lightmaps for my gameobject
why are shadows showing up when i turned shows off on that object
Disabling shadows on a mesh renderer disables it casting shadows, not receiving them
But I'm not sure if that's what you mean
Looks like texel invalidity
https://discussions.unity.com/t/lightmapping-troubleshooting-guide/895352 c. 15
Thanks alot
Hey, help guys
I’m using recroom studio unity but in unity theres a no shadow but in the game there is a shadow
the 2nd image is what my lighting looks like when first opening my project. the 1st image is what the same area looks like after spending some time in the editor with no lighting modifications made. what's causing it to look different on its own?
Hi guys ! I have a question regarding 2D URP lighting:
If I have a 2D Light + 2D Shadow caster on the same object, is it possible to prevent that I cast a shadow form my "own" shadow caster ?
In the pic the Light Source is at (L), the shadows on the other objects are ok but not the one in front of the Golem. You see the Capsule collider which is used for the shadow form.
(all objects need to be on the same sorting layer, because this is a 2.5D game with custom sorting vector)
Any clever ideas how to fix this ? 
What setting did you use to disable the shadow? Are your editor and build target using the same quality level?
Actually Casting Option: Cast Shadow should not be self shadowing
I don't think it's self shadowing in your image
Maybe I misunderstand what you are asking
The difference here is how Unity now treats ambient lighting which has not been saved by Generating it from lighting window (with realtime GI and baked GI disabled if you aren't doing lightmapping)
Before generating it's ephemereal and only visible in specific conditions
First determine what's causing it
Use the Debug Probe Sampling in Rendering Debugger to determine where the lighting is coming from
It could be leaking from the outside, or it could be noise due to not enough samples
APVs need a lot of samples
Also, it helps to set Sampling Noise to 0 temporarily via the Adaptive Probe Volumes Options volume override so you can more clearly see the contribution of each probe
Yes right, this is not a self-shadowing problem. You can see the shadow caster component on the right: self-shadow is not selected only "cast shadow".
The problem is not that the Golem appears to dark (that would happen with self shadow) the problem is, that:
- He has a 2D light source on his head (crystal horns)
- a shadow caster on his root element (using his capsule collider as casting source)
and that he how casts a shadow from his own "feet" - the shadow that goes towards the viewer. It will always stay and move around with him.
Goal: make HIS light + shadow caster ignore each other, but still interact with all other creatures.
If I move the light further down, inside the volume that casts the shadow, the light is completely blocked. Would also be a solution to STOP shadow casters globally from "swallowing" light sources.
So 2 possible solutions - but how to implement them ?
I can barely imagine, that the Unity6 2D URP pipeline is so extremely limited 
I think I understand
It's probably not possible for a light to ignore a specific shadow caster
It has to work on a per-layer basis
Unless you can find a way to inject your code into the 2d light loop itself, that somehow keeps track of associations between discrete lights and shadow casters
Normally all light rendering has to work on generic sets of data like layers to keep things efficient for GPU calculations
Your main issue might be that while the 2D lighting system is very capable, it's not designed for isometric use at all
It assumes all shadow casters extend infinitely depthwise
Hm ok I see. Thanks for the fast reply!
And I guess there is also no option that light sources that are completly inside shadow casters still shine out ? That would be fine as a global setting
I don't know of one, if it's possible
Why does my lighting look so weird and bugged? im on hdrp unity 6.
Dark might need a bigger sample multiplier than that, but before you tweak it use the Debug Probe Sampling in Rendering Debugger to determine where the lighting seems to be coming from
In my experience probes inside walls may get invalidated and duplicate the light from the outside
Seemed fairly random
I guess technically it should be fixed by invalidating the probes on the outside, but in my case a better solution ended up being to apply a virtual offset to probes inside the geometry so they were moved to a valid location, into the room interior space specifically
Hey guys, How do I use Adaptive Probe Volume to make day night like in the video from Unity?
where can I get one of these?
Which video?
Adaptive Probe Volumes (APV) provide a new way for you to build global illumination lighting. Watch this video to learn how to achieve high-quality results using the APV features in Unity 6. We’ll share best practices for setting up and previewing your lighting choices and how to identify and fix common problems like light leaking. Finally, we...
You can create a project with that template, perhaps the script is included with it
It's not there, I checked.
The part of the video where they get to that component they mention using Azude dynamic skybox, it's possible the script is from it
Or perhaps since they're using a proprietary asset with the script they didn't think it necessary to include
Cool, so unity is making some vids on other people's paid assets?
cringe
there are 0 videos on the net on how to fine tune it
From the looks of it the script doesn't do anything except move the sun, except later when it updates and modifies the ambient probe
Probably using this method
https://docs.unity3d.com/6000.0/Documentation/ScriptReference/RenderSettings-ambientProbe.html
Hi there.
I am trying to understand why in, Unity 2020, everytime I save a scene it generates some .lightning asset.
The scene is just some UI button and image to test some small functionality, it needs no lightninh
It seems most likely that your Lighting window has auto-generate enabled
Just checked on Window => Lighting, the Scene tab, Auto generate is not marked 🤔
What kind of lighting asset is it exactly and where?
Pre-Unity6 the editor used to generate temporary scene lighting just for preview purposes
Doesn´t look Temp to me, it's a Lightning Settings Asset, saved next to the scene I just saved, and with the same name ending in Settings.lighting.
I save SampleScene.scene, it generates SampleSceneSettings.lighting
why is this light so bright on 0.001 instensity?
It doesn't happen when saving some other scene, so maybe it's some kind of global settings for lighting?
Hello!
I use HDRP and Shadowmask mode, and when I try to bake lighting for my scene, some mixed lights get the error message that too many mixed lights are affecting the same mesh, and some mixed lights are therefore overriden to baked mode. I understand that part. However, these overriden lights appear completely dark, not casting light of any kind. The geometry around them is static. I've sort of reproduced this both in my main scene and my test scene, although in the test scene the overriden lights aren't completely dark, but merely darker. I tested baking with an indirect intensity of 0, but it seemingly made no difference (perhaps the albedo boost still ensures there is indirect light)
Can anybody help me understand what'sm going on here? The main issue is that overriden mixed lights don't cast the same light as they're supposed to, and in my main scene, they're completely dark.
Actually: Even non-overridden baked lights are dark in my main scene. Like this:
You’ll need to ask a question for people to help you
I don't understand how to make cool lighting through APV in my room, and also how to make it day and night through it
A pretty involved topic, not really something we can simply tell you how to
What are my options for getting my hair to shadow my character's head/face in URP? It seems to be a light bias thing, but no matter what I try, I can't really get anything going.
Besides adding the shadow detail directly to my textures, is there any other options I can do to get this working?
Are you seeing even partial shadows?
Bias pushes shadows under surfaces so they don't appear on the lit side
As a side effect something too close to the lit surface behind it will also be in front of the shadow
The distance between the occluding surface and geometry behind it is what makes the difference
If the hair is very close to the head, to get the hair's shadow appearing between them is quite tricky if possible at all
Hmm, yeah it's quite close to the head. Is there maybe some way I can fake this effect? Without some kind of shadowing, it makes the transition between hair and head look extremely flat.
Not sure if there are many practical options
Can you show what it looks now without shadows (and with, if any)
I'll have to post it later unfortunately. Leaving for work now!
Can URP do decals? Maybe that would work.
URP, APV: Anybody that knows when using APV how the Display cells are chosen. For some reason they don't update, resulting in only an area loading it's probes. Also, not using the GPU Streaming option for probes.
I guess just too little memory:
Max Memory Budget for Adaptive Probe Volumes has been reached, but there is still more data to load. Consider either increasing the Memory Budget, enabling GPU Streaming, or reducing the probe count.
UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset,intptr,UnityEngine.Object,Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle)
but that seems improbable to me as it show my baking set to be 120 MB
Does anybody have any opinions on going full APV vs combining lightmaps and APV? I feel like I really want APV either way because of the soft lighting on the characters. Would be cool to do it all in APV but it takes longer to bake and looks like the Display Cell algo is either bugged or I don't understand something/
I got this message sometimes even for very small volumes.
APVs excel with complex static meshes where lightmapping would fail due to UVs or geometry density
Lightmaps excel with expansive surfaces in cases where APVs keep suffering from sampling noise
They can be used at the same time just fine, as APVs replace Light Probe Groups
But APV specific features like sky occlusion or lighting scenarios are unavailable for lightmaps, so lightmapped surfaces would not have to be involved with those
Thx, yeah I noticed that APV's can create some noisy lighting situations when used on big surfaces. I think indeed for me the ideal solution would be combining the 2. Which I definitely can do as I don't have big scene wide light changes. Just have to figure out what is going wrong with the APVs not loading properly when being divided in to I feel ik 6+ cells.
Not very familiar with that side of APVs
You're loading the cells in progressively at runtime?
It's weird, seems like that is the default behaviour. I thought that the streaming option would enable it
but I had that disabled but I still got the cells like in the screenshot above
The probes only get loaded in the green zones
Perhaps
I've only made room-size scenes with APVs so far
When something breaks mysteriously I always make a new simpler test scene for it, if that also breaks, then a new simpler test project for it
Really helps indicating whether it's a user error in the workflow, errors in your scene or project setup, or something deeper
Yeah, it works fine on smaller volumes, I'll just have to take a closer look at it. Thanks for the help either way :)
anybody knows what thse black squares could be next to the light? they appear when lookin at a certain angle. I am starting to think this is because of light maps.
Hey , does anyone know why my shaddows look like this? The solution is not hard/soft shaddows
Is that supposed to be a flat surface (green)?
yes
its perfectly flat
(i think)
when i turn up the shadow resolution it looks like this
What kind of shadows do you want?
i dont really care i just want normal shadows lol, somewhat realistic but this dont seem right
Do they become better if you put your camera closer?
oh yeah they do
There's a component where you can play around with the shadow quality based on distance
awesome thanks
You are getting there
Enable soft shadows, decrease shadow distance as much as you can and try shadow cascades
And show your quality settings for shadows so it's possible to point out issues
Are you using lightmapping? Realtime, mixed or baked lights? Any more clues or relevant settings at all?
Is the square arbitrary, or is it a whole mesh that gets dark at a time
I use lightmapping, these are mixed lights. The square is always the same, flickering into and out of existance when coming close to the light shource. Depending on camera angle. Only the square becomes dark, not the whole mesh. Seems to be pretty consistently happening near most lights.
thank you sm!! i seem to have gotten it i think
Since it can appear and disappear, it's not related to baked lights so it has to be something related to realtime lighting, such as light limit
mixed is a light that's both rendered as realtime and baked
In shadowmask mode there's maby also some limitations like distance shadowmask's light overlap, but I don't think those appear or disappear like that
how can i make the pillar shadow behind the other pillar
hey guys, has anyone runned Adaptive Probe Volumes inside a Quest 3 build, for some reason, everything works fine in the Editor, but they don't seem to work in build. Using Unity 6.0.41 + Meta SDK 72.0, normal Light Probes seems to work just fine? 🥺
how can i stop this from happening, shadows dissapering in random places
Hey guys, is someone where who knows his way around 2d sprites and normal maps? I really don't know where else to look, I searched the web to no avail 😐
Near Plane
still the same
shadows near plane
Anybody help me? 😦 - Progressive GPU baking . HDRP 17.0.4 Unity6
Light baking failed with error code 2 ('LoadShaders' failed with exit code: 3).
Have you tried restarting the editor? This seems to solve a lot of strange issues.
sure 10x 😄
i have CUDA libraries, RTX 4070 super, but this shit still not works ... CPU progressive is too slooooow
why is this brighter than the sun? bloom is barely on, it's this one pitch black face that isn't the proper texture only when not rotated, if I rotate it even by 0.001 degrees it isn't black and isn't super bright, anyone know why this happens?
Hello, using HDRP and Unity 6, I'm having a hard time to figure out why I can't fully light up a 10x10x4 enclosed room with a single ceiling light after baking. Isn't HDRP supposed to simulate real life and a single ceiling light should be able to lit up the whole room evenly. Here, the corners and ceiling edges are really dark compared to what it would be in a real life room. I've tried playing with all the lighting settings but nothing appears to affect the corner really well, maybe light it up a but still dark. If I put a character with a bent forward position for example, the front of the body will be extremely dark which makes no sense either. And increasing the ceiling light intensity makes the character right under the light super white if I go too high while still dark when in the corner for either side not directly exposed to the main light. Any tips to fix these issues?
Here is what I mean by being too dark. The bottom of the cube should be also quite brightly lit since light bounce off the walls in every directions. How could I have a bright bottom too ?
Are weaker gpus physically incapable of raytracing? Like if there's just a few raytraced shadows and they're all at the lowest possible quality for maximum sharpness, every other fancy rendering aspect of HDRP is turned off, and all of the rendering is forwards besides the raytracing, would it be able to run on weaker mid range computers?
Nobody has any idea for this? Is the only solution to add more lights to brighten dark areas?
who use Adaptive Probe Volume ?
It's not about beeing a week GPU or not, but more about the hardware capabilities and driver limits.
I think that now all "recent" gpus support raytracing and can run it, but a few years ago some models were limited, ie. on nvidia side GTX 1070Ti could run raytracing, but not GTX 1070. RTX20XX series could, but GTX16XX could not, even if they were based on the same architecture.
not sure if this is the right place but, anyone know why my 2d sprite normal maps are doing this. The line in the middle has a solid 128,128,255 rgb normal but the lighting gets cut off like that and im not sure why.
Hey So could someone help me out so when I actually go into vr i see that my shadows like move with my camera would someone know why and also if i change max distance in the urp settings from 80 to 2 it will stop this from happening but the shadows dont look very good after and also in the camera settings if i change the near to 0.06 then no shadows appear if i change this to a lower one what your seeing in the video happens and if higher its still disappears the shadows any help? https://cdn.discordapp.com/attachments/497874524549808128/1356762731348234392/2025-04-01_23-46-26.mp4?ex=67ee6802&is=67ed1682&hm=8f8557585ba0f9c8c0a330c410c0d3e0376031af8a3bbcad53fe977e0b803d4e&
and also all my objects are static in this scene
increase the Near Plane in the shadows settings
in the directional light? ive increased it in the directional light but nothings changed
Hey all,
What do you suggest for achieving day/night cycle on mobile devices ?
I know my question is petty general but I want at least to know where I should start on. I've researched about that but I'm a little confused.
Hi, uh might be a stupid question, but I swapped my build profile to android, then swapped it back,
but now a lot of textures have a purple glow to it? And I'm not sure what I've done wrong 😭
Any help would really be appreciated!
Hello there guys , Today , I just wanted ask on how to fix this issue in unity when I was trying to add some ray tracing inspired lighting and shadows to my game and suddenly this happened : Reduced additional punctual light shadows resolution by 4 to make 18 shadow maps fit in the 2048x2048 shadow atlas. To avoid this, increase shadow atlas size, decrease big shadow resolutions, or reduce the number of shadow maps active in the same frame
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Hey wassup everyone. Does anyone know how to fix flickering lights?
Hello! I'm currently messing around with a scene trying to get familiar with lighting and I ran into some things I want to ask about.
I have a scene with a simple cube with a red material casting a glow and I added some light probes.
in the left picture, when I have the light probes on, my character is receiving the glow from far away. no matter how far away it is from the red cube, it receives the glow as long as it's around the red cube in a Z position.
In the second image I'm receiving the light from the wrong position, so it doesn't seem to be updating in real time.
Any help would be appreciated, let me know if you need any more info about my settings or additional screenshots
I fixed this by setting the projects settings to default so there was a setting in project settings causing an issue not sure what it was but it was something
You'd have to show the light probes, looks like they're not positioned around the glowing effect properly
Also, only Realtime GI can respond to realtime changes to emisive materials, and even then only to color changes
It's easy to mix up whether you're baking Realtime GI or Baked GI
Look into pixel light limits per object
As the message quite clearly states, you have too many / too high resolution shadowmaps from shadow casting light to fit your settings' specified shadow atlas
Here's my light probes, I just put them in front of the object. I wonder if they're just casting the light out to everything on the X axis?
There's also no light being casted without the light probes so I'm curious if I just didn't use the right settings somewhere (my lightmapper is progressive GPU, my directional light is mixed with soft shadows and only the red cube's material is emissive)
Has anyone here had a chance to play around with radiance cascades in 3D?
I'm thinking of using them for my project's lighting
There are probes only on one side of the cubes to capture the light, so a dynamic mesh on the other side will also get its lighting from them which won't be accurate
Are you trying to use Realtime GI or Baked GI
Those options have their respective checkboxes in Lighting Settings
Realtime GI
So i have to change that to low resolution or meduim , right?
Hello
If I click bake, it idles on this forever
If I cancel, the editor freezes indefinitely with no crash warning.
CPU bake works. What gives?
Your GPU not playing nice with the lightmapper
I'd try updating drivers and restarting everything
Already did
Looks like this guy has the same issue as me https://discussions.unity.com/t/unity-globall-illumination-stuck-baking-only-in-linux/1539320
I concur with the last message here
This sucks.
Hardware/OS/driver incompatibilities are rarely something we can help with, since they're so random and hard to track down even if the engineer had your machine in their hands
I only have 7 shadow casting lights, and it's already giving me the too many shadow lights warning. What the hell?
I switched my renderer to forward+, that fixed the lights being culled completely. Not the shadows though.
Hello, I ran into an issue with 2d lights and I have the following question : would it be possible for 2d lights to render on top of or behind objects using a transparency sort axis via the y axis?
I have this flashlight that goes on top of the wall
but when I go behind the wall, the light 2d still renders ._.
If it's the message about shadowmaps fitting on a shadow atlas, it's not a warning exactly but a notification that the shadow resolution was reduced automatically
err no.
There are too many shadowed additional punctual lights active at the same time, URP will not render all the shadows. To ensure all shadows are rendered, reduce the number of shadowed additional lights in the scene ; make sure they are not active at the same time ; or replace point lights by spot lights (spot lights use less shadow maps than point lights).
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:219)
I see
Each shadowmap is a rendered image, which must all fit into the shadow atlas texture defined in your settings
Normally the resolution per light is reduced automatically to ensure that happens, but you can do that manually per light or by changing the shadow atlas size
I'd guess in this case it's not possible to automatically reduce them, due to low shadow atlas resolution possibly combined with high shadowmap resolutions
Point light shadows have to render six shadowmaps compared to just one in case of spot lights
...I also don't want to reduce them
Is there a reason why the engine struggles to make 8 shadow casting lights in year 2025?
I'd try making sure the shadowmap resolution tiers in graphics settings go sufficiently low and try increasing shadow atlas resolution
Since your lights are in relatively enclosed spaces, you could cull them by camera's position in the area which might be the most effective option
@tired oasis Which unity version by the way?
6.0.40f1
I'm not certain these suggestions will help because I haven't encountered this issue
and I can't seem to recreate it either, also using URP and Unity 6
This?
what the hell
Could you send the urp asset?
Is this your main light shadow resolution or additional light resolution?
bizzare
Well, I was one light away from going above 4K shadowmaps, so making one more drops the lights to "medium" effectively
Frame debugger can tell you what's actually being rendered on the shadow atlas
New project, are you not getting this in your console? Wtf.
I'll have to make a new one to try
My test project is upgraded from 6's alpha version aka 2023 so it may not be fully empirical
It would be one thing if the resolution was taking a hit, but they're just disappearing. No shadows.
For me it just keeps reducing them
Worth to note that with default settings of 2K shadow atlas and 1K shadowmap, even just one point light exceeds the shadow atlas on its own
Am I looking at the right thing
Doesn't seem to be full at all
Wait what the fuck
I just switched to vulkan to use the frame debugger now the issue is gone
I can get up to 40 point lights without running into the problem
From what, Direct3D11?
Holy moly
Ah right
To be precise, it's OpenGL that has a limit on shadowmaps it appears
So do I just swap to Vulkan?
I think so, unless you have a reason not to
I like Vulkan. Not sure if there's any adverse effects of this, so I guess.
Most devices/platforms support vulcan now
Probably not WebGL though
In this case it might be just WebGL being outdated, but even in general rendering engines have never been good at this particular task and due to graphics engineering trends and priorities haven't been improving either
I think it'll be hard to find many modern, particularly high fidelity graphics games that have more than one or two, or none, shadowcasting lights
GPUs, graphics APIs and engines have gotten a lot of optimizations for rendering a lot of stuff, and doing a lot of things with the rendered perspective, but expense for rendering multiple perspectives which shadowmaps are has not gone down
Interesting. Thank you for the help.
It's ultimately up to arbitrary priorities of graphics engineers high up in the industry at which direction the shared architecture is developed
But with the right expertise it's definitely possible to improve those rendering features that don't get much love
Is there a way to make fog that doesn't magically light up in the dark?
I don't want to make it black, I want it go glow grey in the light (this is good)
Also, if you ignore that there's basically nothing in the scene, how can I improve the lighting?
I am going for a gritty look, it's in an old bunker complex
There is no straightforward solution to that, unless you consider volumetric fog systems
Non-volumetric fog of this sort is kind of an antiquated feature, it simply fades to a color based on distance which functionally reveals depth differences in geometry giving the illusion of light
There's some creative tricks with shaders and/or particles that can be used, but not any one I could recommend as a very straightforward option
Yeah I've come to know that default game fog kind of sucks. So my option is to use volumetrics?
Simplest might be some lightly varied fog particles with Soft Particles and Camera Fade enabled on the material
It is an option, but for URP they're all third party assets
Varied drawbacks too, mostly performance and resolution
I was going to take a crack at volumetrics at some point anyway. I'm aware it's not built in.
A closed indoor space is ideal for hiding limitations of the technique
By far the biggest part of how a light looks is how the objects and materials that it's lighting up look, alone it does very little
However it's also important to consider the light physically and ensure it emits light in a way that's correct for its shape and type
I'd point to light cookies as an underrated detail
https://docs.unity3d.com/2019.3/Documentation/uploads/ExpertGuides/Create_High-Quality_Light_Fixtures_in_Unity.pdf
This ebook includes good examples
Cookies, hmm yes. I was just looking at Tarkov promo material and noticed it.
My scene actually doesn't look too far off from this. It just doesn't have anything in it.
Which I guess is the point
I'll model up some fixtures and put it in, thanks for the idea.
To my eye your concrete may be too smooth, if it's meant to be unpainted
The materials are basically what reflects the light so they contribute the most to its appearance
But those are up to you to tweak
Additionally you may spot that in the Tarkov images the corners are padded or otherwise covered
Rather cheekily even, if you start focusing on it
Perfectly sharp corners are one thing that subconsciously reveal to us that the place is not real
oh I see that
I like how that random plank just happened to fall there to perfectly cover up the intersection of the floor and wall
It also would appear that most objects in the examples are not casting shadows at all
Which you might assume is something that sticks out immediately
I can't tell if it looks better with ACES or not
Tonemapping might not look remarkable on its own, but they give color correction and other post effects more "room" to work with
how to render 2d light with transparency sort axis on y axis plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
To the best of my knowledge 2D lights only care about sorting layers for determining which sprites they light up
They are not designed for 2.5D isometric perspective, so your means to give them a perspective effect are limited, if that's what you're after
Normal maps may help a bit
if it helps
to solve the very problem you are seeing
with the fog color being too consistent and not reflecting the neviornment around it
I made a volumetrics solutio na while back
its only for BIRP but it can be ported for other SRPs
although keep in mind its a fully baked solution, but if your environment lights don't change or whatnot then you should be fine
So if there's someone who can help me Pease ping me
The setting you want to change to change the distance of shadows is called "shadow distance", coincidentally
In quality settings
Thanks
Hey is there someone who can help me setup ambient occlusion for my project? I am making an vr experience about plant life, but I cant seem to get it setup correctly ping pls
Be more specific
I want this kinda heavenly feeling
Well your original question was about AO.
This just looks like a bunch of point lights, probably baked with AO judging by the soft shading
I had some people telling the complete opposite
Well the bright spots on the sides look like point lights, I don’t know though every developer can have their own way
Do you have any kind of tutorial settings etc? I just can seem to get it correct
I understand that it’s not properly working, but you have to actually explain the problem
Sorry, I dont mean to be a burden, but I just have alot of problem with creating that heavinly feeling. this is just a test, but my best attempt
The main difference here from your reference probably is that the reference does not have hard angled lights, and it has (rather excessive) bloom
The design of the room also has an effect, the reference's room is very tall, and it has objects around the floor to create some soft shadows
Note that it also has a big brightly lit hole on the ceiling that directs a lot of soft light into the room
You can also try SSAO or lightmapper's AO option to exaggerate the shadows in occluded areas
Also post processing is likely involved
The excessive bloom as mentioned
Looks like it could be all low dynamic range, since the bright areas are so blown out
So no tonemapping and/or gamma color space rather than linear
But whether that heightens the dreamy feeling is subjective
Ooh didnt notice this
Is there any tutorial or documentation to guide me through this?
This is the first time reslly focusing on light and these are all new terms for me
Not sure exactly
It's a vast topic
Lighting in real life, in game engines and in Unity are all vast topics with a lot of overlap
I guess you'd first pick one of those as an angle of approach
i just waited 10 mins for my scene lighting to finish baking, but after it finished, i realized that all of my enabled lights were marked realtime. what was baking during this process? do disabled lights still bake?
Environmental lighting, probably
And static emissive materials, if any
i do have a few materials that do look different now, but all instances of them are non-emissive and are attached to non-static objects.
Ambient light from the sky is calculated with the same raycasts as light from any light source
I'm not sure if there's any way to fully disable it, in case of fully interior scenes that don't have a sky
how is this the case if i only have one light in my scene
No crossposting please
You always have ambient light from the sky
If your sky/ambient is pure black / 0 intensity, it's effectively not there but it's possible it does the light raycasting regardless
sorry, I meant to delete it when I realized that the halo existing without light sources meant it was a rendering thing and not a lighting thing, and wanted to movei t
i dont think i follow. is mixed directional lighting only supposed to work when there is no skybox lighting?
Directional lights are not related to ambient lighting
Ambient lighting always exists in some form in the scene's environment lighting settings, and is calculated when baking
Mixed lights are also calculated when baking
So why it takes time does not seem like that big of a mystery
So why it takes time does not seem like that big of a mystery
Im not too sure how this relates to my question. I was asking about why I cannot have mixed lighting even though it is the only light in my scene
oh i think i see where the misunderstanding is coming from. this message --> #archived-lighting message is not a reply to the message before it. it is a standalone question
What would be the best way to simulate, in 2d space, the light cast on a room from a lightbulb hanging on a string? I struggle with the fact that stuff too close to the source ends up too bright when I make the entire space a lit and usable amount of light
Ah, that's what happened
The warning is incorrect, I believe
It should not even concern directional lights, only punctual mixed shadowcasting lights are not allowed to overlap in shadowmask mode, I believe
Trying to figure out why my particles are lit from different directions?
Using URP unity 6 6000.44f1
Is the lighting baked into the particle texture and the particles randomly rotated?
Using a normal map on the material
but uhh yes they are randomly rotated, does rotating them break or something?
No
Normal maps contain information about different directions per pixel towards which the surface should be bent during light calculations
That may explain why they are lit from different directions
But if your particle's base texture has a dark spont drawn on it, that's a more likely explanation
I'm trying to mimic the translucency effect of paper, and the global illumination effects that you see with it, in real-time (in URP)
I'm looking for resources where this or similar things have been done before, or other ideas that could help with creating something for this
Our game is mostly in need of relatively local GI, there are only a few things affecting far-away objects. So, one thing I considered was to create a kind of "translucency probe" that goes with the objects; basically a set of light probes that store the light at various locations for several angles of incoming light.
I can't be the first to want to tackle a problem like this 😄
Realtime translucent GI in URP no less? I wish
I've been rotating ideas in my mind about pretty much the same thing
But to my knowledge there are no solutions like it
🤔 the search goes on
I feel like light probes are so close to something that could do the job, but there doesn't seem to be a good way to update (a part of) the probes during gameplay
of course I don't know if there's a way to make them work well with translucency or even transparency (they work with transparency)
Visually light probes seem like a good match, but that's about it
To my understanding they have to be merged into a single scene wide tetrahedral grid for shaders to sample them, and moving or modifying the probes in that state is not very practical
Yeah, their limitations make them impractical for what we want
maybe I'll end up writing some ray tracing to create and update the information I need at runtime
During baking the lightmapper can easily determine what kind of light each probe is receiving, even from a translucent material nearby
But at realtime that's a huge problem
In URP the translucent material will need custom light calculations
But that's technically a separate detail
The biggest hurdle may be that the light under the surface depends on light on top of the surface
Which is an issue because during realtime rendering everything is rendered by GPU in parallel without knowledge of adjacent things, and promptly discarded when the next frame is rendered
And the surface may not be in frame at all to be rendered, yet the soft light under it would have to respond to changes in lighting conditions above it
indeed, I don't think there are many alternatives to some form of ray tracing to deal with this
but the information resulting from the ray tracing doesn't need to be recomputed all the time
and I think the geometry may be heavily simplified to get good results
It's either that, or some approximate CPU based light detector
Both have drawbacks
For applying the light I'm thinking that a light component would be more practical, since they work in a local way
As shaders get nearby light components in a loop, there's no need for it to be a global data structure
well, im considering objects like tiny houses, through which the light enters by scattering, then just a light won't do right
A punctual light that's modified to have a lot of softness might look good, similar to HDRP's light size parameter
But ultimately a light component is just a point with some information about it, you could also interpolate it similar to light probes to get something even softer
But both of those would probably require modifying URP quite deeply
If you'd be already doing raycasting calculations for the incoming light, it may be an option to also use it for outgoing
But then you'd be reimplementing HDRP's RTGI pretty much
Which might defeat the point of using URP
If I were making it, I'd probably move the goalposts closer to settle with something less or try to fake it more
i am at a loss as to why this is happening after baking. ive added a few notes in the pic, but i'll try to explain as best as i can.
starting from the far left at the gate, the lighting is normal. the red brick unit also seems to be normal.
however, the middle unit has completely messed up lighting, even though it shares the same material of the 3rd unit.
the lighting of the 3rd unit seems to be fine except for the fact that there is no overhead shadow (there should be an overhead shadow similar to the 1st unit).
it is also a bit hard to see, but there is nothing lighting up the inside of the 2nd unit, so it is completely dark when it shouldnt be.
any ideas why this is happening?
Maybe modifying invidual colors values of specific light probes is viable, so if the objects don't move and you can predetermine how the lighting changes, you can store those changes per probe in color gradients
What type of lighting are you using
Baked lightmaps?
yes, just one baked directional light
Your meshes don't appear to have lightmap UV generation enabled
Lightmaps are drawn on textures that require their own UVs
As they have repeating or overlapping UVs the lighting appears repeated and in incorrect places
ah i just turned this on and it looks almost perfect now, thanks! one small problem is that the inside is still receiving 0 lighting. i would expect the inside to be at least somewhat lit up from indirect lighting
I would guess you have included the garage doors in the lightmapping step to block light, and then roll them up later which the lighting cannot respond to
At any rate it seems there's a distinct wall of something blocking the light
actually, it seems that the problem is with the floors and walls themselves since the lighting on the gate wall is fine
no, its a static mesh that's just smaller than the others
URP translucency + GI
Definietly suggests a problem with the floor indeed
yeah its just the floors, all walls seem to be fine. any idea on what's causing this? i've already ticked "generate lightmap UV's" for its mesh
https://docs.unity3d.com/Manual/GIVis.html
I'd start troubleshooting with these
First Contributors/Receivers view
Could check baked lightmap view though it probably won't help
Always good to check Texel Validity and UV overlap even if they don't look to be the direct issue here
hmm, it seems that the lightmap should be showing the light on the floor, but something is blocking it
texel invalidity and UV overlap do occur somewhat, but not on the floor at all
Could be two overlapping floors
the only overlap is of this floor and the default plane
of which, the inside floor is obviously on top
tried baking again with the default plane disabled, but i still get the same result
And with the floor disabled and just default plane there?
The floor mesh itself could have duplicated geometry, even if it's just one object
yeah, it works fine with just the plane
When lightmapping avoid any overlapping objects
Even when it causes no issues, it wastes a lot of lightmap space
i dont think this is the case as the wireframe would suggest
It wouldn't reveal it for sure
how can i check? would i have to open it up in blender?
You'd only truly know it when moving individual vertices to see what's underneath in a modeling tool
Or looking at the baked lightmap UV chart to figure out if there's too much surface area
oh my god the problem is with the material
the floor looks perfect when i use a different material
What material was it?
just tried messing around with this, and this material works fine now when i set it to specular instead of metallic...
metallic vs specular workflow modes
any idea why this is the case?
the metallic map itself does not seem to be the issue
It probably is, considering it's white meaning fully or almost fully metallic
Metals do not receive any diffuse light at all, only specular
but when i get rid of the metallic map completely, the issue persists
With metallic slider at 0?
oh nvm, its because the metallic slider was at 1 too
For reasons baked lighting is purely diffuse, which metals ignore
Only glossy reflections from light sources and the reflection probe are rendered
Speaking of which you also need a reflection probe inside the room for the lighting to be correct, otherwise the interior is reflecting the sky, hence the pale sheen
Additionally you need to bake light probes if you have non-lightmapped or non-static objects that need to respond to baked lighting conditions
thanks for the info. ive never used light probes before, do you know of any good guides on how to get started?
Unity's documentation is always a good place to go first
There are always more advanced guides for everything elsewhere, but for most topics there's a good introduction there
The texture is a white cloud. The shading is from the normal. I’m thinking it has to do with the start rotations of the cloud. I set everything to zero to test. It’s fine for now but I want pre baked rotations or something. So I might just animate rotations in a texture sheet or something
Is your normal map actually a normal map? Meaning it's imported as type normal map and it contains valid vector data
Migrating a BIRP project to URP that uses a lot of code-only shaders I want to keep code-only (they're not rendering traditional meshes.) The awesome new "Getting started with URP" book has a text-only example up to lambert shading, but it's less obvious how to call the PBR functions in Lighting.hlsl (looks like you need to setup a struct first.) Is there a simple-ish example there?
Yes baked from blender
Two different versions too. One known to work and one for testing.
One from blender is quite good but I need to flip the camera or something
What shader?
And to work with rotation, you'll want tangent space normals usually.
Tried many, URP lit, simple lit, particles lit, quibli, some diy stuff,not sure what to do to crack it.
having this at 360 - 0 rotates the particle as well as its shading.
I'm thinking of doing two sprite sheets, one base animated evaporating plume. Then one spinning animated evaporating plume
Tried setting the renderer to quad, and I used a script on the quad to face the camera, still wasn't lit correctly.
So, is it imported as type normal map?
Is it normal for the lightmap object scale on all of my objects to be set to 100? I'm having this issue where every model in my project has overlapping UVs. I even checked in Blender and the UVs were fine but when I import it and bake the lighting the UVs overlap
I'd guess in this case if your transform scales (or inherited transform scales) are very low or high it can throw off the lightmap scaling
Potentially additionally if your meshes were imported with wrong unit conversion so they start at 100 or 0.01
I just checked and every object in my scene has every one of it's scale settings set to 100 for some reason
changing that doesn't seem to help though. I also turned off convert units in the import settings
Better option may be to change the scale factor in import settings instead, or even better export without messing up the scales
https://polynook.com/learn/how-to-export-models-from-blender-to-unity
The issue may be that the Min Lightmap Resolution is calculated before you compensate for the scale, so the margins end up totally wrong
(Or more preciselyt the space reserved for lightmap padding is wrong in the generated lightmap UVs)
Can anyone point me in the right direction? I have been sitting with my project for almost a month now, trying to fix the lights. I have like a office with 7 different rooms, all with the equal height to the roof, and a couple of lights in the roof.
I have fiddeled with the settings, i have watched a couple of videos. I tried indirect baking and gets alot of fireflies, tried different kind of filteringmethods. I even tried to swap out every lightsource for a realtime light, but that pretty much blew up the PC.
So, im stuck. I dont know what to do, and this is more or less the final thing i need to "Fix" before my masterpiece will be released to the closes family :D.
Point me in the right direction:
- What kind of lights is best to be used as a "roof lamp", to light up a room.
- Mixed, Realtime, baked?
- How big should the lightmap resolution, and do the direct/Indirect samples matter that much?
when I changed the scale factor in the import settings to 100 and then put down the fbx file and then reapplied the materials to it and set it's scale to 1 it worked!!!! It does say something about it being the max size for like the atlas or something now though. I feel like this really shouldn't be happening. it's so weird that it happens with every single model I import. is there a way I can apply that to all my assets because this same issue happens to literally every model I import. or idk
I have a huge problem regarding my game: enemies and players use torches to light their view but this is costly with 5 enemies. I searched on the internet and stumbled Upon these solutions: 1) use deferred rendering, the problem I'm using is an orthographic camera and I don't know if it works, 2) fake light using decals
and right now I'm using brp so I should probably change to urp
is there a way that i can easily test an area light (or any light) without baking? area lights dont support realtime, but i hate tweaking the settings a little and then having to wait for the baking process each time just to see the results
Probably the only practical method would be to create a test scene for the lamps you need to tweak that only contains the lamp, the light component and a bit of wall
Baking that should be extremely quick
Especially with GPU baking
Unity 6 with forward+ might be a good solution?
Decals should work as well if they don't have to be accurate. Also more performant most likely
for decals I would like to simulate the come shape at least, so the circle is smaller when it's closer to the source. but decals are applied with a box
maybe I can use a shader that uses the dot product between camera to pixel position and decal direction
Or place the decals with raycasts or something like that
how do i make a realtime light have long range but kinda clamp the brightness so it doesnt get unfathomably bright when close to a surface
mm decal projections seems to ignore culling, so it draws on top of cube and wall behind it
In what render pipeline?
urp
I get two very different looks with this attempt at using normal maps
in the program I used to create the normal map, the light is illuminating pixel-by-pixel, but in unity, the light is rendering at the screen-level resolution
Trying to puzzle out the best way to resolve this, whether that means uppign the contrast on the normal maps or pixelizing the light in some way, not sure how to pull off either solution
If that is the URP 2d lighting, the lighting map is just a texture, you can pixelate it in a shader.
Pixel perfect camera component can match sprite resolution, screen resolution and so light resolution as well
There's now instructions how to modify URP source code to change the light falloff / distance attenuation
https://docs.unity3d.com/6000.2/Documentation/Manual/urp/lighting/custom-lighting-change-light-falloff.html
To determine it per light would require more modifications, however
i want to achieve lighting shine effect on my 3D design I get proper shine effect on black designs like little grey at corners but when choose different color design it looks flat coloured, is there any way to achieve same shine effect on all colours like in black?
Would this specific scene benefit more from better lighting or better models/textures?
textures look pretty flat, do you you have normal, roughness ambient occlusion maps for them?
if you're trying to go for realism, highly recommend using textures that have them (pbr textures)
it makes the lighting react more realistically
Can someone tell me why my light does this?
I have a normal and specular on there. So you say textures and models?
I don't think the lighting would be the issue, if you've baked it all properly
you could watch a tutorial on lighting in case
try and swap the textures with ones from the internet that have all the maps, see if that makes it look any better
polyhaven is a good website for free high quality textures and models
@tired oasis
I haven't baked yet
I did get these from polyhaven, maybe I misconfigured it
Just wanted to know from which aspect the scene suffers more, lighting or texturing
bake
better models and textures. lighting looks fine here
Alright, thanks
just try it
I will once I'm back on Windows. Linux Unity likes to shit itself when using my GPU.
oh you use linux?
you can set the sample count to low
i think thats what its called
the passes
itll make everything look better
Anything that doesn't take 20 minutes looks awful
It would take 20 seconds with my GPU. I will do it later.
I'm experiencing jittering with a moving light source, where the normals seem to bounce up and down by one pixel
Given it's a pixel art style with a 64x64 tiled texture, one pixel is really noticeable
when the background moves, everythign works as expected
When the light itself moves, I get jittering of the normals
can also confirm the issue does not happen with camera movement
anyone?
Maybe some baked solution or a screen space GI solution. APV might be a decent solution for baking this maybe?
Do you have enough additional lights enabled?
How do you move them?
And what kind of jittering? Got a video?
issue occurred both when moving lights using transform tool in editor, and when the light was simulated. Desired object is a lamp hanging from a string that moves when knocked or ground tremors outside happen
Transform tools are not in-game, so should not be used to test this.
About the light being 'simulated', share the code
Also make sure real time stuff like SSAO is turned off btw
game was running, light was moving becasue it was attached to a string of sprites connected with joints to simulate a rope
no scripts involved
SSAO? Elaborate?
Did it jitter at the physics interval?
Maybe interpolate the springs?
Screen space ambient occlusion, might cause some artifacting for moving lights
it jittered in the way I might expect z-fighting to look, except it consistently moved up and down about half a pixel
does this apply in unity2D?
this is also a pixel art game, half a pixel is signifigant
A didn't know it was 2D
I have very little 2D experience
how do i fix the lightning i have disabled all light sorces and still nothing changes its like i cant see the lights idk nothing changes at all
Shadows only show when the camera is near them. Know why this could be happening?
I need a quick response, is deferred rendering not possible while using orthographic cameras, both in urp and brp
do anyone know why does it keeps flashing lights? https://youtu.be/nEdVam1KHs0
NaN values produced by the shader
If you've tried to bake lighting it's sometimes due to errors in lighting cache
I believe deferred works in URP in orthographic
Likely very low shadow distance in quality settings
It looks like your materials are using unlit shaders
Impossible to determine anything at a glance except that they don't seem to be receiving any lighting calculations or if they are the ambient light is fully blown out
how do i fix that?