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
[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 - glossy / etched glass

glossy / etched glass

Moderator: Timo

glossy / etched glass

Postby Timo » Wednesday 15. December 2004, 10:03

Here's a quite easily controllable glass material with glossy reflections and refractions. Unfortunately it doesn't work with caustics.
http://koti.welho.com/tmikkola/materials/glossy.zip
Those of you who know their way around vsl might notice that I stole the blurriness trick from the GI shader. I really wish this could be done with a simple variable input instead.
Last edited by Timo on Wednesday 22. December 2004, 00:20, edited 1 time in total.
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Postby Guest » Friday 17. December 2004, 09:10

Hi Timo,

how are you? well, because nobody answered yet, I want to say thank you for creating this nice material for the RS community :)
I haven't had time to look at it yet, but as VSL novice I appreciate all efforts of new materials to learn from :)
have a nice day and keep up the good work!, see ya, bobbi
Guest
 

Postby Boris » Sunday 19. December 2004, 11:58

many thanks Timo. I was trying to use this glass for eyes but somehow it looks very scary :shock: Namewise it sounded like it might be good for use for the eyes instead of the default glass. Did I used wrong settings or is the shader more for other things thought?



Image
Bye
Boris
User avatar
Boris
 
Posts: 555
Joined: Sunday 22. June 2003, 11:18
Location: Blankenfelde, Germany

Postby Timo » Sunday 19. December 2004, 16:57

Hey, that looks great ;)
Dunno what's wrong with it though... I'll check it out later.
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Postby Timo » Wednesday 22. December 2004, 00:21

Whoopsy, forgot to add transparency in surface:filtering... should work now.

[edit]Still acts a bit weird though... seconday ray reflections are bonkers.[/edit]
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Postby Boris » Wednesday 22. December 2004, 06:56

hmm ... looks now different but now more suited for sunglasses

Image
Bye
Boris
User avatar
Boris
 
Posts: 555
Joined: Sunday 22. June 2003, 11:18
Location: Blankenfelde, Germany

Postby Timo » Tuesday 5. July 2005, 20:24

Here's a new version that I created from scratch:
http://koti.welho.com/tmikkola/glasstest.zip
It's still unusable, surface filtering makes the material act all crazy.
It'd be nice to know what's causing this. I've gone through the material a few million times and still can't see what could be wrong with it.
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Postby Timo » Tuesday 5. July 2005, 20:45

Here's a picture of the error(s):
Image
normal, mine with no surface filtering and mine with surface filtering.
And here's a test scene that shows the error(s).
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Postby Guest » Wednesday 13. July 2005, 19:42

Hi Timo,

I quickly checked the shader and found one potential bug. You are using root level variables (glass color, angle) to store some computations and reuse them later. For example the Angle variable is a problem, because you initialize it in the surface properties shader and use it later in the Surface finishing shader. However, the surface filtering shader recomputes the angle in between these two shaders for each light source from a new direction, to find out shadow intensity.

Material's root level variables are 'static' i.e. they are instanced only once per material. A complex shader should not store any evaluation order dependent data into them. You can either use a new custom channel to store the data or recompute the angle in all shaders that need the value.

I hope this helps...


Best regards,

Vesa
Guest
 

Postby Timo » Thursday 14. July 2005, 20:15

Thanks for the help Vesa, I finally got it working :)
Grab it here
Once again it's not thoroughly tested, so there might be some buggy behaviour. If so, tell me so I can fix it.
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Postby Timo » Thursday 22. June 2006, 19:27

Ran into trouble again =) I noticed that RayTracer objects in Surface Properties get evaluated by caustics, so I moved them there. Unfortunately there's a slight error in the refractions(?). Here's a comparison with a stripped glass shader and the shaders used. The old glossy shader was pretty much identical with the default glass.
Attachments
glossybug.zip
stripped glass and glossy glass shaders (used in the pic above).
(22.75 KiB) Downloaded 219 times
glossybug.jpg
Apparently the bug is in refractions, as it's visible without reflections as well.
glossybug.jpg (17.73 KiB) Viewed 5161 times
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Postby Timo » Tuesday 27. June 2006, 21:50

I've even tried reversing the polari^H^H^H^H^H^H optical thickness order on backfacing surfaces in the refract operation, but nothing seems to help. It'd be nice to get this to work.
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Postby Guest » Wednesday 28. June 2006, 13:03

Hello Timo

Sorry that it took so long to check this problem. The error appears because the refraction in higher
recursions uses wrong optical thickness values. First refraction (from empty space into glass) is OK, but the second
refraction uses the following thickness values:

1. exterior:thickness = glass (material from which the ray comes)
2. surface:thickness = glass (the currently hit surface).

Thickness is the same and no refraction happens. It seems that also a third set of
properties, namely the space behind the hit surface, should be available in the surface properties shader.
I don't think it is generally possible to solve the problem without the new channel information.
A fake solution: check if the optical thickness values are the same and if they are, set latter to zero (empty
space). This does not work correctly when the user creates overlapping transparent volumes, or when the camera is inside a glass object. That is a rare situation, though.

Best regards,

Vesa
Guest
 

Postby Timo » Wednesday 28. June 2006, 23:39

Thanks for the info, I'll just trust that the normals are correct and set surface to 0 in backfacing surfaces....
When it is darkest, men see the stars.
User avatar
Timo
 
Posts: 468
Joined: Wednesday 6. August 2003, 21:24
Location: Helsinki, Finland

Postby Timo » Thursday 29. June 2006, 03:38

I didn't test it that well but it looks like it's working fine now. It's slow as hell with all the stuff on but I quess that can't be helped =)
Attachments
GlossyGlass3.zip
(13.87 KiB) Downloaded 192 times
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 2 guests

cron