#archived-lighting

1 messages · Page 36 of 1

quaint river
#

what are my options then assuming I keep modular assets and just remove internal faces

deft fiber
quaint river
#

I use URP

quaint river
deft fiber
#

2022.3. editor should support them as well but I don't recall with certainty

quaint river
radiant harness
#

Hey Billy, I have followed the instructions you provided, and the problem has been resolved. I can't thank you enough, as I had a really hard time trying to solve it. It’s strange because, in the Unity 2020 editor, I was using the medium and default quality settings, and everything worked fine. Plus, there's not a single post online that specifically addresses this issue using the built-in render. I even installed the latest Unity 6 version, but the problem was still there. Now I can continue with the rest of the development. Have a great day!

plush barn
#

Does Bakery (the unity GPU lightmapper asset) play well with the new Adaptive probe volumes Unity added recently? I can't seem to find much in it's docs and I am curious to try it out as many people love it/say it's faster than built in baker.

boreal vault
#

is there any way to fixe this ugly shoulder ?, without any light it look normal :/

deft fiber
boreal vault
#

yeah, when i disable it, the bug disapear, but i need to keep it in order for the door to look good when being moved

deft fiber
# boreal vault

You can give the player's limbs all the same probe anchor override, such as the chest part

boreal vault
#

You are the GOAT, thanks so much it worked !

limpid warren
#

new to baking, I set my directional light to mixed as I have a moving car which i want shadows for, the rest is all static for baked.

only light source i have is the directional light

Im getting black spots on some trees using the settings in the image, can someone please recommend me some better values or resources

deft fiber
limpid warren
deft fiber
limpid warren
#

So I am trying to recreate that look with baked lighting do you recommend I lower the bake resolution when prototyping as it’s taking me hours everytime 💀

deft fiber
#

@vital wren oh I forgot
Subtractive lighting does let you get baked direct lighting from mixed lights

#

But I'm not sure if HDRP supports it

#

It does look so terrible in most scenarios it's hard to find a use for it, in my personal opinion

#

At least if you want shadows at all

cursive gorge
#

My car in looks wierd in gamescene, i only use directional light, how do i make my car not look wierd? i want it to look like my menu scene which has lights and a reflection probe (im developing on mobile so i cant go overboard with graphics)

ebon hare
#

its to do with lighting

lunar yarrow
#

Q: can I make light probes not connect outside of a boundary? Trying to do light maps but my nodes are connecting across rooms rather than staying in its own room

timber lichen
#

hi

#

my light probes dont seem to work

deft fiber
deft fiber
#

So there's no way to place a limit on their reach

#

A workaround might be to have extra light probes surrounding your light probe group which you overwrite to a "neutral" light probe using scripts
But it requires going through the hassle of manually storing and writing SH data and making sure the probes are tetrahedralized whenever necessary

timber lichen
#

all the materials I import look way too glossy
why is that?

karmic grove
#

That looks cool. Do you know a way to increase the light scattered by the fog?

#

I made this scene which amazingly takes around 20 seconds to bake with adaptive probe lights. But no matter how much I increase the fog, all I get is just a dark dense fog instead of more light scattering from all the emissive stuff in the scene.

timber lichen
night shell
#

so as for increasing the lighting scattering/contribution from sources I'm not too sure how you would do that in the case of APVs

karmic grove
#

Thanks. Then that feature probably doesn't exist in Unity 6 yet. I hope they can implement that in though, it's kind of critical to get some cool lighting.

night shell
#

I'm assuming your on URP?

karmic grove
#

HDRP

night shell
#

yeahhhhh my package def wouldn't work in HDRP, and I don't think HDRP has that support yet

#

although...

#

the video that zigga posted seemed to be using some solution in URP that allows APV contribution to the fog

#

Dive into the realm of real-time rendering with our latest video on Adaptive Probe Volumes (APV) and Volumetric Fog & Mist! Discover how APV enhances scene realism through dynamic lighting adaptation, and learn to create immersive atmospheres with volumetric fog and mist effects. Whether you're a game developer or a CGI enthusiast, this video wi...

▶ Play video
#

I don't know if they built it in yet or if its an external package

#

ah its external, figured as much

#

yikes

karmic grove
#

oh well

#

I'm sure unity 6 will get a lot more lighting updates. This just might be one of them some time.

night shell
#

perhaps yeah, although I'm not too sure the people in unity are even aware that its a thing

karmic grove
#

The directional sunlight can do it for the fog light scattering boost, so there is definitely not a hardcoded limitation on it which is good news. But yeah it's a matter of them turning this into a feature.

night shell
#

for the time being though if you wanted contribution from those lights, since you are in HDRP you can just add a bunch of fog lights

#

no shadowcasting or anything, make them fairly cheap and place a bunch of them to approximate the look

karmic grove
#

I have over 500 billboards in that scene though :D even the interiors are full of billboards. Its basically a test to light up a scene with only emissive materials and APV.

#

One dirty workaround is to boost the light emission to crazy amounts and bake it, and then tune them back down

night shell
#

you could also use a "bilboard" where you have a quad oriented to camera (a simple particle for example) with soft blending and do that too 😛

#

and place that for the bilboards

#

thats actually sort of an old school way of doing "fog" or even "bloom"

#

would be much cheaper than a bunch of lights, but it is manual labor

#

and depending on the kind of lighting situation it can be a little awkward and inaccurate even with soft particle blending to avoid the classic harsh scene intersection lines

karmic grove
#

yep, also it would create a big overdraw when you're looking down a street with all the quads stacking on top of each other

#

just waiting and hoping to get a native solution seems best for now

night shell
#

I mean your using HDRP I was assuming performance for you isn't a top priority lol

karmic grove
#

there are scenes like this where you would see hundreds of big and small billboards at the same time

night shell
#

I mean you might be able to get away with it tbh

#

but you do you 😛

karmic grove
#

yep

night shell
#

ah damn, I have a test environment but would have liked one that was more like an actual "city" so to speak

karmic grove
#

man I'm jealous of that fog 😛

night shell
karmic grove
#

for my scene I generated about 500 different billboards with AI to avoid using real brands and labels

#

then I simply packed them into a 4K texture and made it into a single emissive material

#

It helps greatly to add life to your city and fairly an easy task

night shell
#

some people would shit their pants hearing that but its a perfect use case for it

karmic grove
#

It took a few days to just to select usable interesting ones and cut them all into individual quads. But once you have that you can slap that into any city scenery you want

#

Did you try things like procedural city generators like in blender btw?

#

Esri City gen is also very good at it and gives a more realistic layout

night shell
#

I don't use blender actually, autodesk maya guy but I've been meaning to hop in it

night shell
karmic grove
#

I havent used esri for this but I should have

#

right now it looks a bit like PS2 city lol

#

just an avenue with a street with nothing interesting going on layout wise

timber lichen
night shell
#

? not sure what you mean

deft fiber
deft fiber
timber lichen
#

i have put lighting probe into the scene

deft fiber
#

And?

timber lichen
#

baked

deft fiber
#

What about the steps required for baking to have an effect, such as setting objects to contribute to GI, to receive GI from probes or lightmaps and configuring lighting settings

#

You can't expect us to automatically know what you've done in these departments

deft fiber
# timber lichen

"0 occupied texels" indicates nothing is being baked
Likely you've skipped letting meshes contribute to GI

timber lichen
#

but i just baked it

#

ok

#

where do I find this setting? @deft fiber

deft fiber
timber lichen
#

another question, do light probes light up dark shadows too? or just affect dynamic objects?

#

i saw in some videos that everything seemed to look brighter

deft fiber
#

Probes are points that store baked lighting at that point
They then are interpolated onto objects that don't have lightmaps
Whether that means more light or more shadow at that point depends on the baked lighting

#

Objects that don't have lightmaps include dynamic meshes as well as meshes that are static but set to use probes instead of lightmaps

twilit cradle
#

Hello, lets say I have a cube placed in 0,0,0 and set its bounds to 5k for xyz. How would that affect rendering and shadow maps?

upper fable
limpid warren
#

does this version of unity not have light probe volumes?

mellow sierra
#

It's 2023+ according to the docs

inner seal
#

Is there a reason extruded splines does this when using lightmaps? Do I have to use light probes for them or am I doing something wrong

timber lichen
#

stil not working

deft fiber
timber lichen
#

the mirror looks off, it says there are no light probes

deft fiber
timber lichen
#

now there r but it still looks off

#

evyerthing is darker

deft fiber
#

That particular mirror feature is from vrchat

timber lichen
#

ok

#

but the light probes are still not working

#

it should reflect the fridge

#

the sphere has no baking map shown

deft fiber
#

Light probes have nothing to do with reflections

#

At least not in the Unity I know

timber lichen
#

then with what?

deft fiber
#

Reflection probes

#

Can you see why it's a problem why you drip feed the necessary information

timber lichen
#

i watched tutorials

deft fiber
#

And ask questions about features that turn out to be exclusive to vrchat, after being directed to ask them in the vrchat discord

timber lichen
#

light probes should show the ligvbht on the sphere

#

ok

#

bc it is in unity

deft fiber
#

A whole bunch of games are made in unity, but we can't effectively answer questions about those because they have limitations and features that unity does not

#

If you're serious about learning lighting, for unity or vrchat likewise, you will have to practice it by starting from the basics
Vrchat might have their own tutorials for it, but if not I recommend Unity's own tutorials and a fresh project not associated with vrchat so you don't get tangled in the differences in its workflow until you have some experience

