#archived-lighting

1 messages Β· Page 43 of 1

prime sedge
#

I'm now realising I have like 1k objects to mark static atwhatcost

#

how would I combat this? the cupboard can't be static because it's openable/interactable, But the light won't cast light on it probably because it's a baked light

#

Would the solution be to just make lights that hit/are close to interactable/moveable objects be realtime?

#

Oh potentially 'mixed' is best for lights that cast onto/near these types of objects.

supple nacelle
#

You may want to ensure they are all static batched, but that is outside of my sphere of knowledge. But having them all as their own individual baked little objects is going to make for a crap ton of lightmaps being generated I would expect.

#

They don't have to actually BE static, but they need to be flagged in a way to flag them as to be part of GI. Its one of the Static options where you click to make an object static, or you can set it to contribute to GI on its MeshRenderer.

#

You also may want to make use of the Scale In Lightmap value on the MeshRenderer for those, so you can tell them to only use like .1f of a texture map

supple nacelle
prime sedge
#

I noticed I dont seem to be getting shadows in scene view

#

is that normal?

#

I had this off in urp lol

#

Okay so I remember why I turned it off now, It was when I started because I was getting this weird issue

prime sedge
#

Look at the shadow of the wheelchair hard vanishing

#

and the table leg

#

When getting close

#

Another example

supple nacelle
#

you have a shadow distance setting somewhere, I forget which that is related to though

prime sedge
supple nacelle
#

You might also have an issue with your light having a near range value too high, or a bias setting

prime sedge
#

on the flashlight?

supple nacelle
#

yea. I am not the best person to be answering, but these are the places I would look first

prime sedge
#

Ah near plane was too high on flashlight

#

Dropping it down fixed it

#

It was also set to hard shadows (whoops)

#

Grrr damn shadows

static igloo
#

Okay, I found what's causing the bug

#

How could I make Area Light Range not overlap closeby Area Lights?

#

Because when one Area Light overlaps the range of a second, the second goes blank

prime sedge
#

There is a light limit

static igloo
#

Yes, I do use URP

prime sedge
#

URP:

Light Settings

Forward: 0 - 8 additional lights per object.
Forward+: no limitation per object, but 256 (Desktop), 32 (Mobile), 16 (GL ES 3.0) per camera
Deferred: seems to have no limitation

static igloo
#

Speaking of this?

prime sedge
#

Nopr

#

in your URP settings

static igloo
#

I have this

#

I can't seem to find the Data file

prime sedge
#

I myself can't remember how I found mine one moment lol

#

On this

#

Double click the option in renderer list

static igloo
prime sedge
#

Yeah

static igloo
#

and could you come again with what should I set here please?

prime sedge
#

I'm personally using Forward+

#

Under rendering path

static igloo
#

i'm not used with this types of settings

prime sedge
#

As I have quite alot of lights.

#

Try Forward+

static igloo
#

done

prime sedge
#

Now see how your lights are acting.

static igloo
#

now should I do anything else?

#

or just continue

#

from what I've observer earlier, it's the Area Light Ranges that overlap

#

Let me test please

#

it's the same

prime sedge
#

Can you post a picture or short video of what the issue is?

#

I'm new to unity myself but had a similar issue so thought my solution may have helped but seems it's unrelated.

static igloo
#

one second

#

i can't build the game to get it tested with this :/

prime sedge
#

I tried to fix this the other day but couldn't figure it out, My lights go through my walls? and it leads to alot of strange looking things, this red light is a good example

#

What's the best way to combat this?

#

The walls are thick and double sided

#

This isnt the best example actually I think that red is just high reflection

#

Dropped the specular highlights to fix the stairs but as you can see the red light is going through the wall upto the staircase

#

little test area to explain what I mean

#

Oh figured it out, Have to crank the shadow str on the light

static igloo
#

yeah, i can't find a fix for my problem

prime sedge
#

So my lights are randomly flickering all over my scene at seemingly random points?

#

Also happens in the build

#

turning shadows off fixes it

#

and im being spammed by this every second

#

if i turn shadows from my flashlight off it stops the flickering, The shadow atlas is the max size it will let me have it also

#

Gonna try baking the lights and see if that helps

prime sedge
#

before and after bake some objects are just black

#

grrr not marked as static

prime sedge
#

Oh right.. because it's a door that opens, how the heck do I work around that

opal trout
#

how can i make these lights give more of a pop?

#

right now they look dry afs

#

asf

#

i tried bloom but just looks off

#

im using URP

supple nacelle
supple nacelle
# opal trout something more like this

That reference looks like mostly just a basic bloom on the light. One thing about bloom is it REALLY wants you to respect actual intensity. Like it will look better to have an overly intense light with a small amount of bloom on your scene, than a low intensity light with too much bloom.

What is the emission setting for your light texture?

Also, if you want a bit of realism your emitting light should have a texture to the emission, and not just be the exact same color on every square inch of your light.

#

This is assuming your post processing layer and project are set to support hdr

opal trout
#

hm i see

#

im still new to light

#

so you're saying i should put an emission texture on my material?

#

do i just search on google "light textures"?

supple nacelle
#

If you don't then, yes - you definitely need that for a proper glowing light. That will also make that emissive light render when you bake the scene

#

I would ignore the light texture for now, start with an actual emissive texture, and you probably need to make sure your URP settings support HDR

#

For proper bloom to work, you need overbrights to actually be a thing

opal trout
#

yea my URP supports HDR

#

overbrights?

supple nacelle
#

Then just cranking up your emission intensity should cause bloom

opal trout
#

hmm i'll see what i can do!?

#

xD

supple nacelle
#

In non-HDR colorspace the brightest anything can be is 1, 1, 1

opal trout
#

bit confusing but i'll get there

supple nacelle
#

In HDR it can be brighter than that, like 20, 20, 20

#

It will render to the monitor as white, but its actually much brighter than just white

#

Like in real life, if you take a photo of the sun, it will show up as white on film

opal trout
#

yea i got HDR, i'd like my emissive materials to also give light, since its a neon city that's super important

supple nacelle
#

But because of the brightness of the sun, it causes all kinds of bloom, lens effects, and global illumination

#

its not just white, its a VERY bright white

#

Crank up your lights emissive to like intensity 2, and then bake your scene

#

See what that does

opal trout
#

not much honestly

supple nacelle
#

You have bloom enabled?

#

Try cranking emissive way up to like intensity 10

#

You might not be set to have an HDR post processing

opal trout
#

yea this is my bloom settings

supple nacelle
#

That is enabled in your urp settings?

opal trout
supple nacelle
#

Lighting settings won't matter yet

opal trout
#

okok

supple nacelle
#

if you crank up your lights emissive and you aren't seeing bloom, then something is wrong

opal trout
#

if i crank up bloom i see a shit ton of bloom but its ugly asf

supple nacelle
#

Don't crank up bloom

#

crank up emissive

#

What does that do at extreme settings like intensity 100

opal trout
#

lemme try that and bake it

supple nacelle
#

No need to bake

#

you should see the bloom immediately

#

baking is for the GI, which will also need to be balanced

opal trout
#

yea i dont see anything even with intensity at 100

supple nacelle
#

that sounds like you are not in fact getting an HDR post processing

opal trout
#

yea wtf

supple nacelle
opal trout
#

these are my URP settings

opal trout
opal trout
supple nacelle
#

same as the previous settings, down under post processing

opal trout
#

ohh it was set to low

#

now i set it to high

supple nacelle
#

See if that makes any difference

opal trout
#

nothing changed

supple nacelle
#

if not, I am out of ideas

opal trout
#

i think its good to note that i started this project in HDRP

#

then changed to URP

supple nacelle
#

Yea, not sure. I am still relatively new to URP myself so not sure where you might be going wrong

opal trout
#

maybe something to do with the main camera?

#

yea this is super weird because people seem to get crazy lighting out of URP

#

meanwhile my light feels dry

#

maybe if i create a new URP asset?

supple nacelle
#

Wouldnt hurt to start a new project and just try to get a basic light working from scratch to make sure you know how it should work

#

Though someone here might have a guess why you are having so much trouble getting emissive lights to work

supple nacelle
# opal trout

For these I would keep that threshold higher. Like 1, so only overbrights bloom. And intensity can be kept pretty low as its going to be unnatural. like .1

#

Higher scatter will basically simulate something that feels like volume light around it, higher values can be fine for that one, depending how hazy you want to glow to be.

opal trout
#

i had HDRP still installed

#

looks a bit better now but the intensity isnt working still

supple nacelle
#

If intensity of emissive isn't having a noticable effect, you definitely are not getting a proper HDR post - so something is missing somewhere

