Profile Picture

Crepuscular Rays & Sun Shaft Rays Shader

Posted By bsperan 14 Years Ago
Rated 5 stars based on 1 vote.
Author
Message
bsperan
bsperan
Posted 14 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)

Group: Forum Members
Last Active: Last Year
Posts: 68, Visits: 533
I see on the HDR Video Effects page that iClone 4 features some pretty advanced HDR and shader effects, like bloom and glare. However, is there support for Crepuscular Rays, also called "Sun Rays"?



An example of this type of shader in a game can be seen in this video of a user-created plugin for Morrowind:

Morrowind -- Phal's Sunshaft Rays Shader

I've also seen this type of shader in one or two other games, but I can't recall their names at the moment. I will admit this is a rather cutting edge shader technique. However, you can see for yourself from the above video the depth of realism such a shader can add to animation. And a careful search will yield some Internet discussions of the specific formulas and techniques involved.

IMO, incorporating Crepuscular Rays as a feature in iClone 5 would certainly keep it on the cutting edge of 3D rendering and animation software. And considering the nature of the effect, I believe it would be difficult and/or time consuming to add to animation with post-production editing software. (A still frame should be easier, however.)

PS: I noticed on the HDR Video Effects page a render with an effect that looks similar to Crepuscular Rays. Could someone tell me the type of glare effect that is used?


Paumanok West
Paumanok West
Posted 14 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 2.5K, Visits: 7.0K
People use light cones for this. You can get a great one here.

General Picture - animating now to life itself(tm)
Member of Content Wizards
bsperan
bsperan
Posted 14 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)Distinguished Member (1.4K reputation)

Group: Forum Members
Last Active: Last Year
Posts: 68, Visits: 533
Hmm...
Light cones looks like an interesting effect. However, merely judging from the example video given, I'd say that - at least in some instances - it would be very difficult to use that to simulate Crepuscular Rays with a great deal of realism. For example, having such sun rays filter through the leaves and branches of a tree canopy or through the scaffolding of a building frame would involve a lot of calculations. Is Power & Light really that sophisticated?

Paumanok West
Paumanok West
Posted 14 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 2.5K, Visits: 7.0K
bsperan (9/14/2010)
Hmm...
Light cones looks like an interesting effect. However, merely judging from the example video given, I'd say that - at least in some instances - it would be very difficult to use that to simulate Crepuscular Rays with a great deal of realism. For example, having such sun rays filter through the leaves and branches of a tree canopy or through the scaffolding of a building frame would involve a lot of calculations. Is Power & Light really that sophisticated?



The required sophistication is in the artistry of the user. Tongue

There need be no calculations at all. To fake the shadows of swaying leaves, you use a simple video texture on the sides of the cone to introduce shifting opacity stripes.

This light cone is made from one of the truncated pyramids in iClone's 3D Blocks props. I forget whether it's Pyramid_03 or Pyramid_04.

Load one of these props and examine the Diffuse texture, which shows you how the sides are mapped.

You want vertical streaks to play across the facets of the pyramid (technically, a frustrum). They should flicker in and out in darkness and have small side-side movements. Note however that the greyscale video needs to be applied to the Opacity channel and not the Diffuse channel.

This will produce the desired effect.

General Picture - animating now to life itself(tm)
Member of Content Wizards
Paumanok West
Paumanok West
Posted 14 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 2.5K, Visits: 7.0K
bsperan (9/14/2010)
Hmm...
Light cones looks like an interesting effect. However, merely judging from the example video given, I'd say that - at least in some instances - it would be very difficult to use that to simulate Crepuscular Rays with a great deal of realism. For example, having such sun rays filter through the leaves and branches of a tree canopy or through the scaffolding of a building frame would involve a lot of calculations. Is Power & Light really that sophisticated?



The required sophistication is in the artistry of the user. Tongue

There need be no calculations at all. To fake the shadows of swaying leaves, you use a simple video texture on the sides of the cone to introduce shifting opacity stripes.

This light cone is made from one of the truncated pyramids in iClone's 3D Blocks props. I forget whether it's Pyramid_03 or Pyramid_04.

Load one of these props and examine the Diffuse texture, which shows you how the sides are mapped.

You want vertical streaks to play across the facets of the pyramid (technically, a frustrum). They should flicker in and out in darkness and have small side-side movements. Note however that the greyscale video needs to be applied to the Opacity channel and not the Diffuse channel.

This will produce the desired effect.

General Picture - animating now to life itself(tm)
Member of Content Wizards
Dreamcube017
Dreamcube017
Posted 14 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 2.0K, Visits: 2.9K
Paumanok West (9/14/2010)
bsperan (9/14/2010)
Hmm...
Light cones looks like an interesting effect. However, merely judging from the example video given, I'd say that - at least in some instances - it would be very difficult to use that to simulate Crepuscular Rays with a great deal of realism. For example, having such sun rays filter through the leaves and branches of a tree canopy or through the scaffolding of a building frame would involve a lot of calculations. Is Power & Light really that sophisticated?



The required sophistication is in the artistry of the user. Tongue

There need be no calculations at all. To fake the shadows of swaying leaves, you use a simple video texture on the sides of the cone to introduce shifting opacity stripes.

Hmm... Sorry West, but I'm afraid I'll have to disagree. While that is one way of doing it, you would have to stratigically place a few light cones aroudn the scene in order to get the desired effect.

