#archived-lighting

1 messages · Page 21 of 1

arctic isle
#

the meshes need to be static and the lights baked or mixed but I think that's already the case

iron vine
#

Thats correct

#

i will check the generate lightmaps uvs

#

hold on...

#

i think im onto something

#

hmmm...

#

to weird for words

arctic isle
#

can you go to the scene view

iron vine
#

yes

south sage
#

hi, need some help with baking light. I'm trying to bake light for a large level, and for objects that are very far away from the world origin (over 2000 units away), the baked light has very weird artifacts and doesn't look right at all. If I move them closer to the world origin it will bake perfectly. Any way to make light bake properly for far away objects?

arctic isle
south sage
#

i tested it in an empty scene, first pic the object is at around X -1000 , second pic the object is at over X -2000

#

the same happens in the actual level

arctic isle
#

interesting, can you show a side-by-side of the baked lightmap debug view?

#

I have a feeling that what's changing is the realtime light (?)

#

if that's mixed

south sage
arctic isle
#

welp ok that makes it clearer 😅
can you file a !bug

tawdry schoonerBOT
#

🪲 To make bug reporting as quickly as possible, we made a bug reporting application for you. When running Unity choose Help->Report a Bug in the menu, or you can access it directly through the executable in the directory where Unity is installed. It will also launch automatically if you experience a crash.

📝 If your bug report is to do with Documentation, either an error, typo, or omission, you can report it by scrolling to the bottom of the page where you found the issue and click ‘Report a problem on this page’!

💡If your report is to do with a new feature idea, you can check the Unity Product Roadmaps page to see if your idea has already been planned.

For more complete instructions on how to report bugs, access: https://unity3d.com/unity/qa/bug-reporting

south sage
#

ok will do

#

so anyway to work around this?

arctic isle
#

not that I know of right now, only to bake the scenes individually and load them in tiles. it suprises me that this happens with x -2000 though, it seems like a relatively low value UnityChanThink

south sage
#

ah ok, thanks anyway UnityChanThumbsUp

arctic isle
#

you'll need to make your own asset and increase the pushoff value to something higher, maybe 0.1? this maybe is floating point errors

south sage
#

OH THAT WORKED

arctic isle
south sage
#

ok

#

thanks so much UnityChanCelebrate

ornate axle
#

Thank you. I’ll check this out

distant yew
#

I have a problem with unity lighting...

#

(using baked lights)

#

its been a long time since ive had to light stuff... but still, this is what it feels like

#

I have a reflection probe, I have a box that includes the whole scene, everything is static, everything has lightmap UV's, the bounces is set to 5, everything should be correct... but still its like... the above image.

deft fiber
# distant yew

In my experience baked lighting is specifically the opposite of that since it uses real world accurate inverse square falloff, plus the extra smoothness you get from bounce lighting

#

Which is probably the same technique Unreal uses as well

#

Just ensure that light range is not too low, especially if using mixed lights

#

In URP and HDRP realtime lights also use inverse square falloff, though in BiRP they use linear falloff

distant yew
#

and im talking unreal 3, not unreal 4 or 5, but if they are anything like 3 the falloff value is exposed so using the inverse square law is optional.

deft fiber
#

You also need to be using linear color space and HDR tonemapping for lights not to blow out

#

You generally should never need that high of a range, and only HDRP uses that high intensities because it uses real world light intensity units

distant yew
#

ill look into it

#

I work for a studio, albeit a small one without many experts in 3d yet, so there are certain questions I can't answer 😛

frozen palm
#

Hi Ive been having an issue

#

where I use an HDRI reflection probe

#

and it relfects onto this smooth texture I have for the phone screen

#

I dont want these reflections

#

my suspicion is that it is reflecing the curtains

#

which is the map used how can I get around this so it doesn't reflect the map as well

lethal heron
# frozen palm I dont want these reflections

what is your material? in hdrp or urp? try making the material non-metallic to remove the reflection completely. you can also reduce smoothness to make the reflection more diffuse

frozen palm
#

yes it was HDRP i just changed the map on the reflection probe and it worked

#

so lol wasnt too bad

#

this site was pretty good

opaque ice
#

baked lightings are too much brighter than realtime . how to fix it
NOTE - I am using gamma colorspace and Standard Render Pipeline

opaque ice
#

this is the realtime lighted one

#

can anyone also pls share resources , how to properly light an interior of horror game , like which lights to setup and where .

deft fiber
#

Note that there is no "standard render pipeline"
You probably mean "built-in render pipeline"
All three render pipelines are equally "standard" at this point, and the word is not used to avoid confusion with the term "scriptable render pipeline" or SRP

deft fiber
violet furnace
#

Hello, I am kinda at loss here, I don't know why the lightning has this green hue (pic1)

The crate FBX looks like in pic 2 in blender.

Can anyone help me point to what i'm doing wrong? Pic3 is directional light settings

deft fiber
violet furnace
#

Huge thanks

errant plank
#

Can anyone help me? When I bake my lighting, my lighting isn’t showing

gloomy marten
#

Hi, i make a 3d character and the area that uv split on the head look like this. Any clue how to solve this problem ?

deft fiber
#

But it could be also just an incorrectly produced normal map, or in wrong format (GL vs DX)
Or the mesh normals could be wrong
I'd test without a normal and with different normal maps

tired inlet
#

So I'm checking out if integrating raytraced shadows is an option for my project to achieve higher fidelity shadows for high end users (as shadow filtering is broken as fuck right now)

#

But I'm running in to the issue where raytraced shadows will only shadow one object, and completely ignore the rest

#

When I then duplicate one of the ignored objects it will start shadowing that one, but not the one it did previously

#

All objects have the same shadow casting settings, and the maximum screen space shadows has been adjusted to a super high count to see if that would work

deft fiber
tired inlet
deft fiber
tired inlet
#

Yeah, all good

#

Thanks anyway

balmy wasp
#

Hi,
I've been trying to bake the light in my scene on Unity URP for several times now. Every time, no matter what I modify, I get huge black squares on my models and the light doesn't bake well.
I use my GPU to bake the lights. After some research, I understand that it doesn't always give the best results, but I'd be surprised if it did. The problem is that with the CPU it takes too long (a day).
Thanks!

balmy wasp
opaque ice
deft fiber
#

You can decrease samples and particularly resolution for a big reduction in bake time
And disable objects for test bakes

#

I see on the outside of the building what also looks like UV overlap

balmy wasp
quartz lily
#

The street lights "come on" as the camera gets closer to them.. Can anyone explain what's happening and how I edit this? Using HDRP and 2022.3.11

quartz lily
gloomy siren
gloomy siren
quartz lily
#

Volumetrics on the light (Sun) maybe?

arctic isle
deft fiber
quartz lily
somber anchor
#

Is there some way of getting a pixel's position in world space in the fragment Shader? I need the x and z positions to calculate the normal

deft fiber
somber anchor
#

is the geometry normal already calculated?

gloomy siren
gloomy siren
deft fiber
gloomy siren
somber anchor
deft fiber
gloomy siren
#

oh i am so sorry, i didnt even noitce this object was in the scene... shouldnt be there... deleted it, but didnt fix the problem

deft fiber
somber anchor
#

Okay, thank you

deft fiber
#