opal trout
#

yea i think i'll reinstall URP

#

feels like im missing settings

#

i started project with HDRP then switched to URP midway, unity might have gotten confused

supple nacelle
#

Not sure that is the issue, but having a clean project should at least make it easier to learn how to do this particular thing

opal trout
#

with only 0.25 the bloom looks gorgeous

#

so I'd say its the bloom that's broken

supple nacelle
#

Or something about your post processing settings - URP has a lot of settings and its easy to break it πŸ™‚

opal trout
#

maybe its because i didnt set up the post processing extension?

#

I'm not home right now but are you using cinemachine?

supple nacelle
#

No idea, out of my area of knowledge there

#

I am not

opal trout
#

okok no worries

#

ill test it out later

#

thanks for the help!

supple nacelle
#

gl

unkempt kernel
#

Hi! I'm making a small room (like a storage/pantry) in Unity. When the player gets close to the door, the interior lights up smoothly. I'm currently using a Point Light, but when I increase the intensity, the light source becomes too obvious on the ceiling. I want the room to be softly lit without revealing where the light comes from. I'm looking for a realtime and fade-compatible solution. Any suggestions?

#

I want to softly light up the interior of a house without making the light source obvious. Is there anyone with knowledge on this or who can point me in the right direction?

opal trout
#

and the problem was actually simpler than it seems xd

#

was pondering on rebuilding the project at this point

#

basically i was missing a main camera on that scene

#

only took entire day

icy elk
torpid inlet
#

Hi. I'm using Unity with URP and I have a Spot Light attached to a lamp. The light only seems to illuminate the player model, but not the surrounding environment or the house interior. The light also appears with a weird blue/purple tint, and it's not casting realistic lighting in the scene. I checked my lighting settings, and I'm not sure if Global Illumination or baking is set up correctly. How can I make the lamp actually light up the environment properly?

neon pebble
#

you need to enable lighting

#

click the scene tab at top and then press on the light bulb

#

as you can see the yellow warning messages indicates that you disabled the lighting.

#

if you want dark scene you can simply disable the directional lighting gameobject instead

torpid inlet
#

thank you πŸ™‚

gaunt sand
#

I'm having this issue where the same scene is lit differently depending on if you start the game from the scene itself or from the main menu. There is no do not destroy on load stuff and the level is loaded asyncrhonously with a loading screen

#

but when I build it looks fine

fiery current
#

I'm a real nube. Any idea what might be causing those smudging artifacts on the walls?

Things I've tried:
Doubling lightmap rez from 40 to 80.
Doubling lightmap padding from 2 to 4.

supple nacelle
fiery current
#

ok I have to confess that this is a sketchup model so I have no freaking clue what the topology or the unwrapping looks like.

#

can you elaborate on what you mean by "second" uv map in your question?

supple nacelle
#

lightmapping needs a second uv map. You may want to read up on what lightmapping does before getting to deep into this.

#

There may be a setting on your model mesh importer in Unity to tell it to generate a UV 1 if the file is missing one

#

Its very possible to that your model has overlapping facing and other errors in it, hard to say

fiery current
#

oh you are right

#

hard angle is 88, angle error is 8, area error is 15, min lightmap rez is 40, min object scale is 1, margin method is calculate. Generate Lightmap UVs is already ticked. Any suggestions?

supple nacelle
fiery current
supple nacelle
#

Might also want to try some other export options and try different formats out of it

#

I would guess it has overlapping faces and/or weird normals

deft fiber
fiery current
supple nacelle
deft fiber
# fiery current Thanks that doc is really helpful. I don't have a good conceptual model of why ...

The texel invalidity chapter should have helpful examples of how and why
And what the drawback is for using render face: both
Invalid texels are lightmap texture pixels with basically no lightmap data, so they grab the nearest valid texel's color
Exposed backfaces invalidate texels, which is supposed to inform the lightmapper that he surface is inside another geometry
Therefore it should spread the valid lightmap color, rather than drawing a shadow there

#

But invalid texels can also show up where they shouldn't
Possibly also if there are exposed backfaces where there shouldn't

gaunt yacht
#

Hello. While im baking my indoor scene on urp, im facing with these such lighting problems. How can i fix it?

#

Here is my lighting settings

thick pasture
#

Hi all, I am getting an extremely dark scene after recreating my library folder. (linked before after pics)
I checked the lighting debug link just above but none of it seems to be related. The lights all work, they're just giving an extremely dim light compared to before.

I detail things a bit more in this post https://discussions.unity.com/t/lighting-much-darker-after-resetting-library-folder/1653760

I'm not sure what to look into next for the cause. Anyone experienced something like that?

thick pasture
#

Here are the main error messages, about incompatible keyword spaces

thick pasture
#

figured it out, was due to me having previously messed with the realtime hlsl

deft fiber
#

Oh I see you detailed that in the post

thick pasture
timber lichen
#

i am new to baked lighting in unity, and cant seem to figure out how to stop these black splotches from appearing on some static objects after baking, can someone help me?

#

the console keeps saying i have overlapping uvs, but im not sure how to fix it without going insane from searching through forums

#

is there a simple fix?

deft fiber
sinful nebula
#

Is there any way around to apply lights to specific rendering layers with 2d lights?
i want to seperate the effect of light on objects, but i heavily rely on sorting layers for my isometric game.
currently i don't see any options to apply 2dLights on a specific rendering layer yet the option is there for sprite renderers.

deft fiber
supple nacelle
grim tinsel
#

Hello everyonem i'm beginner and i have put some light on my scene and it's look like that, why i have random illumination and it's stop instant idk why ?

deft fiber
#

Are those cameras over every light?

grim tinsel
grim tinsel
deft fiber
#

If the shaders have a custom lighting model it may override the limit

grim tinsel
deft fiber
grim tinsel
upper fable
# grim tinsel oh nvm i fixed it, i changed my camera setting i switch rendering to deffered

If you change the rendering path, make sure to familiarize yourself with the differences between them. They are completely different ways of rendering lighting that have their benefits and limitations as well as potentially large impact on performance. Forward rendering is not the default without a reason, of course it has it’s limitations too. You can obviously change it back later but just want to point out that the choise of rendering path is not as trivial as you may think and can affect many things later on

ancient notch
#

Hi, guys. Does the APV (Adaptive Probe Volumes) pipeline somehow rely on the lightmap texel density of assets? Does increasing texel density in lightmaps affect the quality of the APV bake?

deft fiber
weak stream
#

my level is tiled so tiles near the player can render differently. lightmapped shadows reveal the seams. it used to be worse, until I increased lightmap padding. increasing further isn't helping though. I've seen suggestions to combine meshes, but I assume that would break my player proximity visuals. anything else I should try?

deft fiber
weak stream
#

tiles near the player highlight as a visual aid

deft fiber
#

Like a shader for all objects that lets you highlight a tile shaped area
Or a shader for a decal projector or a fake decal that functions as an overlay to anything inside its volume

#

Otherwise you would be considering APVs which don't suffer from seams like lightmaps do

weak stream
#

so combine meshes after all and try these shader ideas? I'll give it a try thanks

deft fiber
#

If you have the option to use APVs, that's an alternative to combining meshes and figuring out what kind of shader does what you need

sterile star
#

So we're doing a PT kinda looping thing in our VR project where we additively load and unload scenes that share the same world space. we're hitting a big limitation with lightmap loading where the second we load the new scene in the background, the lightmaps for the current room just vanish and the environment lighting changes. Anyone got any ideas on allieviating this?

supple nacelle
#

You likely would want to have multiple, and pool then if it isn't possible. Would behave better than loading regardless

pallid gorge
#

What can cause these strange colorful blobs on lightmaps (red arrows)? Notice how book (green arrow) don't have them. Image on the right shows that they have approximately same lightmap size. Both models have Generate Lightmap UV's turned ON. I tried different lighting settings for baking but had no luck figuring this out. Anyone knows what to do?

#

Here are my current settings

deft fiber
pallid gorge
deft fiber
#

Usually the more geometry seams you have, the more lightmapping issues you have and the less efficient the lightmap spacing is

#

Because every seam needs padding to prevent leaking

sterile star
# supple nacelle You are loading the same scene multiple times? Don't think that is doable if so.

not really. Basically we have a corridor, a room, and variants of both that get loaded in and out as needed.

  • The player enters corridor 1 through an opening, and moves through the corridor
  • Room 1 gets additively loaded as the player approaches the door to the room.
  • The door opens, showing Room 1.
  • The player enters, The door closes, And Corridor 1 is unloaded
  • Corridor 2 is loaded while the player does puzzles in the room.
  • When the room puzzles are complete, the player moves through an opening into Corridor 2.
  • The opening closes behind them, Room 1 is unloaded, and Room 2 is loaded as they move through Corridor 2. rinse, repeat.
