roughglass bug?

General Project and community related discussion.

Moderator: coordinators

roughglass bug?

Postby paulo_gomes » Tue Mar 04, 2008 7:47 am

hi all, i'm having some trouble with the roughglass material. When i apply a texture to the roughness it doesn't work very well (apears a black ball inside my mesh :( ). here's an image. can anybody please share some light?

used latest cvs build and luxblend exporter (also from cvs).

other tests... (textures don't work with subtrate and plastic)

and a request ;) where's the log from the meeting?
Attachments
planeta_lux.jpg
User avatar
paulo_gomes
 
Posts: 79
Joined: Mon Oct 15, 2007 1:49 pm
Location: Portugal

Re: roughglass bug?

Postby Radiance » Thu Mar 06, 2008 8:37 am

have you tried inverting your texture you use ?

radiance
User avatar
Radiance
 
Posts: 3968
Joined: Wed Sep 19, 2007 2:13 am

Re: roughglass bug?

Postby paulo_gomes » Sat Mar 08, 2008 8:29 am

hi radiance, the texture is working fine, the only problem is the 'black ball' inside. i've tested with and without texture and the roughglass always renders black inside. can anybody test? it's a simple uvsphere, maybe is my build.
User avatar
paulo_gomes
 
Posts: 79
Joined: Mon Oct 15, 2007 1:49 pm
Location: Portugal

Re: roughglass bug?

Postby Abel » Sat Mar 08, 2008 2:23 pm

I've done some tests with a similar setup and got very similar results. It seems that the roughglass material shows a black ball inside when roughness is set to 0.

Image
From left to right:
-roughglass with roughness 0
-roughglass with roughness defined by bitmap (quite contrasty; mostly black and white)
-roughglass with roughness 1

I've attached the scene files:
roughglassmapping.zip
(277.48 KiB) Downloaded 21 times
User avatar
Abel
Developer
 
Posts: 1413
Joined: Sat Oct 20, 2007 8:13 am
Location: Helsinki, Finland

Re: roughglass bug?

Postby Lord Crc » Sun Mar 09, 2008 7:01 am

Roughness parameter should be a positive number (ie > 0). If you want to use a texture for the roughness, make sure that the texture will never evaluate to zero. When using an image, either make sure there are no completely black pixels in it, or use the "mix" texture along with a constant texture (use 1 as constant texture and mix with amount of say 1e-9 or something).

edit: perhaps we should add some code that would clamp the roughness it to a very small value if it is zero? This way images can be used as textures without any hassle.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4452
Joined: Sat Nov 17, 2007 2:10 pm

Re: roughglass bug?

Postby paulo_gomes » Mon Mar 10, 2008 12:17 am

ok, did some more testing. a sphere with no texture, only roughness set to 0.01 and the black ball still inside.
here's the material settings:

Code: Select all
   # Material 'vidro'
Texture "vidro--Kr" "color" "constant" "color value" [0.900000 0.900000 0.900000]
Texture "vidro--Kt" "color" "constant" "color value" [0.900000 0.900000 0.900000]
Texture "vidro--uroughness" "float" "constant" "float value" [0.010000]
Texture "vidro--vroughness" "float" "constant" "float value" [0.010000]
Texture "vidro--index" "float" "constant" "float value" [1.500000]
Texture "vidro--cauchyb" "float" "constant" "float value" [0.000000]
Texture "vidro--bumpmap" "float" "constant" "float value" [0.000000]
Attachments
planeta_lux.jpg
planeta_lux.jpg (7.18 KiB) Viewed 401 times
User avatar
paulo_gomes
 
Posts: 79
Joined: Mon Oct 15, 2007 1:49 pm
Location: Portugal


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests