#archived-lighting
1 messages ยท Page 12 of 1
This is with linear as well
it's weird because in my scene view, the shapes look generally fine
but in my game view, the surfaces looks so brightened
notice the mass of white at the bottom there
Are they translucent overlapping meshes?
Or can you explain what's going on? Maybe if there's too many semi-transparent shapes on top of each other it becomes overexposed?
Funnily enough, they're not even transparent. They're actually just solid objects and they don't interact with each other.
why is my model so lit up (ik i posted before just looking for answers)
You can try to add a slight increasing offset so the meshes don't overlap, just to see if that's a problem
Slight as in 0.000x
How would I do this? 
As you draw, increment the z position by that offset and reset it when you clear the board
Should be up shortly ๐
It's more noticeable at around the 20 second mark
The streaks of shadow on the ground
The weird waves of light shooting out to the side, which I'm guessing is the direction of the directional light
Ah yes I see. This does look like some shadow issues. I think the waves are distant shadows from trees projected really far, but that's just a guess. Are you sure that the directional light is off when it's not visible? You should switch between two light sources (one for night and one for day) to avoid this.
It's not completely off no, just dimmed. It has to remain on otherwise the lighting is off
And the light is constantly changing
It's not a shadow issue from what I can tell, could be lightmap related. There aren't many trees in the distance, and shadow strength is actually reduced over time to 0 which is when it's at the darkest point
Which is when it's happening the most ๐ฆ
Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.
I found this online earlier but
No one really helped him resolve it
So this is a realtime light and you have baked realtime lightmaps with enlighten rtgi?
yep
hm. then perhaps you'll find an answer in your lightmap parameters. if you make a new asset and play around it may fix it, but I don't have anything more specific to suggest. If your light intensity goes down to 0, I wonder if this is somehow related to ambient lighting or cloud shadows.
The waves here are texture compression artifacts, but I don't think that applies to your setup 
I'll test some things and see what I can come up with then. ๐ฆ I did already try messing with all of the lightmap settings but none of them fixed it.
is it baked?
yes
if it is, could be lightmap UVs
how would i fix that
I'm assuming that is a custom mesh
in the unity project settings for the mesh you can enable generate lightmap uvs
no
k
should be as simple as pressing two buttons, 1 to generate it for the mesh, and 1 to rebake the lightmaps
so do i rebake after?
yes
could i ask questions if it doesnt work?
yes?
see you in about 20-30 min
thats what this discord is for
lol
Been trying to fix this for hours, does anyone have any idea what could be causing the weird dark wave of shadow going across my terrain?
It's not shadow related, I can disable shadows and it still happens
how could i make vr quality better
Your going to have to be specific because that is incredibly general
Just accidentally fixed it, was going to install Post Processing v2 to try and at least hide it a little, and after applying an empty Post Processing effect to my camera it has completely eliminated the problem.
No idea how or why, but it did
Do these weird lighting lines go away when you bake lights?
can you give more context?
For anyone working with Baked Lighting in 2022.2+ we have just released a small but mighty UX improvement: our very own keyboard shortcuts!
From 2022.2.0f14 onwards, you can press CTRL+9 to bring up the Lighting Window and CTRL+SHIFT+L to trigger a bake from anywhere in the Editor ๐ก
Time to build some muscle memory!
Hi there, just reposting this in case someone have an answer,
I wish to use the 2D Freeform Light (using the 2D renderer) and use a shadow caster to... well have shadows. From testing, I understand that the shadows are cast from the object depending on the direction of the transform coordinates of the light. I have the desired effect but sadly if the object with the shadow caster is past a certain distance, the shadow is not cast anymore. This mean I can't simulate a shadow from a distant source (godrays).
I was wondering if it was possible to extend this range somehow ?
Any clue why the shadow is showing like this ? ( the curtain shadow on the floor )
Oh i figured it out, needed to be set for two sided shadows
Those lighting lines appear when 2 seperate objects are next to eachother. Im wondering how to get rid of those and if it's there bc I havent baked my lighting yet? Sorry if this sounds dumb I'm not experienced with lighting
No dumb questions, we're all here to learn (even me!)
I would expect this to go away if you bake the lighting, though it's hard to know without looking at the whole scene setup. I'd say give it a go 
Ok thank you
How do I go about making certain objects like those flowers be affected by light?
If I drag it in to the scene it works fine, but if I put it in through the terrain it doesn't light up.
Hi all. Is it possible to stop two light probe objects from influencing each other? See picture.
The light probes don't influence each other, rather mesh renderers pick the nearest probes for their lighting
The purple lines here visualize what the nearest probes would be in that inbetween area
To my knowledge you cannot mask meshes to only use specific light probe groups
Okay; great. I was worried. Thank you for your time 
But usually that won't be necessary
If you have probes at the furthest corners of all areas, those will be sampled near the edges unless your objects have passed out of the level area
And even if they do they start lerping towards the next probe, so with that distance it probably wouldn't be noticeable
To add to what Spazi is saying, mesh renderers sample from the tetrahedral area inside the purple lines, not the probe positions themselves. We interpolate the lighting along the mesh faces and so you get the best approximation, not the probe vertices. Probes don't affect each other, they are individual precomputed samples of indirect lighting in 3D space.
What you end up with after Tetrahedralize() is a global probe structure which you can't mask or segment because it's one tetrahedral mesh (per scene constellation).
Thank you Mr. Unity
iirc the objects placed through the terrain tools are probe-lit by default.
hey guys! i would love if someone could help me with good lighting in my unity game
Making good lighting is a whole trained profession, and subjective too
Your best course of action is to find tutorials and guides to follow along and post here when you run into problems
Hey guys! I bought a AMD GPU last week, and baking lighting with GPU seems to be extremely slow? Is that normal?
Is AMD not good to work with the lightmapper in unity?
Bakery is NVIDIA only ๐ฆ
I changed from a RTX 2080Ti to a AMD RX 7900XTX
Okay, im back again to see what people think about the lighting of this room. Also to ask for help since for some reason the glass panel isn't doing box-projection like the other panel for some reason and I don't know why
Also applies to the other side as well for some reason
I have found the issue but don't know why it's happening. If the angle of the panel is more or less than 1' in any rotation then the reflection just breaks for some reason
I have no idea what the issue is, the panels that are horizontal have just broken and copy and pasting a panel that is vertical and rotating just breaks it. Box Projection also seems to have broken as well as reflections are now inaccurate
Hi guys! I honestly don't know where to put this, but I see that using the URP Balanced that Unity creates by default creates these weird sky artifacts.
weird artifacts in the sky. what could i do?
unity boat attack demo; unity version 2020.3.23; I was trying to use it instructively to learn more about lighting in unity, so I copied all their lighting settings, their post processing, and imported a mesh; generating lighting in separate project unity version 2021.3.14
but I keep getting this very light, bluish coloration on all meshes and shadows; any ideas why?
URP
sky lighting maybe?
I copied skybox, lighting, and directional light settings
may you clarify what you meant if that's ok?
Hi everybody, I'm using HDRP and trying to figure out how to switch from an outdoor lighting setup to an indoor lighting setup (Basically a low poly city map and you can enter high poly rooms of city buildings). The quirk is that I'm using Trilib to load all models on the fly from the StreamingAssets folder (So that my game can be easily moddable by players).
Default lighting is made for outdoor and since city is low poly, it doesn't matter if lighting is not optimized. However for interiors, I'm stuck...
Every tutorial I saw online about HDRP lighting includes a step of baking lighting in the lighting window but since my models are loaded from outside of Unity, it's no doable, at least from my understanding. So how should I make it work?
maybe the bluish tint is caused by sky lighting, try changing it to gradient or just color
thank you for the suggestion; I tried it, but it ended up also making the other side of the rock darker; I don't understand why I copied all their settings and still get different lighting
Maybe you can also check if the demo use some kind of color grading
I copied post processing as well
I'm really lost; I appreciate all your help though ๐
Does anyone know why I am getting these weird dots in specific areas of my shadows?
Probably lacking up to date reflections from reflection probes
And/or light probes if it uses baked lighting
Which render pipeline is it? Are you using light cookies or custom shaders?
just the standard pipeline
only shader I've made is for the display above the radio
Why do my shadows appear like this when the light has a high outer angle?
When they have a low one, they look sort of fine
and also, the shadows look pretty garbage
what do you mean by baked lighting? like generated lightmap? I used the mixed option on my directional light
I baked reflection probes in my scene
The scene may be using light probes from baked lightmapping for mesh ambient lighting
Make sure the cubemaps of the reflection probes are in appropriate locations and reflect what they're supposed to reflect
how do i make the yellow point light erase the shadow of the purple spotlight(using standart pipeline and pp)
or how should i search for source?
how?
complete noob here: anyone know how to render skybox on top of a canvas? don't know how to add sorting layers for the skybox (rendered as background in the Main Camera). Also tried camera stacking but couldn't figure out how to enable skybox in an overlay camera... appreciate any pointers!
You'll have to look into what baked lightmapping and light probes are to determine if those were used
Hi everybody, would anybody know why my walls and cube don't project shadows ? I have only one directional light with shadows enable on it but the room is still completely lit...
If I lower the directional light intensity, the room does get dark, up to full dark at 0 intensity so I don't think it's ambient lighting problem
Using HDRP btw
Do your lights and meshes both have shadows enabled
Yes, even set it to two sided to make sure
Do they appear any better if you switch from orthographic to perspective camera
In Game view I mean
Do the shadows work in any scene in your project?
Yes they do on the city map, buildings do project their shadows on the ground
I'm using the same scene to switch between indoor and outdoor models
Here is the city map for example
And here is my directional light setting
In the light explorer, it does say I use only one light so I don't think it should come from any other light
And here is the scene when I lower this directional light intensity
If the shadows work in that scene elsewhere with the same light, that suggests a problem with the meshes or camera's placement
Hm, actually, it doesn't work either in the city map, or should I say it's barely visible
After moving the cube behind the building, it should be really dark but there's barely any changes.
It's as if the shadow intensity is too low to be noticeable
But I can't find the option to increase the shadow intensity
Is it in the volume ? Or Light ? Or on the mesh ?
The volume seems to offer some control of the shadows but after playing with the sliders, it seems to affect both the bright and dark side at once, it doesn't make just the shadow cast on the cube darker.
One thing I forgot to mention is that all my mesh are loaded from the StreamingAssets using the Trilib asset (to allow modding in the future). So I can't generate lighting using the lighting windows like all the hdrp lighting tutorials show
Could that be a reason why it behaves so weirdly?
Can anyone give me some tips on fixing my lighting settings, first of all the torch itself is illuminated for some reason and is really bright (There is a point light above it)
It also appears somewhat low res even though from my experience lightmap resolution of 20+ texels should be enough (But then this level is much bigger than anything I would usually work with)
Everything is set to static and generate lightmap UV's are on too.
This is HDRP btw.
is it possible to pause baking of progressive lightmap baking? (i need to turn off the notebook the unity is running on)
Ok to answer my own question, I just had to change the shadow tint in the directional light settings. It was grey before, changing to black did make everything dark like it should
Dont think so but you can try setting priority in the task manager really low or something
what does "Mesh doesn't have albedo UVs" mean?
In your mesh importer, check the "Generate Lightmap UVs" box
Select your 3D object file and go to the inspector
There should be a checkbox that says "Generate Lightmap UVs"
I think the shadow looks correct given the position of the light and the object
hi everyone. I bought this asset pack with shaders, and these shaders includes many time nodes. (like the fog, tree sway,...) but it seems like lightbaking is going into a loop when these nodes are connected. if I disconnect all time nodes then light bakes perfectly. Is this a bug in the latest URP?
Interesting. Can you link to the asset pack if it's on the asset store?
Hey folks... no idea what I changed this morning, but suddenly my directional light is not appearing in my build. When I play in the editor it's fine, but my build is no bueno.
I actually took like 2 days to figure it out xD
I was stumped as to why I couldnt bake light
Even went as far to reinstall windows haha
thank you git!!! I moved my directional light into a child object to organize it under a ===lighting=== folder (gameobject), and for some reason the build didn't like that
Are all gameobjects, which are static, static shadow caster?
Dammy boy.
Well when they sway, you want the real time lighting to react, no?
Btw, I didnt change the shadow settings of the prefebs. It came out of the box like this so I thought it was all correct
Thanks for the help!
ah, my dumb self made the lighting category editor only xD
Oh, you are unity staff. Thanks a million for taking a look!!
No worries, I'll take a look and let you know if I can reproduce your issue.
With disconnecting the time nodes, my level designer is able to bake light (rtx 3060) however, I still get stuck on my AMD RX 7900 XTX with latest drivers
But with connected nodes neither works?
Correct
Were you able to reproduce the problem?
I didn't get to it today, lots to catch up after holiday. I'll take a look tomorrow 
I understand. Since this looks to be a AMD problem as well. Is there somewhere else I could go for support?
Maybe a radeonrays problem? (Im talking out of my butt)
Since it reproduces on both Nvidia and AMD GPUs I don't think it's a GPU vendor-related problem. Which version of Unity are you using? You are mentioning latest URP so is this 2023.2?
Seems like it does work on my AMD after waiting a long time and after disconnecting all time nodes. So the problem is def the time nodes. Since it happens on both amd and nvidia
Yes, haha I agree
2021.3.22f1
However, I also tried on the 2022 and 2023 beta
Interesting. I will investigate tomorrow ๐ต๏ธโโ๏ธ
You're the best
Hey, I reproduced the issue with the provided assets and I'll be filing a bug right away for you. I'll get back with the public issue tracker link.
This seems like an issue with the lightmapper so we'll handle it. I could reproduce it with the CPU Lightmapper as well so defo not a GPU issue.
Thank you so much!
Good news is that we know exactly what's going wrong, bad news is that there is no obvious best solution.
I see. Does the asset pack use a bad method for the tree sway?
I downloaded an office environment from asset store, it had already baked lights, from that scene I tried to redo the light baking (without changing anything) and the result was way worse
From this
To this
What do you mean by "redo", bake again?
I generated lightmaps
I have edited your nickname as it's not suitable for our server.
Try changing the lights to area lights and rebaking-- besides that, make sure your meshes are configured correctly to cast shadows, make sure that the mesh UVs are correct (and that you have Generate Lightmap UVs on) and make sure your meshes have correct normals.
The lights should also be placed in front of any emissive meshes you're using to display the light source.
well probuilder meshes automatically set to cast shadows
lights are set infront of the meshes
how do rebake>
now lights just
don't
they just dont work
i had to place new light objects
lights still go through wall
srtrange
i switched to point light now it work
Did you mark your scene geometry as 'static' using the checkbox at the top right of the inspector?
no
Please do
Make sure you have the area lights in place of spotlights / point lights and rebake. Area lights won't have the preview but they'll bake nicely
EDIT: All filled up, thanks for the help!!
Call for help: Do you want to help make lighting in Unity better? Do you have at-least a basic understanding of how to build Scenes in Unity?
I am looking for volunteers to help with user testing for the new Probe Volumes lighting feature in the product. If you, or anyone you know in your networks might be interested in participating, I'd love to hear from you. The only requirement is that you have used Unity's lighting features before, even if just experimentally.
User testing will be conducted between April 17th and 28th of April, between 10:00 - 17:00 (CEST).
During a 1hr user-testing session we provide a test project on a remote machine.
You will be asked to carry-out a short list of workflow challenges using the remote control feature of Zoom, and to speak about your experience. This informal user testing will not be recorded, and should take around 60-70 minutes.
Your feedback will help us shape the future of lighting in Unity. ๐
does exist a way to recalculate light only on one specific object?
Unfortunately, no. It's on our radar though.
ok, thanlk for the info ๐
Sounds like fun, hit me up then 
my giant donut has some artefacts in the lightmap after using bakery. The only thing I changed between this and the last version to work is a limited dissolve on that mesh in blender. Generate UVs are on.
It might be texel invalidity if the sprinkles are clipping into the donut's surface, but I haven't seen this type of artefact outside of Bakery
It might be better to ask in Bakery's channels
In any case dense and organically curved geometry is a bad fit for baked lightmapping
yeah sadly it has to be baked, where would I find bakery stuff?
The store/docs/home page for assets usually has a link to forums, discord, etc
oki thx
Hi everyone, I have a question for all of you on Probe Volume. I am trying to make a little game in unity and I looked a ton of videos on graphics because, coming from blender, I really wanted to have a "base" on how I would like my game to look before importing the prefabs, and coding everything. I saw this video for example : https://www.youtube.com/watch?v=DlxuvvYZO4Q&t=1084s . After watching this video and trying the "3D HDRP" example project I decided to try building my own scene and use probe volume as it seemed easy to set up for a nice result and ressource efficient. However I am running into a lot of problems and there is very few documentation or videos on the topic. What is your opinion on probe volume, have you been able to work with it ? Or is it too soon to try anything with it ?
Step into the famous Sponza Atrium to see how to beautifully light an environment from scratch using a mix of baked and real-time techniques. Pierre Yves will showcase the GPU Lightmapper, the new Probe Volume system, ray tracing, and path tracing.
00:06 Introduction
01:18 Speaker
01:40 Volume system
02:47 HDRI sky setup
04:16 Direct lighting &...
What issues are you running into? We're actively working on improving probe volumes at every level, so feedback is highly appreciated.
In closed space, light seems to be leaking a lot but as I am very new I don't really know if it is because of something else or because of probe volume
For example in this scene it should be very dark as there is no lights and no opening, however it looks like the light from the sky still goes through the ceilling and lights up the whole scene ๐ค
There are some known light leak issues with Probe Volumes currently. I am not sure that it's what you're seeing here though. If you can light the scene (or in this case... not light?) with lightmaps with no leaks and then switch to Probe Volumes and see leaks, then you can be sure. Otherwise it may be normals / shadow / UV issues.
What is going on with my flashlight? Look at the top, the light sort crawls slowly away. What's going on?
And what's with this weird motion blur thing?
hey guys, does anyone know how I can get the light level of a point/the amount of light received by a gameobject? I'm trying to make a kinda stealth system
you might be able to use the light probes for that
can use that to get the interpolated probe value for a position, then https://docs.unity3d.com/ScriptReference/Rendering.SphericalHarmonicsL2.Evaluate.html
to get a color from it
thanks looks a bit complicated for me but I'll try figure it out ๐
This looks to me like an artefact of ray traced reflections or GI, as those are updated over time
This trailing is also a similar temporal artefact, which could be from misconfigured ray tracing settings also, or from TAA lacking motion vectors or something similar
Are you using Enlighten RTGI?
Either this or add a custom pass to your render pipeline that queries the lights in the scene if you only care about direct light. Alternatively, considering that your character may only be touching the ground, you may be able to unwrap the lightmaps to world space and use the lightmap color brightness at the player's XZ coordinates relative to the lightmap UVs to calculate the light levels.
Hello, I am developing a game and I have this lighting problem where there is I line where there is light and another which is black. Can someone help me ?
the light is a flashlight *
Issue with wall normal map textures, likely they aren't set as the normal map type
Do you guys know where I can improve the pixelisation of the light rays ?
I am using hdrp and a volumetric fog
Here are my fog parameters
Thank you elon
So I have a 2D URP project and I wanted to add point lights but for some reason there is no light or shadow at all when using with the URP 2D asset. It works fine when I use the universal one but it doesn't have 2D lights so I can't use that. All materials act like they're unlit, even in a fresh new project, what's the problem?
Hi all, can I disable some objects/tags/layers from receiving environment reflections? Thank you.
Anyone here know how I can do baked lighting with ambient occlusion WITH Shader Graph shaders? Or are these two things not compatible
Having a lot of trouble with this
@deft fiber 1 - There is no normal map on the floor
2 - I already set the wall's normal map as a normal map
Nope I don't think.
So, changing the texture type helped the walls?
so uh
made just a slight oopsie and uh.....idk what happened ๐ญ
realtime lighting works just fine but baking just breaks textures
the lightmap ๐
You need to generate lightmap uvs for the mesh @gray harbor
You can do that with a simple toggle on the mesh import settings when you select it in the project window
idk chief, doesn't seem much better ๐
did some uv magic and it looks perfect now, thank's for the tip ๐
Hi all, can I disable some objects/tags/layers from receiving environment reflections? Thank you.
No, but you can use reflection probes, edit the material specularity, or make your own shaders to control this behavior.
It won't be perfect, but it gives you some control. Out of curiosity, what is your use-case here?
I didn't want some objects to have environmental reflections (like mountains) and some yes (like a river.). I realized I can just change the smoothness. Thank you!
no
the texture type is normal map
It looks like some kind of normal map issue, if not that
Maybe some channels could be inverted, the strength value could be wack and/or something could be wrong with the data itself, or with how the shader applies it if it's a custom shader
You can confirm this by removing the normal map entirely, assuming it uses Unity's lit or standard shader
Not sure what could be causing the floor problem
Is that a default shader as well?
Hi. I'm struggling with getting my lightings right for an indoor scene. After baking I got those ugly bright seems around the faces. Do you have any tips how to get rid of it?
yo, im trying to port this map to another game and I want to know how to get the lighting effect on the lights
Looks like the wall is full of seams, lightmap UV seams or geometric
https://forum.unity.com/threads/lightmapping-troubleshooting-guide.1340936/#post-8467097 explained here
How were the lightmap UVs generated for that mesh?
They are billboard sprites, though "sprites" in Unity terms
By default only the particle system supports the necessary billboard render modes
so any idea how i can achieve this?
I tried auto generate in Unity and making it in blender. Both had pretty same results, but I'm not sure that I did the lightmap uv in blender correctly.. Thank you, I will take a look on the link you sent
If you used Blender's "lightmap pack" UV unwrap that'd explain why it's so incredibly spotty
Yeah, I used exactly that
I wouldn't recommend it for anything
It doesn't respect any kind of continuity
So even a flat piece of geometry will be full of seams and wasting resolution into padding those seams
Do you have some recommended tutorial how to do it properly? I was looking something, but with no luck.
A proper manual UV unwrap will likely produce good results if Unity's automatic one won't
What issues did you face with the automatic one?
I had similar issues with bright seaems. I can switch to auto generate, baked and post a screenshot with the result. I will need a few minutes
Your wall looks kind of curved so that may be making it unwieldy for the lightmap UV generation, so a manual unwrap may be required
Still, some tips to address that will be in the link
UV unwrapping manually is more of a whole tech art skillset than just a technique
That's interesting. Now it looks pretty decent.
Last time since I tried it, I merge it into one big meshes and added outer walls.
Before that I only had faces on the interior.
Do you think these changes might have helped?
I probably have a commit without those changes. I will try to come back to it and look on the results.
I got it. It looked something like this.
i use a skybox
but when i start
the sky just has a flat colour
i've messed with every single light setting i've found
and nothing hhelps
please help
:T
standard buildt in shaders
I have a 2d game. the game sometimes spawns coins in front of the screen. when I enable a new canvas, the coins are still in front of the screen but their lighting disappears. what could be causing this? the light is never disabled.
check your camera clear flag setting, is it set to skybox?
yes
standart
๐ค show us your texture import setting
Could be other things wrong with the texture too, such as flipped channels or something else
Anyway that can be ruled out by removing the texture and/or swapping it out for other normal map textures
Does anyone know a work around.
I want it too look like this https://i.imgur.com/ickt5Tw.png but when I add a camera it goes like this https://i.imgur.com/J7FvJfT.png
Check your post-processing settings, this looks like bloom from post-processing
Disabling bloom does help but it still makes the world glow when I zoom in https://i.imgur.com/MnokwT8.gif
Hi in forward rendering do overlapping (same plane) surfaces end up with double lighting applied?
why dont you test it?
it does for me - really bad z-fighting like double lighting - but not sure if I am doing anything out of the normal
I guess I normally use defered, seems like a bad z fighting issue
Each of them receives lighting independently, not sure what you mean by "double"
Z-fighting is expected when you overlap geometry, not sure why you would
Yes it is limited to point and spotlight I think now - I rarely see coplanar surfaces but it can happen in my procedural stuff currently
Hi what is the differnce between the two assets?
The best option is to make it not happen
We can't tell for sure what they are just by looking at the icon here
But most likely the first one is an "URP asset" which are more or less quality levels/tiers in asset form
Assuming the second one is an "URP renderer asset" that means it's basically defining the rendering back-end features to use
URP assets can share a renderer, they can each have their own or they can have many in a list to use situationally
Thank you @deft fiber that answered my question!
Hello,
Trying to bake lighting on a Text Mesh Pro Text with color is making it just become black.
Using the shader Distance Field (Surface), which brings the correct aspect when on preview:
But when baking lights this happens:
Why do you assign the URP Asset to the Graphics -> Scriptable Render Pipeline Settings, vs the URP Render Asset? I would assume it makes more sense to apply the Render Asset
The one in graphics basically takes the URP asset as the default quality level, I think
There isn't a very good reason why the Graphics and Quality tabs both need an URP asset
I believe they're planning to simplify the system, including to make asset/renderer separation clearer or to get rid of it altogether
Awesome, thanks @deft fiber , I appreciate your help!
Is there any tip for fixing that?
The issue is probably that textmeshpro doesn't generate any lightmap UVs
So that`s a Unity issue?
TMP is designed for dynamic text elements, so they probably didn't consider lightmapping as as option
It's procedural geometry so it'd have to generate lightmap UVs additionally
And most TMP shaders don't support lighting at all
(if not all?)
Instead of TMP I'd use a quad with a cutout material and a texture of the text
Or a mesh text made in Blender or another modeling program
Hi Im following along with a unity lighting tutorial and I'm wondering why this spotlight on object doesnt cast a shadow on the robot - is there a specific shadow that I am missing? I tried enabling shadows on the specific light
Thank you
Thank you
Thanks for the heads up!
?
If a light is set to baked - and there is no baked data - will it be realtime?
i keep getting this bakery error when im baking lights
thank you, that fixed it
: D
anyone able to assist me with tattoo issues in this channel?
had to clear cache
I would assume only in the editor, but maybe it's worth a try
No
Why do you think that
I am having problems with baking, whenever I press generate it always finds its way to get stuck on this
Seconds left will increase infintiely
infinitely*
And I am using light probes.
Unity version 2021.3.23f1 if that matters.
how do i get better lighting here? something is off with the shadows... i think it would help if I had like additive shadows somehow? like dark shadows where there are multiple objects in the way of the light.. and yes cast shadows is checked on every object in the demo
and look in the trees, the denser parts of the leaves are REALLY dark compared to the rest
my ambient lighting is all bright white, and my sun is looking like this
idk why would i think a unity help server would actually help people with unity issues..... ffs
i asked if it was the right channel for it
you didnt have to be rude about it
knock the chip off your shoulder
I'm trying to make an hallway dark, I tried both using quads and cubes for the walls, putting a plane over it to block lights, two-sided shadows, but it never seems to block shadows, thoughts? The light comes from a directional light.
all you asked about is getting assistance with tattoo issues and that is it, not specific about anything else
tattoo issues about what? are you doing tattoos on a character?
and what exactly are you struggling with?
i changed indirect intensity btw, looks better, but id like shadows to look more realistic
After waiting it'd resolve itself and start baking, but this baking would take MUCH longer than usual, whys that?
I don't have too many lightprobes and tooo many static objects, neither is the lightmap res too high.
system specs?
I mean, I had the same amount of these as before, and it was much faster, even with more probes.
Yeah, I realized it was just..extremely large light probes that I had dealt with.
After fixing all those problems and light probing properly, I have fell in love with them lol
Okay, I am working with giant areas to apply light probes, hopefully having multiple groups won't cause any issues judging by how the wireframes link up
If you want good graphics, choose Unreal Engine 5 or 4 (if you have a good gaming pc)
because, in Unity, it is hard to get AAA graphics or at least good graphics
@deft fiber
I found something
here I rotated the floor on the Z axis
BUT
now the black square is inverted
its in the right
not on the left
Unfortunately im not expecting all of my players to have a good gaming pc and I also love unity's programming workflow a lot
Im not really one to mess with C++
So i want to get good graphics on unity
Ive switched to HDRP now so it should be easier
yes switch to HDRP
but @hot path if you dont like visual scripting and c++ is hard for you Epic Games created a new language called "verse", and it A LOT easier than c++
but if HDRP works then stay on unity
Verse looks like they just took python and added javascript
it is a mix of c++, C, java, and c#
I think
I disagree strongly
This is getting off topic for this channel
@deft fiber I fixed it, it was a mesh problem. (This game is a PC port of a mobile game) I replace the .obj mesh in the mesh filter component with the same mesh but in .asset ; now it is fixed. but there are some meshes that are only .obj and not .asset . do you know how to convert this type of files ?
".Asset" is used by the editor for a variety of its own file types, not something you normally ever have to contend with
What do you mean by "pc port", do you not have the project source files?
I decompiled the unity build
Shouldn't you have the source if you're developing a port? These kinds of issues are not part of any normal workflow
I only dont have the scripts
I made them from scratch
@deft fiber the "WoodFloor" file is the .asset file; and the "Wood_18..." file is the .obj file
.asset "WoodFloor" file properties
.obj "Wood_18..." properties
.obj parent file properties
There really isn't supposed to be loose mesh data assets floating in the project
This is an example of a decompilation issue, I presume
no it is not a decompilation issue
its just
ok
just
ill send you something
the .asset mesh applied to the wood floor
I think you showed this already
the .obj mesh applied to the wood floor
It looks like the mesh data is partially loose in the project, some of it lacking normals, or something similar
Again not really something we're expected to face unless the project is decompiled or corrupted
But considering you said the project is a decompiled build, that seems like it'd explain it
I dont understand what are you saying
the "mesh data"
Mesh data assets should always be generated on import by this type of file that contains that data, and reside under it, because mesh assets are more than just the geometry
I re-imported it and it doesnt work
Well, you could try to re-export it in a modeling program to make sure it's not missing any data, but I can't really help because issues with decompiled projects are totally unpredictable and out of scope of game development
Decompilation is against the server rules due to this reason, and for its dubious legality
I re-exported it in a modeling program and there is still the black line
You have to make sure that the data that is there makes sense, vertex normal direction most importantly
Anyway, normals don't randomly turns sideways or whatever when you're working with proper sources
If you're legitimately porting a game, you should never have to decompile anything
yeah thats pretty dodgy
not sure also how this applies to lighting
seems offtopic to me
this I disagree with quite a bit, even in unreal if you don't know what you are doing you won't be able to achieve a high fidelity with good graphics
noticed your still running into similiar issues prior, what pipeline are you using again?
URP im trying to use HDRP now
but i took a backup so i can switch back
im gonna upload a video to #archived-hdrp in a little bit showing a serious group of issues
the reason the lighting doesn't look good in that instance is because there is no global illumination happening
i have realtime GI on
shadows are flat, trees are also flat, no blend between the two
its not doing its job here
well why not
those trees are painted on a terrain right?
yes
yep, thats probably why
? why
terrain lighting sucks pretty badly
when you paint objects on a terrain
unity resorts to lighting them mostly with probes
so am i just meant to make my own terrain thing
no, there are ways to make it look good
but in some way yeah
but to keep things simple
to imrpove the lighting of that scene
I would definetly use ambient occlusion
SSAO
since I recall also your lighting is fully dynamic, which certainly makes things harder
SSAO would help ground your trees and other terrain objects
HDRP will be an improvement but honestly not that much of one I would reckon
Realtime GI needs to be precomputed, assuming you mean Enlighten
SSAO is a post process effect
HDRP could also be a downgrade if you aren't familiar with configuring and using it right
There's a lot to learn in it
yeah thats what issue im having atm
yeah but my scene changes a LOT
i hit generate lighting
but thats what it looks like after
You have to make sure you're specifically precomputing realtime GI, not also baked lightmapping
the problem is that as far as enlighten is concerned all that is baked is just the terrain itself, not the objects painted on it
which is why his trees and lighting looks awful currently because it resorts to probes
Quite possible, considering Terrain uses GPU instancing for trees, I think
That's something to test and confirm before trying to use it "in the field"
My advice is that you start using HDRP on the template project
You'll be quite lost if you try to upgrade, as you're not only lacking examples of HDRP features working right, you'll also be fixing stuff that broke in the change
does HDRP let you work with terrains and trees? also will i be able to import all my scripts because i have a lot of stuff already working
what usually breaks/changes between SRPs are lighting/materials/shaders
your scripts should be unaffected
unless if some of your scripts specifically mess with lighting then you might need to change some things
how am I meant to import it though
import what, HDRP?
the pile of scripts and prefabs and objects i have
You'd install the package, configure the project to use HDRP, convert materials, lights and settings using the Pipeline Converter
Anything else will be untouched
^
ive done that
i meant for your idea of creating a new template project
Oh, I mean that mostly just for tests and most importantly practice so you're not flying blind
oh
But sure you can export+import all your game content as an .unitypackage if you so wish
The new project would include pre-configured HDRP settings which may work better than what you've got hacked together currently
Hi are there any common reasons why a shadow wouldnt be showing up on this baked spotlight. I appriciate your help!
I'm assuming you want a shadow to appear on the mesh but that mesh is a skinned mesh renderer
you can't baked skinned meshes within unity
Yes, I want a shadow that outlines the character (using urp)
i want a shadow on the lightmap, if that makes a difference to what you are saying
baked shadow
would it wrk for realtime
yes
ok thank you
Hi there,
I am a bit confused about shadows there are so many areas to set the shadows and im not sure whats more important light source ,or the object, or the urp renderer if someone could provide me with any resources would be really helpful. Thank you!
Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.
Awesome thank you
is it possible to bake shadows entirely?
yes
Is that through ShadowMask?
shadowmasks are for when you are using mixed lighting
what if you are doing only baked
does that happen automatically or is there a setting for that
should happen automatically if your mesh contributes to GI and casts shadows, and if your baked light source also is casting shadows
Understood, I appriciate your help! @night shell
Hi,
My question touches both lighting and the new water system.
I have followed the guides and have the water system working, however, the lighting system is giving me quite a bit of confusion.
I have the hdrp outdoor setup
I have sun with strength 100000 Lux (High sun)
I have an ocean with an absorption of 9
A red cube at the bottom at 20m (units)
Down at the cube I have my camera, and a spotlight of 172376.7 Lumen (which is insane high)
Still I get the following result:
Could it be that the system doesn't take the water light absorption of the sun into account when considering underwater spotlights at depth?
A normal dive light has around 2000 lumen (more or less). So I'm already cranking up the spot light quite a bit.
This is without the ocean
So might be still my misunderstanding. But I expected the spotlight underwater up close to be way more intensive.
I know that when I'm diving at ~20 meters, and I turn on my torch of 2000 lumen, I can definitely see the result at 1 meter
any feedback on this?
i think it looks better but i want feedback
i added ssao and sss
idk what's going on here, I am doing baked lighting in URP. I had no lights, and everything was blank as expected. I put one small spot light and its somehow gone crazy
this is not what I expected from a single small spotlight at all
generate lightmap UVs
what is that
I'm having this issue with a plane with a water shader on it recieving shadows, creating this odd double shadow effect. Shadows seem to be casting onto the water plane and then onto the ground below it, causing a jarring and effect and doesnt seem to be how real life works too. Was wondering how I would be able to turn off receiving shadows for the water plane since I dont see any option?
Receiving shadows is done in the shader
If the PolygonNatureWater shader doesn't expose that option, you may have to modify it
yeah sadly im not even seeing that option in the shader options, you can see when i have the "Surface Options" open, theres no settings in it
ended up finding it in the shader settings, just not familiar with them\
thanks!
does anyone know why i don't have any shadows/darkness at all? i believe its a setting or something i might have messed up, but i cant seem to find it
How are you lighting the scene? Baked, realtime or some other type of lighting?
The cave is lit by the scene ambient light / sky, which cannot be occluded without some form of precalculated lighting
it was the scene ambient light that lit everything up, i made it work now๐
So it costs at least a bit memory having light objects in the scene. Is there a difference in just disable them or deleting them before building? Especially light objects that are only used for baking.
having issues with bakery
use the normal GPU lightmapper ๐
i mean
not technical
you see, i've got a lamp post similar to this
and i want a spotlight
problem is, i cant put a spotlight inside the pole or else there will be no light
here
and i cant put it to the side or it will cast a shadow
disable shadows for the lamp top
thanks
one more thing, i haave white spots in dark areas, can this be solved by just making texels per unit higher or samples higher?
also, bakery is much faster and i dont feel like waiting 5 hours to render the 100 lights in my scene
this is likely caused by too few lights in a large area of GI recievers or small emissive meshes that are getting samples too sparsely
soo just add more lights?
5 hours?! with good lighting settings on a nice GPU you should never go that high with GPU lightmapper
because i think it'll be fixed since this is the same area with the broken lamp posts
I have a 1650 :/
Hm... Bakery is optimized for Nvidia cards especially the older ones so I get it.
anyways, thanks for the info
oh yeah, forgot to mention the normal lightmapper is probably slower because im on 2021.3.5f1
Figures. We have made massive improvements in later versions (2022/2023.1/2023.2), most especially to improve speed / stability with lower-end cards. Next Monday I'll try to optimize the normal GPULM settings and try to beat Bakery's times with a 1650. How many GB VRAM do you have?
4 gb vram
it worked thanks
i am using it lol
this was back to URP btw
i would rather get HDRP working
also i tried out UE, dont really like it for a number of reasons, namely infinite storage usage, it takes literally 2 minutes for ever save even though i have a pretty damn good PC
and lots of other small issues but it does have good lighting BUT i think i can good enough lighting on HDRP
I kind of don't understand the art direction, is the ground supposed to be a desert?
its a snowy forest
ive been told multiple times
my snow is shit
how do I add a glint to it? and also I need to find a good snow texture but ive got LOTS of sources for that
my best guess is a very small bloom effect paired with some specular highlights / detail mask
beyond that, I think the color of the sun could be colder
i dont understand those, not a professional artist yet ๐
maybe
anyways i dont even have my scene working on HDRP yet
its SUPER buggy
like really bad lol
i posted a video of it
#archived-hdrp message here you go, along with a list of important issues
maybe i make a thread for HDRP issues?
i think ill do that, can i include multiple messages for a thread or nah
There's no way to make a 'good' snow glint without some shader magic
Here's a how Journey's sand glint was made which is very similar to snow https://youtu.be/wt2yYnBRD3U
I don't think so but you can always link to them within the thread
I like the snow particles ๐
perhaps some frost / fog ??
there is some light fog but yeah
yeah its an asset i got
I stand what said before which is that if you don't want to be fighting against HDRP you'd have to practice its use first separately
Only then attempt to convert a pre-existing project and face the conflicts of that process
nice! look up boreal forest for references like so and study them, like adding snow on your props around the scene
Even the basics of HDRP lighting are far beyond what you'd ever do in other render pipelines
most likely because its not working on my main project
yeah i saw a shader tutorial on how to add snow to meshes, i can try that out
you can stack materials right?
or no
depends on how many submeshes you have I believe
intersting, ill have to try it then
Snow is a challenging subject because it almost entirely defies all the principles that realtime graphics use for representing materials
It has no "texture", no "reflections" and it's very translucent/transmissive with sub-surface variation
So don't feel bad if it seems difficult ^^
Most snow you see in videogames looks like movie snow, kind of plastic-y and without that crystal element that makes it so beautiful. But yes, an approximation like that is enough to suspend disbelief.
fair but i am attached to the dream of the first map in my game being a snowy forest lol
i love snow and i love forest
so i can make it scary ๐
A non-realistic artstyle is also great for tempering player expectations towards the visual accuracy
but then its kind of less scary idk
i wanna get good at art anyways
because i have a reasonable amount of programming background but i had like 2 hours total of art background in my entire life before ive started working on a game
hopefully ive got the creative mind in me to make good stuff, and hopefully i can find a good resource for learning art concepts
is it possible to use specular/metallic highlights with light probes in URP?
nope
you need a reflection probe
Practice and study are important, art excercises especially
I don't want to discourage you but you're facing a lot of problems at once on the daily with this project
It's often better to ramp up the complexity at a steady pace instead
could I just like, duplicate the light probe and change it to a reflection probe?
no, you need a new gameobject
or could I like, change the lights to mixed and only use the realtime lights for specular stuff on certain materials?
yes, though would probably still need a reflection probe if you want accurate reflections
how do I make sure I only apply those lights to specific objects? I don't want to have the performance cost of baked lighting AND realtime lighting, just cuz I want some realtime effects on basically a single game object
is it possible to do that?
like if I mask it to only that object will that actually save performance or will it just discard calculations that arent on that object
yeah but i feel like its all art-related, meaning i can just dedicate a whole bunch of time to learning art stuff outside of my project, so i kind of agree with your advice regarding HDRP but im not sure what to make lol
you can use light layers for that
and skip the ref probe if you just need the specular response from the material instead of an actual reflection
im not sure exactly what that means but basically here is how I got here
I am using a sprite weapon, like the classic doom, but with shading and a normalmap. eventually realtime lights kept bothering me so I went to baked lights, and to make the sprite respond I needed to add light probes. and now it doesn't have that shiny look since there is no specular
most of my scene right now is illuminated from a single direction light and a lot of bouncing, is it not going to have any shinyness if it doesn't have a direct LOS to the direction light?
Why not use reflection probes? They normally go hand in hand with light probes
Rather why avoid it specifically
yeah so if you are relying on bounce light you pretty much need a baked reflection probe in areas where you won't get direct LOS to your directional light
thought it would be simpler since im only doing it on one object that doesn't need to be perfectly accurate, just convincing
I also don't have any tool to place light probes automatically so I'm gonna probably have way more than I need and im worried about performance
there is no fps/performance overhead if they're baked
same for lightmaps and light probes, you just load them from disk and that's it
well, it would be RAM overhead or something then rather than CPU
In my opinion it'd be a great excercise to make dioramas, or isolated parts of an environment based on any random idea
I learned lighting just by experimenting with basically every feature I could find, though it didn't really leave me any porftolio to show for it which the diorama excercises would have
a single reflection probe goes up to a single 2048 cubemap texture, you can go way lower and you can also compress them
Light layers probably have more overhead
Reflection probes are ancient tech and you don't need many of them
well that fit what i was thinking about already, do you know "I'm on Observation Duty"?
it looks like I need to place one in each room?
yes pretty much
:/ idk if I want to use them then
basically you try to find what changes in a few different rooms, and its sort of like a diorama for each room
though I guess I have to if I want shiny materials
One in each area where the lighting changes
If your rooms have "similar enough" lighting you might need just one total
but the walls would block reflections would they not
No, anything within the probe's range will receive reflections from that probe
no, but you'd risk some weird leaking though
Yes, that'd be a great genre of game for a visual environment designer to practice ^^
does the probe ignore mesh renderers or something?
also can you just like not scale a light probe group?
Each mesh renderer finds the closest probe and uses that for reflections
Same for light probes
alright, i think ill take like 3months, 6months off? to make that kind of game? but im kind of worried about running out of time to work on my main project once I go to college, and then by then it feels like the game im trying to make will already have been made LOL
but this probably isnt the place to talk about that
from what I understand the reflection probe works like a 360 degree camera, so a reflective surface can show the surroundings on it or something
so if you have a response #๐ปโunity-talk might be better
so if the probe is in a location that doesnt see the light, nothing will see the light right?
it works exactly like that yes
and if it's in a location that does, then it will always think it's in direct light
Correct
so only one probably wouldnt work for the level
Mixed lights are required for specular shadowing like that, but then you incur that cost
Or multiple reflection probes, yes
in the time we spent trying to convince you, you probably would have made all the reflection probes just saying ๐
nah cuz in one level theres hundreds of invidual small spaces and in an entire game that's gonna be a ton of work
im gonna see how the light layers thing works
I recommend you try them both out
Reflection probes don't take many minutes to set up!
Note to self: make "auto place reflection probes" button
it would be really nice for Unity to include a way to like "filter" a volume of light probes (and to place one in the first place instead of having to duplicate selected over and over) to remove probes that are in a large area where the lights don't change
cuz as a single person team I just don't think I have the time to manually edit all the shadows in the world
probe volumes kind-of sort-of solve this
but there's a ton of unnecessary probes in that case
also is there a way to place probe volumes? cuz I only see the option to duplicate selected
and like, make a box by extruding the edges repeatedly
Probe volumes are a wholly different new system
do I have to add them to my project to be able to use them
cuz it would be really nice to just automatically fill in probes with a specific density within the convex areas of my level geometry or something
like the bounds
they're available in HDRP in 2022 and above and in URP in 2023 alpha
not saying you should use those editor versions just for probe volumes though
well the alternative is placing thousands of probes manually with duplicate selected or paying for Magic Probes
so I think I probably will
hm I'm trying to do the realtime thing and having a problem, basically the probe lighting appears to respect the normalmap but the "mixed/realtime" lighting doesn't and just lights it in a straight line
im gonna set it back to baked instead of mixed and see if I wasnt just seeing things
yea there's no "line" when it's baked
basically I'm just using this standard shader
on this object with a sprite renderer
and it seems that the indirect lighting is interacting with the normalmap of the material but the direct realtime lighting isn't
or...
its not doing the normalmap at all and it just kind of looks like that because of the directional information on the probes
https://github.com/cgaueb/light_probe_placement there's also this free option which looks well made, though I can't speak for it
hm ill try it out thanks
What does your level look like? From your description it sounds like a worst scenario for any kind of baked lighting
it's incomplete but mostly interiors with holes in the ceiling for light to come in
but realtime lights are just so ugly I can't stand using them
the problem I have is with the sprite renderer I think
when I was in the built in pipeline the sprite renderer didn't respect normalmaps
like at all
so I had to find a shader somewhere on reddit or something that applied normalmaps to a sprite renderer
but that shader doesn't work with URP it seems
which is what I switched to in order to get decals
if I try to do a regular shader on the plane, it shows the entire spritesheet at once
but sprite renderer seems to ignore normalmaps
like this looks pretty nice, WAY better than realtime lights which have instant sharp shadows and fade away in the distance and stuff
I actually like the sharp shadows in certain cases, but I want them to be overlayed onto a soft-lit area with bouncing rather than solid black
like you can't see the grate texture of the skylights because it's baked
but if I set it to realtime, you can't see the walls at all
and I don't want to just add ambient light because some areas do need to be pitch black
These kinds of spotty ceiling windows with sunlight definitely are kind of a worst case scenario ^^;
I mean it looks nice to me, much nicer than realtime
just doesn't look nice on the weapon because it's so soft
but I don't have a normalmapped sprite shader in URP
Light layers may help, but the sun's shadow casting still needs to render the environment, or there'd be no shadows from the ceiling
and this is why I can't just use a normal shader lol
doesn't even look like the normalmap is registering here anyways though
nvm it is... just extremely faint
Sprite renderer with a lit normal mapped material 'works on my machine' on 2021.3.
the range is big but I had to turn the intensity to 21 to get anything
You can change a material's tiling and offset values to replicate the frame animation, if you refer to that
normalmap is actually working though on a normal shader
just the realtime lights are weird
I noticed when I switched to URP it seemed Icould not increase the range of lights
no matter what I did, the light never reached further unless I increased intensity, which made a giant white overexposure spot where it was
I'd have to write a whole system to do that though... which maybe I will have to
but finding a sprite shader with normal maps would be much easier
URP uses logarithmic light falloff, and the range is just for clamping its maximum range of influence
BiRP on the other hand uses linear light falloff, afaik
Or just keyframe the material's Tiling and Offset properties
so... all my lights are just gonna have to look really overexposed if I want them to have any chance of reaching the weapon?
why can't you do broad soft lighting in URP?
doing that manually sounds awful
like without being able to set a certain frame index to a point on the timeline
Well, that's not really expected
URP light falloff is real world accurate, for better or worse
So it also depends on unit scale
in the real world though I've seen lights where the wall 1 inch away isn't white and yet the whole room is illuminated
like this light can't even reach the edge of this room despite the range being massive
Our eyeballs have an extremely wide dynamic range
Game renderers tend to simulate cameras
I have to make it burn your eyes out to do so, whereas I feel I did not in BiRP
that's due to the albedo of the surface, the bounce lighting, and as Spazi says our eyes
maybe I should go back to BiRP, it has baked lighting right?
for some reason I just felt like I could NEVER get the lighting right in BiRP, felt like it never bounced and it took years and years to bake
Also make sure you're using HDR, tonemapping and linear color space
URP light attenuation won't look right otherwise
I set linear color space, where do I set those other ones
HDR is enabled in URP asset, tonemapping is a post processing voluime override
birp does have baked lighting but sticking with URP is better for every other reason
I'm not sure how HDR works technically, or why the dynamic range doesn't appear to be customizable, but an eyeball simulation option would be nice
Would also be nice to configure light attenuation
HDR seems to be a bit better
although the range still has to be absurdly large to even reach the back wall lol
actually nvm
I had it bigger than it needed to be
It's for limiting the range, not extending it
however, my main issue of the weapon shader is still a big problem
there isn't any converts that convert shaders is there?
the one I ran in the first place that was build into unity didn't fix the weapon shader
probably cuz it was custom idk
No, the pipeline converter only looks up matching Unity shaders and swaps them
whats the big issue with going back to BIRP tho?
if I can get a decal shader there I dont see the issue
The birp hasn't been in active development for a while, so most of the tools there are antiquated. If it works for you though then yeah no reason not to use it.
do you know of a decal renderer within the BIRP
also for some reason it seems the directional light simlpy is not affecting my weapon at all
You can get flipbook animation for non-sprite shaders, and from what I've seen you can also get normal mapped lit sprite shaders using Shader Graph
like a quad? ๐ค
that has z fighting
built-in unity package that comes with the render pipelines, allows you to make shaders using a visual node system
Shader Graph is URP's (and HDRP's) tool for creating shaders
Flipbook is the generic concept of cycling parts of a texture to create animation or other types of sequences
so you're saying I could code those tools myself? not that they exist already?
I could make maybe the flipbook animator
but there is no way I'm writing a shader
I still know nothing about shaders
my normalmaps were broken for a super long time just cuz the thing I was using to generate them had like, one number slight off, and it broke the whole thing
if I do flipbook on the material tiling though I wont need that
interesting thing, so the directional light I believe actually WAS affecting the normalmap but it simply looks bad, I guess because it's a flat shape. but point lights look pretty decent with it...
not sure how I'm gonna get good sharp lighting outdoors then
cuz it makes that ugly line that the point lights usually don't
I hate lighting ugh
might just have to not have sharp highlights outdoors tbh
hm I think I know the problem
the light probes are just a lot softer than a point light
which I LIKE for environment, but not for the weapon
I think because it's averaging from multiple probes or something
is there any way I can like increase the sharpness of the light it gets from the probes somehow?
light probes are softer than regular lighting because of how they work
they are almost like an ultra low resolution cubemap (think reflection probes but super low resolution)
as for increasing the sharpness, there is no in editor way for that currently (I think unticking removing ringing option could get you close). But if your writing your own custom shader...
and in that case within the shader you can apply some changes to make the probe lighting appear "Sharper" in some respects i.e. increasing the contrast of the resulting color or other ways
if you struggle with lighting and hate it, could just make your game flat and fullbright ๐ then you don't have to deal with lighting
but as for again retaining sharp lighting on probe lit objects its again possible, either through what I described or through some other more complex means that I don't know if shader graph will allow you to do
hm, I can't just decrease the amount of probes that it smooths between?
having more or less probes doesn't make the results sharper
only having more probes basically just increases the precision and the accuracy of what the light should look like at a given spot. doesn't make the result sharper, it will still be relatively soft most of the time
Ok id like to ask what the hell a reflection/light probe actually does?
a light probe is a point in space that is used by dynamic objects to sample lighting from
Why does it exist
to properly light dynamic objects with lighting that matches that of the rest of the scene
its almost always used in tandem with lightmaps
does that help explain it?
each ball is a light probe
each ball is placed in a spot where lighting is sampled. this lighting enviorment is used by dynamic objects in the game world
those balls basically show what the lighting of an object would look like at a given point
And so a dyanmic object sort of lerps between those?
Are they cheap?
yes
I believe enlighten realtime GI works with these probes as well
but generally they are used with typically static lighting
yeah it probably wouldn't
reflection probes are more than that
they can be used for mirrors
but in reality they should be used whenever you can
reflection probes are basically very similar to light probes
except that obviously they are a tad bit more expensive
Arent they expensive cuz higher res
a bit more expensive yes, depending on the resolution and the rate at which they are updated
if they are realtime anyway
which in your game they would be
for PBR renderers reflections/specular are CRITICAL
to getting good results
In what way
they provide the proper shine and enviormnent reflections at any given point. PBR is all about proper surface shading, and in order to do proper surface shading you have to feed it the right information
let me show an example
but in comparison to light probes lik ein this example, reflection probes would be used more sparingly since they can be more expensive but the idea is the same as light probes
its a point in space where the reflections of the enviorment are sampled from
give me a moment booting up unity
When is a render considered PBR
pbr - physically based renderer
to keep it simple it mostly starts with the shader that you use
and if the shader is a physically based shader
the unity standard shader for example is a PBS shader
and most of the other unity shaders now are using physically based models
lots of simplifcation and things im glossing over of course but generally thats the idea
Does that include hdrp lit shadera
yes
So i def want reflection probes then
100%
being physically based is in the name, its about using actual math and information to accurately shade materials
so material properties, light angles, and also imporantly is enviorment information
am I losing you?
Reflection probes are cool
enviorment example but showing you what a scene looks like using physically based shaders would look like with and without reflection probes
top one is with reflection probes
bottom one is without
now
The shiny stuff doesnโt look too good
here is the enviorment example with only the sky as the reflection probe
and you can see that even with "reflections" it looks wrong in this case
because the only "reflection" that is being sampled is the sky
so thats why you use reflection probes
because they can sample "reflections" from your actual scene
understand it a little better now @hot path ? or still have questions?
doesn't have to be just for "mirror like" or reflective materials
its needed also for some more diffuse materials as well
looking at the wooden table also which is rather matte you can see a difference here with proper reflection probes, versus without it or with incorrect reflections in the other screenshots. the color is off, but when its configured properly it looks more correct and right
aaaaaaand probably lost y'all
sorry i was busy with other stuff
now the question is if YOU are still here ๐
yes
uh just some questions, the floor looks wrong with the reflection probe
is that just bad configuration
i actually like the floor more without the reflection probe is what i mean
ouch
?
yeah from that angle it looks a lot cleaner
when i was far away though i could see a lot more floor detail without the reflection probe
not sure why
not sure how to respond to that
not quite its more of that someone doesn't really have the eye for realism
It depends on what style you are going for I suppose, if you prefer clarity of textures/details over reflections that is your choice
up close the reflections are good but far a way it was affecting the texture quality lol
ahhh you mean mip mapping thats probably why
so true thats why i have to ask every three seconds why my scene looks like shit ๐คฃ
well to pivot away and back to the original question
do you understand light probes and reflection probes now?
somewhat yes not sure how often to use them or how to use them though
The Unity Manual helps you learn and use the Unity engine. With the Unity engine you can create 2D and 3D games, apps and experiences.
for reflection probes its simple, you are given a bounding box, anything within that bounding box will use the reflection generate for that box
thanks ill read that later im gonna give my mind a break and do some gamin
interesting
I can't find where to enable Generate Lightmap UVs. Also, If I mess with the angle of the directional lighting is or add roughness to a texture, the baked lighting gets messed up. Any ideas on how to fix this?
UV generation option is in mesh import settings
Static lights and objects should not be changed after baking lightmaps
Precomputed realtime GI can adapt to light source changes
How do I get to mesh import settings? Is it possible to send an image? Also, is there a way to undo baked lighting then, until I'm finished changing static objects?
click on your model/mesh asset in your project window
the mesh import settings will pop up in your inspector tab
Also, is there a way to undo baked lighting then, until I'm finished changing static objects?
In the Lighting Window (Window > Rendering > Lighting) click on the small arrow next to the Generate Lighting button and select Clear Baked Data
also can you describe it more what you mean by your baked lighting getting messed up when you move your directional lights or add roughness textures?
Thank you!!
For sure, when I switch the texture shader from standard to autodesk interactive then add a roughness material, the lighting does this:
A similar result happens if I rotate the directional light.
I baked lightmap this scene. It seems not all right. How do I fix this lightmap baked problems like this?
generate lightmap UVs
and try to bake
if you already have them its probably some other issues
Assuming that your bake is finished and you have auto-generate off, nothing can change the baked lightmap texture but another bake
Shaders can technically have different ways of sampling the lightmap, but supposedly all that support lightmapping should be doing it the same way
In this case I would make sure the bake is finished and not on auto-generate, then confirm that the artefacts we're seeing now don't show up
I already did. but what some other issues?
Check UV overlap and texel invalidity scene window debug view modes to rule out those problems
If what we're seeing are neither UV overlap or texel invalidity then I'm not quite sure
https://forum.unity.com/threads/lightmapping-troubleshooting-guide.1340936/ might be able to find a matching problem here
ahh I see. Ok thanks.
hey, how would i make this more realistic?
Why UV overlap and Texel invalidity didnt show this? Did I wrong anything?
these shows same with UV charts
Many of the debug views are valid only after the bake for that specific scene, up until the editor is closed
The dark grey checkers imply exactly that, I believe
Ok understandable.
Can you explain these reasons? (Lightmap UV artifacts)
If every mesh has Generate Lightmap UVs enabled, the resulting lightmap UV should be valid with no extra required on your part
But to confirm that you'd have to do another bake to get to the debug views
Basically those rules are so that when a light ray hits a point on a mesh, there will be a place on the lightmap UV for the light calculation result to be painted on as a texel
(or rather, valid texels to fire the rays from to determine the color would be more accurate I believe)
Ohhh Understandable
maybe I understood hard.
Missing shadows, fog, post processing
agreed
The checkering is displaying the atlas resolution. Oh, and btw, the ephemeral nature of the debug visualization modes should be improved a bit in 2023.1+. You're able to view them even after closing the editor as long as you are baking on-demand.
That's good to hear 
hmm... is it possible for me to have an object which recieves light both from light probes AND mixed lights in a realtime fashion?
and additionally does anyone know how I could render somthing lit as if it was a single point?
basically it should be all bright or all dark
rather than having the line
I just want it lit uniformly as if only taking light data from a single point
yes
should already happen by default
mixed lights already cast realtime lighting
yes but it seems that individual objects only ever receive mixed or baked lighting
not a mix of both
as for your weapon model and the shading not sure whats going on there
are you using purely baked lighting?
and light probes?
basically my weapon is a 2d plane with a normalmap
huh intresting
I'm trying to emulate an effect from Amid Evil and failing completely lol
what is your scene lighting setup though, are you using light probes?
sort of
I have some light probes but I don't like how they look on the weapon
so basically for the level geometry im using bounced baked lighting
I like how that looks
but for the weapon I like the sharpness of the realtime lights
however I DONT like the line going through the middle when it has a shadow
and additionally I want to mix in some of the light probes so its not pitch black in areas that have some boucned light
but I want sharp highligts that the realtime lights give
ok, whats your light probe setup for your scene though?