supple nacelle
#

That might still be an issue. I haven't tried doing that with scenes. But with Prefab Baker and loading any baked prefab more than once the lightmaps don't work properly.

Why are you loading and unloading the same scene though? Rather than enabled and disabling the gameobjects? Loading and unloading is going to cause all kind of allocation and garbage collection needlessly. Are you sure these rooms too large to keep in memory?

supple nacelle
ancient notch
#

Hi, guys. I'm having some issues while baking lighting with APVs. It seems that the bake has absolutely no effect on my interior, while the outside spheres appear to be baked correctly. How can I solve this issue? Can attach additional info if needed

#

Objects set to static, mesh renderers receive global illumination from light probes

small horizon
#

Is there any way to change MeshRenderer.receiveGI in a build? This property is editor only.
Edit: it seems setting Renderer.lightmapIndex to the index of the desired lightmap is how you make a Renderer change from using light probes to using lightmaps at runtime.

marble coral
#

We are using subtractive lighting mode and we are having a issue where shadow pass through other objects is there any solution to it?

scarlet geyser
last haven
#

Hello, we've been working on a project where we want to have real-time shadows and allow the player to toggle on/off lights and change their color/intensity as a customization feature. I'm starting to think this is just generally impossible. Lights disabled = ~1400 batches, enabled = ~15k. Obviously 15k batches is insane. We've tried all rendering paths, enable/disabled srp batcher, static batching, & dynamic batching. I plan to combine some of these meshes which should drop the batch count though however much I drop it, this will still be an issue. Is there anything we can do or does Unity just not support this kind of project?

deft fiber
#

SRP Batching decreases the cost of batches
Rendering paths beyond Forward decrease the cost of lights separately from that
Shadows will always be expensive regardless of batches

last haven
# deft fiber SRP Batching decreases the cost of batches Rendering paths beyond Forward decrea...

I was initially hoping for a simple answer to this but I believe the map is just generally unoptimized. Too many shadow casters, lights with large ranges. A lot of the map is separate meshes as we want the player to have freedom on customizing the wall/floor materials, which definitely doesn't help. We are redoing a bit of it right now. I'll come back here if it's something I can't solve, but definitely seems like a user error on our end.

deft fiber
#

Like changing all light ranges at once or toggling shadows for them

last haven
#

Turned shadow casting off for a few mesh renderers & lowered the ranges from 12 to 8. Somehow went from ~11k batches to ~2k. Huge difference for little work, not complaining though!

dim narwhal
#

hi i want to ask is there a way to make this baked lighting more look more clean, just like the screenshot the baked light on some part make the wall look dirty.

#

lighting option that i used right now

deft fiber
# last haven Turned shadow casting off for a few mesh renderers & lowered the ranges from 12 ...

Lighting affects batches because when the material gets information from a different light from another material next to it, they can't be batched
But as mentioned SRP batching decreases the cost of separate batches so it's not that big of a deal
Deferred rendering doesn't affect batches at all with its lighting, but that doesn't always mean it's necessarily cheaper than Forward or Forward+

deft fiber
#

But ultimately getting a perfectly smooth baked light is pretty difficult
If an option it's better to have even a subtle texture on the wall that conceals the noise in the lightmap

dim narwhal
#

And I want to ask one more question my non static object became black after baking, I think it because I add light probe but not set it right yet is there a way to disable the light probe without rebaked the light? I have tried deleting the light probe it doesnt fix the issue

deft fiber
#

Although it's possible to overwrite them separately from C#

#

Usually not worth the hassle

#

If you have a GPU remember to bake with GPU so the bake should be orders of magnitude faster

dim narwhal
undone surge
#

Hello there ! I'm trying to bake a static lighting with a plane but as it's a single face, there's this issue. Is there any solution to fix this or I'm cooked and I've to create a specific mesh with 2 faces ?
It's probably a recurrent question here but couldn't find any solution to this ! Thanks in advance 🌺

ancient notch
#

Hi, gyus. I have this kind of result after scene baking. Why some of my objects have map checker on it while other simply don't? It's "Baked lightmaps" in debbuger mode. All assets are static, have uvs and some of them are even ticked to generate lightmap uvs

deft fiber
#

Or you are also baking APVs and those objects are using probes instead of lightmaps
Though in that case I guess they'd still have the grey checkers

uncut sundial
#

Hi guys, can someone let mne know where migght the issue be here?

#

the shadows are extremly off for some reason, they're worse off in real time, this is how it looks in indirect baked mode, shadow masking looks slightly better but still doesn't solve the problem

uncut sundial
#

URP

deft fiber
# uncut sundial URP

Then you should be able to tweak the active URP asset to fix it
Increase shadow resolution, enable shadow filtering ("soft shadows") (in both the Asset and on light component), decrease shadow distance and/or add shadow cascades
Now there's also a separate soft shadow quality setting

#

In baked indirect mode the shadow you're seeing should be exactly the same as with realtime directional light

ancient notch
uncut sundial
deft fiber
# uncut sundial damn, I guess that explains it, thank you for your time

Hopefully ^^
If there's more weirdness you can also use the frame debugger to see what exactly is being drawn on the shadowmaps and what the lights are "seeing" from their perspective
Shadowmasks when baking can have their own weirdness, but it should not be related to this specific issue

deft fiber
#

And also if you've also baked Realtime Global Illumination, that bakes a separate set of lightmaps using a different system that have their separate debug overlays (and separate issues)

ancient notch
ancient notch
#

Overlap check

deft fiber
#

It's one of the issues

ancient notch
deft fiber
deft fiber
# ancient notch Yep

Right under there are lightmap UV settings, you have to make sure the minimum lightmap resolution specified is not lower than the resolution you're baking with

#

Additionally the objects must not have a crazy scale, in the mesh or inherited in hierarchy

#

The scale often goes wrong on export/import

#

If the room is one mesh, the walls should not be modular like that
And there should be no internal geometry

#

Seams in geometry and wasted surface area both are problems for lightmap baking

ancient notch
deft fiber
#

The LOD meshes probably could all share the level 0's lightmap, but if the lightmap UVs are auto-generated they won't fit the geometry of the other LOD levels

#

The room itself doesn't have LOD levels does it?

ancient notch
#

Yeap. Walls are clear from LODS

deft fiber
#

But they still clearly have issues

ancient notch
#

Yeap

deft fiber
#

Probably more fundamental ones, so I'd try focusing on that first

#

Probably requires a bunch of test bakes so I'd make another scene that has just the room, one chair, one table, one TV and one lamp
No point baking all of them each time

#

Then if you want to bake without LODs, or some similar test, it'll be much less work

ancient notch
#

Okay, thank you 4 your time ❀️

deft fiber
#

In this case I'd also confirm the scene is the right scale, using a default cube
The default cube is one metre tall so that helps determine if the room is room-size

deft fiber
#

That's correct

#

The simplified test scene will surely help

#

There's many variables with baked lighting so a lot of problem solving is typically doing a lot of test baking, tweaks, more test bakes

#

Comparing to what should work, like default meshes

#

Sometimes the number of baked objects can cause an issue on the lightmaps, so even just stripping the duplicate scene from all the extra rooms and furniture may give a clue with how it bakes then

ancient notch
#

Thanks. Will try to simplify things and then try to detect an issue 🀝

deft fiber
#

So far we've just seen very vague UV overlaps and wrong scales that look like most of those issues

#

But without something more specific would have to assume the meshes themselves could be an issue

#

Or the baking settings, or some combination thereof

unreal zodiac
#

i have a question, will unity realtime specular from realtime lights will work at future like unity 7, 8, 9 when it will out, like i need that because i plan to use specular realtime effect in future

#

πŸ™

#

(using urp)

upper fable
unreal zodiac
#

ok thanks

deft fiber
unreal zodiac
#

like just light reflections from smooth material (urp lit)

deft fiber
unreal zodiac
#

thanks

abstract saddle
#

Anyone know how to fix this stuff caused by baking lights? πŸ‘¨β€πŸ³

unreal zodiac
#

Use more resolution in baking setting (for unity 6 and 2022.3)

#

And specify are you using urp

abstract saddle
unreal zodiac
#

i recommend use 70

abstract saddle
chilly kettle
abstract saddle
chilly kettle
#

i bake scenes with res of 10 - 20 and they look good.
Are your mountains one sided? so they have a open backface?