Not sure why delete it, unless you already configured another one

gloomy siren
#

Yes had another one...

gloomy siren
deft fiber
gloomy siren
deft fiber
gloomy siren
#

Reducing the light intesity and chaning the global volume override "Hdri Sky" to "Exposure" and then lowering it did it.

muted tinsel
#

When exporting my textures created within Substance Painter into Unity, they are not as bright and saturated. Is there are way to recover the original quality of those colors or at least mimic them? So far, changing the shader to Unlit has brought the colors closest to the original, however, doing so does not allow for shadows to be received or casted

hallow nimbus
#

what is the best approach to when the player turns on a generator, a bunch of lights at an area turns on? i could just do something like turn the game objects on, but the problem is, these are all realtime lighting so optimization and performance can be an issue, how can i do something like this where the lights are baked? im assuming id have to switch scenes right? thanks

deft fiber
deft fiber
hot echo
#

anyone know why my point light doesn't light up every angle?

deft fiber
hot echo
#

Sadly already checked that, I've tried with different materials also and I'm getting the same issue

arctic isle
hot echo
deft fiber
proven carbon
#

hey, i am following a tutorial on youtube and i realised my shadows are very ugly... how do i fix this? first pic is mine and second pic i how i want it

deft fiber
#

Shadows can break like this if the normals used for shading don't match the geometry that's used for shadow casting, since normally shading hides the shadow border

proven carbon
#

its sebastian lagues video on procedual planets

deft fiber
#

And since you're using HDRP the shadows require TAA to be filtered smoothly which you won't have by default in scene view

#

Anyway the problem most likely is that your mesh normals aren't being deformed or aren't being recalculated to the deformed mesh

#

You can disable shadow casting to make the ugly jaggies go away, but the shading will likely still be incorrect

proven carbon
#

how do i enable TAA

deft fiber
#

Scene window has that option in one of the dropdowns, and it must be set to "always refresh"
Or you can preview it using the game window

#

Assuming it's enabled there

proven carbon
#

hmm didnt help much

#

i calculate normals by grabbing each vertex and doing m_normals[i] = vertecies[i].normalized and afterwards mesh.normals = m_normals

proven carbon
#

i figured out the shadows sort of, nect problem

#

see that the bumps on the sphere have a more bright color?

#

well mine dont

#

seems like i dindnt calculate the normals right...

#

all good!

#

i just used mesh.RecalculateNormals() which creates seams, but i will figure that out later

fallow tapir
hallow nimbus
deft fiber
#

Shadow casting is another story, but that's why there's the shadow distance settings

hallow nimbus
deft fiber
hallow nimbus
#

i still have no idea about lighting so thats why

brittle cloud
#

uh... question. why is my spotlight not lighting?

#

oh nvm i fixed it.

limber echo
#

Hey i need help adding indoor lighting into my game. I have an asset that has emission but its not casting any light really and i dunno how to use emission stuff

limber echo
#

pipeline?

#

i know none of this stuff lol

plush hatch
#

cuz if its for smth like light bulbs/lamps you can just place a (colored) light source

limber echo
#

Yea its a light bulb for a room

#

And thats what it is

plush hatch
#

ok, then you just create a light source (right click on hierarchy > Lights) and place it where your light bulb is

#

if you want your emissive material to glow (not actually emitting light, just the "glow effect" itself on the camera), you need to bloom as a post processing effect

limber echo
#

Okay so how 1. Which kind of light? Directional, spot, area? And also 2. How do i keep it from going through the walls into the other room

plush hatch
#
  1. depends: the image below represents how light is disturbed from different kind of light sources. E.g. Spot light is optimal for ceiling lights, point lights for candles or fires, etc...

  2. is more complicated. You'd have to post an image of your scene for that first (prpbably its because of walls not casting shadows but there are other reasons for light leaks)

limber echo
#

okay let me send that

#

thats without light

#

just emission

plush hatch
#

yea you've to add the light, it wont work if you just use emission (except if you use global illumination but thats another topic)

limber echo
#

okay so what light is best? Spot?

plush hatch
#

abviously if your emissive material is purple, you want to color the light purple too if thats what ur goinh for

limber echo
#

so i did it, but its leaking through the walls to the next room

#

or do i even want the light to light up the whole room?

#

I made it so where it was really a spot, but the problem is that you cant see the cieling at all, and the light is still leaking

plush hatch
limber echo
#

now its not lighting up the room just the pod that i have in there on the right wall

plush hatch
#

if that doesnt fix it, please send an image

limber echo
#

like inside the room or outside the room? bc rn its above the cieling

plush hatch
limber echo
#

ah oki

#

So its not going through the walls into other rooms anymore, but it is going through to the rock outside

#

but it fixed everything else

plush hatch
limber echo
#

no its the spotlight. i just tested it

#

thats with the spotlight off

plush hatch
#

is the rock under the room?

limber echo
#

yea should it be above?

#

yea i just moved it above in the hierarchy and its still doing it

plush hatch
#

nope but that means your floor in the room does not cast shadows. click on the floor and navigate to its mesh renderer. Then set Lighting > Cast shadows to On/Doublesided

plush hatch
limber echo
#

nooo ill rotate and show

#

its beside of it

#

also the floor is already casting shadows

plush hatch
#

type Light in the search box of your hierarchy. Go through every light in your scene and disable all lights where it says that it is directional (as seen in the image)

#

The bed below is lit by the spotlight, the bed above by a directional light (as an example)

limber echo
#

still happening

plush hatch
#

🤨 maybe theres other light facing to the rock or theres something weird with the rocks material

limber echo
#

the only light i have are the directional lights which are disabled and the 3 spot lights i have.

#

this spot light is the only one effecting the rock

#

for some reason the rocks material is a vertex color, would that have something to do with it?

plush hatch
limber echo
#

yea

plush hatch
#

change it to a lit shader. if you want that look, increase the metallness/moothness then accordingly

limber echo
#

alright

#

got it fixed. thank you smm!

plush hatch
#

🔥

limber echo
plush hatch
#

Thats a complicated story.. id recomend you watching some tutorials on that on yt or smth. Basically realtime means the light emitted from the source is always dynamic and lits its environment. Baked light does not emit light - its ligth is used and received by static objects (objects that dont move) - and when you bake the global illumination for your scene (which can based on complexity of your scenes geometry take a VERY long time) the light is used for illuminating the environment.

Tldr:
Realtime: Low Quality / More Performance Heavy / Easy to use and fits with almost all usecases
Baked: Very high lighting quality / Almost no performance hits / .. The big cons: Takes a very long amount of time and isnt very adaptive + can only be used with static objects (everytime you move a object the whole scene needs to be baked agains completely)

fallow tapir
limber echo
burnt brook
#

I can't fix these lines. And yes compression is disabled

#

Using Radeon Pro and A-Trous filtering does make it much better, but its still there

midnight sorrel
#

How can I make less smoothed, more solid baked shadows?

shell juniper
#

It might be tied to lightmapping settings but I'm not sure

charred moth
#

does anyone know what the cause of these lightmap artifacts is?

deft fiber
# midnight sorrel How can I make less smoothed, more solid baked shadows?