deft fiber
inner seal
deft fiber
#

If lightmap UV generation for those meshes is enabled, then it may be related to padding but it's not my first suspect usually
If your lightmap resolution is very low, it may exceed the minimum resolution defined in lightmap UV generation settings

#

Or it could be something totally unrelated

inner seal
#

same front and behind

jaunty niche
#

ive now noticed the limits of reflection probes - ive tried to use a third probe in this third area on the left but as you would expect, it just doesnt work. How can i get around this?

deft fiber
night shell
#

if you are in forward rendering I believe objects can only have up to two reflection probes

#

in deferred rendering there is no limit, but in forward rendering there is

#

and you can get around it by splitting up the mesh into multiple objects

jaunty niche
#

yeah thats what i've done, only just seeing this now

#

just a little tedious selecting every single face

night shell
#

your level geo seems to be very boxy so splitting up the mesh per room should get you good results

#

and would allow you also place a reflection probe for each area to get the best results

timber lichen
#

GUYS i have an issue
is there an option in unity that controls how far can shadows fall? I think its unreasonable that depending on light's rotation they can be even 200meters long. I hope theres a way to change it. Is there?

night shell
#

in the quality settings in unity under Edit > Project Settings > Quality there is a max shadow distance that you can control, but not sure if that is what you are looking for

#

if you mean how the shadows of the light can become very long and stretched out when you have the light angled at an oblique angle then that's true to life and physically plausible. If you want to avoid it just angle the light to be less oblique so that they don't appear to be that long and stretched out

#

if that is not satisfactory enough then I'm sure we can help you figure out a way but provide more info about what your trying to accomplish

timber lichen
#

so i end up with a lot of slow shadows that nuke my fps

timber lichen
night shell
#

you can reduce the intensity of the directional light as it reaches the horizon

deft fiber
#

"Long" shadows aren't more expensive to render than short ones, to the best of my knowledge

deft fiber
night shell
night shell
#

you can do some programatic math and cheat a bit, where if your doing a day night cycle, you can cheat the lighting angle by defining a minimum limit for the sun to reach, but the lower the sun actually goes it still controls the colors/intensity

#

so when it reaches near the horizon it stops (you could do additional logic to smooth the transition) and it doesn't go any lower, but the color/intensity changes accordingly

deft fiber
#

I do wonder about the "lot of slow shadows that nuke the fps"

night shell
#

could mean alot of shadow casting lights

#

either that or too many objects casting shadows, which is another

deft fiber
#

Maybe, additional lights have a hard limit with their Range though
I'm thinking that the accused issue is how directional lights render everything between the camera and "infinity", as far as I know

#

So that can be a lot of meshes

night shell
#

one could try like a sphere cast around the player, either that or a trigger (multiple ways of doing it) and enable shadowcasting on mesh renderers inside the range, and disable shadowcasting on mesh renderers outside

#

that has the added problem of course of reducing the "accuracy" of the shadows to an extent, but given they are not a fan of the enlongated shadows mabye thats fine since objects near the horizon and mostly out of sight/range from the player won't be casting shadows

timber lichen
#

if theyre 200meters long and u have a lot of shadow casters on the scene like trees u kinda end up with a lot of these super long shadows that you cant cull if sun is angled

night shell
#

have you profiled this?

deft fiber
#

Can't cull, or would rather not?

timber lichen
#

if you cull you will have shadows dissapearing in camera's view

#

because theyre that long

deft fiber
#

That seems fundamentally unavoidable

night shell
#

have you checked perforamnce with the profiler?

deft fiber
#

That's an important thing to do
The cost of rendering the meshes for shadowcasting is usually not big compared to the overhead cost of rendering shadows for the directional light, in my experience

#

The most practical workaround that comes to mind is to have a separate shadow meshes for the trees, made to have smooth normals, overall simpler geometry and simpler shaders

night shell
#

^^ using lower LOD levels for shadowcasting basically

deft fiber
#

I would imagine LOD group components could be used for that purpose but frankly I don't know how directional light shadow casting deals with LODs over large distances, and if that can be tweaked with any settings

night shell
#

by default unity uses the same mesh used for regular rendering for shadowcasting, you can cheat a bit by having the main regular mesh not cast any shadows, but have a shadow only LOD mesh active

#

the problem of course is that creates potential arifacts due to the likely inconsistent shape/accuracy of the LOD compared to the base mesh

#

but you can certainly setup an LOD group to enable a mesh nearby the camera to use the same mesh for rendering/shadowcasting, and for the next LOD level, switch to another mesh renderer that is the same but no shadow casting, and enabling a lower LOD shadowcasting mesh

timber lichen
#

my problem seems to mostly be amount of shadows not their quality

night shell
#

then either use shadow LOD meshes or unmark shadowcasting meshes

#

reduce the quantity

#

smaller geo like rocks or mabye some small bushes here and there could lose the shadowcasting, but larger geo like trees can retain it

dusky nacelle
#

is there any alternative similar to lightprobes? for example, the object wiill become dark when it goes to shadowy lightmap area, and Bright when goes to bright areas ? without using lightprobe?

#

@night shell

night shell
#

in terms of built-in tools unity has, lightprobes seems like the only thing that can do exactly that

#

why do you want to avoid light probes?

dusky nacelle
# night shell why do you want to avoid light probes?

because, I baked my whole big scene for 2 days with minimal lightmap sample and resolution setting. Unfortunately, I have placed lots of lightprobes in the scene and now the lighting data.asset is so big like 370mb. which would be bad for mobile. At this point I just want to rebake the lightprobes only, based on existing lightmaps, if not possible, then I just wanna get rid of it having anything similar

night shell
#

how does your light probe setup for your scene look like?

dusky nacelle
#

Almost millions of probes, I didnt realize that, it has cost on the memory. Now I just want to reduce the probes and rebake them

#

do you know any way to bake lightprobes only? in the existing lightmapped scene?

green cargo
#

why might i get "too many lights overlap in the scene" when setting the light mode to mixed while i only have a single directional light in the scene? im brand new to unity

night shell
night shell
#

Im curious what your setup is because even in a large world there should never be that amount of probes

#

even probes placed in high density can only give you so much accuracy

dusky nacelle
night shell
#

what I want to see is this basically

night shell
dusky nacelle
#

okay , give me a minute

night shell
#

and I'm seeing light probes (clone) (clone) I wonder if you have duplicate light probe groups on accident

dusky nacelle
#

nope, one for day scene, another for night scene

#

actually the terrain is bigger than pubg map

#

and lots of buildings and stuffs

#

here you can see the density , now guess a whole terrain of 9000x9000 unit

night shell
#

in terms of how densly packed you have your probes

night shell
# dusky nacelle

most of the probes you have are redudnant espeically ones over the grass here

#

the lighting is basically identical to other probes

#

simplify basically

dusky nacelle
#

yeah, I admit my mistake, thats why I wanna put less lightprobes and bake them

#

but Im trying to find a method to bake lightprobes only

#

Im using unity 2021

night shell
#

yeah on that version there is no way unfortunately to only bake probes

#

you'll have to rebake the lighting for the whole scene

dusky nacelle
#

I guess I need to use ambient probe then

#

it's a cool tool

deft fiber
# dusky nacelle

You only need a probe whenever the lighting changes, so basically one in a shadow and three or four around it
The probes next to each other on the open fully lit ground aren't doing anything visually

#

Usually you wouldn't have a world this big loaded all at once anyway, especially on mobile platforms

dusky nacelle
#

yeah, I made this mistake, But I wanna rebake probes only, baking with lightmaps will take my whole day and also It's been 4 months since i lightmapped my scene, I have forgot all the setting I did in lightmap parameters and scales in objects...

deft fiber
#

There probably isn't much of a way around it
There are many ways to make the baking faster though

dusky nacelle
#

I will do manual probing

#

setting probes that dont need baking, and set their colors to affect the dynamic gameobjects

timber lichen
#

I wish i could add a fake sun. The scene's sun position is controlled by the first directional light that has shadows turned on.
I wanted to have one fake sun for shadows, and another sun for its position in the Sky. But unity wont let me separate them

deft fiber
# dusky nacelle yeah, I made this mistake, But I wanna rebake probes only, baking with lightmap...

If you've got complex meshes like trees, they could be set to receive baked lighting from a probe instead of lightmaps
And if you've got plants or other small or very detailed objects, they can be excluded from being lightmap static entirely
With such a big level it would be smartest to disable most of the level and work to perfect the lighting techniques only on a part of it
Could have another scene with a slice of the map for testing

#

And of course bake on the GPU if you have one

timber lichen
#

maybe theres a way to separate suns By modifying some internal lighting code but idk where it is

dusky nacelle
deft fiber
timber lichen
#

Oh man it was shadow cascades that was giving me fps drop

#

I get 130+ fps more after switching from cascades4 to cascades1

#

crazy

deft fiber
#

They be expensive
Shadowcasting pass is rendered many times in different resolutions

deft fiber
#

@vital wren My understanding of shadowmask modes wasn't perfectly clear earlier, I'll try to clarify
I said that you wouldn't get lightmapped shadows on static geometry with shadowmask mode, but that's specifically the kind of shadows you do get
With distance shadowmask, you get realtime shadows up to shadow distance, and lightmapped shadows beyond it
Both shadowmask types give you specular occlusion even on lightmapped shadows thanks to the shadowmask texture
Baked indirect gives you realtime shadows for everything, but no shadows at all beyond shadow distance
Subtractive gives you realtime shadows from dynamic objects and lightmapped shadows on static geometry, but can't blend the two effectively and doesn't support any direct specular on static geometry