And while this is possible, it just seems like a work around simply because we can't do it.

As far as IC4 is right now, that method is fine (although you would have to have some fairly accurate alpha channels to simulate when things are cutting through the light... and that can be done.) but since the technology is clearly there for realtime software to actually do things like this, there is no reason why iClone shouldn't get this feature.

These are also referred to as god rays. I made a post on this very suggestion sometime back. 

The unreal engine just got this feature about two months ago. 

What you are basically asking for is volumetric lighting.

Another fairly simple way this can be done (the devs would need to do this) is to make it so that one directional light would shoot light beams  in one direaction. The beams wouldn't be coming from one specific point. There'd just be an infinite number of beams pointing in which ever direacion the light source was facing. To keep things simple, only one directional light would be able to do this at a time.

Or a volumetric light could be implemented to do this. A one volume light per scene would be sufficiant for now I think as a sun light.

Oh, I just recalled an even OLDER post I made where I tried to create my own light cones. 

Here's an image I made with my hand made light cones.

I had to place a cone per window.

See, with the program doing this, I wouldn't have to think and worry abou where and how they were placed. 



This light cone is made from one of the truncated pyramids in iClone's 3D Blocks props. I forget whether it's Pyramid_03 or Pyramid_04.

Load one of these props and examine the Diffuse texture, which shows you how the sides are mapped.

You want vertical streaks to play across the facets of the pyramid (technically, a frustrum). They should flicker in and out in darkness and have small side-side movements. Note however that the greyscale video needs to be applied to the Opacity channel and not the Diffuse channel.

This will produce the desired effect.[/quote]

----------------------------------------------------
***BEST OF THE CORE**
:A music reel demonstrating the different types of music I produce for multimedia. Hope everyone enjoys.


Player not working? Use this link.

My other audio work.

Facebook page:

Creation begins at the core.

Attachments
Old temple with light beams.jpg (483 views, 248.00 KB)
Paumanok West
Paumanok West
Posted 14 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)Distinguished Member (11.0K reputation)

Group: Forum Members
Last Active: 10 Years Ago
Posts: 2.5K, Visits: 7.0K
Dreamcube017 (9/14/2010)

it just seems like a work around simply because we can't do it.
...there is no reason why iClone shouldn't get this feature.


In another thread, Peter said there is no timetable for the appearance of iClone 5, and I seriously, seriously doubt an effect like this would show up as an update to V4.

Since we have no corporate commitment to implement this--EVER--I'm just trying to help the poster get his effect NOW rather than someday.

Sitting around lobbying RL is not the same as actually getting a movie made! BigGrin

(And I am assuming you and I both realize that the viewer's eye doesn't require an exact correspondence between the shape of every leaf and the placement of the beams.)

General Picture - animating now to life itself(tm)
Member of Content Wizards
Dreamcube017
Dreamcube017
Posted 14 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 2.0K, Visits: 2.9K
True, I konw what you mean.

It's not a bad idea though.

I was actually thinking you could render the scene from the viewpoint of the light and then make it into a thrush hold filter and make that an alphe. Put that through the cone and it should give some sort of alpha and it'll move with the characters.

Just a thought.

I aw that thread as well and I know these won't be in 4, but when 5 does come out, it'd be awesome to have that.

----------------------------------------------------
***BEST OF THE CORE**
:A music reel demonstrating the different types of music I produce for multimedia. Hope everyone enjoys.


Player not working? Use this link.

My other audio work.

Facebook page:

Creation begins at the core.
Peter (RL)
Peter (RL)
Posted 14 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)Distinguished Member (116.2K reputation)

Group: Administrators
Last Active: Yesterday
Posts: 22.7K, Visits: 35.7K
bsperan (9/14/2010)
I see on the HDR Video Effects page that iClone 4 features some pretty advanced HDR and shader effects, like bloom and glare. However, is there support for Crepuscular Rays, also called "Sun Rays"?



An example of this type of shader in a game can be seen in this video of a user-created plugin for Morrowind:

Morrowind -- Phal's Sunshaft Rays Shader

I've also seen this type of shader in one or two other games, but I can't recall their names at the moment. I will admit this is a rather cutting edge shader technique. However, you can see for yourself from the above video the depth of realism such a shader can add to animation. And a careful search will yield some Internet discussions of the specific formulas and techniques involved.

IMO, incorporating Crepuscular Rays as a feature in iClone 5 would certainly keep it on the cutting edge of 3D rendering and animation software. And considering the nature of the effect, I believe it would be difficult and/or time consuming to add to animation with post-production editing software. (A still frame should be easier, however.)

PS: I noticed on the HDR Video Effects page a render with an effect that looks similar to Crepuscular Rays. Could someone tell me the type of glare effect that is used?


Sadly this feature isn't planned for the next version of iClone. Thanks for the feedback though.

                                                                

Peter
Forum Administrator

www.reallusion.com


Dreamcube017
Dreamcube017
Posted 14 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)Distinguished Member (11.6K reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 2.0K, Visits: 2.9K
man Peter, ya killin' me!

Wait... is the next version version 5 or just another 4.xx?



----------------------------------------------------
***BEST OF THE CORE**
:A music reel demonstrating the different types of music I produce for multimedia. Hope everyone enjoys.


Player not working? Use this link.

My other audio work.

Facebook page:

Creation begins at the core.



Reading This Topic