Source Filmmaker

Source Filmmaker

Aliassfm May 10, 2017 @ 8:23am
Omni-directional lighting (has anyone successfully copied this?)
https://www.youtube.com/watch?v=quqflnowD3o

I gave it the old college try but I get a (pretty cool, I'll admit) effect where there are very clear bars of shadow between the lights when they're all centered on each other. I tried panning them away from each other but the overlap still isn't perfect.
< >
Showing 1-11 of 11 comments
Zappy May 10, 2017 @ 8:41am 
It can be accomplished with 2 (downright awful result), 4 (possibly quite good?), or 6 (as perfect as possible) lights.

With 6 lights, you want to have a north, south, east, west, up and down light, all with a field of view of 90 degrees, and using a pure-white texture that has the "point sample" flag checked (and some of the various "clamp" flags checked). Like 6 squares put together into a cube.
If done right, it can result in a completely seamless transition between each of the lights

With 4 lights, you want to use a triangle-shaped texture with an un-examined field of view (it may have been examined, I just haven't tried it myself, so I don't know what the field of view should be), put together like a... 3-dimensional triangle shape thingie. I don't know the name of this shape, but like a pyramid with 3 edges instead of 4.
If done right, there may be a tiny line of a little extra or less brightness between each of the lights, due to the triangle-shaped texture blending in over the copies of itself, but some jittery rotation to the lights should be able to blur that away using motion blur.

With 2 lights, you just want to point them 180 degrees away from each other with a field of view of 179.99999... degrees. 180 results in the light not doing anything. The texture to use would be the same as for 6 lights, being a pure-white "point sample" texture. However, because of the way shadowed lights work, the shadows of these lights are almost non-existant due to the large field of view, and where there are shadows, it's horribly blocky. And because it's 179.99999... degrees while the lights are facing 180 degrees away from each other, that leaves a 0.00000...2 degree line of darkness between the two lights. The latter can be kind of worked around by jittering the rotation of the lights, but the former can't be solved...

I speak of this with the experience of having done the first (6-light cube) and the last (2-light thingie) options long ago.
Last edited by Zappy; May 10, 2017 @ 8:42am
Marco Skoll May 10, 2017 @ 10:33am 
Originally posted by Zappy:
It can be accomplished with 2 (downright awful result)
With the right light settings and some slightly careful light/camera placement, it can look fine.

The burning APC in this shot uses only two lights for the flames, and yes, it is casting shadows - the seams are just hidden with gobos and attenuation settings. (If the light is set to fade out before a wall you'd see the seam on, then you don't see the seam).
https://www.youtube.com/watch?v=Ov87eDJLaDM

I also did a behind the scenes on where the lights were positioned/moving during that scene.
https://www.youtube.com/watch?v=fg_WVAH9fU4

As far as dirty solutions, this was a test render of a shadowed omnidirectional light using *ONE* light:
https://www.youtube.com/watch?v=1lrytNG2EvU
It's abusing motion blur samples by having the light do a full spin once per frame. (Because the light is somewhat less than 180 degrees, there is a blind spot on the ceiling, but the answer to that is not to point the camera at it!)

There's a bit of flicker because I didn't spend time finetuning things (and it's actually rendered at fairly low samples, just as a test), but the right gobo or uberlight settings could probably smooth it out.
episoder May 10, 2017 @ 11:13am 
@zappy it's called tetrahedron. it's the hardest to figure out the angles tho. i haven't found it back then when i tried it. it's pretty nasty, but it'd allow to use 2 of those light thingies.
Last edited by episoder; May 10, 2017 @ 11:37am
Aliassfm May 10, 2017 @ 11:53am 
How are the lights oriented in the 6 light configuration? When I have the all on the same point in 90 degree directions I get an outline of a shadowed box. Neat effect, but not seamless at all.

Edit: https://my.mixtape.moe/xxsaqd.mp4

Looks like the freakin' Unity symbol. I'm using gobo texture 105 from this:

https://steamcommunity.com/sharedfiles/filedetails/?id=388582552
Last edited by Aliassfm; May 10, 2017 @ 12:09pm
Zappy May 10, 2017 @ 12:00pm 
Originally posted by Aliassfm:
How are the lights oriented in the 6 light configuration?
Lock lights 2-6 to light 1, use the "Zero" preset on the transforms of the lights, then set light 2 to have a rotation of 0 0 90, light 3 to 0 0 180, light 4 to 0 0 270, light 5 to 0 90 0, and light 6 to 0 270 0.

Again, the field of view must be exactly 90 and the texture used must be completely pure white with the "point sample" texture flag enabled on the texture for it to be seamless.
Aliassfm May 10, 2017 @ 12:10pm 
I edited my previous post with what mine looks like. Could be the texture, I'm very new to gobos. I lock all 6 to a ball and rotate that way, easier to not get confused as to which is the parent.

Where does one enable the "point sample" flag?
Last edited by Aliassfm; May 10, 2017 @ 12:11pm
episoder May 10, 2017 @ 12:19pm 
just for giggles. the tetrahedron omni light should be something like that[i.imgur.com]. you could calculate the angles based on the units. 8/11.25. should be something around 126 degress. my trigonometry math is rusty. the fov should be somewhat the same.
Last edited by episoder; May 10, 2017 @ 12:20pm
Zappy May 10, 2017 @ 12:21pm 
Originally posted by Aliassfm:
- I'm using gobo texture 105 from this: [Workshop submission]-
I'm going to guess you're not going to want to use that texture for this.


So anyway, what you're going to want to do is open up MSPaint (or some other image editor), fill it in with pure white, use the selection tool to select a single pixel, then hit Ctrl+C.

After that, open up VTFEdit,[nemesis.thewavelength.net] hit Ctrl+V, and import it. When importing, make sure "Generate Mipmaps", "Generate Normal map" and "Resize" are all un-ticked, and for best results, make sure the "Normal Format" and "Alpha Format" are both RGB888 or I8.

Then on the left, the top-most option in the "Flags" list is "Point Sample". Tick it. Then save the texture somewhere within Source FilmMaker's installation (in an accessed folder), such as
-/SourceFilmmaker/game/usermode/materials/white.vtf

Now set the lights to use that texture.
Last edited by Zappy; May 10, 2017 @ 12:22pm
Aliassfm May 10, 2017 @ 12:49pm 
That worked well, thanks!

One last question. Any idea why the shadows "pop" in go suddenly?

https://my.mixtape.moe/iqbjwj.mp4
Zappy May 10, 2017 @ 1:05pm 
Originally posted by Aliassfm:
That worked well, thanks! One last question. Any idea why the shadows "pop" in go suddenly?
...Well, yes. It's because I forgot to tell you to also tick the "Clamp S" and "Clamp T" flags of the texture. (At least I believe those are the flags you should enable.)

If after doing this, you end up with the "Unity logo" again, just right-click the horizontal and vertical FOV sliders of all the lights (in the bottom-right portion of the animationset editor), choose "Remap Slider Ranges", set the maximum value to 90, drag the sliders to the left and then drag the sliders to the right, and do that one by one for each of the field of view sliders for all lights.
Last edited by Zappy; May 10, 2017 @ 1:05pm
Aliassfm May 10, 2017 @ 2:26pm 
Edit: Got it, I was editing rotation incorrectly. It's working perfectly now. Thanks!
Last edited by Aliassfm; May 10, 2017 @ 2:38pm
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: May 10, 2017 @ 8:23am
Posts: 11