chilly kettle
#

closed geometry? also at the bottom? ^^

abstract saddle
#

No, on the bottom they are open. I'll try 10 rn

chilly kettle
#

i think you have invalid texel artifacts. You can check this with the "scene debug view" > "invalid texel artifacts"

deft fiber
#

Low resolution can amplify baking artifacts by making each messed up texel bigger but I do not think it causes them
At least unless resolution is lower than the minimum lightmap resolution set in lightmap UV generation, which only causes UV overlap and light leaking

abstract saddle
deft fiber
#

By default the minimum is 40 iirc, which is on the higher end
Resolution is of course relative to scene size and mesh's size in lightmap property

abstract saddle
#

The problem started when i tried to undo all my lightmap data and reset, and then when I baked again it was all funky

deft fiber
#

I concur it most looks like invalid texels, but somewhat atypical

abstract saddle
deft fiber
abstract saddle
abstract saddle
deft fiber
deft fiber
deft fiber
abstract saddle
deft fiber
chilly kettle
abstract saddle
#

Also thank you guys for your help!! I usually work in 2D, so this is really appreciated

chilly kettle
deft fiber
#

Finishing the bake could give a clue of the result before and after clearing cache, at 10 resolution

abstract saddle
deft fiber
#

Changing multiple variables per test always muddies the conclusion a bit

deft fiber
abstract saddle
#

Looks like I have a lot of invalid texels

deft fiber
#

Also check UV overlap

#

That's a pretty crazy result

#

The debug views require a finished bake though I'm pretty sure

abstract saddle
abstract saddle
deft fiber
#

For test bakes it helps the speed to bake smaller segments of the level first
And to use GPU baking if you have a GPU
Lowering resolution and samples also speeds things up but can introduce some artifacts that wouldn't otherwise be there

abstract saddle
#

Yeah I'm using my GPU, it's a laptop 3060 though so still takes about 30 minutes per bake

deft fiber
#

Just based on this it looks like there might be overlapping geometry since the invalidity pattern is so speckled
And because it's repeating perfectly it suggests the lightmap UVs are not properly generated

abstract saddle
#

The pattern is the grass sticking out

#

Hmmm I don't see any overlapping geometry but the debug view seems to change throughout the bake so I'm going to let a full bake happen and then I'll look at it again

deft fiber
#

The resolution wildly changing between geometries suggests also missing lightmap UVs, or if there are drastically different scale in lightmap properties per mesh, or if the meshes have different transform scales

abstract saddle
#

I'll look into adding lightmap UVs. I've never done that before

deft fiber
abstract saddle
deft fiber
ancient notch
deft fiber
#

It's possible that the choice of shader affects baking results

ancient notch
#

Hi again. Seems to be common issue with baking. Got artifacts on seams after bake. Wall geometry is merged and thick enough. My baking parametrs:
Tried to tweak resolution and padding. Thought it change something, but issue stays

deft fiber
#

I would also have a room or a corner next to it made of default cubes with default shaders and similar lighting, so you can compare and see if the mesh or shaders alter the baking result

ancient notch
#

Okay, i'll try

ancient notch
#

Another trouble: some assets become completely black after i enter playmode. Seems that lightmaps are messed after i click playmode button

fallen island
#

how do I fix this? idk what is this.

#

its like to that side its not lighten

#

every light has this issue in my scene

ancient notch
#

Try this

soft compass
#

or the mesh itself has bad normals

high rover
#

hi

#

Volume Profile

#

left is PC, right is NDA platform

#

why volumetric fog option is completely missing from the same asset, when I'm checking it on NDA platform?

soft compass
#

doesnt mean much as many things could be different

scarlet geyser
scarlet geyser
fallen island
#

Should has it

#

But Ill check

deft fiber
deft fiber
abstract saddle
deft fiber
abstract saddle
upbeat umbra
#

I don't work in Unity's HDRP often enough, but I'm really enjoying the lighting quality. I'm taking some of the assets from The Human Spaceflight Project and updating them for this render pipeline. I'm kinda exctied to see where this goes.

ancient notch
cloud night
#

How do you prevent unity from automatically rearranging your lightmap UVs?

supple nacelle
cloud night
supple nacelle
#

Then Unity shouldn't be changing anything. Are you re-importing the model after making changes or something?

cloud night
cloud night
wild spear
#

Hey lads, for some reason, when built, if I play, the sun source will work. But on other's pc, it wont, is there any reason why this happens?

golden sequoia
#

do area lights only work on meshes that have uvs in the mesh? currently i calculate uvs in a fragment shader on the fly, but have noticed when i bake, my area lights dont seem to work but the other lights do

supple nacelle
golden sequoia
#

ah okay thanks! that explains it!

fallen island
fallen island
#

How do I fix this so reflection is more realistic? My reflection is realtime so I dont understand what is going on.

#

Bc ig reflection is aligned to center or smth but I dont want that

chilly kettle
#

If you want realistic reflections on walls, you need Screen Space Reflections, but they are quite expensive.

fallen island
#

but is there a way to make it better at least?

chilly kettle
fallen island
#

ok thanks

chilly kettle
#

But Reflection probes are more a thing for... maybe a weapon you hold in your hand.. to have the room reflected on the weapon.

#

They are not made to have reflections of the room on the walls.

fallen island
#

What happend to my baked lightning? I changed to hard shadows and it does not show any light

fallen island
#

ok

fallen island
fallen island
#

Thanks for help. The only way I had in mind was making new lights and deleting old ones.

#

yet everytime I generate lightning they disappears

#

So there is a bug that makes baked light disappear when I generate lightning

#

that sucks

#

I dont know how to fix it tho and I no wanna copy and paste it again

#

Just changed it to mixed and i will just switch it to baked

#

I have so many lights that its just pointless to fight with it

unreal zodiac
#

or mixed

fallen island
fallen island
#

Chat am I cocked?

#

It was showing 8 days earlier

deft fiber
#

Reflection probes are a whole another deal

deft fiber
fallen island
fallen island
deft fiber
deft fiber
fallen island
#

So thats why my baked light was disappearing?

past depot
#

20k light probes in this scene/group.. i have no reference. is that too much if I'm trying to run this on phones?
also how much would you aim for?

chilly kettle
past depot
#

thanks

chilly kettle
#

maybe share a screenshot so we can see the density ^^

past depot
#

sure

#

for example

#

I'm using Magic Light Probe to do this, probably haven't gotten the setting quite right yet though

#

(Also tried APV but i read it's more intensive and also got an "error" that it can't load it all in one go)

deft fiber
# past depot

That looks like a lot
Most of them I expect are redundant because the lighting doesn't functionally change but there still are multiple probes in those spots

#

Even without probes it looks like a really big city to load in at once, with interiors and all

#

You will have to test it tough
The scene in general, and also with and without the probes

past depot
deft fiber
past depot
#

Oh I thought you meant outside of the probes to improve the map

deft fiber
#

Large areas are often loaded and unloaded per zone

#

In a way that makes sense for the gameplay

past depot
#

Also have to still figure out MLP settings to get it right

#

So like by placing triggers or how would you do the loading/unloading?

deft fiber
#

There are multiple methods that are all situational

#

Triggers are good if the level has areas connected by specific points

#

Chunking is better if there are no specific points like that, but the player is more free to move between areas in a grid-like way

past depot
#

i guess not so good for this because of its openness

#

although.. perhaps at least the interior i could load/unload when leaving entering

deft fiber
#

But also if the player can move or rotate the camera, you must ensure the areas where they can look won't be unloaded

#

Interior/exterior separation is usually logical

past depot
#

Wouldn't it stutter each time this (de)activation happens though?

deft fiber
#

But this may introduce a pause to load during the transition
A lot of games utilize liminal spaces between two areas to hide loading in the background

past depot
#

also i don't have LODs. Adding those would probably boost it quite a bit?

#

liminal as in like a hallway etc

deft fiber
#

Loading screens that pause the game are used so the gameplay won't stutter during loading

past depot
#

What if everything is loaded in at the start and i just toggle meshrenderer enabled state?

deft fiber
#

Loading in the background will stutter only if the hardware can't handle that
Background loading will also place a time limit how long a slower device can take before the player reaches the area

deft fiber
past depot
deft fiber
#

The time it takes to load the scene initially, and any scripts that would be running in objects in unloaded areas

#

LODs help if there are many meshes on screen, especially due to distance
If your perspective is fixed that prevents the player from seeing very far and many objects at once, it will not help by itself much

past depot
#

(Aside from the initial load time...) Yea it's mostly just meshes(+colliders) so practically they can just stay loaded?