Lightmaps are limited to texture pixel resolution (which have to be pretty low for large areas), so there isn't much of a way
Increasing resolution would improve the appearance though, and additionally it's possible to apply effects to the lightmap using shaders for example to posterize it
But that's tricky and an advanced topic

deft fiber
# burnt brook I can't fix these lines. And yes compression is disabled

This is called color banding which occurs because our monitors are limited to a meager 16 million colors
If the color banding is from a mixed/realtime light you may be able to enable "dithering" that will smudge the lines
If the bands are on the texture itself I don't know if there's any way to fix it, short of applying similar dithering in an image editing program using some context sensitive algorithm
Looks like it's realtime though
And if it isn't, almost any kind of texture on the wall will conceal the bands

languid blaze
deft fiber
#

Most games suffer from color banding but you don't really notice it

languid blaze
#

e.g. by giving the wall some texture

#

like this!

#

There's still banding if you squint, but it's a lot harder to notice

deft fiber
#

We think the same way!

deft fiber
languid blaze
#

oh yeah, I just thought I should throw that out there

fallow tapir
#

so i'm having a strange issue with SpriteRenderers casting shadows for the wrong sprite!

notice the trees in the top left, how they are casting a shadow for the big tree instead of the skinny tree.

#

and as i walk around the scene they switch between the different types of trees seemingly at random

#

like if i go here the skinny trees have appropriate shadows again

deft fiber
fallow tapir
#

i wouldn't even know where to begin with debugging

#

and it's really annoying and distracting

deft fiber
main ginkgo
#

Hi guys I have a quick question, so whenever I change scene, the lightning looks weird compared to when played each scene separately (what I meant is if I played from scene 1 teleports to scene two , the lightning is ruined in scene 2.) so it got fixed by making auto generated lightning (fixed) although when I build the game, it was stuck on gl data build for over an hour / while compared I turn auto generative lightning off the problem of long build wait time is gone, but when I click played and tried changing scenes in-game lightning is now ruined. Is there anyway I can fix the problem? Thanks!

deft fiber
fallow tapir
# deft fiber Frame debugger may give some clues at what stage the problem is happening, and c...

