Hi, I'm currently making a map that utilizing the sun as lighting for a few major areas, has anyone perfected a way to create a very good lightning technique that simulates the sun?
See the only problem with doing that is for some reason light likes to clip threw the walls/roofs, lighting up a whole area that was not intended to be lit, so it doesn't really look like a sun but ambient light. If you know a fix for this thought i will <3 you forever, no homo of course
Honestly, I'd go about making a sprite or half dome model. Slap a good texture on it, and with some really clever particle work, it could look really nice.
For example note in this picture *The fake sun is on the opposite side of the map, i set it to a very high intensity to demonstrate the effects, notice how it ignores the fact that a face is there and lights up an area as if the face were not there.
pSyk0mAnNerdish by NatureGermanyJoin Date: 2003-08-07Member: 19166Members, NS2 Playtester, Squad Five Silver, NS2 Community Developer
edited August 2010
The problem is that a lot of props don't have backfaces to block lights from outside. First of all you have to use a spot_light with true shadowcasting. Then you either add geometry that causes proper shadows or you adjust the spot_light position, angle, cone and range so it only falls on a certain part of the map, where no additional geometry is needed and the sun_light can actually be seen.
(Also please post a picture from farther away, so we can see the whole room and the sun above and get an idea how to help.)
Here are some shots of the area, theres another but if i can find a way to work with this one i can apply it to the other, this is my best attempt to lighting as you can light still goes threw the walls and such.
It's easy enough when it's a circular hole in the ceiling...
<img src="http://i28.tinypic.com/1247z47.jpg" border="0" class="linked-image" /> ...but when you've got windows in the wall, you've got a a problem.
<!--quoteo(post=1790282:date=Aug 1 2010, 08:05 AM:name=pSyk0mAn)--><div class='quotetop'>QUOTE (pSyk0mAn @ Aug 1 2010, 08:05 AM) <a href="index.php?act=findpost&pid=1790282"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The problem is that a lot of props don't have backfaces to block lights from outside.<!--QuoteEnd--></div><!--QuoteEEnd--> It's not just props, though.
<img src="http://i31.tinypic.com/zn1p4j.jpg" border="0" class="linked-image" /> This doesn't work obviously, but the solution should be as easy as flipping the faces, right?
<!--quoteo(post=1790324:date=Aug 1 2010, 01:03 PM:name=SgtBarlow)--><div class='quotetop'>QUOTE (SgtBarlow @ Aug 1 2010, 01:03 PM) <a href="index.php?act=findpost&pid=1790324"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I have the same problem, I have it almost totally solved, Will post answer once I ironed out all the drawbacks.<!--QuoteEnd--></div><!--QuoteEEnd--> Eagerly awaiting your solution.
pSyk0mAnNerdish by NatureGermanyJoin Date: 2003-08-07Member: 19166Members, NS2 Playtester, Squad Five Silver, NS2 Community Developer
edited August 2010
Why would you have the light_spots cover the whole room, when the light only comes through this two openings? Reduce range and change cone, move it closer to the opening and maybe use normal lights to highlight the frame of the opening properly since the light spot is barely hitting it. Of course this doesn't always help aswell, but putting a large spot somewhere and cover everything seems a bit lazy to me. I'm fine with being lazy though, when they fix/improve this someday, but for now you've got to be smart or wait.
Check out that one map with the grate opening and that industrial background?!
<!--quoteo(post=1790357:date=Aug 1 2010, 03:52 PM:name=Eric_Jedi)--><div class='quotetop'>QUOTE (Eric_Jedi @ Aug 1 2010, 03:52 PM) <a href="index.php?act=findpost&pid=1790357"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Align - Try welding all your faces. ( If they aren't of course ) .<!--QuoteEnd--></div><!--QuoteEEnd-->
You can't, there isn't a weld button yet, annoyingly.
I think it's more that the lighting is a bit odd, shadows start a short distance after the object which casts them, so a marine standing on the floor will seem to be floating, I assume it will be fixed eventually.
pSyk0mAnNerdish by NatureGermanyJoin Date: 2003-08-07Member: 19166Members, NS2 Playtester, Squad Five Silver, NS2 Community Developer
You can weld vertices, but you still have duplicate lines, which might not fix the problem!? In this case you have to build everything out of one "brush" in the first place, adding lines and faces.
<!--quoteo(post=1790361:date=Aug 1 2010, 04:05 PM:name=pSyk0mAn)--><div class='quotetop'>QUOTE (pSyk0mAn @ Aug 1 2010, 04:05 PM) <a href="index.php?act=findpost&pid=1790361"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->You can weld vertices, but you still have duplicate lines, which might not fix the problem!? In this case you have to build everything out of one "brush" in the first place, adding lines and faces.<!--QuoteEnd--></div><!--QuoteEEnd-->
If you welded the vertices you can't have duplicate edges.
What does welding vertices mean in spark? Because in 3ds max it means you pick one vertex and then click another vertex and it removes the first one, and connects all the vertices the first one used to connect to, to the second vertex.
Essentially you collapse an edge, removing it entirely, so you can't have duplicate edges because you destroyed the duplicate ones to perform the weld.
pSyk0mAnNerdish by NatureGermanyJoin Date: 2003-08-07Member: 19166Members, NS2 Playtester, Squad Five Silver, NS2 Community Developer
<!--quoteo(post=1790367:date=Aug 1 2010, 05:14 PM:name=Chris0132)--><div class='quotetop'>QUOTE (Chris0132 @ Aug 1 2010, 05:14 PM) <a href="index.php?act=findpost&pid=1790367"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->If you welded the vertices you can't have duplicate edges.<!--QuoteEnd--></div><!--QuoteEEnd--> Yes, you can, at least in spark and it might be fixed (or maybe was with the alpha?).
The real whole purpose was trying to create only one spot light sun for the whole map, make it bright enough and make it cover the right areas, it has the right effect and will simulate the sun, unlike if i use multiple spotlights for the sun, there could be some clear distinctions between a few rooms and somebody saying this doesn't look right the sun was at a completely different angle in that last room!
But yeah before I came to the forum gods for a response from the almighty, i tried flipping faces and such, and messing with alot of different light setups, duplicating and flipping objects could work but I really think that's a bit much considering i may have 3 rooms lit up by the sun and having to place objects just to block out the sun would seem a bit much when a flipped wall should have done it.
Best thing to do is use separate spot lights to cater to your individual lighting needs. To make it more realistic you can light them all in a very similar function and all in the same direction around the map.
There's currently no light_environment entity or such from what I can see.
Create a new layer called <b><u>CommanderInvisible</u></b> (CASE SENSITIVE! - It is not working for me, either its not implimented or there is another reason why.)
Create a what I can only describe as a Light Shield and assign that geometry to the new layer so its hidden from commander view.
Hmm havn't tried this. But pursuming you want the sun the ~same place I think I'd do it like this. Have a fixed axis of which your sun is. In theory the sun is infinitly large, so moving the lights on this 1 axis should achive the same thing, as long as the angle of projection is the same. The suns rays are equally infinite so moving it in the depth axis is also possible. So given the angle of projection is correct you can move your lights in the depth axis to achive the spotlight is close to the point of interest, but still in the correct orientation of where the sun is.
It may be harder than on text as you can't lock an axis (would be awesome though) so moving the lights in the depth field could be tricky.
Alright here's one of the rooms I've tried with just using a really narrow spotlight, still need to create something bright for the sun possible just a circular object that ill just shove a really really bright light in
<!--quoteo(post=1790401:date=Aug 1 2010, 07:38 PM:name=Killpo1)--><div class='quotetop'>QUOTE (Killpo1 @ Aug 1 2010, 07:38 PM) <a href="index.php?act=findpost&pid=1790401"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The real whole purpose was trying to create only one spot light sun for the whole map, make it bright enough and make it cover the right areas, it has the right effect and will simulate the sun, unlike if i use multiple spotlights for the sun, there could be some clear distinctions between a few rooms and somebody saying this doesn't look right the sun was at a completely different angle in that last room!<!--QuoteEnd--></div><!--QuoteEEnd--> That won't work. Unless you have the light source insanely far away - and I hate to think what that'll do to the resources needed for the light - it's still going to be at slightly different angles in different rooms. Far simpler then to simply copy the same spotlight and use it at each sunlit opening (without changing it's angle or other settings, obviously). Just make sure to Group them so you select all of them at once, should you want to change the colour or what have you.
Alright, so i made a sun sprite and added a light to it to try and make it look somewhat like a sun and also here's another room using a closer spotlight then how far the the sun is actually away, however in order to light the sky box areas i also needed to create a sun like light that would end right before it hit the main part of the map, it creates what you see below, Opinions would be nice, also I rather not have my map destroy some ones computer and the one spotlight lighting up that rather large area may be rather demanding any thoughts?
Use the Ambient lights to add directional light to sky props, the Ambients are very cheap. Start Intensity of an Ambient at 200+ You have lots of control as you have color options for, Front, back, left, right, up and down.
Don't worry about it to much any more guys i decided to scrap the heavy reliance on the sun for lighting, it there will be any sun it may just be one sun roof, where multiple angles do not matter.
<!--quoteo(post=1790368:date=Aug 1 2010, 04:17 PM:name=Thaldarin)--><div class='quotetop'>QUOTE (Thaldarin @ Aug 1 2010, 04:17 PM) <a href="index.php?act=findpost&pid=1790368"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I don't see why you'd ever weld vertices. Just keep your creation neat and tidy, periodically check "show edges" and remove unnecessary lines etc.
Welding faces just seems a pointless waste of time to me and it removes author freedom.<!--QuoteEnd--></div><!--QuoteEEnd-->
I use it all the time in max, it's often easier to build the object you want a bit roughly and then weld a few vertices later. It also makes it easier to play with later on if you weld all the vertices on an object together rather than having bits intersecting, and it can also be used to keep your surfaces nice and uniform and thus easier to work with, plus any vertices/faces you can eliminate improves performance.
You don't have to do it, and in some cases it is both easier and more efficient to just intersect geometry, but I certainly like doing it, and it's a useful sculpting tool sometimes as well. It is also essential if you want to use technology like smoothing groups which are very important to create the illusion of smooth surfaces, and it can also be used to fix micro-gaps in geometry.
I'd really like a max-like weld tool added, as well as a max-like weld selected button which welds any vertices you have selected and which are close to each other together.
Comments
<img src="http://i142.photobucket.com/albums/r93/fatboy987789/Untitled-13.png" border="0" class="linked-image" />
First of all you have to use a spot_light with true shadowcasting. Then you either add geometry that causes proper shadows or you adjust the spot_light position, angle, cone and range so it only falls on a certain part of the map, where no additional geometry is needed and the sun_light can actually be seen.
(Also please post a picture from farther away, so we can see the whole room and the sun above and get an idea how to help.)
<img src="http://i142.photobucket.com/albums/r93/fatboy987789/lightning3.png" border="0" class="linked-image" />
<img src="http://i142.photobucket.com/albums/r93/fatboy987789/lightning2.png" border="0" class="linked-image" />
<img src="http://i142.photobucket.com/albums/r93/fatboy987789/lightning1.png" border="0" class="linked-image" />
Note: I may very well be scrapping this map due to a few problems with level design.
<img src="http://i28.tinypic.com/1247z47.jpg" border="0" class="linked-image" />
...but when you've got windows in the wall, you've got a a problem.
<!--quoteo(post=1790282:date=Aug 1 2010, 08:05 AM:name=pSyk0mAn)--><div class='quotetop'>QUOTE (pSyk0mAn @ Aug 1 2010, 08:05 AM) <a href="index.php?act=findpost&pid=1790282"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The problem is that a lot of props don't have backfaces to block lights from outside.<!--QuoteEnd--></div><!--QuoteEEnd-->
It's not just props, though.
<img src="http://i31.tinypic.com/zn1p4j.jpg" border="0" class="linked-image" />
This doesn't work obviously, but the solution should be as easy as flipping the faces, right?
<img src="http://i31.tinypic.com/nw075t.jpg" border="0" class="linked-image" />
Unfortunately, no...
<!--quoteo(post=1790324:date=Aug 1 2010, 01:03 PM:name=SgtBarlow)--><div class='quotetop'>QUOTE (SgtBarlow @ Aug 1 2010, 01:03 PM) <a href="index.php?act=findpost&pid=1790324"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I have the same problem, I have it almost totally solved, Will post answer once I ironed out all the drawbacks.<!--QuoteEnd--></div><!--QuoteEEnd-->
Eagerly awaiting your solution.
Reduce range and change cone, move it closer to the opening and maybe use normal lights to highlight the frame of the opening properly since the light spot is barely hitting it.
Of course this doesn't always help aswell, but putting a large spot somewhere and cover everything seems a bit lazy to me. I'm fine with being lazy though, when they fix/improve this someday, but for now you've got to be smart or wait.
Check out that one map with the grate opening and that industrial background?!
You can't, there isn't a weld button yet, annoyingly.
I think it's more that the lighting is a bit odd, shadows start a short distance after the object which casts them, so a marine standing on the floor will seem to be floating, I assume it will be fixed eventually.
If you welded the vertices you can't have duplicate edges.
What does welding vertices mean in spark? Because in 3ds max it means you pick one vertex and then click another vertex and it removes the first one, and connects all the vertices the first one used to connect to, to the second vertex.
Essentially you collapse an edge, removing it entirely, so you can't have duplicate edges because you destroyed the duplicate ones to perform the weld.
Welding faces just seems a pointless waste of time to me and it removes author freedom.
Yes, you can, at least in spark and it might be fixed (or maybe was with the alpha?).
But yeah before I came to the forum gods for a response from the almighty, i tried flipping faces and such, and messing with alot of different light setups, duplicating and flipping objects could work but I really think that's a bit much considering i may have 3 rooms lit up by the sun and having to place objects just to block out the sun would seem a bit much when a flipped wall should have done it.
There's currently no light_environment entity or such from what I can see.
Create a what I can only describe as a Light Shield and assign that geometry to the new layer so its hidden from commander view.
<img src="http://www.unitedworlds.co.uk/ns2/lightshield.jpg" border="0" class="linked-image" />
Like what was previously said, the Shadow offset bug is a problem but if thats fixed this should work best.
It may be harder than on text as you can't lock an axis (would be awesome though) so moving the lights in the depth field could be tricky.
<img src="http://i142.photobucket.com/albums/r93/fatboy987789/lighting5.png" border="0" class="linked-image" />
That won't work. Unless you have the light source insanely far away - and I hate to think what that'll do to the resources needed for the light - it's still going to be at slightly different angles in different rooms.
Far simpler then to simply copy the same spotlight and use it at each sunlit opening (without changing it's angle or other settings, obviously). Just make sure to Group them so you select all of them at once, should you want to change the colour or what have you.
<img src="http://i142.photobucket.com/albums/r93/fatboy987789/sun1.png" border="0" class="linked-image" />
<img src="http://i142.photobucket.com/albums/r93/fatboy987789/sun2.png" border="0" class="linked-image" />
You have lots of control as you have color options for, Front, back, left, right, up and down.
CommanderInvisible: All props and geometry placed in a group
named CommanderInvisible will be invisible to players playing as
commanders.
Welding faces just seems a pointless waste of time to me and it removes author freedom.<!--QuoteEnd--></div><!--QuoteEEnd-->
I use it all the time in max, it's often easier to build the object you want a bit roughly and then weld a few vertices later. It also makes it easier to play with later on if you weld all the vertices on an object together rather than having bits intersecting, and it can also be used to keep your surfaces nice and uniform and thus easier to work with, plus any vertices/faces you can eliminate improves performance.
You don't have to do it, and in some cases it is both easier and more efficient to just intersect geometry, but I certainly like doing it, and it's a useful sculpting tool sometimes as well. It is also essential if you want to use technology like smoothing groups which are very important to create the illusion of smooth surfaces, and it can also be used to fix micro-gaps in geometry.
I'd really like a max-like weld tool added, as well as a max-like weld selected button which welds any vertices you have selected and which are close to each other together.