Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 483

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /www/htdocs/w0097c3c/rs-forum/phpBB3/includes/bbcode.php on line 112
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3824: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3826: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3827: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3828: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:483)
Realsoft Forum • View topic - AO mixing

AO mixing

Moderator: Timo

AO mixing

Postby arjo » Thursday 13. December 2007, 12:20

I promised to show the AO effect mixed with regular shading. So here's a detail of a render I created.

Mix, AO pass and nonAO render.

Arjo.
Attachments
AOmix.jpg
AOmix.jpg (123.96 KiB) Viewed 7387 times
AOpass.jpg
AOpass.jpg (48.09 KiB) Viewed 7387 times
nonAO.jpg
nonAO.jpg (125.26 KiB) Viewed 7387 times
arjo
 
Posts: 69
Joined: Monday 5. January 2004, 08:14

RE: AO mixing

Postby zaug » Thursday 13. December 2007, 12:48

Nice, thankz for the example.
Is making the AO pass simply a matter of disabling lights and materials; excepting the AO shader, of course ?
User avatar
zaug
 
Posts: 225
Joined: Saturday 20. December 2003, 16:29
Location: USA

RE: AO mixing

Postby arjo » Thursday 13. December 2007, 12:51

I post an explanation to the list. Not so handy maybe
arjo
 
Posts: 69
Joined: Monday 5. January 2004, 08:14

RE: AO mixing

Postby Timo » Thursday 13. December 2007, 13:33

It is possible to render the AO at the same time as other passes:
    -change the postprocess vsl a bit so it writes AO to a custom channel instead of adding it to image:color
    -render the custom channel to a separate image (or to a separate layer in the same image)
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

RE: AO mixing

Postby guest » Thursday 13. December 2007, 20:42

Thanks Arjo . Much appreciated . Easiest way to see the effect , or to see the actual difference in the 2 images , is to just save them to disk and then drop them into a browser . When we toggle back and forth we can really see where the AO is kicking in . Your AO pass is an excellent indicator of what this shader actually does . From what I understand AO can be a fantastic tool for "highlighting" (or should I say "low-lighting"?) certain areas where more shadow contrast is required . I think your original 'Cube' object worked very well , as we could quickly see where the 'low-lighting' was taking effect .

garry
guest
 
Posts: 102
Joined: Wednesday 10. January 2007, 02:12

RE: AO mixing

Postby arjo » Thursday 13. December 2007, 23:28

@Timo: It is possible to render in one pass indeed. But (I'm not sure, didn't test) I got the impression that it took much longer to render everything in one pass.

Another thing is that mixing the effect too strong isn't nice. And I paint a mask in Photoshop to use the effect only in certain areas. where a pavement meets the street, the dirt effect is nice. It's as if the objects "melt" together. But in other areas it can be a rather strange effect. Some corners that catch a lot of light sometimes need to stay bright. As the AO effect darkens every corner you can't do without manual adjustment. One might avoid that by using the effect only on certain objects, but in my case the scene is too complicated to make such a setup. So rendering AO at full strength and then reducing it a mixing stage suits me best.
arjo
 
Posts: 69
Joined: Monday 5. January 2004, 08:14

Postby Ville » Friday 14. December 2007, 06:34

Timo! Could you give a simple example scene where there is
channels and fileformat ready made. Multipass rendering is still too complicated for me :)

Ville
Ville
 
Posts: 21
Joined: Tuesday 4. January 2005, 10:20
Location: Finland

Postby Timo » Friday 14. December 2007, 08:18

@Timo: It is possible to render in one pass indeed. But (I'm not sure, didn't test) I got the impression that it took much longer to render everything in one pass.
In V5 this is indeed true. V6 should fix this quite well.
Another thing is that mixing the effect too strong isn't nice. And I paint a mask in Photoshop to use the effect only in certain areas. where a pavement meets the street, the dirt effect is nice. It's as if the objects "melt" together. But in other areas it can be a rather strange effect. Some corners that catch a lot of light sometimes need to stay bright. As the AO effect darkens every corner you can't do without manual adjustment. One might avoid that by using the effect only on certain objects, but in my case the scene is too complicated to make such a setup. So rendering AO at full strength and then reducing it a mixing stage suits me best.
AO's 'real' use is as an additional light, often replacing the ambient light: used this way it doesn't kill the highlights. What you're describing is more like a dirt shader, although the actual shader works in pretty much the same way (a dirt shader's effect is a tad bit more localized). Naturally it's just a tool that should be used in whatever way gets you the best results. I find rendering passes and balancing/masking them in Gimp to be extremely effective.
Timo! Could you give a simple example scene where there is
channels and fileformat ready made. Multipass rendering is still too complicated for me Smile