I think I might just try moving to URP. I mean so far I failed to get the post processing to have the look I wanted out of HDRP in the first place anyway and my frame rate is already lower than it should be (though that's much more likely my fault in scripts somewhere lol). I might not have to fight URP so much to make 2d elements work properly in 3D and it should give some extra processing time headroom.

What does the downgrade process look like?

deft fiber
fallow tapir
#

I'll need to redo all my shaders too right?

deft fiber
deft fiber
rocky fox
#

Hi! I'm trying to make a scene with light switches in a house, but I'd like the lighting to be baked. Is there any solution to having "local" lightmaps for a room (as in multiple smaller lightmaps)? I think it'd be easier than creating multiple lightmaps that are switched between every possible lighting combination throughout the house. Though if it's not possible I may just have to do that

deft fiber
#

Technically you could additively blend as many lightmaps as you want, but the shaders of all lit objects then would need the functionality to be able to sample multiple lightmaps which is tricky especially for shader compatibility
Also, light probes and reflection probes would not update which are also important for accurate baked lighting

#

They'd need a system of their own to do some kind of switching or blending

rocky fox
deft fiber
rocky fox
#

Got it, I'll try looking around

#

thanks

deft fiber
tulip tendon
rocky fox
tulip tendon
#

englighten bakes the light in smaller lightmaps so they are updated in realtime

#

you can also have both

#

for realtime lights use realtime GI and for lights that dont change use baked GI

deft fiber
#

Definitely worth seeing how Enlighten handles the scene

tulip tendon
#

the only thing is that enlighten doesnt work with the new APV's

icy tundra
#

When I bake a reflection probe it seems to be baking from the wrong position, causing super bad reflections. Realtime, it correctly renders from its set point.

polar wadi
#

Hello, could anybody explain me why I still got light bleeding through walls despite having thick walls? I've already played with the bias but can't find a proper settings to make it disappear. I don't get it.

#

My wall is technically one inner wall and one outer wall if that has any impact

#

Using 2022.3.9f1 and HDRP

#

Ok some more testing, I've disabled SSGI to see how it goes and the direct light does bleed

#

Scaling the outer wall to 2, the bleeding stops but the light access gets messed up. What's the minimum wall thickness needed to not have bleeding?

#

Plus I'm not a fan of making walls too thick since it would make shadows look strange at certain angles depending on the time of day. What other techniques do we have to fix light bleeding?

polar wadi
#

ok, settings shadow resolution to 4096 on the directional light did fix the bleeding but at low quality settings, the whole room is fully bright...

#

How to get a proper dark room in low settings too? I'm quite lost here...

craggy edge
#

urp lights are only showing in unity scene and not in game view, they have the correct sprite-lit-default texture

#

I couldnt fix this issue yet

#

I made a new scene and copy and pasted stuff from the old to the new one and it is working now!

whole bramble
#

Suppose, I have a scene which requires 2 days to have the lighting baked (using progressive cpu)

In my region, often blackout(loadshedding) occurs, in that case, How can I keep the baking Progress not to restart from the beginning everytime for stupid absence of electricity?

#

is there any way? im not even sure with my ups backup, as cpu uses it's 100% when baking, the ups cant hold much for long.

craggy edge
#

having another source of power, like a charged battery that can support ur pc during ausency of electricity

untold saddle
#

if anyone can help, i need my player model to be completely unaffected by light. you should be able to see the player when they're in front of you as if it was in a lit room

#

right now you can barely see it, however it's not because of the light intensity, but the skybox

tulip tendon
#

the material unlit which will make it completely unaffected by any kind of light

icy tundra
untold saddle
#

i just imported an fbx model and i made the material in blender, but i can't get the "material 0.001" to change to unlit. how could i do this?

polar wadi
deft fiber
#

Or alternatively use "on demand remap" to assign new materials, or assign them at prefab-level

untold saddle
grave patrol
#

I have looked around for a few hours and have not found a fix to my issue. I have really odd lighting on objects when baking my lighting. I use these same lighting settings in another scene and it works great. The objects are ProBuilder objects, along with most objects in the working scene. Are there any guides to fix this issue? If not any tips?

tulip tendon
#

generate lightmap uv's for the probuilder objects

#

there is a button in the probuilder window that generates uv's for all objects in the scene

#

is that doesnt work increase the lightmap resolution to something like 32 for the probuilder objects

#

also keep the lightmap resolution to a number thats ^2

#

like 2, 4, 8, 16, 32, 64, etc

grave patrol
grave patrol
deft fiber
#

You can use the scene window debug views to preview for UV overlap issues, and another view can be found in the Baked Lightmaps tab by previewing the lightmaps there
Once you've fixed the UV overlap you should look into texel invalidity issues if those pixelated artifacts persist

#

Just note that invalid texel artifacts can appear anywhere if you don't have correct lightmap UVs, even if there actually is no texel invalidity

formal veldt
#

so do metal shaders not interact with the light map or light probes or something

#

someone told me they usually dont care if you are in a shadow

#

how do I get a shader that uses reflection probes to actually respond if I'm in a dark area etc.

#

im using the URP with baked lighting

#

I have this environment for example

#

and it doesn't seem to care if I'm in a dark area or not

#

whereas if I disable the metallic aspect of this shader it does

night shell
#

so if you have an object that is pure metallic, yet its appearance doesn't change when you move around the room, then the problem is the reflection

formal veldt
#

does it not see that the area over there is dark?

#

I dont even really want reflections

#

I just want it to look shiny

#

in blender you can just do a specular style of lighting but it doesnt seem to work like that in URP

formal veldt
night shell
#

use box projection

#

and line it up well with the walls of the room

tulip tendon
#

Then instead of making it fully metalic find a balance between metalic and specularity

night shell
formal veldt
#

im not sure the exact terminology for what im after, cuz idk how shaders work. I just know I want it to look a bit shiny, and be dark in dark areas and light in light areas

night shell
#

I'll boil it down then

#

use reflection probes with box projection

#

it'll help your metallic objects

#

or anything that you want to have shine

#

as for having like a strong specular highlight, that is dependent on the lights in your scene, since your using URP I don't think the shaders still have a specular term for baked lighting

#

unless if you are using realtime lighting

#

or mixed lighting

formal veldt
#

box projection didn't seem to change anything

night shell
#

how did you define the reflection probe bounds?

#

because the bounds of the reflection probe dictate the box projection

tulip tendon
#

I dont see how the reflection probe should help

formal veldt
#

I went into ortho view and made it slightly larger than this area

night shell
#

ahh I see the issue

formal veldt
#

looks exactly the same

polar wadi
# untold saddle how would one go about that?

In case you didn't find out yourself, you simply click on your FBX asset in Unity then in the Inspector window, you just go to the material tab. From here, simply extract or you can directly put a new material in the material slots displayed then click apply.

night shell
#

before we move forward I wanna verify

#

what kind of lighting are you using @formal veldt

#

is it all purely baked?

#

are you using realtime lights? lights set to mixed? etc.?

#

whats your setup

#

from the looks of it I'm going to assume baked, but can you elaborate?

tulip tendon
#

Isnt his problem that his gun material ignores lightning?

formal veldt
#

as far as I can tell it's all baked

night shell
#

specifically improper light probe placement

tulip tendon
#

And thats because he has the metalic setting trough the roof

night shell
#

if his metallic setting is through the roof that means the object is pretty much only shaded by the specular term

#

i.e. reflections

tulip tendon
#

Ye

night shell
#

which is why I was going down on the reflection part

tulip tendon
#

By default reflections are sampled from the skybox

night shell
#

he has a probe already setup in the room

#

although just to verify, what setting is reflection probes set to on the mesh renderer for your gun model @formal veldt ?

tulip tendon
#

That doesnt change the way the gun is lightup tough

#

That just replaces the reflection sample from the skybox to the probe

formal veldt
night shell
#

huh?

#

can you show us the material settings you have for the gun model?

formal veldt
#

this is most of it

night shell
#

show the advanced tab

formal veldt
#

I keep messing around with this one but usually both are on

tulip tendon
#

Put the metalic map to something like 0.6

#

See how it looks

#

Also what version of unity are you on?

formal veldt
#

ive tried every combination of values for the metallic map and smoothness

#

those arent the issue

night shell
formal veldt
#

I think so? because when I turn off the metallic the shadows actually shade hte gun

night shell
#

do you have a light probe group in your scene?

formal veldt
#

oh jeez

night shell
#

so thats a yes then

tulip tendon
#

Oh god

#

Thats a lot of probes

formal veldt
#

I didnt want to place them manually lol

tulip tendon
#

What version are you on?

night shell
#

well thats what happens with automation, but I don't think thats the problem neither

#

but just as a test spawn a white sphere

#

and move it around the scene

#

does it get shaded properly? darkens/lightens where it should?

#

if it does then it only confirms that once again its the reflections that are at fault

formal veldt
#

it seems to be shaded properly yea

#

again the gun itself is shaded fine

#

as long as I dont try to mke it shiny

night shell
#

screenshots to show it

#

I just wanna make sure its clear as day

#

you never know

tulip tendon
#

Damn ignoring my question...

formal veldt
night shell
formal veldt
#

if I make a shiny sphere it seems to have the same issue

night shell
#

this makes it clear as day now

#

so it is the reflection at fault

#

so how to fix? you'll need to modify the reflection probe settings

tulip tendon
night shell
#

i.e. changing the bounds and moving where its capturing the reflection

#

a reflection probe basically captures a 360 image of the enviorment its in

tulip tendon
#

I would have suggested using the new APV's but thats in unity 2023

night shell
#

and then (if enabled) it projects that texture into a "box"

#

to approximate the enviorment

tulip tendon
#

Or put 3 different box relfection probes in the dark and lit areas

night shell
#

^^^ that works too but I wouldn't have too many reflection probes, can be bad for memory/performance

#

only if its necessary

tulip tendon
#

For a game like this you can get away with it

#

Is not realtime so it wont be recalculated

#

And if he makes it row res it shouldnt be a problem with memory either

night shell
#

its still taking up memory and has to be sampled by objects within bounds

#

you can still do it of course

formal veldt
#

what would you do then

night shell
#

but I'm saying that I'm certain you can make it work with a single probe for that room

#

but if you can't

#

then multiple probes it'll have to be

tulip tendon
#

The thing is he will have to spam probes all over all the levels

night shell
#

and?

tulip tendon
#

Is a lot of extra manual work

#

Just to have a gun shiny

night shell
#

unless if you are willing to dive into custom shaders and write a shader than can sample specularity from light probes

#

and other shenangins

#

or using mixed/realtime lights

formal veldt
#

is it possible to have shinyness without reflection probes

tulip tendon
formal veldt
#

I dont want it to look like the skybox I want to add specular highlights that are basde on the light sources of the map

night shell
#

see?

tulip tendon
#

In that case mixed/realtime lights is the solution

#

But you dont need metalic for specular highlights

night shell
#

you don't its true

#

but it will feed into the overall look

#

of the "shine"

formal veldt
#

the thing is I dont want JUST light sources to light it

tulip tendon
#

Yes but you dont need max metalic value

formal veldt
#

because I feel if I make them mixed lights its just gonna be black until it's in range of a light source

tulip tendon
#

Realtime GI is a thing

night shell
formal veldt
#

I dont want global illumination

#

I Need the gun to be pitch black in certain areas

tulip tendon
#

._.

#

But baked lighting is global ilumination

formal veldt
#

some areas dont get reached by the light even with the bouncing

#

I need it to be dark in those areas

tulip tendon
#

Yeah

#

Thats what light probes are for

#

I dont see how that has anything to do with the shinyness tough

formal veldt
#

basically I don't care about any meshes in the reflection. I dont need to reflect textures or details. I think I just need it to have a specular highlight based on the light probes

#

so when it moves around it has that shiny specular effect

night shell
#

that can only be done with a custom shader

tulip tendon
#

The old lightprobe system doesnt sample specularity

#

The new one might tough

formal veldt
#

there really isn't any basic specular shader? blender has that

night shell
#

I've done it

#

its possible

#

but what hes asking will have to venture into the realm of custom shaders

formal veldt
#

regardless I don't think I'm gonna be able to write my own custom shader tbh

night shell
#

and if he can't do that, it'll have to be achieved with mixed lights

#

or reflection probes

#

specifically reflection probes with some tricks i.e. "specular probes" with emissives and such

tulip tendon
#

Ive used the new adaptive probe volumes in unity 2023, masive improvement from the lightprobe groups and there is no manual probe placing required

night shell
#

his inital problem was that the gun that was set to a full metallic material, yet it wasn't being shaded how he wanted in dark areas, that means its a reflection issue at that point

#

the diffuse shading is apparently already sufficing for him

#

alright let me setup a scene just like what you have to guide you through it @formal veldt

tulip tendon
#

Im not sure if the new APV's sample specularity tough

formal veldt
#

making a shader?

night shell
#

can I get a wide shot of that area so I can see what kind of enviorment your working with @formal veldt ?

night shell
formal veldt
#

ive just been testing in this area

night shell
#

gotcha, need a moment to build something similar

formal veldt
#

I suppose the specular might be hard to see since the gun is actually a flat plane and the primary light source is directly above and pointing down? idk if that would affect it

night shell
#

its a possibility, going to put together a sample scene though so I'll be back in a couple

formal veldt
#

also I found a webpage that describes what I am looking for

#

this is the exact game that made me want to do this style

#

I don't expect it to look AS good but something to this effect

night shell
formal veldt
#

that looks similar yea

night shell
#

gonna do a couple of things to make it match where I think you are at for the moment

#

so diffuse wise as we saw you had your light probes setup

#

the light gets dark as it should depending on where it is thanks to light probes

#

but now you want "shine" to appear

#

I'll start with the mixed light approach since that'll be probably what your after, but then I'll dive into reflection probe setup for something like this

#

so the material here is purely shiny

#

but of course I haven't setup a reflection probe at the moment so by default it reflects the skybox

#

so for the time being I'll disable enviorment reflections and focus on specular highlights which is what your after

#

so despite being in this area in bright sun there is no "shine" appearing

#

one way to fix this is to use mixed lighting

#

I have a single directional light in the scene, so I'll go ahead and change the settings so that its mixed

#

setting it to a mixed light means its essentially both a realtime light, and a baked light

#

since its full white I'll darken it so its easier to see the highlight

#

but now with the light set to mixed, the light you have in the scene is casting realtime lighting

#

and we have shine

#

I can make the material smoothness smaller so that this shine appears larger

#

and the shine will darken accordingly

#

mind you this is purely specular reflection, no enviorment reflections here

#

now let me show you the problem that you were running into when you made the object fully metallic

#

this is the reflection probe part

#

so I've setup a reflection probe, and made the ball purly metallic/shiny

#

however I move it to the shadow

#

it still looks "bright"

#

so this is where we dive into earlier what we were discussing

#

box projection, capture point, and multiple probes to better approximate reflections

#

despite being in the shadow the reflection here is wrong

#

and you can see that its reflecting generally in the area where there is most sun

#

we can help mitigate this problem by enabling box projection, which will allow the reflection to essentially change depending on where you are in the enviorment

#

it helps, but of course its still not right, since its in the middle of that room, and still appears pretty bright

#

we can play with the capture point of the reflection probe to change where its taking this "360 image" from

formal veldt
night shell
#

but if its purely only specular, i.e. you disable enviorment reflections in the shader then only that single little shine will be affected

night shell
#

moved the capture point down, and the reflection looks better now

#

this should start painting the picture

#

@formal veldt

formal veldt
#

I still can't seem to get the specular highlights

#

whats the material settings for that first one

#

the gray sphere

#

I set the main sun directional light to baked but I didnt notice a difference

#

I mean mixed

night shell
#

you need to rebuild lighting

formal veldt
#

even though going to mixed is just adding a realtime component?

#

im not going from realtime to baked

#

im going from baked to baked + realtime

night shell
#

when a light is set to baked, unity basiclaly disables it

#

and it doesn't reenable it even if you change the mode

formal veldt
#

so I have to bake the entire lightmap again?

night shell
#

yes

formal veldt
#

ok

night shell
#

@tulip tendon object here with light probes being lit with the shader method I mentioned

#

all baked, no mixed lights, samples "specular" from the light probe

#

although its very basic, it samples it essentially from the brightest point

formal veldt
#

I thought I needed mixed to get specular highlights

night shell
#

you can also get it with reflection probes with a "specular probes" trick but this is kinda hacky, and will likely not work for you given that you don't want to bother setting up reflection probes for the areas in your map

#

but it is possible

#

but beyond that, the only other way (outside of the reflection probes, specular probes I just showed, or a custom shader that samples specularity like I showed, or fakes it) is with mixed or realtime lights

formal veldt
#

now it seems that the material just isn't affected by the global lighting at all

#

where it used to be

night shell
#

what are your material settings again?

#

is it full metallic?

formal veldt
#

that pic was taken with 0.697 metallic

#

even if I put zero metallic and stand in darkness its fullbright

night shell
#

and its the same level?

formal veldt
#

yea

#

all I did was make the main light mixed and bake lighting

night shell
#

something must have went wrong with the light probes

#

ohhhh wait

#

ahhh I think I know

#

whats your lighting mode?

formal veldt
#

what do you mean

night shell
formal veldt
#

baked indirect

#

idk what that means

night shell
#

switch to subtractive

#

and bake again

formal veldt
#

ok

#

whats the difference

night shell
#

baked indirect means when lighting is baked, its only baking the GI term, not the direct lighting

#

what the heck does that mean?

#

here

#

left is direct illumination only

#

right is BOTH direct illumination and GI

#

in baked indirect ,its basically the right, but minus the direct illumination

#

its only the GI term

formal veldt
#

what is subtractive

night shell
#

subtractive means that when you bake lighting, it basically does everything in the lightmap (like the right image), but for mixed lights when it casts shadows it will "subtract" them from the lightmap

orchid cairn
#

is there a way I can have this emit lighting onto the walls? Like have it so the texture pattern emits lighting

#

Idk if that's possible but figured I'd ask

night shell
#

yes

#

its possible

#

well kinda, it depends how your scene is lit

orchid cairn
#

how would I go about doing that?

orchid cairn
night shell
#

is it realtime lighting? or baked lighting?

orchid cairn
#

realtime

night shell
#

well to get that lighting to affect the scene you'll most likely have to bake it

#

you can use enlighten

#

which is a realtime GI within unity

formal veldt
#

still bright

night shell
orchid cairn
#

what does Realtime GI do, just make it so textures emit light?

night shell
formal veldt
#

where

night shell
night shell
formal veldt
#

on the weapon?

night shell
#

yes

formal veldt
#

it didnt change anything

night shell
#

is there an option for recieving shadows?

#

find it odd that option is missing

formal veldt
#

recieve shadows is on

#

on the shader

night shell
#

do you have shadow casting enabled in the URP pipeline settings?

formal veldt
#

I mean I didnt turn them off when I rebaked the lighting

#

and it worked before

night shell
#

those options shouldn't affect baking

#

this is just on the mesh

#

and material

formal veldt
#

what settings are these

night shell
#

this is venturing into the point of URP troubleshooting which I'm honestly not to familiar with

#

but URP usually has an asset in your project

#

called URP settings or whatnot

#

you can also find it by going into edit > project settings > quality

#

and you can find the asset in there

orchid cairn
#

wait so how do I get GI to work in the texture? tried looking up youtube tutorials but they aren't super helpful

night shell
#

it ventures into the realm of "lightmapping"

#

you can find tutorials on that

#

to get that texture to "emit light" you'll need to make sure emission is on

#

and then from there bake your scene accordingly

#

there is a bit of setup involved though so I'd be sure to watch a tutorial on one

formal veldt
night shell
#

on the top

#

there should be a field for the render asset

formal veldt
#

cast shadows is on

night shell
#

screenshot?

formal veldt
night shell
#

huh, wonder what is missing

#

ohhhh wait

#

I keep forgetting

#

your gun model is just a flat dumb sprite

#

wait nvm even in that case it should be fine

#

ask in urp for help on getting proper lighting with mixed lights in URP

#

it would be easier to help you if you were in the built in pipeline but clearly some things have changed in URP so its not the same

night shell
#

@formal veldt

formal veldt
#

I changed it back to baked and its properly lit now @night shell

night shell
#

but you'll be missing your specular highlights

formal veldt
#

yea

#

I hate rendering

night shell
#

rendering is tough, but learning about it makes it less hard

formal veldt
#

are you using a baked light for that example scene

night shell
# night shell

for this one no, this was mixed lights to get the specular shine to show up @formal veldt

#

on the regular unity shaders that is

formal veldt
#

so mixed lights were working for you

night shell
#

yes, although they don't seem to be working for you

#

and your in URP so I'm not sure whats wrong or different about it

icy tundra
#

Is there a way to have a realtime light not cast specular reflections?

deft fiber
#

@formal veldt I didn't see if it was mentioned but you need a reflection probe for each spot where the reflected lighting changes significantly, or use only rough nonmetallic materials
Beyond that what you're asking for would require raytracing

pastel elbow
#

is it possible to keep reflections from lighting themselves up?

#

like, there are no lights, it should not be illuminated

deft fiber
pastel elbow
#

ah unfortunate
ok

#

I could use SSR
maybe ill just do that

deft fiber
pastel elbow
#

I could also just cope and have some unrealistic lighting in some areas

hidden ridge
#

Hey, I'm having some issues with baked lighting. A bit of background, there are walls on either sides of the door that are their own separate pieces. However, this will leave a gap above the door if I don't fill it in. So, of course, I did put another one there, just above the door. However, it leaves a weird artifact when the baked lighting processes and you can very obviously see the seem.

Any ideas on how to fix this?

tulip tendon
#

you just need to properly snap it

#

use vertex snapping

#

also i would reccomend to stop using progrids, it has been discontinued since its features became built in the engine

hidden ridge
#

And just that or?

#

Cause just doing CTRL and moving the central block made no difference when I rebaked it.

little mason
#

I have a big sun and a bunch of planets orbiting the sun. I want to project light out in all directions from the sun so that it hits the planets. How do I do this?

somber sun
#

Hi, Is there a reason why only some of my terrain layers receive light when using real time GI?

#

(the opposite)

tulip tendon
abstract helm
#

How to fix walls?

little mason
# tulip tendon A giant point light i guess

the problem now is that if I jack up the intensity the first few planets get lit but the farther away ones dont get lit unless the intensity is even higher drowning the first few planets in light

hidden ridge
tulip tendon
#

I still dont see the wall snapped properly

worn ridge
#

making a game, my lights for some reason keep turning on and off in playmode.

hidden ridge
tulip tendon
#

you can clearly see the wall is not snapped properly

tulip tendon
worn ridge
#

oh ok

hidden ridge
rustic garden
#

Anyone know how you can create light shafts or sort of volumetric lights like this?

tribal coyote
#

How do I get the light to invert? So only the edges are lit up instead of the edges being shadowed

copper steeple
tribal coyote
copper steeple
tribal coyote
copper steeple
#

i think i misread your message?

tribal coyote
#

No, only the grass (edges) should be lit up

copper steeple
#

well then put it outside of it like i said originally

tribal coyote
#

Like that red line?

copper steeple
#

yeah

tribal coyote
#

(I’m not on pc rn)

copper steeple
#

well it will have to go over the left part as well

tribal coyote
#

Yeah

copper steeple
tribal coyote
#

Oh well I’ll try it once I can

#

I understand the free form light as that the light is inside of the area

tribal coyote
#

@copper steeple

#

this is how it looks, the platforms that aren't islands work fine

copper steeple
#

di you forget to remove the lights inside the middle one?

tribal coyote
#

nope, i separated all the islands into different sorting layers, and set the large light to only affect itself and that island which is lit. idk if it was necessary but it was a try to solve it

tribal coyote
copper steeple
#

is everything at 0 on the z

#

axis

tribal coyote
#

yep

copper steeple
tribal coyote
surreal belfry
#

Hello Guys, does anyone know why the lighting looks off in the game view? I only have this problem with Tiles using Normal Maps like the ones in the picture

graceful lily
#

Hello all! After changing the scale factors in unity to a larger number. My assets started having these weird lines on the sides where my assets connect. I am 100% sure that they align perfectly. I tried baking the lighting but it makes all my assets turn black

#

This is what I use as material

#

They were just fine when they were much smaller.

#

When I drag the real time shadows to 0 it disappears

supple coyote
#

Hello, I have some problem with reflection probes ( I guess)
HDRP, Unity 2022.3.10f1

#

can anyone help how to fix this

languid wing
#

Zibra Liquids?

#

You should ask the publisher of the plugin for help. Looks like a bug in their code, specifically their RenderComponent.

supple coyote
#

I write to them and they said its Unity fault

#

@languid wing

languid wing
supple coyote
#

what I can tell them that this is their fault

languid wing
#

I mean you can do what you want

#

maybe stop using their plugin if it doesn't work

supple coyote
#

too late, game is already on steam, and it's the core of the game

#

I mean can we somehow confirm that this is bug on asset publisher side?

deft fiber
#

How would it be Unity's fault that their asset made for Unity doesn't work with Unity

timber kiln
deft fiber
#

Judging by the error somewhere a custom pass is trying to access a reflection probe incorrectly
Seems like something they might know more about over at #archived-hdrp

timber kiln
#

Nah, that's just issue in our code
We seem to filter out reflection probe camera's in one part of the code but not another, and then do illegal dictionary access
Weirdly enough, we've already fixed exactly same issue before, so no idea how it appeared again

supple coyote
winged dawn
#

Morning! I have an issue with dynamic object in my project, the issue is as followed: non-shadow casting dynamic object that are GI static still cast AO on their surrounding and themselves.
The following post describes the issue aswell, but this method results in the object not casting AO on surrounding objects, but it still recieves AO from other objects onto itself. Is there a way to completely exclude the object from AO baking but still having it recieve GI?

deft fiber
# winged dawn Morning! I have an issue with dynamic object in my project, the issue is as foll...

Doesn't sound very possible aside from some workarounds like baking parts of the scene separately
With that it may help to use this system for tying lightmapping to prefabs instead of scenes https://github.com/Ayfel/PrefabLightmapping/
But baked lightmapping is "baked" for a reason so it's probably not easy in any case
Another hack you could consider is bake once with AO and once without, then combine those manually in an image editor

polar wadi
#

Hello, I'm having an issue with lighting when building the game. Shadows simply don't work the same as in the editor and I can't figure out why. Quality settings is set to High on both sides. Using HDRP and SSGI.

I have two scenes, one city map and one indoor. There appear to be two problems, possibly related:

  1. On city map, the shadow gets some stripes in build only for some reason. I had this issue in editor too and changing bias value fixed it in editor but not in build. Why?
  2. Indoor, rooms are using SSGI since they are loaded dynamically as well as textures from the StreamingAssets folder. The problem is that everything is fine in editor, but in build, the wall don't appear to block light anymore and the same shadow stripes bug occurs on the side.

Would anybody have any idea what's causing those issues?

rapid geyser
#

Hello eveyone. I want to add lens flare effect on some of the lights in my game. I downloaded a lens flare effect png with transparent background but the background of the image is displayed when i add the flare effect to the light. How can i make the background totally disappear?

soft fulcrum
rapid geyser
#

i selected lightmap in the texture settings. It shouldn't display that checkered background. Is there something wrong with the image itself?

placid kite
#

I want to illuminate a large dynamic mesh with light probes but I can't use "Light probes volume" because I'm using URP, is there another way of doing that ?

polar wadi
tulip tendon
winged dawn
plucky needle
#

I really need help with a reflection probe problem I'm having. The issue is I have this building model, and i want the windows to have proper reflections.
The problem is, if i place the reflection probe inside the model, it reflects the frames of the windows because their sides aren't being culled, because they arent a backface
Is there a way to work around this? I can't think of a way to solve this, other than maybe some method to exclude one specific object from a reflection probe (culling mask doesn't work because i need to reflect other buildings)

