Author Topic: Help with faking a lighting effect  (Read 3600 times)

2024-08-14, 23:44:24

dj_buckley

  • Active Users
  • **
  • Posts: 1054
    • View Profile
As the sun starts to disappear I get this incredible lighting effect happening in my living room.

I'm wondering how to fake this because the recreating the reality would be huge overkill imo.

The reality (see second pic) - as the sun sets it reflects off this nasty cheap wavy perspex type material.  The perspex is really dirty and really warped/bendy.  Behind the perspex is a stained glass window.  The light then bounces into my living room, through my bay window, which has double glazed sash windows, and finally through the shutters and onto the living room wall.  The result is the gorgeous effect you see here.

How would you recreate the effect without modeling/shading the reality of the environment that's creating it?

2024-08-15, 10:06:02
Reply #1

dzintas

  • Active Users
  • **
  • Posts: 53
    • View Profile
This would caustic reflection from aforementioned window. You could try to model similar window, with it's warped glass and everything and try render with caustics enabled. But it will be slow cumbersome to setup and as you mentioned it would be overkill.
Old-school way of faking this would be with just few lights behind interior window, you can even use textured lights for better result

2024-08-15, 12:11:09
Reply #2

aaouviz

  • Active Users
  • **
  • Posts: 1005
    • View Profile
    • Another Angle 3D
Just do multiple suns?
Nicolas Pratt
Another Angle 3D
https://www.instagram.com/anotherangle3d/

2024-08-15, 12:39:29
Reply #3

Avi

  • Corona Team
  • Active Users
  • ****
  • Posts: 801
    • View Profile
As the sun starts to disappear I get this incredible lighting effect happening in my living room.

I'm wondering how to fake this because the recreating the reality would be huge overkill imo.

The reality (see second pic) - as the sun sets it reflects off this nasty cheap wavy perspex type material.  The perspex is really dirty and really warped/bendy.  Behind the perspex is a stained glass window.  The light then bounces into my living room, through my bay window, which has double glazed sash windows, and finally through the shutters and onto the living room wall.  The result is the gorgeous effect you see here.

How would you recreate the effect without modeling/shading the reality of the environment that's creating it?

You can achieve this by using gobo lighting technique.

https://www.google.com/search?sca_esv=5a54ede1e073dd21&q=gobo+lights&tbm=isch&source=lnms&fbs=AEQNm0Aa4sjWe7Rqy32pFwRj0UkW9NAzhPVmkAfB2zK1tnQfJzCiZcTA2TlTxMAPq-4VyX6jrBGjDhtI7Gn1UoI00PgFrGuimHmGgX0Ep8Fi1uieTSy7m81gFuDOHi2QYx4kBXAV9wzoZQxKQ9nSM-gRtRWIXvDjYfTvT2kyeP8dfniAUX9rpYrk3Bn7rCWiNEN7BbNFryO9HS0H78dwIWV5IHkZ1mt8hA&sa=X&ved=2ahUKEwjYyur15vaHAxUr_rsIHQicCH4Q0pQJegQIFBAB&biw=2010&bih=738&dpr=1.25

Use can use Max native target light with a texture. You can use Corona light also but for this fake lighting effect, 3ds Max native lighting works better.
Arpit Pandey | chaos-corona.com
3D Support Specialist - Corona | contact us

2024-08-15, 13:04:54
Reply #4

pokoy

  • Active Users
  • **
  • Posts: 1983
    • View Profile