#

So generally their performance from most to least expensive would go like
-Distance shadowmask
-Shadowmask
-Baked indirect
-Realtime (should be same performance as baked indirect but require less memory)
-Subtractive
-Baked

vital wren
dusky nacelle
deft fiber
#

Lightmaps and light probes are stored in lighting data asset which is per scene, and as far as I know more than one can't be loaded in at once

#

I think APVs would solve a lot of the problems you're encountering, since they're automatically placed, efficient and streamed into memory
But you said you were targetting mobile which usually don't support APVs yet, though worth checking out if that's true

#

If you have to use lightmaps and probes, this resource might be useful for making sure you can load in the chunks while keeping the lights on
https://youtu.be/KbxiGH6igBk
It's for procedural level creation, but since your chunks are in predestined places, you might not need to go through all the hoops

shell juniper
#

streaming might still be HDRP exclusive

dusky nacelle
#

I dont have problems with lightmapping stuff anymore

#

and I have excluded light probes from the lighting data asset using a library which can edit lighting data asset

#

I think , it's better not to use light probe, rather I change the genre, like all the character will be from another dimension , cartoonish character in real looking world

deft fiber
#

But, altering the art style is a good alternative to trying to push against significant technical barriers

dusky nacelle
#

yeah, just trying to have that)

strong plank
keen pagoda
#

Is it possible to add shadows under the character in a HDRI lit background. Just want a plane that multiplies shadows into the scene.

#

HDRP pipeline

strong plank
#

Or, if you have a smaller, localized area you can fake these with area lights

deft fiber
timber lichen
#

for lod shadows proxies, does reducing verts/tris help? in my case optimizing shader helped the most.
reducing tris and verts doesnt seem to help at all. actually it may even make things worse, the fps is slightly lower. perhaps due to addition of additional mesh. or maybe im not testing properly.

deft fiber
vital wren
#

I’ve got an interior scene that has multiple mirrors in it. I’ve set up reflection probes near these mirrors and for the most part it looks ok. But there’s some stretching in the one mirrors reflection near ceiling and floor. For the other mirror all looks good, but the alignment of the reflected image is off. I’ve tried moving the capture position around but can’t seem to get it tuned correctly. Any recommendations for how I can get these mirror reflections looking their best?

deft fiber
vital wren
#

I’ve setup planar before but completely spaced it this time. Thanks Spazi.

karmic grove
strong plank
karmic grove
#

Nice. How is the performance?

#

I tried SEGI before which had a very similar logic to this, although the voxel count seems a lot more on that video

night shell
#

only for HDRP though but that is nice

#

OHHH wait this is the update for it

#

I didn't realize it was the same product, I knew I recongized the name but was confused as to what I was seeing

#

the previous one was purely screen space

strong plank
night shell
#

I wonder if its all software or if its leveraging the hardware raytracing APIs

strong plank
#

URP is under consideration. afaik the focus rn is just getting it to be the best it can be on HDRP

night shell
#

hoping for the former, that would be more impressive

strong plank
#

goes over how it works

#

it uses ReStir too

night shell
#

I saw, no details about if its hardware or software

night shell
#

oh hell yeah

#

I imagine also they are leveraging geometry shaders for voxelization?

night shell
#

I've been building my own voxel lightmapper system, so this is def peaking my intrests

strong plank
#

^^HTrace did not work with BetterLitShader probably because of the layers upon layers of abstraction.

I would assume as time goes on Shader specifics become less of a problem

strong plank
night shell
#

its a hell of alot of work lmao

#

I would love to make it realtime some day but keeping it simple

strong plank
#

I feel like by the time i grasp it all, we will have dedicated pathtraced cores and it will become the norm (maybe not but who knows )

errant goblet
#

Hi, i've been using triplanar mapping for my horror cave game and I noticed this weird lighting issue happening with the normal texture. I've been testing it out and the issue is related to the normal map, as removing it makes the lighting go back to normal. I attached a screenshot of the issue and the shader graph. Please ping me for replies

Edit: the textures are grabbed from a free website (CG0, specifically). They are regular normal textures

#

Another screenshot

deft fiber
errant goblet
#

oh

#

i changed it but it didn't realy change anything

#

oh nevermind

#

i just forgot to save the shader

#

it worked!!!

errant goblet
deft fiber
errant goblet
#

huh?

#

oh

#

right

fair prairie
#

I have a very simple question that I have been curious about. How cheap is the ambient lighting exactly? For example I disable the main light in urp and use only a nicely tweaked ambient lighting and it looks pretty good and works good enough on some older devices too but I wonder if there's a simpler way to illuminate things, although I noticed that a scene always has ambient lighting and there's no way/need to disable em so I'd assume they're very cheap?

#

Only ambient lighting gives some very goood results if the map looks decent

#

And this is default per pixel lighting

deft fiber
#

If so, that might be the most costly thing for performance

#

Consider also the Simple Lit shader

#

The scene will always have some data for ambient lighting, but it's up to shaders to use it

#

The Lit shader doesn't calculate directional or punctual lights at all if they're not present, but I believe ambient is always factored in
Wouldn't really be much of lit shader without any lighting

#

Specular from reflection probes might also be calculated, even if you have none

#

So even if your lighting in actuality is purely ambient diffuse, it might be calculating smoothness and normal maps anyway

#

Specular can be disabled from advanced material settings for Lit and I believe Simple Lit shaders both, assuming you're not getting specular from anywhere in the scene

fair prairie
fair prairie
fair prairie
#

Would be cool if I can globally swap the shaders to something much simpler through some toggle

deft fiber
#

The lit and simple lit shaders become cheaper just by disabling features like specular, and emptying fields like normal map

#

Though some gains might show up only in build after shader variants have been generated

fair prairie
# deft fiber The lit and simple lit shaders become cheaper just by disabling features like sp...

Ohh, that's interesting! Can probably swap materials
Thanks for the info
I just need a way to completely disable normal calculations and some extra stuff. I don't have mats with specular highlights enabled. Built in had mobile shaders which weren't true pbr. Wish urp had something similar. I did find some custom lighting functions for shadergraph, but I ain't sure if all of that is worth the effort. I do want to make the game look good on higher end mobile phones while make it look decent and work at a stable 30fps on older devices

#

Having multiple mats for the same thing with different presets sounds like a rough solution. But maybe materials don't take too much space, afterall the textures would be the same

#

And additional shader variants

deft fiber
fair prairie
#

Got it, thanks 🙂

deft fiber
#

Multiple materials are fine to have
But I don't know off the top of my head what'd be the smartest way to make every single renderer and material slot swap between them though

fair prairie
#

Right
Would keep trying to find the best way to do that
Atleast now I know what to do

#

Also

deft fiber
#

Scriptable objects and sub-assets might be one way to keep track of them, but still would have to do the swapping

fair prairie
#

There's also this one thing I was working on a while ago. It's kind of like a very cheap point/spot light solution. Uses stencil.
Seems to work pretty good at 60 fps on an old Android phone

#

Actual realtime light looks better but only one tanks perf down alot

fair prairie
#

Even tho the performance is still just alright

#

I was planning to somehow use something like what ambient lighting does

#

With the stencil shader

#

Idk if it's possible

#

Could be a good cheap lighting solution for older devices

#

Stencil approach is more performant for mobile devices

fair prairie
dense spruce
#

Hey how do I fix overexposure when using a point light

#

like I want to make a flashlight that can see decently far so I have to increase the intensity

#

but they when I'm close to an object I only see white

#

like you can see the object

#

its horrible

timber lichen
vital wren
#

I have numerous models from a well known environment/kit provider. They have an importer tool specifically built for Unity. I've imported numerous assets using their tool. When I look at the UV layouts for the meshes, they almost always look like the attached. Unity complains about nearly every single mesh that the GameObject has overlapping UVs. They also don't come with a 2nd UV channel for lightmaps.

  1. Are UVs that look like this functional in Unity, or will they cause issues? I've seen similar UV layouts from other asset providers and I'm not sure how serious I should take the warnings about overlapping UVs.
  2. What happens when you don't have a 2nd UV channel and you bake lightmaps?
lunar yarrow
#

anyone know for a light probe generator? i fond one on github by TatumKirchner but its very buggy for me

livid cloud
#

Can anyone tell me how I would get my light source to appear like it's flickering in a 2D project? I want it to look like my candles are lighting the room with flickering lights

timber lichen
livid cloud
#

I worked it out haha. Thanks anyway

keen finch
#

So this light goes through the wall in my webGL build, but not in the editor. These are the wall lighting settings. Is there any other place that I need to tick something? Help xD

#

Floor is a plane btw

scarlet geyser
keen finch
#

It was a point light, I now swapped to a spot light with 179° because it works in this case

broken ice
#

I'm desperate trying to bake my scene 😦

#

I have tested many configurations but it always crash my editor, both in linux/vulkan and windows/dx12, with and without raytracing

#

really frustrating as I don't know how to debug this

deft fiber
broken ice
#

yep

deft fiber
#

Do other scenes crash?

broken ice
#

yes, i tried a few assets from hivemind with similar results

deft fiber
#

Do scenes with just default unity primitive meshes crash when baking
If so, what about that kind of scene in a fresh project

#

Does it crash with GPU baking or CPU baking or both