#

weird reflection example

vestal canopy
#

or disable the building when baking the reflection probe

plucky needle
vestal canopy
deft fiber
#

As mentioned they will never result in "true" reflections is a situation like that

plucky needle
plucky needle
unique mango
#

shadows in unity are trash, change my mind

deft fiber
# unique mango shadows in unity are trash, change my mind

Shadowcasting is limited and/or expensive in all render engines, it's kind of an unsolved problem so you have to work around the limitations of the system
Even if your post is kinda inflammatory and pointless you're technically not wrong

unique mango
#

I don't care about performance of shadows itself. If your shadowcaster have small amount of geometry then shadows are not a big deal. I care about the look of those

#

By that I mean the shadow bias settings, normalbias and other stuff like that.

deft fiber
#

If you want advice how to improve shadows in a specific scenario you need to give some info to work with

unique mango
#

In unity it doesn't matter how you set it. It's gonna look bad always.

#

Haven't solved that issue in years.

deft fiber
unique mango
#

okay so let's say I'm trying to setup realtime sun and its shadows.

#

I've got unity's terrain set up. Directional light is going around the terrain kinda like sun should.

#

well that's not true but u got the logic here.

#

I can't spin the terrain itself

#

when sun is going behind terrain, I get some weird shadows. By that I mean it's kinda light casting through it.