A simple gobo won't do it, it'll have to be multiple lights.
Each of those little panes that reflect the sun is distorted, reflecting the light from different places and with a different angle.
My setup would be:
- create a single targeted light some 50 meters away, with a small disc shape (0.1-0.2 meters) and directionality at 1.0 (multiple suns will mess with Corona's sky light if you want to use skylight too)
- set the target to the center of your room's window opening
- multiply the lights (instance it to be able to set intensities in one go)
- now move each light a bit so they're scattered in a 1-2 meters radius (keep the in one place at the window opening)
- now for the gobo - create a plane and place it a few meters from the light sources, assign a CoronaLightMtl with a noise map in opacity slot. This will 'block' some lights in different places to create those smooth light gradients, you'll have to play with the noise parameters to get it to look good.

To move the entire light setup I'd use a point helper in the middle of the scattered lights with only the lights (not the targets) and the gobo plane linked to it.

Preapare for high render times because of the high directionality setting :-/

2024-08-15, 14:37:28
Reply #5

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 919
    • View Profile
What about getting the texture (can be done with overlaid rectangles in photoshop or even with light baking) and then use it as a decal with light material or self illumination?
It definitely will be faster to calculate than with light.
Aram Avetisyan | chaos-corona.com
Chaos Corona QA Specialist | contact us

2024-08-15, 15:05:39
Reply #6

pokoy

  • Active Users
  • **
  • Posts: 1983
    • View Profile
What about getting the texture (can be done with overlaid rectangles in photoshop or even with light baking) and then use it as a decal with light material or self illumination?
It definitely will be faster to calculate than with light.
You need to produce different lighting directions where light is oriented slightly differently, that won't work with a texture from a single point.
You could probably use a noise modifier on a plane with a LightMtl but would still need to use directionality at 1.0 to get sharp shadows on the wall - this is the slow part, not the lights.

2024-08-15, 15:26:03
Reply #7

Frood

  • Active Users
  • **
  • Posts: 2002
    • View Profile
    • Rakete GmbH
You need to produce different lighting directions where light is oriented slightly differently, that won't work with a texture from a single point.

I think Aram just would create a simple 2d texture that looks like the effect of multiple lights and use that as decal with light material.

But if using a CoronaLightMtl for decals, it turns all triangles of the mesh on which it is projected into a light emitting primitive. Maybe self-illu would be enough for trying this option.

I'd personally go for multiple lights with slightly different locations and intensity through the window anyway.


Good Luck



Never underestimate the power of a well placed level one spell.

2024-08-15, 17:46:01
Reply #8

pokoy

  • Active Users
  • **
  • Posts: 1983
    • View Profile
The first thing I did was to actually try to mimic it and only then I made the list of how to get there (or close to).

Directional lighting from a plane, even if only a few spots on it are emitting the light, will produce just the same shadow position due to the same light direction. So you'll just have the shadow in the same spot only with different areas being pronounced.
You really need a slightly different direction for each light source, and the target 'focal point' of all the lights need to be in the window opening (not the wall where you want the shadow).

Self-illu will be much slower and will not be able to cast a sharp shadow, especially from such a distance.

I'm silent once you try and get the same thing OP is after ;)
Then again, maybe I'm just wrong.

2024-08-15, 21:33:53
Reply #9

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 919
    • View Profile
Here is a quick proof of concept using simple maps, decals and scatter.
Aram Avetisyan | chaos-corona.com
Chaos Corona QA Specialist | contact us

2024-08-15, 21:40:33
Reply #10

pokoy

  • Active Users
  • **
  • Posts: 1983
    • View Profile
No idea how you did it, looks great!

2024-08-15, 21:49:12
Reply #11

dj_buckley

  • Active Users
  • **
  • Posts: 1054
    • View Profile
Here is a quick proof of concept using simple maps, decals and scatter.

Round of applause. 

I posted this question late last night and have only just had chance to revisit it.  Please it got so much engagement with quite a few different suggestions.  Aram if you don't mind explaining the method you used in the end or even uploading the scene, i'm sure there's something in there we could all learn from.

For reference, I've attached a streetview grab of the actual window too, the size and angles of each window opening are naturally adding even more variations to the size of the 'rectangles' and each shutter was no doubt open at varying amounts when I captured the photo, and each half of each shutter can also be varied, not to mentiond my warped glass too.

Also, this is why these forums are great.

Thanks all
« Last Edit: 2024-08-15, 21:55:48 by dj_buckley »

2024-08-15, 23:48:56
Reply #12

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9249
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Aram if you don't mind explaining the method you used in the end or even uploading the scene, i'm sure there's something in there we could all learn from.

The scene is attached to Aram's post.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2024-08-16, 00:25:11
Reply #13

dj_buckley

  • Active Users
  • **
  • Posts: 1054
    • View Profile
Aram if you don't mind explaining the method you used in the end or even uploading the scene, i'm sure there's something in there we could all learn from.

The scene is attached to Aram's post.

It's been a long day.  Thanks

2024-08-16, 15:30:49
Reply #14

Frood

  • Active Users
  • **
  • Posts: 2002
    • View Profile
    • Rakete GmbH
Self-illu will be much slower and will not be able to cast a sharp shadow, especially from such a distance.

I'm silent once you try and get the same thing OP is after ;)
Then again, maybe I'm just wrong.

It must be me that everyone gets me wrong lately :) I just had the feeling, what Aram wrote was not clear enough to you, sorry.

The rest was about the option Aram suggested (using a decal with light material): It may be slow because of what I wrote - it turns the entire object into a light and Corona has to handle it.

So I thought that using a material just with self illumination for the decal would work as well to avoid this. And switching to self illu in the scene now shows in fact almost the same effect, but without creating that amount of light groups and thus is faster (just switch the CoronaSelectMaterial).

Basically, as mentioned, I would try with multiple lights as you. But because of:

How would you recreate the effect without modeling/shading the reality of the environment that's creating it?

...my variant is disqualified because I have 3D-blinds in the scene :) But this is the result. I used your scene @Aram, I hope you don't mind. The advantage may be that you can control sharpness by the light size (while adjusting intensity) and playing around with directionallity offers some interesting effects. And it's the most performant option while rendering.


Good Luck




Never underestimate the power of a well placed level one spell.