I simulate the light-gem affecting shadow in sunlight at objects with a spotlight (light has to have a minus sign -2500/-4000). It takes much time to compile that but the result is pretty good.
Is it somehow possible to make object shadows produced by sunlight affect the lightgem? I have added Object System->Immobile and Renderer->Runtime Object Shadow (and set them both to true) to the objects and while a shadow is cast, the lightgem still isn't affected. I also tried both single and quad sunlight, just in case, but that didn't change anything.
I have two islands surrounded by a high number of cliffs and to save cells I built the cliffs from objects. I didn't want to close off large areas with artificial barriers, so the player is allowed to swim around most of the cliffs and, naturally, I would like for the cliffs to cast proper shadows that the player can hide in, but it seems that this isn't possible the standard way.
I have a few ideas on how to accomplish something similar:
- Set the lightgem manually when the player enters certain areas, but that would most likely be a binary thing (and would require lots of tedious editing for something that might not work well enough in the end, anyway).
- Hide simple, solid terrain inside the cliffs (or even build the entire cliff from solids), but since my cell count is already pretty high, that might not be possible, except maybe for the most critical areas.
- Create an artificial sunlight source, but that would probably look pretty odd.
Last edited by qolelis; 13th Nov 2014 at 11:23.
I simulate the light-gem affecting shadow in sunlight at objects with a spotlight (light has to have a minus sign -2500/-4000). It takes much time to compile that but the result is pretty good.
Aha, thanks for the tip; that was news to me; I'm trying it out right now (i.e. negative brightness on an animlight cancels out other lights).
Edit:
Yup, that solved the problem - now I just have to tweak it for each cliff (and possibly also some trees).![]()
Last edited by qolelis; 13th Nov 2014 at 11:24.
Yes, placing the shadow-spotlights needs some experience.
Set the spotlight to the objects when the mission is almost done. If you have a lot of those 'shadows', it can take so much time to render it.
Be sure you're setting a radius on the spotlight's Light property, as that will reduce the calculation time. I've used small-radius omnilights with negative brightness to create shadows where the lightmap wasn't behaving.
The lighting process already takes around 5 minutes, so I'm used to it.Do negative lights take longer to process (than non-negative ones)?
Is there a minimum radius one has to set (for the negative lights to work) or is it entirely dependent on each situation? I'm guessing the latter. Either way, I'm going to continue with this later tonight or tomorrow, so I'm soon going to learn the details first-hand (I was really heading out the door right now, but then I got stuck with... things).
Thanks again, this turned out better than I thought when I first encountered this problem.
I did some very rudimentary speed-comparisons:
existing lights only: 04:33
existing lights + 5 negative lights (b = -200, r = 60): 04:55
existing lights + 5 positive lights (b = 200, r = 60): 04:59
existing lights + 5 negative lights (b = 20, r = 60): 04:57
I'm not drawing any conclusions yet, though (due to the currently very limited data set).
That doesn't surprise me, there seems to be no reason why negative brightness light sources would have any greater effect on calc time than positive brightness ones. Radius has a significant effect, though (or rather the lack of one, which makes it infinite).
I've noticed that objects and meshes sometimes get weird colours in negative light: Is this something I will have to accept?
I have no idea if it works this way, but maybe when total light goes negative? Could you be using too much negative light in places?
Well, I have sunlight brightness set to 30 and each negative light has a brightness of -200, so, yeah, that's probably it; I'll tweak the brightnesses and see if that fixes the problem.
Last edited by qolelis; 22nd Nov 2014 at 04:16. Reason: typo
Yeah try using -30 for the negative lights, and you can play with the radius and inner radius if need be to make the shadow extend far enough.
The problem I'm having right now is that I either get a failing light gem or miscoloured objects and meshes; I can't seem to find the golden mean. I prefer having proper shadows for the player to hide in, so I am slightly tempted to add some story element to explain the weird colours in the failing areas.
Using a negative value closer to zero solves the miscolouring, but makes the light gem stop working. Increasing the radius after that doesn't do anything and I can't increase the spotlight width, beacuse that would make the shadows too wide. I tried with values closer to negative infinity instead, in case the resulting light level wraps around and with the right, negative brightness it would wrap around to zero (or a positive value sufficiently close to zero), but that didn't work out either.
And you can't put some kind of solid brushwork hidden inside the objects to create a shadow for you? It wouldn't be perfect, but as long as the object's centroid isn't in solid ... or have you tried that?
I only have 93 cells left and I still have one critical area left to build (although a pretty small one (just one room, really)), but I might be able to squeeze in some cliff solids in the most critical areas. I could also save some cells by getting rid of a few dodecahedrons (in areas where they are not absolutely needed). I could also try to minimize the number of objects/meshes in the failing areas, but that is proving hard. For now I'm most likely going to leave this as it is and return to it later when everything else is done.
...no, wait a minute, I can actually add a very simple solid in the area where the miscolouring is most severe, so thanks for the reminder.
I could also, if I really need to, get rid of the trees in the other area where objects/meshes are most likely to appear (the remaining areas will most likely never see any objects (and definitely not any meshes)). This will create a large area flooded with moonlight, though, and make the sneaking harder, although there are alternative, slightly longer routes, which I can probably tweak if necessary, though (with some luck I might be able to add some simple solid terrain in the moonlight-flooded area to create a few shadows).
Here, I have an area with the sun low on the horizon to your right. Inside the standing stones I put a .25 thick and 22.0 high solid brushes angled to block as much sun as possible.
And here I have the result, a dark light gem when standing with the boulder between me and the sun. The thing I need to work on a bit is how the get the ground look darker, but that may just be because I have the solid too high.
![]()
That will make the objects cast shadows on the ground, yes, if that's what Larry means by making the ground darker.
I have Object System > Immobile on all the standing stones, but the shadows are not distinct on the ground. I don't know why. You have to be looking at your light gem to see if you are in shadow. You can't look at the ground and plan your path.
In rendering parameters have you quad+objcast shadow or single+objcast shadow?
Check the phys models of the stones, since they're what actually cause the shadows if I'm not mistaken.
If all else fails, maybe you could add a thin customized shadow object and put it flat on the ground!?
For my situation, I think I have fixed the worst now: I put up a solid in one place (I lost 17 cells in the process, but it was worth it), got lucky with the numbers in another and finally removed the trees. I might add back some of the trees later, but with some kind of normal light source beneath to explain the light gem not turning dark.