broken ice
#

I could try that

#

it crashed with both

#

I've been working with Unity the last 5 months and everything works (almost) as I could expect, but lighting is outside of my league yet

broken ice
#

the HDRP demo scene is baking alright

deft fiber
#

If the new scene bakes fine at first, but fails after moving your assets in it, that indicates it wasn't the scene asset or associated lighting settings that had the issue, but one of your in-scene assets

broken ice
#

I'll try, thnks

copper shoal
#

On my 2D game, the global lighting works, but none of my other lighting im attempting to add works

#

it used to be a 2D Built in render pipeline, but i switched it over to 2D URP

#

nvm im stupid and wasnt putting in 2D lights

floral swallow
#

Hello. I've got a pretty weird issue I'd appreciate some assistance with yayay

Spot lights with a range of above 5 seem to be creating horrible stretched and broken lighting issues, I need lights with at least 2x the range and this is a really horrible effect to see in VR, has anyone got any ideas why it might be happening? 👀

#

This is the setup for every light, I've made sure to use less than 8 per gameObject as I'm using URP in Unity 6

floral swallow
deft fiber
#

Using what Unity version exactly

deft fiber
#

Some versions of Unity 6 (19f1 to 24f1 I think) have issues with bakes getting stuck

lofty igloo
# vital wren I have numerous models from a well known environment/kit provider. They have an ...

There is nothing wrong with the UV's, its using the fact that in mot cases most textures use wrap mode so anything outside the 0-1 range gets remapped back into it. Most likely this is either just bad design or explicitly used so that its easier to move groups of UV's around for different textures.
As for lightmapping, it relies on using the second UV channel for proper lightmapped coordinates (which cannot overlap as that is nonsensical for lightmapping). If the second UV channel doesn't exist it falls back to the first UV channel, which is rarely layed out for lightmapping.
In this case and most cases the solution is in the importer of the model to enable 'generate lightmapping'. Unity will then generate correct lightmap UV's in the second channel (overwriting any exisitn UV in that channel).

vital wren
# lofty igloo There is nothing wrong with the UV's, its using the fact that in mot cases most ...

Thanks. Regarding the UV layout, I was just surprised they were using wrap mode when they don't appear to be using the available texture space efficiently to begin with. Looks like UV generation was automated with no QA.

Re: the lightmap UVs - that was my understanding as well. But this vendor uses their own plug-in for Unity (using USD behind the scenes) and their process is not constructing the lightmap UVs on import. It could be because the vendor's plugin does not officially support Unity 6 yet, only the 2022 LTS stream.

lofty igloo
# vital wren Thanks. Regarding the UV layout, I was just surprised they were using wrap mode ...

Knowing this comes from a kit and looking at the image, I would guess that UV's are designed to work for specific areas of a texture based on the object type. If so then its quite common to add an offset to the UV values knowing they will be wrapped as it makes editing the mesh and moving UV's around much easier, as you can simply drag a box around the UV's and move them, instead of having them all on top of each oither and intermixed within a single 0-1 range.

As for custom plugin are you saying the models don't use the standard Unity model importer? That would suck. You might find you can add the lightmap UV's yourself with a custom importer process that happens after their's. That is assuming multiple importers can run on the same model and in order, plus that Unity has an API that allows you to call 'generate lightmap uv's'
Have you double checked the mesh of the model in the inspector - you can see what uv channels are in use. Maybe they are using UV2 for something else.
Ultimately I would go an ask questions on the asset creators forums or other social media as I doubt you're the first person to have these issues.

vital wren
teal lily
#

I have a stylized game that is semi-anime style. (see attached).
During the night I want my game to be pitch black, with the exception of areas that are lit by fire or other light sources.
Unfortunately, most of my assets use unlit shader variants, which make this task impossible by conventional methods.

Is there a simple way to achieve the desired effect, without having to convert all my shaders to lit ones?
(I am using Unity 2022 with URP)

toxic walrus
#

If you're using shader graph then this should help you add lighting into your unlit shaders

#

Alternatively you could just lerp between 2 sets of values in your shaders (day and night) that you've preset

deft fiber
jaunty mist
#

im trying to bake lights onto this big mesh but nothing works ive tried generating uv lightmap and changing lightmap scale and still nothing. i can bake lights on every other mesh exept this one. is it because of its size or some other reason

deft fiber
jaunty mist
#

i want the ground to be lighten and i know why baking didnt work becasue when i baked lights on different surfaces i could remove light game object without the baked lights disappearing

deft fiber
#

You should not move or remove lights of the baked or mixed type after baking, except if you intend to bake again

jaunty mist
#

and will changing lighting mode fix something?

deft fiber
lunar yarrow
#

Q: how can i bake rooms individually so i can also do an off and on state for my lights?

deft fiber
#

You can bake into different lighting settings assets and swap those, but that doesn't really let you have multiple toggleable lights in the same scene
Or at least not in a way that'd scale up in any practical way

#

If lights need to be toggled, they'd be realtime instead
It's also an option to use Realtime GI if you need toggleable bounce lighting as well

lunar yarrow
#

the reason im avoiding realtime is they are really buggy in some rooms thats why im trying to do a toggle with baked

upper fable
lunar yarrow
#

to my knolage, its a limitation of the lights, somethign about too amny on screen at once

deft fiber
#

Light limits can be worked around

#

Since you're running into light limits I assume you're using the forward rendering path, which caps you at 4-8 lights per object

upper fable
#

There are different render paths and other ways. Changing to something that unity doesn't support by default doesn't sound the greatest of ideas as a workaround

deft fiber
#

At least it's important to understand the problem and the options fully before committing to such changes

lunar yarrow
#

its being uploaded as a VRChat world os i have to use forward rendering as far as im aware

upper fable
#

Obviously less lights would avoid flickers and also be good for performance too

deft fiber
#

XY problem and modding environment limitations
Not my favourite

lunar yarrow
#

that i could od, ill need to re, blender the meshes

#

Spot vs point

teal lily
#

I am using Unity 2022 and URP. Since I am building a survival game that has day / night cyclies, I want the player to be able to place an arbitrary ammount of lightsources (tourches).
As I am using Forward rendering, it seems I can only place 4 point lights. (others are ignored).

Question 1: Is my only option to switch to Forward+ rendering?
Question2: Does Forward+ have any limitations? (the documentation mentions: There is no per-object limit for the number of Lights that affect GameObjects, the per-Camera limit still applies) Will I be able to place let's say 200 toches that have point lights?

Thanks!

lofty igloo
#

Out of interest, can anyone tell me if URP/HDRP offer any means of clipping point/spot lights in realtime lighting? Specifically i'm trying to deal with the classic lighting issue that lights in shaders 'generally' have no concept of occluders. So if you have two adjacent rooms, with a large range point light in one room, the other room tends to get lit as well.
I'm aware that baking or enabling realtime shadows can both address this issue, but for realtime lighting 'baking' is out, and shadow casting for point lights, especially multiple ones gets expensive very quickly.
I guess if static shadowmaps were supported that might be one option, though rather limiting, but I can't help feeling it should be possible to add clip planes to shaders for specific lights to occlude lighting. I did a quick proof-of-concept with BiRP surface shader and it seems plausible, so was wondering if Unity have implemented anything like that for the new SRP's?

toxic walrus
dense spruce
#

like too brightly white

#

i used tone mapping too

#

(ACES)

timber lichen
#

I did that

#

But i dont remember what file it was

#

Lot of ppl had problem with it. That the light was super strong at the center and otherwise weak

lofty igloo
# toxic walrus Sounds like you might be looking for light layers?

Thanks for the pointer I’ll take a look. Though it does remind me at one point I used standard layers to include/exclude geometry for specific lights, but due to layers being used by multiple systems and limited to 32, it obviously wasn’t a solution when scaled up.

versed warren
#

Hello

#

Hi, how do you get correct lighting with URP on non-static objects? I'm obliged to bake my lights but if I change the direction of my directional light, it does things... weird!
Image
Why are they all so visible at night?

#

with Realtime lighting, my objects are much too dark

deft fiber
#

@versed warren in picture 1 the environment reflection probe has the day sky
In picture 2 the environment reflection probe has no data at all

#

If you want to bake the lighting your environment reflections must match the lightness of the scene, it is simplest if the sky is both the ambient light and environment reflection source is the skybox, and then you swap to a darker skybox

versed warren
#

Okay, but then I can't use the procedural sky box? In fact, I was potentially planning a simple day-night cycle.

deft fiber
#

You can't change lighting conditions smoothly with baked lighting

#

If you use realtime lighting, you should still probably use the skybox for ambient lighting and environment reflections, but most importantly you also need to Generate Lighting
To avoid baking lightmaps while you do it, disable Baked Global Illumination

#

If you need smooth day-night cycle, you'll either have to update the ambient light and environment reflecitons manually from code, or generate Realtime Global Illumination

#

Generating Realtime GI also bakes lightmaps, but of a different sort that allows them to be lit by realtime lights

#

Realtime GI allows the scene environment reflection probe and ambient lighting probes to respond to changes in the directional light as well as the procedural sky

versed warren
#

My currently configuration :

deft fiber
#

Realtime GI's precomputed lightmaps are not necessary for that effect, but allow for realtime bounce lighting
If you do not need that, you can disable Contribute GI static from objects

versed warren
#

The shadows are terribly dark

#

I was already using realtime :/

deft fiber
# versed warren

This is how realtime lighting looks before generating lighting