#

but that's okay. I change the normalbias value to higher and problem solved.

#

but there is another problem that is caused by changing normalbias value

#

Other shadows are just casted 100m away from the object. pixelated and idk what else. faces shadows are split to pieces

deft fiber
#

If you have to modify light bias settings at all you have to be careful with it or seemingly unrelated shadow issues tend to appear
The bias values have to be there for a purpose

deft fiber
unique mango
#

that's what happened when you increase the normalbias value

#

that's where the normalbias value is set to 0.

#

and overall the shadow here looks good to me

#

and it could stay like this

#

but there it comes what I've described earlier with the terrain

#

so im trying to solve this overall shadow issue for about 5 years now. nothing has changed at all.

deft fiber
unique mango
#

light casting though terrain from behind.

#

that also happens not only on terrain but other objects as well

deft fiber
#

And that wasn't solved by blocking the light from under the terrain with extra geometry?

unique mango
#

there is always a blind spot in that case. it's not perfect solution

deft fiber
#

"Blind spot"?

#

The "shadows are split to pieces" because the mesh has split normals
The properties of the mesh that's casting the shadows has a considerable effect on the appearance / quality of the shadow

#

Shadows have to be pushed "inward" (which depends on geometry) to avoid them poking out through the surface they're being cast by

#

For this reason you shouldn't have any too thin shadow casters, like I assume your terrain's underside is in this situation

