So in unity you can bake lights and you have to make the gameobjects static so they get a lightmap
So I did made my objects static and bake the scene light.
The result in the editor and in editor play
this is what I want
But when I build the game I get this
there is no light at all or its just spread all around the floor
The floor gameobjects are just primitives with a texture
I tried to reacreate the bug by placing some gameobjects and lights in a new scene
in both editor and build there was no problem
I used the default camera to make sure its not a issue with the camera on the play but no matter what I do it has the same effect on the previous scene.
I tried making the direct samples bigger inderect samples bigger and enviroment samples bigger
also the lightmap size bigger but nothing works.
LightMap Settings
Quality Settings
Okay so they way to fix this is go to
Edit > Project settings > Player
go to other settings and disable lightmap streaming
You need to disable it because huge maps like mine generate a lot of lightmaps and streaming all of them in runtime is really slow and so the lightmaps is really low res
Related
I'm building a virtual exhibition platform in unity. There are about 50 stalls and I used a directional light and 124 point lights light up the scene. I didn't use any real time lighting, only baked lighting is used. But at runtime frames get dropped. when I inactivate all pointlights it works smoothly. How can I optimize lights?
You can improve your performance by doing the following,
Add Light Probes, this can minimize the number of point lights in use.
Change Render Mode to Auto, this will reduce the load significantly in your case as there are a lot of point lights in use.
Apply a culling mask, make sure the light affects only the required object in the stall.
Use Fake Shadow instead of using Soft Shadow.
Switch to URP or HDRP.
Alternate way :
Build and bake each stall separately in Blender or Maya. Then add them to unity. This way you don't need to add that many point lights and bake.
124 Point Lights that is a LOT of lights, but you could use Deferred Rending path on your Camera (but if you need VR I'm not sure its supported).. You can set the Point Lights to be Baked, use Baked lighting and light probes instead. Set everything that won't move in your scene to be Static objects (very top right corner box). also remember to go into Rendering -> Lighting and Generate the Lighting and look at the options presented there.
Light probes video
I have made my game and I am currently testing it. I have discovered that the textures in the WebGL build are blurry and it obviously does not look good
Here's a comparison:
Editor Image
WebGL Image
I have tried changing the setting of the sprites but it does not change anything (that I can notice and would solve my problem).
Here is a list of a few solutions that could help
Disable mipmapping on your textures
Change the texture quality of your project for WebGL, which should be under Edit > Player Settings > Quality. I believe it defaults to Very Low
Change the filter mode of the texture to Point
How large is the current texture you are using?
My point lights renders in unity but it wont render in the oculus headset. What could be the cause. I Could not find a solution online.
I am using URP
Add more details if possible, are you using baked lighting, mixed, realtime? It might be your light per pixel setting.
Try to disable any other light in the scene and leave only the spotlight, increase the spotlight range and check if the spotlight works.
If it does, then it's your light per pixel/vertex count, you can edit it from your Settings folder, opening up the URP profile you're currently using, it's called Per Object Limit:
Do not go beyond 1 on the Quest and bake lights if they don't have to be dynamic.
guys!
I want to use Unity 3d for the AR project, for this, I need good shadows for the small objects. But when I start HDRP project and look at the demo scene I see terrible shadows... So the question is - is it really possible to get good shadows in Unity doing some adjustments or this the top what I may get? If it's possible, could someone point me out where to read how to set up good shadows for the small objects in Unity?
Mulitple factors comes when talking about shadows, such as general game quality settings, antialiasing, light settings, Normal Bias, occlusion, and more. You can change thoses settings in Unity editor directly.
You should check:
Edit > Project Settings
Ligh inspector settings (hard or soft shadows)
Window > Rendering > Lighting Settings
You can kind of "play" with settings and see where you go, you can get good shadows for small objects in Unity3D. Don't forget that some settings could be very consuming depending on your hardware (you are doing AR so mobile), just keep in mind.
Good luck !
I have a really complex terrain in Unity, its full of trees, grass, flowers etc.
When I run the game, the frame rate is really low, maybe 1 to 3 fps.
I read some where that the terrain resolution may be the problem since i got it cranked up high.
When I try to lower the terrain resolution, unity erases the whole terrain, which is bad since I can go spending two months to remake it all over again.
Does anybody know of a way to change the resolution of the terrain, and other terrain parameters without losing the whole terrain?
Maybe there is a script in the unity asset store that can export the terrain and lower the resolution, and re-import it, or something like that?
Anybody know of script or method to do that? I don't have time to develop a script myself, or spend huge amount of time on this.
I know one thing you can do is decreasing the resolution of the texture you used for terrain and grasees or trees on it.
What you are trying to do is very complex and will take a lot of time. An alternative way of getting higher FPS is to select all your non-moving objects, or just the prefabs in your prefabs folder and check Static in the right-hand corner of the inspector. This will boost your FPS but if you have a day-night cycle you should uncheck Lightmap Static by pressing the downwards arrow next to the Static button in the inspector.