versed warren
#

But I still have to generate? I thought this was done in real time.

deft fiber
#

You must generate once for each scene no matter the type of lighting

versed warren
#

after generating.

deft fiber
#

If Realtime GI is generated, it enables scene ambient light and environment reflections to adapt to changes in the skybox

versed warren
#

and when I turn the light

dusky nacelle
#

is there any tool that can be used for editing baked lightprobes?

chilly kettle
dusky nacelle
# chilly kettle What do you want to edit?

i have a baked scene with lightprobes....now i have split the scenes, so i dont need that huge lightprobe with about 500k coefficients...thats why i wanted to know if i could just cut those lightprobes to only the needed one for the split scenes

chilly kettle
dusky nacelle
chilly kettle
dusky nacelle
#

its 9000 * 9000 (int unity units)

chilly kettle
dusky nacelle
# chilly kettle 😳

its a open world project, so it had to be big....but i did a grave mistake by baking it without splitting the scenes at first

chilly kettle
#

Baking small objects increases the bake time significantly

deft fiber
dusky nacelle
deft fiber
dusky nacelle
#

actually I had pretty big lighting data asset , like 370 mb I got rid of it dividing into 64 small lighting data assets using a library , before that, it was impossible for me to divide the whole scene into smaller scenes as they only share one lighting data asset which ocntains 240 lightmap textures of total 292 mb , let alone be the scene objects, whatever I somehow have divided the scene into smaller scenes and each of them have their ownn small lighting data asset now, they load unload based on player's distance

fallen crest
#

Is there a way I can make a terrain layer "glow" or indicate itself in some way when the player is within 5 feet of it? also reacting to light would work too

deft fiber
#

Terrain layers are just textures blended together as part of the Terrain shader, there's not much practical way to modify it
Terrain shaders do react to light

soft siren
pure cobalt
#

Hello everyone, i need help with lighting in my procedural dungeon project using URP.
Currently i'm using real-time spotlights but the results aren't great (see image). Performance i also not ideal since I have many lights throughout the dungeon.
I plan to make the lights flicker / turn off, so baking isn't an option + it's procedurally generated...
The dungeon structure is based on room and corridor prefabs. In the future, meshes will be instantiated in these prefabs during runtime.

Do you have any advice/anwers to my issue? thanks in advance. 🙂

pallid gorge
#

What really is wrong about them? To me it seems pretty neat and stylish! Maybe you are talking about rough transition from more lit to less lit areas?

pure cobalt
pallid gorge
pure cobalt
deft fiber
#

Shadows will still be expensive though

#

Realtime lights in dynamic environments will lack indirect lighting, but you can approximate that a bit with an additional weaker shadowless point or spot light
With a spot it'd have a wide soft angle and face upward

pure cobalt
#

Yeah, with forward+ I got the best performances.
This a great idea I'll try that ty 🙃

dusk ginkgo
#

im in HDRP and ive increased some shadow settings but I still see these pixels... is there a way to smooth the shadows?

deft fiber
dusk ginkgo
deft fiber
#

HDRP not only has default graphics settings, it has overrides per selected quality level and also overrides from volumes in scene, if you have them

dusk ginkgo
#

I changed those

#

Player settings and lighting settings is what they are referred to

#

That's precise

deft fiber
# dusk ginkgo That's precise

It may seem that way from your perspective, but look at it from mine
If you say you changed all the relevant settings, I have no way to know if you actually did, how you changed them
If you did change everything you were meant to, what more can I suggest?

#

What exact light and shadow settings did you change, in what menu or context, what did you change in player settings, what "lighting settings" are you referring to

opaque sky
#

I would like to understand URP better. If I create a "Universal 2D" project in Unity, is it no longer possible to have any sort of real time directional light? I would still like to experiment with how the game looks, and it feels like I have to make that decision extremely early in development. My gameplay is 2D, but I still have 3d props and things I'd like to make look nice in the background. Should I just redo everything with "Universal 3D" selected?

EDIT: chat gpt says yes, which makes sense I guess.

charred folio
#

Greetings good people of the internet
I've encountered a weird problem:
After I bake the light map, these weird darker areas appearing
I am using the Unity 2021.3.0f1 - URP, default baker
.

dusk ginkgo
# deft fiber What exact light and shadow settings did you change, in what menu or context, wh...

Shadow resolution, lighting settings window for the scene I tweaked some there, I messed around with the global volume and got no good results from adding contact shadows and micro shadows and whatever. In player settings I removed everything accept for the highest quality so the game couldn't downgrade to trashy settings and the Shadow resolution in there was 2k-4k.

Thanks for your time with this, my reason for doing this is because this is a very clear edge on the shadow and I'm not even sure if unity can do better with the shadows which sucks but at this point you could write down a list of all the things you'd change to get it down and then I could run through it because honestly I have very few ideas left

deft fiber
#

Shadow resolution, lighting settings

#

The polygon reduction tool seems to have flipped your vertex normals, or otherwise messed them up in the process

deft fiber
#

Could be "recalculate normals"

azure lagoon
#

https://i.imgur.com/vP7Q8e4.png
Anyone some ideas how to get some nice lighting on these platforms? Usually I'd just throw on some scene lighting and call it, but I'd like to have something a bit more lively. In this case I've some lava flowing under it, but that's all unlit and rendered on another camera, but I guess what I'm trying to aim for is having these platforms illuminate and scatter similar to how the lava is flowing.

#

I was thinking like spinning around directional/spot lights but wasn't looking that great

deft fiber
#

Shaders could help, you could multiply the base texture with an height blended orange while accounting for normals to get an emission texture that simulates light, and could be animated too
If you want to be fancy about it instead of emission you could implement the lava glow into the lighting calculations in a custom lit shader

azure lagoon
#

Emissions does sound like probably the better idea, but I'm looking for like a directional light such that I can just apply a gradient to that too if that's possible as I'm not seeing it

deft fiber
azure lagoon
#

"A scene lighting would be simplest, as in gradient mode you can have an orange glow from below"
What's this gradient mode you're refering to? The directional light component is fairly limited for what it has directly on it

#

I can probably do emissions using the y as a reference which probably will deal with the bottom of the platforms, so really it's just the top that needs something a bit more I'm feeling

deft fiber
azure lagoon
#

Do my own fake lighting

deft fiber
misty olive
#

hey so - I imported the blender monkey and it's completely flat without any shadows, is this normal? I would like to see shadows being cast

#

using URP

deft fiber
# misty olive

This is usually how it looks like when trying to use 3D meshes and materials with the URP 2D Renderer

misty olive
#

oh I see

lucid laurel
#

Hello, i'm pretty new to unity, but I'm currently using many lights (for a DMX project) and I can't go further than ~80 lights at the same time. if I put 50 lights no problems, but if I add more lights, at one point it start to disable some light randomly. i'm using HDRP on a 2021 version.
I tried to change the "Maximum Punctal On Screen" in project setting but if I go over (around 80) it changes nothing.
any idea ? Thanks.

deft fiber
#

Emissive materials or glowing particles

lucid laurel
#

DMX to simplify, is what control lights in concert, and in reality you can control thousands of lights, I have a lib on unity to communicate in the same protocol, and I need to simulate it in unity. (I have a full R-G-B-pan-position control on it)
it is not possible to just change the maximum of light ? what cause this limit ?

lucid laurel
deft fiber
#

Particularly if all they end up appearing as are just glowing dots anyway

#

Lights are designed to illuminate light receiving surfaces, so just a brightly emissive surface or a particle is much much simpler

lucid laurel
#

ok ! big thanks for the responses ! I will see if I can change it.

dusky nacelle
#

one of my lighting data asset is around 390 mb...but it is taking about twice as much as its size in ram...i can't figure out why...any clue? the red one is set in my scene baked lightmap field and the green one(the parent is sized 392mb)...don't know what the 2nd child is, but cleared all lightprobes, lightmaps in it....

the lightprobe should be 370mb and lightmap around 9mb...the memory profiler shows one lightprobe of 370 mb..but doesn't show what is eating rest 370mb....again this only happens when i use this lighting data asset

deft fiber
arctic cape
#

anyone know a way i can make this fake volumetric lights fade out

#

my reference was this

#

where the light just slowly kinda fades out

neon pebble
#

my scene is very dark after baking lightmaps

#

tried so many things

deft fiber
#

If they are, you can map an alpha gradient texture onto it like with any mesh

misty olive
#

is it possible to get emissivity from blender into a shader in unity?

#

setting emission on the material here and then exporting to fbx

#

i just want something like a shader that outputs a white pixel for emissive parts of the scene and black for not emissive

deft fiber
misty olive
#

also I'm not super sure what you mean by using a texture in the emissive field

#

what im trying to do is make some downscaled animation atlas textures from the 3d model

#

and I also want an emissive texture too

#

I made a script and scene that handles this

deft fiber
misty olive
#

Yeah I’m making the texture in Unity and I’m using 2D renderer

misty olive
hazy wolf
#

Is it possible to pass lightmap data to meshes rendered through Graphics.DrawMeshInstanced?

deft fiber
dawn cape
#

anyone here know how to light a large scene like this without killing the performanc?

winged forge
dawn cape
winged forge
dawn cape
winged forge
dawn cape
pallid bear
#

Anybody know what might be the reason why my character looks very bright and shiny after these custom render passes?

#

no, it's not related to the deferred error, cause it looks the same when I change the render method to forward

misty olive
# deft fiber You'd have to explain the situation clearly Earlier I saw you talking about rend...