Ville
Sure thing, I'll do it this evening (and add it to the wiki). I'll try to finish the V6 AO shader as well.
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Postby arjo » Friday 14. December 2007, 08:32

Timo wrote:
@Timo: It is possible to render in one pass indeed. But (I'm not sure, didn't test) I got the impression that it took much longer to render everything in one pass.
In V5 this is indeed true. V6 should fix this quite well.


I now remember why it renders faster in a separate pass. I render the AO straight forward without any postblur. With some antialias it's smooth enough.
I blur it in Photoshop. Blur in PS is not as sophisticated as Realsoft blur but as it is only used as a multiply layer in photoshop, it doesn't really destroy details in the image.
arjo
 
Posts: 69
Joined: Monday 5. January 2004, 08:14

Postby Neico » Friday 14. December 2007, 08:46

Hi Arjo .... the image above AOpass.jpg .... was camera flashlight at 50% ... and also the ground surface at lower left seems to me to have a bump treatment. In your post to the list you recommend no materials but I guess you are happy enough with bumps.
Neico
 
Posts: 127
Joined: Saturday 20. November 2004, 07:43

Postby Neico » Friday 14. December 2007, 08:49

Some variations. Easily enough to find the composition layers from such resources. For the final I felt a need to tweak contrast in PhotoPaint.
Attachments
AO_Tests.jpg
AO_Tests.jpg (53.86 KiB) Viewed 7299 times
Neico
 
Posts: 127
Joined: Saturday 20. November 2004, 07:43

Postby Timo » Friday 14. December 2007, 10:01

arjo wrote:I now remember why it renders faster in a separate pass. I render the AO straight forward without any postblur. With some antialias it's smooth enough.
I blur it in Photoshop. Blur in PS is not as sophisticated as Realsoft blur but as it is only used as a multiply layer in photoshop, it doesn't really destroy details in the image.
The reason i was thinking of is that V5 AO is basically the same as one bounce GI, it just ignores the calculated hit surface illumination. It also has huge problems with reflections/refractions.
V6 fixes both issues.

Photoshop blur blurs over geometry boundaries, so you'll experience some 'leakage' in your AO, but I'm sure it's good enough in most cases.

AO could still be made immensely faster by using a separate process for it, for example using OGL rendering with an irradiance cache/photon map type solution.
The idea here is that we can decouple geometry from the AO samples, this way we can use proxy geometry for the AO rendering and we don't need UV coordinates for the AO'd objects.

The OGL rendering would basically render the scene from the sample's point of view with the (low quality) objects as black and the BG as white. Add some weighing and such, et voilà, you have an AO sample.
Naturally the resolution can be low for these sample renders, something like 100*100 might already be overkill. They should be fast to render as we can ignore lighting, drawing order and all such nonsense.
The hardest part would probably be finding proper sample locations, especially for adaptive sampling.

This solution works quite well with the RS rendering philosophy, as we can only render AO samples for the actual rendered area (unlike Photon mapped GI, where you have to preprocess the whole scene).

Having a separate cache/map for each object would make the render more accurate, as we wouldn't get sample leakage at object contact points.

The cache side of this solution could naturally also be used for GI (that's what irradiance caches and photon maps are usually used for).

There are other ways to do OGL AO, for example Nvidia's dynamic ambient occlusion, but most of the solutions only work with ordinary triangle meshes.

All of this is outside the scope of VSL though and would require some rather complex C coding, so I'll skip it ;)

</ramble>
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Postby arjo » Friday 14. December 2007, 11:11

Neico wrote:Hi Arjo .... the image above AOpass.jpg .... was camera flashlight at 50% ... and also the ground surface at lower left seems to me to have a bump treatment. In your post to the list you recommend no materials but I guess you are happy enough with bumps.


I'm sorry I did throw away the materials but I forgot that the file instances have their own materials. So that's why you see the bumps. The reason the AO image is so grey is because I saved the Photoshop layer to jpg without changing it's wheight.
arjo
 
Posts: 69
Joined: Monday 5. January 2004, 08:14

Postby arjo » Friday 14. December 2007, 11:19

Timo wrote:AO could still be made immensely faster by using a separate process for it, for example using OGL rendering with an irradiance cache/photon map type solution.


I guess that's what Cinema 4D is doing then. I did export the little scene I created some time ago when I changed your AO shader.

With V6 it renders in 65 seconds
With C4D it renders in 14 seconds
arjo
 
Posts: 69
Joined: Monday 5. January 2004, 08:14

Postby Timo » Friday 14. December 2007, 12:45

I guess that's what Cinema 4D is doing then.
Actually it looks like they use raytracing for it, I quess it's just well optimized.
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Next

Return to Shader/VSL/Texturing

Who is online

Users browsing this forum: No registered users and 1 guest

cron