- Home /
The question is answered, right answer was accepted
Seams between Primitive Cubes
The walls and floors are cubes. The light shining on them is caused seams to appear. What is a simple way to fix this?
Each wall needs to be separate so that when the player touches it, it will trigger an event.
Thanks!
First: Are these cubes exactly aligned on top of each other?
Second: Are these cubes made inside unity? You could try making a simple cube in Blender and remove the top and botom. So the faces dont get drawn.
Let me know if you do not get what i mean.
heres an image illustrating aligned and not aligned cubes respondse on light.
They are not lined up on stop of each other. They are only side-by-side.
They are made inside unity. Uunfortunately, blender cube only makes things worst.
How are you able to get the light not to show seams? I build the map dynamically and place them exactly side by side.
holdon a sec.
do you have lightsources inside every cube you got there? o.o
Yes. (just answered why to the guy beneath)
Is the error happening because I have the light source inside the cube?
Thanks for taking the time!
Answer by MaT227 · Feb 07, 2014 at 07:18 AM
I see multiples errors in your level.
As ChoChoEnzo said, why do you have so much light sources ? Why do you need one light source for one cube ?
The more you have separated objects the more you have draw calls and gameobject, then Update calls etc..., why do you need multiple cubes to make a straight wall ?
Same question for collision, why do you need so much collision detection, one for each cube ?
You can solve your lighting problem easily by optimizing your level and make a correct level design with adapted technics.
I need one light source per cube because when the player touches a wall, the wall will fade in the light and also change colors. I mean, I guess I could add a light source dynamically when the player touches the wall, but that still doesn't fix the lighting problem :\
Also, each cube changes colors when the player touches it. That is why I have separate cubes.
Do you have a suggestion as to how to fix the lighting problem and also have separate cube collision while utilizing your suggestion about non-separate walls?
Thanks for your input!
I don't understand
the wall will fade in the light
Concerning the lighting problem, you can also try raising the Pixel Light Count but having so much lights affecting each other cubes is definitely not a good idea. First you should identify the light problem. Try with maybe 3 cubes precisely aligned in a scene and one light source in one of them. Does this causes the glitch ? Then try with more lights and more cubes. Concerning the separated walls I have maybe a solution but it is complicated I think and maybe not worth it. And It needs another question in Unity Answer because it doesn't concern our light problem.
Yeah, your right! It was the shader I was using. Also that light count is way too high. Thanks for all your input!!
Follow this Question
Related Questions
[SOLVED]Procedural generated side by side cubes without 'seams'? 2 Answers
Seam between meshes 1 Answer
Light shining through mesh 1 Answer