I wanted to try a way to make faux pixel art graphics by using a 3d model with an animation in blender and turning it into 2d atlas textures.

  • I have a scene with a camera and a script that samples the animation and renders it to a diffuse texture, normal map texture, and (currently trying to get this to work) an emissive texture.
  • In order to get the different textures, I have three different Renderer 2Ds, one for diffuse, one for normals, and one for emissive. You can see in the screenshot that there's a Render View dropdown in the inspector that lets me preview each renderer. In my script it swaps renderers for the camera before writing to each atlas's pixels.

so basically I was trying to do something sketchy with a shader for a render feature for my emissive renderer that turns the scene into something I could render as an emissive texture. I know this is probably stupid but I hadn't figured out something better yet.

#

hope this makes sense

deft fiber
#

I used pixel perfect camera component's upscale feature to pixelate the render, then have 3D meshes that use a custom sprite shader for interacting with 2D lighting
Got normals and emission and whatever needed

#

Assuming you want 2D lighting

#

Not that many other reasons to use the 2D renderer

misty olive
#

yeah I would like 2d lighting

#

custom sprite shader?

#

so you mean you don't turn it into a texture at all but just pixelate your 3d mesh at runtime

deft fiber
#

If it's fine to pixelate the whole screen such as with pixel perfect component, that'd be the best option

misty olive
#

I wanted the flexibility to edit my pixel art too

deft fiber
#

"edit"?

misty olive
#

yeah like in paint or something haha

#

in case i wanted to tweak it

solid star
#

any asset i download and put into unity looks odd when i bake the lighting and turn on global illumination. is this a blender issue or a unity issue

deft fiber
solid star
deft fiber
#

I don't recommend starting with both because they're entirely different systems with their own process and quirks

solid star
deft fiber
# solid star

That's not related to global illumination calculations, so it's extra important you look up what GI systems in Unity do and how to use them

solid star
#

there arent even any light sources on this building

deft fiber
solid star
#

it worked very well for this guy so i dont understand what more there is to do?? i watched this tutorial also and he did the same stuff https://youtu.be/KJ4fl-KBDR8?si=_xdOSz7FPN67vBis my scene looks nothing like either of theirs

In this video, we are going to take a look at Lightmapping in Unity 2020.1 to help you create fast and beautiful lighting in your scene.

Learn more about Lightmapping in 2020.1 from our Docs!
https://on.unity.com/2U7VQIX

Interested in the newest Graphics Features we added in 2020.1? Click here!
https://on.unity.com/2GHYGkR

Download the Spaces...

▶ Play video
deft fiber
solid star
#

what step did i miss then

deft fiber
#

Lightmap UVs

solid star
# deft fiber Lightmap UVs

i tried generating uv maps in unity but it doesnt work and in blender i cant find smart uv project to unwrap it

deft fiber
solid star
#

just frozen

deft fiber
solid star
#

i ended up just closing unity because it was frozen

deft fiber
#

I'd look into fixing that rather than going through the trouble of making custom lightmap UVs

#

But nonetheless the docs have instructions for that process as well

solid star
#

do i click swap uvs also or is that it

deft fiber
solid star
#

with lighting off it looks like this too

deft fiber
#

(or caused by custom shaders in the scene other than the sky)

solid star
#

the skybox is just a texture no special shader is applied

#

the walls are the defualt shader when first imported

#

no texture on them either

deft fiber
#

I would try to do a process of elimination, so bake lighting in a new scene with default everything, including meshes and sky, then introduce parts of your scene into that test scene and bake and repeat until it resembles your main scene and usually you catch the thing that's causing it

#

Could also restart the editor in case it's random weirdness related to that

solid star
#

its the skybox somehow

#

the skybox is very dark so idk why this would cause it

#

this is a new skybox but it looks odd inside

deft fiber
solid star
#

and what about this skybox? its just different textures so im confused

deft fiber
solid star
#

its just the standard unity skybox shader :/

deft fiber
#

Unity should have multiple skybox shaders that do more or less the same thing, so you're not out of options

#

It's also possible that just tweaking the values (or again restarting the editor if you didn't already) might fix it
Since it's not a thing that's expected to happen

solid star
#

this has to be on 0 or it will show those bright lights

#

i hope i dont need it

livid marsh
deft fiber
chilly kettle
deft fiber
#

That, and how did the issue come up whichever it is

misty olive
#

I realized that I totally didn't account for emission when the emissive pixels have rotated out of view... @deft fiber since bloom is a post processing effect, there isn't a way to have a "backlit" light?

deft fiber
misty olive
#

so many of the frames the eyes which are emissive are not visible

deft fiber
#

Naturally

#

If they are occluded, they wold not be drawn
Which is what you usually want

misty olive
#

if the bloom is intense then you'd expect it to "spill out" i guess

#

🤔 I need to make my toon shader

deft fiber
misty olive
#

oh no I meant like if it were a real object in real life

deft fiber
#

you could add some glow particles or light shafts before baking
Then you'd have to deal with the complexities of baking transparent blending into an alpha texture
Which is a whole can of worms

misty olive
#

I think I can get away with a smaller bloom 💀

livid marsh
misty olive
#

URP has a single main directional light?

#

per scene

low copper
#

Hello, I'm new to Unity lighting. Does anyone know how to fix this? If so, do help out, that would be appreciated.

neon pebble
low copper
neon pebble
#

go to the lighting window and change envoirement to color instead skybox

#

there are a few more ways to make it lighter

dawn pawn
#

And in Unity 6 you might have to bake lighting if its set to skybox

jaunty niche
#

pretty new to lighting, how can i prevent this noisy lighting?

vivid sleet
#

what is happening here? I need help.

loud gazelle
#

I have 3 scenes, Scene A Scene B and Scene Elevator.
The player starts in A and the Elevator is loaded additivly. Entering the Elevator unloads Scene A and loads Scene B
For what ever reason, when that happens, the lighting inside the Elevator changes

#

Inside Elevator when Scene A is loaded

#

Inside Elevator when Scene B is loaded

#

as you can see, it is much darker and a slight shift in the colors

scarlet geyser
jaunty niche
waxen crow
#

Can anyone send me low setting lightmap baking settings for fast baking cuz my light maps are bad and there's a lot of random black areas for no reason and this project is using URP. thanks : )

waxen crow
#

The project is in unity 2022

formal veldt
#

is it possible to get baked global illumination to respect normalmaps on materials

#

I think I am on URP

scarlet geyser
azure lagoon
#

https://i.imgur.com/owz8V39.png
Question on baking lighting, so here I remove the light map I just baked and it removed some of the lighting, but now the geometry still has some lingering light effect which I'm not sure where it's being saved.

deft fiber
azure lagoon
#

Ah, alright makes sense ty

thorny goblet
#

How could i fix this banding, this is realtime lighting on URP

languid blaze
#

Do you have dynamic resolution enabled? I forget if that's even a thing in URP

#

It was causing noticeably more color banding in my HDRP game (even at 100% scale)

thorny goblet
#

I know what your talking about, but i forgot where to look.

languid blaze
#

Your camera settings will have an "Allow dynamic resolution" checkbox

#

ah, I see -- it's possible in all render pipelines; it's just that HDRP has its own ~special~ flavor

thorny goblet
languid blaze
#

Okay; it looks way too strong to be that anyway

#

Does it persist when you disable post-processing?

#

you do turn it off in the scene view with that toggle on the right

thorny goblet
#

Yes

languid blaze
#

Does it stay the same if you switch quality presets?

#

project settings -> quality

#

then click on different options

#

whichever one is highlighted is the one that Unity is currently using

#

(you may see different names; this is an HDRP project)

thorny goblet
#

Okay give me a second, i was trying to bake my scene to see if that makes a difference but i'm going to stop it.

languid blaze
#

This shouldn't depend on baked GI at all, yeah

thorny goblet
#

The banding is still there, but the scene is darker, so that may be why.

#

@languid blaze

languid blaze
#

Oh yeah, you've kind of reached a limit there

#

One band is [14,14,14]; the next is [15,15,15], etc.

#

Previously, the bands were 2 or 3 values apart

#

I'm guessing that you switched to a higher quality setting?

thorny goblet
#

Actually lower, The previous preset is a high asset that i customized heavily.

languid blaze
#

Ah, I see.

#

Perhaps your tonemapping is particularly aggressive?

#

URP does HDR rendering, then squishes that wide-gamut color back into something that fits on your monitor

#

But that's part of post-processing, so it should've changed when you turned it off in the scene view

#

Perhaps you can share your URP assets?

#

There should be a "URP renderer" asset for each quality level, plus a global settings asset

thorny goblet
#

Do you want the "heavily customized" asset that i use mainly?

languid blaze
#

It might be useful to see how it differs from the other assets, yeah

#

One thing that comes to mind is the color buffer format

#

again, HDRP, but it'd look like this

#

let me pull up a URP project..

languid blaze
#

I'm suspicious of the Low Dynamic Range setting here

#

this is on the main pipeline asset

#

not on the renderer

thorny goblet
#

I tried changing it and all it does is make my scene a tad lighter.

languid blaze
#

what version of unity are you using? i should be able to plug these in to see the issue for myself

#

(the only URP project I have handy is a 2D game that's missing a renderer feature, so I'll need to make a new project anyway)

thorny goblet
#

Unity 6000.0.23f1

languid blaze
#

24f1 is close enough 😉

#