deft fiber
#

If there's no physics going on there either then yes

past depot
#

no, just static colliders like buildings etc so no physics unless the player walks there

deft fiber
#

These are typical techniques, and examples how they are situational

past depot
#

hmm wondering if lods will help enough to justify making them.. there arent that many meshes visible and theyre mostly rather simple. not sure about this metric

deft fiber
#

Like I said originally you will have to test performance first, to know if you even need to implement any of these optimizations

past depot
#

right

deft fiber
#

And when you do implement them, test again
And possible even by simulating optimizations before implementing them, such as by disabling specific meshes or effects

past depot
#

on my phone i currently get about 18ms of waiting for vblank

#

i think its 30fps(?)

#

well could be around 60fps if uncapped... and i still want to add npcs and other fun thingies

#

feels like i should optimize soon

deft fiber
#

Mobile devices control their own FPS caps afaik

#

and vsyncing

past depot
#

yea true.. but iirc it said cpu time was around 15ms and gpu around 18ms (?) gotta check in a bit again

#

so thats just under 60fps

deft fiber
#

"Waiting for vblank" might mean you've already exceeded the maximum framerate so it's just waiting
Or it's unable to hit maximum fps, like 60, so it's targeting half of that and delaying until it's 30

#

You have to be meticulous about interpreting the profiler information

past depot
#

CPU Main Thread Frame ~15ms
CPU Render Thread Frame ~3ms
CPU Present Wait ~16ms
GPU Frame ~18ms

#

Oh yea it also says "Present limited"

#

Looking this up in the development build menu btw

past depot
#

I was getting 90-120 fps when i uncapped it and set my phone refresh rate to 120

Although i guess that makes it run too hot and now its constantly at a stable 60. cant seem to get 120 anymore πŸ˜…

I'll try to still optimize some things and test the probe stuff probably too soon

fallen island
#

nah but what the flip happend here again

#

I did just copied lamp and tf is this

deft fiber
fallen island
#

well

#

its supposed to look more dark

#

should be just dark

deft fiber
#

What type of light, and what shaders are the materials using

fallen island
#

Nothing special tbh. I was getting everything from unity

#

But I copied and pasted it to different scene and the problem is also there

#

other scenes are good so its only for these assets ig?

#

so smth is doing it bc if I turn off the "Act5" it goes dark as it should be

#

ok... so

#

somehow the bookshelf is doing it??? 😭

#

but how 😭

#

it has a sun in its asset

#

omg that is so stupid

#

sorry

#

Im going to fix it now

deft fiber
# fallen island omg that is so stupid

Stupid problems will always be a part of the process
Scrutinizing each step that lead to the problem and removing objects temporarily to eliminate or confirm them as related is the exact right thing to do

fallen island
#

Thanks for understanding

deft fiber
supple nacelle
#

^^ I find I never stop running into a weird gotchas. I just get faster at making sense of them and fixing them.

#

I think a lot of people expect things to just work in rendering/lighting - but Unity is not Blender. There is a lot of trickery and tools for trickery to make realtime rendering at 120fps possible, and all of these headaches come from managing those tricks. Nearly every trick brings gotchas with it.

dapper geyser
#

Hi everyone,
Does somebody else has difficulty to bake indirect lighting into APV's ?

deft fiber
dusty nymph
#

when do i use this vs not use this? i put a volume in there and set it to static and stuff and it blew up my bake

dusty nymph
deft fiber
#

Unless you have a particular reason to bake lighting with a sky profile that's not the same as the one your scene uses for realtime lighting

dusty nymph
deft fiber
deft fiber
#

Potentially

#

If you want to bake static lighting from clouds that are normally dynamic, I'd first check if HDRP has some relevant instructions for doing that

dusty nymph
keen veldt
#

So i have this problem with my point lights
as you can see in the video it only works fine when i am the player is close to it Anybody knows how i can fix this problem?

chilly kettle
# keen veldt So i have this problem with my point lights as you can see in the video it only ...

This video deals with the common problem of flickering or invisible lights in Unity.
If you also have the problem that your Unity lights flicker or become invisible depending on the viewing angle, this is the video for you.

Fixing the problem of flickering or invisible lights in a few seconds with a few mouse clicks

If you are interested in g...

β–Ά Play video
stone kestrel
#

πŸ‘‹

#

When I bake lights, the shadows go very dark. Is it due to my skybox?

supple nacelle
#

The skybox will be the primary influence on shadow areas yeah, assuming you have no reflection probes

stone kestrel
stone kestrel
#

I'm using Mixed lighting

#

Why?

supple nacelle
#

Shadow will be dark regardless no? Where are you thinking ambient light in those shadow areas will be coming from?

#

If you have your light set as baked only, and you set your car/terrain to non-static - I am surpirsed to have any shadow there at all

supple nacelle
stone kestrel
supple nacelle
#

Oooh

#

If your light is set to mixed, then its just going to be realtime for your non-static objects

stone kestrel
#

Then even if I change the skybox, the shadow stayed the same

supple nacelle
#

The shadow without any baked data is just going to be the result of your light and any reflection probe reflections

#

So what are you expecting there vs what you are seeing?

#

If you have one light and no baked lighting... then your ground should be pitch black under the car, plus any possible reflection probe reflections added to that

stone kestrel
stone kestrel
supple nacelle
#

It is a realtime shadow, which is 100% shadow from a single point light

#

and light under the car will come from ambient, baking or reflections - there is no other source

#

If you have no ambient light source, no reflection and no baking, it should be 100% black in the shadow (unless you set your shadow color to be something other than black)

stone kestrel
#

I've changed the skybox to be bright, set everything to realtime including the reflection probes yet it's still like this

supple nacelle
#

Skybox has to bake though

stone kestrel
#

Oh

supple nacelle
#

Because its a complex directional based thing

#

Unless you have some kind of realtime GI enabled (I know little about that, its too expensive and useless imo)

#

Which pipeline btw?

stone kestrel
#

URP

supple nacelle
#

You will want your terrain to be static if you want to bake using the skybox

#

You can still use mixed, and your main light can case shadows on it

#

So you can drive your car on the terrain and have it have a shadow

stone kestrel
#

So this is how it looks right now, the terrain and the objects are marked as static

#

This is fully due to skybox , right?

supple nacelle
#

That looks like only the skybox doing the lighting there yea

#

did you turn off your sun?

stone kestrel
#

Nope, these are the lighting

#

Increasing it has no effect tho

supple nacelle
#

Something seems odd then, your sun should still be adding to the baked lighting

stone kestrel
#

It's also marked as the sun source

#

Oh, rebaking it seems to work

#

So basically, I must bake the lighting in order to have the ambient lighting from skybox, which causes shadows?

supple nacelle
#

yeah, skybox is a super complex light source

stone kestrel
#

I see

supple nacelle
#

definitely not getting that kind of lighting realtime

stone kestrel
#

But if I wanted realtime shadows, what'd I have to do?

supple nacelle
#

Compromise basically. Typically your car if it moves will be non-static and the ground will be static

#

What happens if you mark the car as not static, bake, and then move the car around?

#

The skybox lighting of the ground should exist everywhere, and your sun will add to that. What you will lose is the car blocking the skybox lighting of the ground - since that has to be baked and is not realtime

#

So the ground under the car will be a bit lighter than is natural

tame mural
#

ive been stuck on importing for a while after ticking "generate lightmap UV's" for a single mesh. should i just kill it or wait for it to load?

supple nacelle
tame mural
#

ive never had it take this long either, but its not too complex. only a few hundred thousand tris i think

#

so i killed the editor but it's still trying to generate lightmap UV's?????

#

why is UnwrapCL still running??

supple nacelle
#

Never tried anything that big, though I would be a little concerned about it trying to unwrap that into something that will fit onto a single map

#

Like any islands at all, and you are boned

#

With a million tris, that is less than a pixel per triangle by a long shot

dusty nymph
#

often when i make changes in 1 adaptive probe volume, it applies those changes to the other ones too, is that a bug?

stone kestrel
#

It's realtime although I don't want it to be

supple nacelle
#

You don't want the car to be realtime?

stone kestrel
#

For now no, I'll work on realtime shadows later

supple nacelle
#

The shadow in mixed is going to be realtime, unless you change that shadow mode for that

stone kestrel
supple nacelle
#

If the car will always be static, then by all means make it static

#

you will get more realistic skybox lighting that way

stone kestrel
#

But when I move it, the shadow moves

#

It's like the lighting isn't even baked

supple nacelle
#