unique mango
# deft fiber "Blind spot"?

yeah. for that to work correctly I need to make exact same terrain mesh that have inverted normals and also made additional face for covering the borders of terrain. otherwise the light will cast though the gap between those 2 meshes.

#

idk if I described that correctly

#

i tried just putting big cube beneath terrain

#

it was like I described here. when light is just beyond the horizon, its passing light under the terrain through the side gap

#

can't do it like that

deft fiber
unique mango
#

the red thing is that cube I put beneath. but the gap I'm talking about is this green space

deft fiber
#

That's what we're both talking about

unique mango
#

yeah

#

So far, I'm giving up on that. Maybe I'll come back to that later.

deft fiber
#

Five years of struggle and giving up so close to solution? 😏

unique mango
#

this problem is not the only one 😏

#

Soon I'll invent the universal solution that I'm going to share with whole world ! 😄

deft fiber
# unique mango Soon I'll invent the universal solution that I'm going to share with whole world...

If you can find some technical breakdowns or research papers of the techniques used it really does help you understand how to better navigate these features
It also will give you respect for all the clever hacks that let us have shadows of any kind in the first place ^^
I don't know if there are such resources for Unity's shadows but the techniques are basically all the same as are used in Unreal and Godot likewise, and you can find people struggling with these exact same issues there

timber lichen
#

so huh

#

i'm not sure if I'm doing anything wrongly but neither seem to work?

#