What's this last renderer feature? I'm missing it.

#

This is on the renderer asset

thorny goblet
#

Its a custom render feature from github name limSSR

#

its screen space reflection for URP

languid blaze
#

I don't see any obvious problems when I switch to your High_PipelineAsset asset. It matches the default PC quality level (the new template just has "Mobile" and "PC")

thorny goblet
#

Also i notice that it mostly happens on my floor, other objects have a little bit of banding but not nearly as much as the floor does. I dont know if that helps.

languid blaze
#

Does toggling that SSR renderer feature do anything?

#

I'm installing it right now

#

nothing happens as far as I can tell

#

I'm looking at a single point light in a pitch-black scene with a single plane in it

thorny goblet
#

No nothing changes.

languid blaze
thorny goblet
#

I see a little banding, its not showing it for you?

#

If so it could be my monitor

languid blaze
#

It's there, but it's the minimum banding possible without throwing in something like dithering

thorny goblet
#

Oh, Ok.

languid blaze
#

Each band is exactly one value apart

thorny goblet
#

Should i try doing the same thing as you and seeing if it changes?

languid blaze
languid blaze
thorny goblet
#

Could it be how far my light is?

languid blaze
#

Notice how the first image's bands just .. overlap

#

The second's look more like a contour map

thorny goblet
#

True

languid blaze
#

which is what I would expect

thorny goblet
#

Wait, i found something.

#

Changing my floor to be a Transparent surface type, makes it look alot less noticeable.

#

Well, kinda, its still bad towards the darker areas

languid blaze
#

Are the two lights blending "correctly" now, though?

languid blaze
thorny goblet
languid blaze
#

I see no changes at all when switching between Opaque and Transparent (with a Standard shader)

#

Does it go back to the plain overlap when you put the floor back on opaque?

thorny goblet
#

Oh never mind, it looks the same now, doesn't change when i switch either.

languid blaze
#

ah, okay

#

Do you have a Volume in the scene? I'll want to see its Volume Profile asset if so

thorny goblet
#

I have many, but i do have one that is actually for tonemapping and changing scene colors.

languid blaze
#

hm, nothing obvious there, either. I can't recreate the bad banding you're seeing

#

One thing -- there are quality settings that aren't part of the asset

thorny goblet
#

should i try building my game, and seeing if it changes?

languid blaze
#

there isn't a lot in here, though

#

It could also be an interaction with something in the global settings asset

thorny goblet
#

Is there a way i can fade this, or blur the shadow banding?

#

If not, its fine, i can eventually figure this out.

#

Also i notice that the banding is not the shadows from the light, it seems like regardless of the light, there is still banding.

winter moth
#

I am really trying hard to figure out how to stop an indoor part of a scene from receiving reflections from the skybox (imagine a deep cave with twists and turns, it would receive no light). I've set up an enclosed cube (with walls, no light leaks) and fiddled with every possible combination of reflection probe settings that i can imagine, and not matter what I do I cannot get the inside of this box completely dark with environment reflections on.

winter moth
zenith pond
#

Hi I'm on Unity 6, my objects that dont move are set to static. When i bake there's not really shadows like in other versions. in fact i dont see any shadows. Am i doing something wrong? I have Spotlights set to Mixed. I have the same Render/Lighting settings that i used in 2021 and 2022( and that work in those versions). I'm using URP

#

Also a weird thing i noticed is I originally had 3 Directional lights and it said Baking 3 lightmaps. I removed those lights put 8 Spotlights and it still says baking 3 lightmaps. Aren't the amount of lightmaps supposed to match the lights you have. Where are those 3 still coming from? I have 8 lights now

lyric valve
#

Hi I am making with hdrp

#

But have some issues with light

#

I want to make night scene lighting

#

But it is not good looking

#

The light is passing thought walls

zenith pond
#

Yeah that happens.

lyric valve
#

Can someone give me a tutorial link about that

#

Night lighting scene tutorial

#

Btw I want to use realtime light

zenith pond
#

The only thing i could do about that is use Volumes. HDRP is hard to understand for me

lyric valve
#

And I want to make scene same like "From the Darkness by N4BA"

#

I am using sky and fog volume

#

But not working good

#

I also use the physical skybox in hdrp

#

But how to change the skybox in physical skybox

winter moth
#

cubix do your walls cast shadows?

zenith pond
#

boyd thanks but is that related to Unity 6, because Unity 6 may have changed stuff. I even read some thread from unity forums people talking about having problems with baking

scarlet geyser
#

I have a problem where the debug lighting visualization is not working. It doesn't show anything. Unity 6000.026f1, URP, Android

deft fiber
scarlet geyser
deft fiber
#

And you have baked it in the current editor session?

deft fiber
# scarlet geyser wym Both?

Your scene uses baked lightmapping, and the scene view debug mode is set for baked lightmaps rather than one of the others

#

Just to make sure we're not looking at / trying to look at something like realtime GI lightmaps instead

devout tapir
#

How does unity interpret light intensity in a gltf file?

#

for example if I have:

  • point light in Blender with power 10W
  • exporting that as glTF will convert it to intensity = 543.514...
  • importing to Unity, the point light's intensity is 173?
thorny goblet
#

@languid blaze Sorry to ping you, but i found the fix to the banding issue. You mentioned the color buffer precision yesterday, so i finally found that setting and changed it to 64 bit, then enabled hdr rendering, and now the banding is gone. Thanks.

languid blaze
#

nice! where was that setting?

thorny goblet
languid blaze
#

The default PC asset has it set to 32-bit, but with HDR rendering enabled

#

I think the latter was your problem

#

but it's enabled in the asset you sent, so that's weird

deft fiber
languid blaze
#

Were you seeing this warning on the Tonemapping setting previously?

thorny goblet
#

It wasn't on

languid blaze
#

Ah, on the camera itself

azure lagoon
#

https://i.imgur.com/NAAl3bE.png
Question of some shadowing from directional lighting. So here we have some shadowing from the scene lighting, but if I move a little back with the camera here, it fades out completely. Now, I was wondering if it's possible to keep this shadowing from a further distance, or is that just not really recommended? I know if you bake the lighting, you can keep this shadowing here which does show from any distance.

#

Even playing around with a lot of the shadowing settings, I can't seem to really increase the distance of this using real-time

vocal badge
#

when i move around in editor my lights flicker?

winter moth
#

is it possible to prevent skybox environment lighting from affecting enclosed indoor spaces that are not marked as static?

vocal badge
scarlet geyser
#

I'm trying to bake the APV lighting scenarios and when I bake the second scenario, it tells me this. Unity 6

languid blaze
#

Both URP and HDRP have settings for how far out shadows are rendered (and I presume the built in system does, too)

azure lagoon
#

Using URP, but even with messing around with the pipeline settings, the lighting settings, and the lighting source there seems to quite a limitation for how far these shadows will remain from the camera

#

Furthermore, scaling objects seem to displace or not even show the shadow most of the time

lunar yarrow
#

Q: i swap the skybox in my map between rooms, how can i bake it with each skybox?

lyric valve
#

Hey everyone! Can someone help to improve my scene quality.

#

This is my scene in HDRP

#

My lighting temperature is 6000. And intensity is 100 by range 10

#

Also my lights are realtime and realtime baked

scarlet geyser
lyric valve
#

But I need help about lighting

#

I want lighting same like this.

languid cove
#

That light shaft is darn suspicious ...
How did you place the light ? At the physical position of the lamp light bulb ?

#

The shadow of the table is way to sharp, you can increase the ceiling light radius and enable soft shadows to smooth it.
You could also try to use 4 point lights to mimic the model, instead of a single one. It will cost more performances though.

lyric valve
lyric valve
#

But I need video tutorial.

#

That video tutorial make same scene. Form 0 to end with lighting

#

Do you know some like that

languid cove
#

No, I don't have one handy like that for interior lighting.

lyric valve
#

Okay thanks

lyric valve
supple ruin
#

Oops looking at wrong version. Guess BuiltIn doesn't

#

Was there any version of Unity that did? For some reason I thought so but maybe I'm wrong

midnight sorrel
#

URP

Description:
Cannot bake APV. Getting an error ArgumentException: Kernel ‘MainRayGenShader’ not found.

Error:

ArgumentException: Kernel 'MainRayGenShader' not found.
UnityEngine.ComputeShader.FindKernel (System.String name) (at <0900e0d4bb644dafbfd59eb7fd222a68>:0)
UnityEngine.Rendering.UnifiedRayTracing.ComputeRayTracingShader..ctor (UnityEngine.ComputeShader shader, System.String dispatchFuncName, UnityEngine.GraphicsBuffer dispatchBuffer) (at ./Library/PackageCache/com.unity.rendering.light-transport/Runtime/UnifiedRayTracing/Compute/ComputeRayTracingShader.cs:22)
UnityEngine.Rendering.UnifiedRayTracing.ComputeRayTracingBackend.CreateRayTracingShader (UnityEngine.Object shader, System.String kernelName, UnityEngine.GraphicsBuffer dispatchBuffer) (at ./Library/PackageCache/com.unity.rendering.light-transport/Runtime/UnifiedRayTracing/Compute/ComputeRayTracingBackend.cs:13)
UnityEngine.Rendering.UnifiedRayTracing.RayTracingContext.CreateRayTracingShader (UnityEngine.Object shader) (at ./Library/PackageCache/com.unity.rendering.light-transport/Runtime/UnifiedRayTracing/RayTracingContext.cs:51)
UnityEngine.Rendering.AdaptiveProbeVolumes+APVRTContext.get_shaderVO () (at ./Library/PackageCache/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.LightTransport.cs:662)
UnityEngine.Rendering.AdaptiveProbeVolumes+DefaultVirtualOffset.Initialize (UnityEngine.Rendering.ProbeVolumeBakingSet bakingSet, Unity.Collections.NativeArray`1[T] probePositions) (at ./Library/PackageCache/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.VirtualOffset.cs:116)
UnityEngine.Rendering.AdaptiveProbeVolumes+BakeData.Init (UnityEngine.Rendering.ProbeVolumeBakingSet bakingSet, Unity.Collections.NativeList`1[T] probePositions, System.Collections.Generic.List`1[T] requests) (at ./Library/PackageCache/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.cs:472)
UnityEngine.Rendering.AdaptiveProbeVolumes.PrepareBaking () (at ./Library/PackageCache/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.cs:934)
UnityEngine.Rendering.AdaptiveProbeVolumes.OnBakeStarted () (at ./Library/PackageCache/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.cs:893)
UnityEditor.Lightmapping.Internal_CallBakeStartedFunctions () (at <20f98a04ac634cc8bf5f95425bb19bb9>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
nimble cradle
unique tundra
manic osprey
#

Is there a way to change lighting modes at runtime similar to rendering wireframe or flat lighting in the editor?

night shell
#

if it was mixed you might have more leeyway since it has both a baked and a realtime component

#

but that doesn't really change the fact that when you swap a light from mixed/baked the underlying baked lighting data will no longer match up

manic osprey
#

Hmmm, so there isn't really way to wipe out all shadows and get just flat lighting like the unshaded look in the editor, but in runtime

night shell
#

at runtime no

#

whats the goal? @manic osprey

#

I don't really see a reason why you'd want to flip flop between different lighting styles

#

so not sure what you are shooting for

manic osprey
#

I have a community member who wants to render out flat images of screenshots from the game I've been developing. Their trying to work on fan art without completely recreating the graphics from scratch.

night shell
#

flat unshaded, what do you mean exactly since there are different "terms" that could mean that

#

do you mean as in flat with no baked lighting info?

#

or flat as in looking only at material color buffer

night shell
#

at runtime

#

as for how you achieve it, it depends on your game and the rendering setup

#

if your game is using a deferred renderer you get access to this easily by default and its fairly easy to show directly to the screen

#

with forward, its more complicated but doable

#

the technical terms you are looking for is that you want to give this user access to see the raw "albedo" buffer of your scene

#

at runtime

#

does that help? @manic osprey

#

wasn't too sure what you were going for in the beginning but if you just want to show the user the raw albedo buffer of your scene at runtime (i.e. the flat unshaded version basically) yes it's very possible

#

how you go about it depends on your game rendering setup

#

but there shouldn't be any need to go in and disable lights or anything crazy like that

manic osprey
#

I'm using the HDRP with a deferred setup

night shell
#

ahhh then its easy peasy with deffered

#

I don't know the specifics of HDRP but in terms of general concept, all you need to do really is get the "Albedo Buffer" of the scene, and draw it to the screen

manic osprey
#

I think I can figure it out from there. Thank you!

night shell
#

you shouldn't need to render out a fresh or custom "albedo" version, in a deffered renderer the albedo buffer (as well as other buffers like normals) should be easily accessible and ready to use

#

since in a deffered setup those buffers are shared and used across various effects

manic osprey
#

Gotchya. I may need to think about setting up a hotkey for them to use then. It might be a bit difficult trying to fly with out the depth that shadows afford.

south dragon
#

are baked lights supposed to look worse than mixed or real time lights? it looks so much worse when baked instead of mixed, how do i fix that? is there a certain setting i need to change?

languid blaze
#

A big thing you lose are specular reflections

#

see our discussion up here where I grumbled about the same problem

south dragon
#

well I mean mixed looks sharper

languid blaze
#

A mixed light is still realtime for direct lighting

#

it just has baked indirect lighting (so, light that bounces off of surfaces)

south dragon
#

mixed vs baked

languid blaze
#

oh, okay, so this is more of a problem of "there is no light anymore"

south dragon
languid blaze
#

well, you don't, unless your lightmaps are super high-resolution

south dragon
#

ah

languid blaze
south dragon
languid blaze
#

right, and I don't see any lighting in that scene

#

that looks flatly lit

south dragon
#

well no if I turned off the lights then it wouldn't be that color

#

here's a better comparison

languid blaze
#

okay, I see there's a little light there

south dragon
#

yeah

languid blaze
#

Try baking light with the lightpost renderer disabled

#

so that it's just a light floating in space

south dragon
#

alright I'll try that when I get home

languid blaze
#

Also, make sure that "Static" is checked on the game objects for these renderers

#

notably the rocks

south dragon
languid blaze
#

You need to have the "Contribute GI" flag enabled, and then "Receive Global Illumination" needs to be set to Baked Lightmap.

This will happen automatically if you just check the static box

languid blaze
#

If "static" is unchecked, that means the "Contribute GI" flag is off. This means that the object only receives realtime light

#

(plus light probes)

#

You will need to go in and place light probes so that dynamic objects (e.g. the player) are lit properly, but that can come later

south dragon
#

what are light probes?

languid blaze
#

Light probes measure the intensity, color, and direction of light at a point in space

south dragon
#

ahh cool cool

#

would I just need one or multiple in different areas?

night shell
#

multiple

languid blaze
#

You will want to read up on them -- and lighting in general

south dragon
#

gotcha

wary aspen
#

Hi can someone help me with this please,, i exported object with no material from blender to unity. But in unity it acts like a lamp lol. It brightens up the room i want the object to be in. How do i make it stop?

upper fable
feral knoll
#

So apparently Unity (2D URP) doesn't render normal map of object under the transparent sprite, does anyone know fix for this?

formal veldt
#

the material is the URP/Lit shader

#

and I have the normal map in surface inputs and detail inputs (not sure what the difference is)

#

the effect is visible with realtime lights but not the baked lights

south dragon
#

how do i prevent my lighting from looking like this?

#

i set the building to static and it looks really bad

languid blaze
#

It might not have good lightmap UVs

#

Since you turned on the "Contribute GI" static flag, it's probably now set to receive global illumination via a baked lightmap instead of light probes

#

You can look at the lightmaps by switching the scene view to the "UV Charts" mode.

#

Also click on the object and look at its MeshRenderer. There may be a warning about overlapping UVs

unique yarrow
#

ive got nothing but a reflection probe and no light sauce but my corners for my room are lit up? they are the only corners that are at an angle too

scarlet geyser
unique yarrow
#

im not sure how to light up my scene. i havea reflection probe but when i use lights it never seems to light anything up unless i crank up the lumen to max and multiply it, even then its only brightly lights a snall area and wont spread across the room

night shell
#

your exposure setting on the camera is likely pretty high

#

hence why you need to jack up the light intensity to be very bright just to show up

#

so you need to lower the exposure setting on your camera

languid blaze
#

Oh, did you leave the override exposure thing checked?

#

We were messing with that earlier

#

Do keep in mind, though, that a single point light will not evenly light a room. The areas close to the light will be way, way brighter than the areas far from it

#

The HDRP uses physically accurate lighting.

unique yarrow
#

yeh that was the issue i compleatly forgot to disable that

scarlet geyser
scarlet marsh
#

anyone know how to fix this?

dawn pawn
#

Always explain your issue @scarlet marsh

scarlet marsh
#

light

#

bug

#

line

#

seen in picture xD

crude lintel
scarlet marsh
#

its fine now i found a better way to do the flash light sorry for creating issues

#

idk whats causing it xD

crude lintel
# scarlet marsh idk whats causing it xD

Well, you at least know that it was flashlight. It was not clear from the screenshot whether it's related to the flashlight or something else. Next time, make sure to provide this kind of details. Don't assume that we know what you know about your project.

brisk furnace
#

Is it possible to create a seperate shadowcasting pass for a specific material, that respects a stencil pass? I got the sprite to correctly render if it passes the stencil test/comp, but it is still considered when creating shadows, ruining the effect (enemies with that material are supposed to be visible only within the FOV space). I did the sprite dissappearing by adding the stencil test to the entire subshader, but i think shadow generation ignores it? is there a way i could override it or seperate it for specific materials?

#

its unity 6 LTS, URP 2D btw.

languid blaze
#

I presume this is a spotlight with a cookie attached

#

A bad cookie causes weird artifacts -- you wind up seeing a 180 degree spotlight!

#

which has infinite horizontal range

wintry obsidian
scarlet marsh
livid cloud
#

Hi all, looking for some help. I'm using this script to create flickering lights but they don't turn all the way off (just dim and brighten). How could I change this so that it looks like a flickering street lamp? I'm using 2d URP

dawn pawn
#

Then it also doesnt consume any computation for lighting when its off

languid blaze
#

Perlin noise is way too smooth for this

#

using a threshold would help a lot

wet hare
#

Hi, does anyone know how to solve this issue or if there is an asset which I could buy to solve this issue? I tried anti-aliasing, both deferred and forward+, native rendering but none of them works. (Issue: pixel noise seems to appear when I enable reflection probe, it disappears when i disable reflection probe / delete a few lights / move around at a certain angle but it re-appears at another angle. I'm using HDRP unity version 2022.3.30f1, intel, MacOS). Thanks so much in advance ^-^

wet hare