You rebaked after changes the static settings? And what are the actual static sub-selections? The checkbox is kind of fake, the "static" setting for a gameobject is actually an enum

stone kestrel
supple nacelle
stone kestrel
#

And yes, I've rebaked

stone kestrel
supple nacelle
#

If your light is set to mixed, its going to be realtime still even for baked

supple nacelle
#

For the shadow part of it. You will however be baking indirect lighting from your main light

#

Because that is what mixed is meant to be doing. It is giving you baked GI, but the shadow is dynamic since its expecting to have dynamic objects moving around effecting it

stone kestrel
#

Oh, I see. Can I also ask what's GI shortly?

supple nacelle
#

Global Illumination

#

light scattering

#

So your sun's direct light in mixed is realtime, which includes its direct shadow. The light bouncing off of what that direct light is hitting however gets baked, since its a much more complex thing that can't easily happen in real time

#

There are other lighting modes other than ShadowMask that you can look into

#

As well as ShadowMask mode has two options itself

#

Are you trying to make an outdoor scene where NOTHING dynamically casts shadows? Even the player and NPCs?

compact aspen
#

Hello guys, i've been struggling for days to bake some lights in a scene

It's a part of a map from Counter-Strike 2

Does anyone know why the floor has those weird shadows? there are no faces overlapping in the UV, i'm going crazy...

compact aspen
compact aspen
#

I figured it out, if anyone has a similar problem hit my DMs

deft fiber
#

Or you could just say it was texel invalidity

dry bane
#

Does anyone know why this weird lighting problem is happening when I bake things? This first image is what my lights look like in real time, obviously you can't have many real time lights so I have to bake them(plus duh performance), but when I bake them they look absolutely abyssmal. I assume its something to do with the UVs of the meshes but I really can't tell because I already unwrapped them again and made sure they were exporting properly.

#

this is what they look like baked:

deft fiber
#

No Lightmap UVs generated, most likely

dry bane
#

they are being generated, I already checked that fully

deft fiber
#

The UV overlap mode lets you visually confirm overlap

dry bane
#

unless something about this is wrong

deft fiber
#

"active scene's lightmap resolution is less than the specified min lightmap resolution"

#

But first do confirm it using the debug view mode above

dry bane
#

what's this supposed to be telling me

dry bane
chilly kettle
#

And, as far as i know, transparent Debug visuals means, that its not baked correctly

dry bane
#

everything is transparent its meant to show UV overlay... and the wall is perfectly fine if you look at the screenshots, it uses triplanar mapping as most large terrain objects do, so the UVs are irrlevant.

#

the checkerboarding on the torch not being present is valid though, I'll see what I can change but I don't know how to fix that

deft fiber
# dry bane what's this supposed to be telling me

This says there are no lightmaps, if it's UV overlap
Is it that one or some different one?
Lightmap debug views are only visible if you've baked the particular scene in the current editor session

dry bane
#

Its UV overlap

#

also yeah after I baked it it looks like this

#

baking took a helluva a long time but it looks a little better I suppose

#

how to I make it so that the UVs are good?

deft fiber
#

The one thing that sticks out is the resolution warning
Lightmap UV generation settings must have the correct minimum lightmap resolution that you're baking with

dry bane
#

I fixed that already

#

is there a way to set the lightmap UVs manually?

deft fiber
#

Yes, but there seem to be issues where there are no overlaps, at least according to the two previous screenshots

#

So it might be a light leaking issue separate from that

dry bane
#

so how do I fix that? if I could set the UVs manually I could fix light leaking myself

deft fiber
#

We haven't pinpointed why that's happening

#

95% of the time auto-generated lightmap UVs don't have any disadvantage over manually generated ones, and the manual process has its tricks

#

In this type of situation I'd view the lightmaps directly from the lighting window
It shows the UV islands on the lightmap texture, so you can spot things like lighting crossing over from adjacent UV islands

#

And I would try different lighting placements, often light proximity to geometry can cause unexpected results

#

You can bake just one segment of the wall and one torch at a time to speed testing up
Preferably in a new scene

dry bane
#

why in a new scene? also when I look in the lighting window for the baked texture the islands for the torches are extremely small, how do I fix that?

dry bane
#

also I dont even know how to tell which are the UVs for the torches

deft fiber
dry bane
#

all the meshes except the floor and the wall have uvs generated

deft fiber
#

If you select a mesh renderer iirc it shows which lightmap it's using and also lets you open the preview window

#

Everything that gets lightmaps should have lightmap UVs

#

You can slide the exposure slider to reveal if dark areas are pure blackness, or just darker than the rest

dry bane
#

How do I select the mesh renderer? I dont see anything about a lightmap here

deft fiber
#

"Baked Lightmap" with the expandable arrow

#

β–Ά

dry bane
#

bruh I'm stupid

#

Ok yeah the one that I took a picture of is the torch you are correct

#

but I have it set to generate lightmap UVs why is it just not doing that lol?

deft fiber
#

As long as you hit Apply in import settings after changing it, it should do it for all the objects within that mesh asset

#

I guess the alternative is that you have meshes from different assets

#

When you click the assigned mesh field in the Mesh Filter component, it shows which asset it is from in Project window

dry bane
#

Β―_(ツ)_/Β―

deft fiber
#

In this case I'd make the test scene with just a wall, a floor, a torch and a light, and by following their components' mesh references make sure each of them has lightmap UV generation enabled

dry bane
#

well the actual prefab of the torch that is in the scene is an empty parent with the mesh prefab in it so that I could apply materials and positioning and the area light, but would that change anything

deft fiber
#

So we for sure aren't looking at another torch that comes from a different asset

dry bane
#

yes

#

they are all the exact same torch

deft fiber
#

Each bit and piece of the torch is a separate object, with its own lightmap UV?

#

I guess that might explain why the lightmaps are like that

dry bane
#

I mean yeah? I could make it one mesh but then I wouldn't be able to apply materials to each part

deft fiber
#

You could with material slots

dry bane
#

but they are all part of the same mesh prefab and I said to generate lightmap UVs on that prefab

dry bane
hollow comet
#

I'm looking into some runtime level generation and have been thinking about doing light baking at runtime (which is unsupported by Unity's lightmappers afaik). Preferably such a solution would be fast (only take 5-10 seconds on a moderatly powerful gaming PC) and work on PC, Mac and Linux. The only thing I've found so far is Bakery (https://assetstore.unity.com/packages/tools/level-design/bakery-gpu-lightmapper-122218) but it only runs on Nvidia cards. Does anyone have any ideas for alternatives, either finished libraries or just a paper or article on fast lightmap generation? Maybe you're working on something like this yourself?

scarlet bloom
#

@hollow comet Sadly if you want indirect/baked with procedural the best you can do is bake the parts first then use something like SEGI (Sonic ether) with a mix of fill lights and blending edges with decals if needed - not really any good solutions for it currently

modern trench
#

Hello! Any ideas on how I can keep directional lights from bleeding through the walls and reflecting on indoor surfaces?

timber lichen
#

@modern trench Need more info to help. Do you have a wider screenshot to show your environment and light setup?

modern trench
#

the house is setup with light probes and reflection probes, no baked GI only realtime

#

the materials use the uber shader, metallic core

#

boosted the smoothness / min smoothness for more reflectivity on the floor

timber lichen
#

Is the game set indoors?

modern trench
#

well no its a house placed on a terrain

timber lichen
#

It looks like your reflection probes aren't baking the house correctly if they are inside the house. Is your house set to Reflection Static? What do the baked reflection probes look like?

modern trench
#

all static flags on all house related objects

#

sec

timber lichen
#

Could it be reflecting the ceiling light instead of the directional light and you are mistaking one for the other?

modern trench
#

nah happened before i added that light, its reflecting the moonlight which you can tell by walking around a bit

#

maybe the reflection probe volume is too big

#

does extend beyond the walls..

timber lichen
#

The Reflection Probe Volume only determines what inside of its range should use the reflection data; not what it actually reflects. What it reflects is set in the Reflection Probe Component's Capture Settings (Cull Mask, Clipping Planes, etc)

#

If you change the directional light color, does the reflection change too?

modern trench
#

yes

#

It is definitely the directional light (moon/sun depending on time of day) πŸ˜ƒ

timber lichen
#

Hmmm, no idea unless know more about the scene. πŸ˜ƒ If your scene and project is small, you can DM me it and ill take a look tomorrow. πŸ˜ƒ

weak wharf
#

what's your directional light setting?

modern trench
#

That's greatly appreciated πŸ˜ƒ However the project is unfortunately very big currently πŸ™„

timber lichen
#

Hmmmm, that might not work. πŸ˜„