(I'm using directional light, so this excludes the second one already)

#

this is ideally what I'm trying to replicate:

gilded cloak
#

Is there a way I can add 2D global light to a 3D URP project? Trying to do a mix of the two, the player characters are going to be 2D sprites while the enemies are 3D models. The project is currently 3D URP, but I don't have any 2D lighting options. Is there a way to mix them together?

unique mango
#

so it's working fine ;D

timber lichen
#

I'm literally a newbie with Unity lmao

#

(And does it work with buildin RP?)

unique mango
#

sure it works in builtin

#

otherwise I won't use it

#

I only work in built in

#

there are 6 steps u need to do for it to work.

  1. import it to unity.
  2. find scripts folder in the package
  3. put VolumetricLightRenderer script to camera obj
  4. put VolumetricLight script to the light obj that contains ligh component. (assign proper references (default spot cookie image))
  5. go to projectSettings/graphics/alwaysIncludedShaders and put there 3 shaders that comes with the package.
  6. run the game and play with the settings in light script in the inspector.
timber lichen
#

(without running)

#

I have a MainCamera and a DirectionalLight

#
  • Added VolumetricLightRenderer to MainCamera, set default spot cookie = spotlight
  • Added VolumetricLight to DirectionalLight
  • Added shaders to graphics
#

It's either I'm dumb or this doesn't work either

unique mango
#

it won't work untill you run the game

#

if you'll find satisfying settings just copy component while game is running

#

and then paste it again when game is off

#

default spot cookie is just that one sprite that comes with the package

#

and that's all

timber lichen
#

alright, let me try building then

unique mango
#

you don't need to.

#

if you'll run game in editor it will work as well

timber lichen
#

with play?

unique mango
#

yup

timber lichen
#

it doesn't notlikethis

unique mango
#

then settings are not correct or you just missed something

#

run the game and change script settings while in playmode

#

you should see the difference

#

try this

#

i'm using unity's default skybox just for showing purpose

#

notice that the game is runing

#

if I turn it off then script will turn off either

unique mango
#

always included shaders should look like this

#

this script on camera

#

nothing else

timber lichen
#

mmh

#

could post-processing maybe affect this?

#

oh wait, it works now lol

#

ok I definitely have no idea what happened but ty @unique mango you're a savior

unique mango
#

No problem buddy

deft fiber
#

You can recreate all kinds of lighting-like effects using custom shaders that will work with 2D Renderer, but it disables all shader code that makes lights work normally within shaders

timber lichen
unique mango
#

That's good news 😉

#

And your game looks pretty dang good

deft fiber
#

"Fit"? At a glance it looks more like an animation issue

#

What do you mean by "fit"

#

You're probably using some kind of animation to move the feet
If the problem is the position of the feet relative to ground, that implies animation issue
Lighting has nothing to do with character postures or positions

livid viper
#

I'm having some issues with light baking where some cracks and crevices emit unnatural lighting, been fiddling around with lightmap settings to get it to a minimum, but still not happy about it, any tips on how to fix this?

#

and my lightmap settings

#

using 2019.3.15 hdrp

livid viper
#

managed to get a proper bake without any issues after setting indirect multiplier on my directional light to a lower value

wraith viper
#

Hey!

Anybody knows where this weird flickering on the Characters head is coming from? (using a Realtime Spotlight)

neon python
#

This is called "z-fighting"
What's happening is you have two planes perfectly overlapping each other, so the gpu sometimes renders one plane first, and something the other

#

That's what causes the flickering

neon python
wraith viper
neon python
#

It's fine, if you don't have 2 seperate game objects, aka 2 seperate meshes, that are layered on top of each other, then yeah your mesh has an issue

#

but check to see if you can move the hat(?) slighty up in local position

mossy mesa
wraith viper
mossy mesa
wraith viper
#

tbh i never had these issues before, but i also never tried to do anything with lighting etc, i'm 99% programmer 😄
learning something new everyday, for the next time i have issues like that, z-fighting will be my first thought

mossy mesa
#

nice

deft fiber
#

Light probes work by grabbing the nearest light probe, no matter how far away that is

#

Always have relevant probes nearby

#

There's not really a way currently to have light probes that are only "local", but if you're using baked lighting you basically need to have probes in every area where the lighting changes anyway

#

Otherwise dynamic objects would get wrong lighting

last tendon
#

What's a "normal" value for the amount of lightmaps after baking? My settings result in 160 maps, but it seems to have no significant effect on performance. Is this a high number, targeting PC as platform with GTX10xx GPU?

chilly kettle
#

How big is the szene?

last tendon
foggy monolith
#

been experiencing an issue with one of my projects for a while now, it was originally a 2d project that wasnt going to have any lighting but ive since attempted to add lighting... and experienced the most confusing bug i have ever seen; no matter what i change in my URP settings, project settings, preferences, and even all the lighting settings change absolutely nothing whatsoever visually.. i always get an EXTREMELY lit scene despite no lights

#

even the materials in my project appear like bright circles

#

tried completely removing my URP and lighting settings assets both and remaking but nothing changed still

#

i 100% bet its just one specific setting somewhere i have checked that i really shouldnt but i cant figure it out for the life of me

#

even changing stuff on the materials like emission, metallic, and smoothness.... they all do nothing

livid viper
#

what causes this dark line to appear after a light bake

#

only using directional light and a hdri sky

deft fiber
#

Create a new URP asset with Universal Renderer (or whatever the not-2D option is) and set it as active in Quality settings (And also in Graphics settings in case you disabled that)

livid viper
#

figured out that it was down to my lightmaps uv not lining up perfectly, the next question is though

#

How do I get them to line up perfectly, I modeled those cracks and are at a 45 degree angle but can't get them to line up with my current uv settings that were unity generated

deft fiber
livid viper
deft fiber
#

If those squares are visualizing your lightmap resolution, it won't be possible for them to represent geometric details that small

livid viper
deft fiber
#

I expect the crevice's shadow will spread to the flat surface even if the lightmap pixels line up perfectly

livid viper
#

doing them by hand is the hardest thing for me, do you have a recommendation for blender plugins that can help speed up the process

livid viper
#

so it's not too unnatural looking

#

thanks for the quick response UnityChanThumbsUp

deft fiber
deft fiber
#

Still, unwrapping a beveled slab should be quite a simple task to do by hand

livid viper
livid viper
deft fiber
#

Wouldn't lose sleep over it
If you want seams to be visible to some extent I'd make them a bit bigger
Of course, you always get better baked lighting with continuous meshes and very subtle seams are best done in normal maps and texturing

livid viper
#

this was justifiable for looks in this case where performance didn't go down

deft fiber
#

Simply painted on seams are often perfectly good likewise

livid viper
#

hence why I opted for generated uv's

livid viper
#

thanks for help

deft fiber
livid viper
#

Will definitely do that next time around in that case

foggy monolith
#

nice! that seemed to be on the right track, 3d objects now appear to be recieving most lighting, except the entire environment section appears to still not work, and the 2D sprites dont seem to be receiving light (thats the main thing im trying to get work)

#

ah! wait i seemed to have figured it out, i created a new 2D URP Renderer and made sure it was in both quality and graphics settings, then added a Global 2D light and everything seems all good!

livid viper
#

back again with another question, what causes this green color to appear after a bake, only green thing that's in my scene is my hdri

#

is there a way to fix this or minimize the effect

#

I've got my indirect multiplier set to 0 already

#

really wonder where this colors get sampled from

deft fiber
deft fiber
livid viper
#

those colors get a lot worse when I have it enabled

#

you'll get all colors of the rainbow

livid viper
#

was thinking of leaving out my hdri cubemap and rebake it

deft fiber
livid viper
deft fiber
livid viper
#

going to be quite a rabbit hole to dive into

misty hearth
#

how can i make it so the light doesnt go over the sprite but instead, the sprite blocks the light

deft fiber
misty hearth
deft fiber
misty hearth
#

I know what you mean. Isn't there a line of code or something to put on the object with the sprite renderer to block light?

#

i hope that makes sense

teal vale
#

Hi Guys, is there any way to make that shadow inside Red line to make it smoother?

subtle night
#

scene view

#

game view

#

doesn't show the skymap in gameview!!

deft fiber
deft fiber
arctic isle
subtle night
#

solved

#

in camera setting it was set to solid colour

random geode
#

Hello. I encountered this light leakage bug.
Spotlights have this strange lit line below them (the right part). It's for all spotlights. I already tried playing with basically every light setting I can, including setting the render mode to Important.
How do i fix that?

misty hearth
keen notch
#

Does any1 know what could be causing a consistent an immediate crash when generating lightmaps? This randomly started happening today, many different versions and newly created projects are affected.

#

Currently using 2021.3.27f1

keen notch
#

Just migrated to 2021.3.32f1 and the same issue persists

weary fossil
#

how do you guys get world lighting that casts shadows in unity 2D?