weak wharf
#

i think that's because shadow is turned off for that directional light

#

that's usually the case for these kind of bleed through

modern trench
timber lichen
#

Good point. Does your directional light cast realtime shadows?

modern trench
#

afraid so

weak wharf
#

and no duped lighting?

modern trench
#

its being controlled by unistorm

timber lichen
#

Do the mesh renderers of your house have 'Two Sided' enabled in 'Cast Shadows' option?

weak wharf
#

that is also a good one

modern trench
#

it does not.. should it?

timber lichen
#

Turn it on and see what happens. πŸ˜„

weak wharf
#

check the ceiling, if that happens to be a separate mesh

modern trench
#

hehe my heart skipped a beat, but no joy 😐

#

well there are lots of separate pieces, its a modular house

weak wharf
#

take a picture of the house from above

timber lichen
#

Hmmm, I have to leave now but ill think about it tomorrow and will get back to you if anything pops to mind. πŸ˜„

weak wharf
#

does the ceiling looks invisible?

modern trench
#

actually, maybe i misunderstood

#

why would it look invisible πŸ˜›

weak wharf
#

that looks fine to me

modern trench
#

Thanks for the help though, andy, have a good one mate πŸ˜ƒ

weak wharf
#

well, i thought the only visible part was from the inside of the house

modern trench
#

Aha

weak wharf
#

well then, no clue lol

modern trench
#

i'm stumped as well lol

#

figure I'll come back to it at some point to figure it out, maybe I'll get a clue somewhere along the road πŸ˜›

#

thanks though πŸ˜ƒ

weak wharf
#

heh good luck

modern trench
#

it disappears if i set shadow strength to 1 on the directional light

lime adder
#

Is it possible to bake lightmaps at runtime? I'd like to build an in-game editor with ProBuilder's API and have the ability to bake lightmaps before saving the map. Kinda like Portal 2's level editor which bakes them when you compile it.

serene wasp
#

currently it's not possible to bake lightmaps at runtime - definitely a thing we would consider doing in the future and have gotten asked about

lime adder
#

Aww that would've been nice

#

I might just consider a solution where the user can export their map, open it in Unity for baking and then compile as an asset bundle

modern trench
#

Seems bounced light rays do not get blocked objects at all.. is this correct is there a way to achieve this?

modern trench
#

it even says so on the light

weak wharf
#

You'd probably need something like a realtime voxel raytraced gi or something along the line

#

If i get what you want correctly

modern trench
#

Yeah problem is bounced light bleeding through walls and floors

weak wharf
modern trench
#

so basically no indirect multiplier for indoor lights..

weak wharf
#

that's always been the case up til now

#

It's p expensive to do in realtime

modern trench
#

hows the performance on SEGI then?

weak wharf
#

you need a beast pc

modern trench
#

hehe figures

weak wharf
#

well atleast it runs at 60 fps on low with a 750 ti

modern trench
#

thats not too shabby

weak wharf
#

well, the demo

modern trench
#

too bad, the indirect lights really made the indoor scenes pop

weak wharf
#

try it out yourself

#

well ofc, but they require expensive calc since they replicate real lights

modern trench
#

considering the way clustering works, could you not precalculate that one cluster should not bounce light to another cluster because an object is occluding it.. i dunno

#

i prolly misunderstood the way clustering works πŸ˜›

modern trench
#

the indoor light is basically ignoring the wall unless i set the shadow bias ridiculously low.. at which point i start getting banding in the shadows

#

in illuminated areas*

pale pawn
#

@modern trench real-time gi will acknowledge shadow from directional light, however not from spotlight or pointlight. Duster shadowing (shadowed indirect lighting input) from pointlight and spotlight is costly in CPU hence it is not supported. In many cases using spotlight with real-time gi will be fine since the coverage can be limited and the leaking wouldn't be too noticeable. The specular from the moon or sun leaking is most likely an issue of shadow opacity not at 1. In PBR workflow it's recommended to never set shadow opacity below 1.

#

As for banding in shadow, check the directional light angle. If it's to extreme, you won't get good result. Second, check the Cascade distribution on the directional light and make sure you have the first Cascade to not cover to big of an area.

modern trench
#

@pale pawn thanks. The shadow acne was caused by an indoor spot light with too low bias (which was the only setting that would remove the problem). So I added in some boxes set to shadow only in mesh renderer instead. I'm using the suburbs pack from the asset store, which while having the benefit of being modular, doesn't seem to be optimal for realtime GI

#

every wall piece is basically one plane for the inside wall and one for the outside wall.. in one mesh

#

just using them for prototyping anyway so im not fussed

#

meanwhile I've ran into a new problem πŸ˜ƒ i have a day/night cycle in the game (using unistorm), and i've realised that having baked reflection probes isn't great in that regard

#

i need to re-render those when lighting conditions change, too often = bad framerate, too rarely = noticeable popping

#

so i'm considering dumping the reflection probes and just going with ssr

#

There's a bit of a learning curve in regards to realtime GI, but I'm enjoying it πŸ˜ƒ Though information is a bit sparse and hard to come by

#

finding exactly the bits and pieces of information that my particular use case requires, that is

#

not just "this is how you do it", but also how to trouble shoot and figure out what and how things go wrong

fast plinth
#

One message removed from a suspended account.

#

One message removed from a suspended account.

modern trench
#

that would be cool πŸ˜ƒ sounds achievable but i have no idea.. i have yet to look at srp

storm bolt
#

for probes, you cannot render them "async" only time sliced per face then suffer a stall during the convolution. Work is being done on HDRP to optimise that case, so if using HDRP you don't worry so much

#

So you would only render the bare minimum change to the probe

modern trench
#

HDRP certainly looks tempting, but I feel like I've jumped on the new bandwagons too soon too many times .. nothing more frustrating than hitting a road block and learning that its due to be fixed later sometime this year πŸ˜ƒ

#

Not sure how much that would be something to fear in its current state

storm bolt
#

It's alright, just different workflow, asset files. Dust definitely settled on it though, and now it's just about making it all ready in time for 2019.3 so yep has rough edges. I've been using it for a while.

modern trench
#

I'm definitely going to look into it and see if i can gauge how much pain making the transition might be πŸ˜ƒ I'm using assets like the uber shader and CTS, not sure if/when the hdrp-updates for those will arrive

#

or, well, procedural worlds said theyre dropping a 2018.3 update in january maybe

#

do you roll your own terrain shaders?

storm bolt
#

No I just used Unity's terrain shader that ships with 2018.3 - it has a 8 layer HDRP variant. As for the rest, you will find almost nothing supports HDRP (and doesn't need to)

In the case of vegetation rendering, you will find there's support in Vegetation Studio Pro but it's a bit out there at the moment.

#

For example HDRP is faster and better looking with (IMHO except for the pixel displacement options) is usually always better than Uber

#

Uber uses some quite expensive pixel displacement stuff, and HDRP's pixel displacement is simplified for performance (which is what I want)

#

And there's the whole shader graph support in HDRP which means if it can't do something you can tell it to do it anyway.

But still, not polished (no real docs etc)

modern trench
#

I took the plunge and upgraded the project to hdrp.. and boy am I glad I did πŸ˜‚

#

it looks positively awesome

#

fps improved and some of the shadow issues i had went away

storm bolt
#

It's very configurable but lots to learn and be sure to package manager update it. Note most unity settings don't work. you need to use the asset files instead (same for any SRP)

modern trench
#

Hehe yea im noticing docs are slightly out of date, as are samples and guides.. at the rate its being updated im sure thats gonna be the case for a good long while πŸ˜ƒ

storm bolt
#

regarding docs, the docs team with Kat has just finished up LWRP docs I heard!

modern trench
#

wonder if i can make a hdrp triplanar shader for terrain .. or maybe i should just avoid terrain alltogether

storm bolt
#

So congrats to them, and I feel sorry for them going into HDRP πŸ˜„

modern trench
#

πŸ˜ƒ

storm bolt
#

HDRP is fast

#

even triplanar is quite quick (but the nature of the beast is it will depend on how many textures you're burning through)

#

if you limit how much bandwidth you're spending (which is a core design tenet behind HDRP) you can start using nice things like triplanar.

#

it doesn't need to be on everything so YMMV

full pawn
#

Not LWRP docs in general

#

Like I’m nowhere near done

#

But a big new chunk is coming real soon

modern trench
#

yea i'd only be using it on steep surfaces, eg mountains

#

there are people working on the hdrp docs though.. right? πŸ˜›

storm bolt
#

yes but expect the docs in 2019.3

modern trench
#

hehe.. so no holding my breath πŸ˜ƒ

storm bolt
#

because that's the release date for HDRP

#

however - all the docs are actually around just hard to find

#

latest might be on githib

#

hub

modern trench
#

yea thats where i found the most complete docs

storm bolt
#

specifically inside the hdrp

#

not the old wiki docs

full pawn
#

Yes - there are also people working on hdrp docs.

modern trench
storm bolt
#

She is here, avoiding beer πŸ˜›

modern trench
#

which was horrible to navigate πŸ˜›

full pawn
#

Specifically, we’re a small team of people working across Hdrp, lwrp and Shader graph.

#

We’re aligning a lot as we go, and working with UX and devs to make fixes in the product itself, not just write docs

#

I’m the main writer for lwrp

modern trench
#

my impression is that hdrp is still in a state of flux.. do you expect a lot of changes before it stabilizes?

full pawn
#

Yes

#

It’s a a fast-moving target.

#

Although, I can’t speak to performance stability, per se - not my area

storm bolt
#

It's grim in the trenches of documentation hell.

full pawn
#

But for docs; as hippo said: expect them for 19.3.

modern trench
#

Well I expected as much, but nice to have it confirmed πŸ˜ƒ

storm bolt
#

dives to the floor as Unity programmers change something without telling the docs team.

full pawn
#

My colleague is working their behind off in getting stuff updated on the wiki

modern trench
#

It's nice to get a foot in early anyway

full pawn
#

Haha, yes, @storm bolt, that’s historically been the case

modern trench
#

hehe yea sounds like you got some challenges ahead πŸ˜›

full pawn
#

For hdrp and lwrp, it’s gotten so much better.

#

Both me and my colleague get pulled into so many discussions about what properties should be named and if the tooltips make sense and β€œbtw, we’re aiming to change this a month from now”. So in general, the amount of docs being pushed out is increasing

#

And all the behind-the-scenes things you’ll never notice ;)

storm bolt
#

Now you've got me curious.

modern trench
#

should not the domain experts be telling you what things are called? πŸ˜›

storm bolt
#

But big congrats for Team Kat on finishing LWRP docs πŸ‘ πŸ‘ ❀

full pawn
#

Nooo

modern trench
#

btw, whats your affiliation with unity hippo? I see you all over the forums πŸ˜ƒ

storm bolt
#

I'm a local landmark

modern trench
#

πŸ˜„

full pawn
#

Nooo!

#

Please don't say finished

#

They're not.

#
  1. Docs are never finished
  2. My update was purely for a chunk of shader docs
modern trench
#

that's the spirit

full pawn
#

I sitll have a lot on my to do for 19.1 - how the forward renderer works and differs from built-in

#
  • explaining the lighting model
#
  • updating the Asset doc, because we've redone UI
#
  • giving ya'll a list of shader stripping keywords
#

All the things!

storm bolt
#

(I became friends with David H and the early unity team then stuck around for some reason as a mod - I do actually dev in Unity though and help staff out be it code, or just having Kat wince at my poor command of the mother tongue)

full pawn
#

Also, Xeethrax; yes and no. I work closely with domain experts. But devs aren't always the best at... naming... things?

modern trench
#

i can attest to that!

#

..being a dev πŸ˜›

#

im horrible at it, just horrible

#

also, good to know hippo πŸ˜ƒ was just curious

storm bolt
#

IComparerThingyWotsit really doesn't lead the reader anywhere useful...

modern trench
#

i havent had a look at the lwrp.. does it have its own set of shaders?

storm bolt
#

Read Kat's docs to find out!

modern trench
full pawn
#

Like, concerning things you'll never notice:
I was writing docs for LWRP SHaders. I noticed that the same property had three different names; one in each Shader, depending on the type of LIghting used. Asked our QA why, since my verbose description was identical for each.
-> cross-team/area discussions, align with HDRP -> Shaders now named similarly; UI now named similarly; property now the same name across Shaders (in both pipelines)

#

And yes, LWRP comes with LIt, Simple Lit, Baked Lit, Unlit, Particles Lit, Particles Simple Lit, Particles Unlit and some AutoDesk Interactive Shaders.

modern trench
#

cool, so you sorta double as a QA for devs naming conventions πŸ˜›

full pawn
#

Yes.

storm bolt
#

It's pretty cool that you're creating consistency for developers, so we can do more without these bumps in the road.

modern trench
#

I feel the sudden pressure to make sure my grammar is okay.

storm bolt
#

I'd argue that the use of 'the' is redundant in the above sentence!

full pawn
#

I have that effect on people.

modern trench
#

πŸ˜ƒ

full pawn
#

Back in my raiding days, a guildy actually thought I was perpetually mad at him because I used a full stop.

storm bolt
#

I guess texting is torture eh? πŸ˜„

modern trench
#

Haha πŸ˜‚

full pawn
#

Honestly, my fat thumbs keep getting me in a whirl of trouble - "I thought you were good with writing" - well apparently not on an iPhone!

modern trench
#

I can relate.. whenever you start being grammatically correct, it sounds somehow formal and creates a more serious tone.

storm bolt
#

At least you don't press the entire phone like I do.

modern trench
#

I truly hate texting on a phone

#

especially with touch screen keyboards

#

add autocorrect on top and the frustration peaks

storm bolt
#

@full pawn one day u will 'ave to let ur hair down and just say somefing tottally sloppy.. its like junk food with bad spelling, horrific punctuation and more!

#

Let ... go

#

Tis liberating, honestly.

#

...innit

modern trench
#

u bri'ish?

storm bolt
#

Yep unfortunately. I'd use correct grammar but I can't given the state of brexit. Somehow it's all gone pete tong.

modern trench
#

lmao πŸ˜„

#

Brexit is all over norwegian news papers. Mostly about how it affects us, of course.

#

going to london in a couple of weeks actually

storm bolt
#

Nice! well not nice, since there's not much nice about London really, unless you go to a nice bit. But at least the weather is reliably pants.

#

(feel guilty chatting here OT lol)

modern trench
#

somehow we tend to luck out on the weather πŸ˜ƒ been going every year for 9 years now

storm bolt
#

Yeah? how come

modern trench
#

Oh, right. Yes, sorry about that. I shan't stray from topic!

#

work thing, gaming convention

storm bolt
#

just continue in ot bit if you want

modern trench
#

Aye πŸ˜ƒ

cloud plaza
#

Hi all. I'm a programmer and I'm trying, for the first time ever to learn Unitys Lighting. Are there any in-depth resources you would recommend besides the official docs?

hoary pasture
#

I liked catlikecoding's walk through

#

looks like he's got walkthroughs for both the legacy pipeline (which I enjoyed) and the new SRP stuff

#

might be too basic if you're familiar with some of these concepts from other engines

dapper brook
#

I'm trying the GPU Lightmapper on a fairly simple scene (sponza) and I instantly get the errror on unity 2018.3.2f1 OpenCL Error. Falling back to CPU lightmapper. Error callback from context: CL_OUT_OF_RESOURCES
With a 2080Ti and ridiculously low settings, any idea what could be the cause ? I managed to bake yesterday on the default HDRP example scene but today, nothing

dapper brook
#

I worked on some other irrelevant stuff and tried again and now it works, so it's fixed I guess :x

pale pawn
#

Comes with the sample project. The documents currently is for built in renderer, but the base knowledge are still going to be relevant.

timber lichen
#

@dapper brook what gpu do you have

#

It needs a ton of vram

#

Oh nm

#

You sad 2080ti

#

I’m stupid lol

#

I would recommend Radeon 7 for it since it is based on Radeon rays and the extra vram

#

Plus Vega’s performance in blender if you use that is great

#

But if it ends up defaulting to cpu that likely means vram maxed out

#

You also need a certain driver version for nvidia gpus if I’m not mistaken

storm bolt
#

I don't really recommend picking up hardware to solve Unity's PLM right now as the PLM is likely to cancel its jobs for other reasons, so bug reports if any would be a safer move if you already have a card with a decent amount of ram.

cosmic breach
#

Can someone help explain how mixed lights are supposed to work to me? I feel like I'm missing a huge piece of information based on what I've read and experimented with.

The house I have is completely static,, every object in or a part of the house is marked as static (double checked Lightmap static is checked as well) with the only dynamic object being the character.

When the lights are set to baked, I get roughly 3-400 draw calls. When I set them to mixed, then generate lighting, I get 3k-4k draw calls as if everything is being treated as dynamic in real time lighting.

Shouldn't I be getting something only slight above the baked lighting since everything should be baked except for the character object? I'm in 2019b1 and using Progressive GPU.