[BUG] No specular reflections on glass from sun

Feature requests, bug reports and related discussion
User avatar
Caronte
Posts: 61
Joined: Tue May 01, 2007 7:17 am
Location: Valencia, Spain

[BUG] No specular reflections on glass from sun

Post by Caronte » Thu May 17, 2007 8:49 am

I think this can be a bug (or I don't understand) because in real life I can see it

The only way I was found to get specular reflections over glass from the sun, are using a "Spec type=glossy transparent" and set the exponent value to something like 1500 but thi's not a solution because the glass becomes frosted.

From this post:
http://www2.indigorenderer.com/joomla/f ... highlight=
Attachments
indigo.jpg
indigo.jpg (376.64 KiB) Viewed 2481 times
Sorry about my poor english ;)

neepneep
Indigo 100
Posts: 413
Joined: Wed Jun 28, 2006 10:21 am

Post by neepneep » Thu May 17, 2007 10:42 am

This isn't a bug but I am guessing the problem is that the sun in the sky model is a little small.

What you can do is create a blend material of both the glossy and the regular specular materials and then fiddle with the blend factor until you get a better result...

eg.

Code: Select all

	<medium>
		<name>Spec</name>
		<precedence>10</precedence>
		<basic>
			<ior>1.5</ior>
			<cauchy_b_coeff>0</cauchy_b_coeff>
			<absorption_coefficient_spectrum>
				<rgb>
					<rgb>0.001 0.001 0.001</rgb>
				</rgb>
			</absorption_coefficient_spectrum>
		</basic>
	</medium>
	<material>
		<name>Spec</name>
		<specular>
			<transparent>true</transparent>
			<internal_medium_name>Spec</internal_medium_name>
		</specular>
	</material>


	<medium>
		<name>Gloss</name>
		<precedence>10</precedence>
		<basic>
			<ior>1.5</ior>
			<cauchy_b_coeff>0</cauchy_b_coeff>
			<absorption_coefficient_spectrum>
				<rgb>
					<rgb>0.001 0.001 0.001</rgb>
				</rgb>
			</absorption_coefficient_spectrum>
		</basic>
	</medium>
	<material>
		<name>Gloss</name>
		<glossy_transparent>
			<exponent>2000</exponent>
			<internal_medium_name>Gloss</internal_medium_name>
		</glossy_transparent>
	</material>


	<material>
		<name>blend</name>
		<blend>
			<a_name>Gloss</a_name>
			<b_name>Spec</b_name>
			<blend_factor>0.85</blend_factor>
		</blend>
	</material>
Attachments
specglossblend.jpg
specglossblend.jpg (29.87 KiB) Viewed 2434 times
Last edited by neepneep on Thu May 17, 2007 2:16 pm, edited 3 times in total.

User avatar
zsouthboy
Posts: 1395
Joined: Fri Oct 13, 2006 5:12 am

Post by zsouthboy » Thu May 17, 2007 11:03 am

Your scene scale is wrong.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Thu May 17, 2007 12:53 pm

1 unit = 1 meter

Just in case zsouthboy is right :D
obsolete asset

User avatar
OnoSendai
Developer
Posts: 6174
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Post by OnoSendai » Thu May 17, 2007 3:04 pm

Hi,
While not necessarily a bug, this is definitely an 'issue' with Indigo.
The sun is the correct size, the scene is modelled just fine.
The problem is that the sun subtends a very small fraction of the sky. Combined with the curvature of the sphere, the result is that the sun image covers only a small fraction of a pixel.
I guess the underlying divergence from 'real life', is that in the human eye, or a camera, there will be a number of mechanisms by which the sun image is spread out a bit over the rest of the image - diffraction effects, scattering off particles in the eye / camera, imperfections on the lenses etc..
There is also a biological 'veiling glare' effect due to retinal neurons getting overloaded, and an analogous CCD 'overflow' phenomenon.

I'm still thinking about the best way to handle this issue. For example, see rerdavies' threads in the Violet dev section as one possible approach that could be integrated into the Indigo core.

In the mean time, I suggest you save out a HDR image as an .igi. Then you can experiment with Gaussian bloom, glare, and diffractive bloom, which should make the sun specular reflections a lot more visible :)

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Thu May 17, 2007 4:25 pm

there is another issue with the sun, that I already pointed out, once...

if you point the cam directly on the sun, you can see a black pixel line arround it...

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Thu May 17, 2007 8:33 pm

While not necessarily a bug, this is definitely an 'issue' with Indigo.
The sun is the correct size, the scene is modelled just fine.
In that sense I don't see a reason why to "fix" that. Burn parameter should be set accordingly by users, this is related with tonemapping isn't it ?
obsolete asset

User avatar
OnoSendai
Developer
Posts: 6174
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Post by OnoSendai » Thu May 17, 2007 8:49 pm

CTZn wrote:
While not necessarily a bug, this is definitely an 'issue' with Indigo.
The sun is the correct size, the scene is modelled just fine.
In that sense I don't see a reason why to "fix" that. Burn parameter should be set accordingly by users, this is related with tonemapping isn't it ?
It's an issue with Indigo because the goal of Indigo is photorealistic graphics.
And in a photo the sun image will be larger than 1 pixel.

crsrma
Posts: 45
Joined: Thu Nov 02, 2006 3:38 am

Post by crsrma » Thu May 17, 2007 9:32 pm

Hmm...what's this biological talk, when most everything in the XML/exporters is based on shutters & f-stop?


edit: Wouldn't experimenting with creating more pronounced specular [highlights] create unwanted hot spots as well?

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Thu May 17, 2007 9:49 pm

the sun would look larger... I don't think it would affect all the highlights, 'cause it's brightness based...

Dunno, if that's right...

crsrma
Posts: 45
Joined: Thu Nov 02, 2006 3:38 am

Post by crsrma » Thu May 17, 2007 10:04 pm

Maybe sky turbidity would matter as well..?

I've had instances of this myself, basically in glassy/glossy scenes.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Thu May 17, 2007 10:10 pm

not really...
sky turbity won't upsize the sun appearance. It just changes the colour of the sky.
And the physically accurate range of turbity is 2-6. Lower or higher values will give unrealistic skys.

But a new skymodel is comming :D (I don't write soon, just that it's comming)

User avatar
Caronte
Posts: 61
Joined: Tue May 01, 2007 7:17 am
Location: Valencia, Spain

Post by Caronte » Fri May 18, 2007 2:55 am

OnoSendai wrote:It's an issue with Indigo because the goal of Indigo is photorealistic graphics.
And in a photo the sun image will be larger than 1 pixel.
¡Exactly!

I think the goal of a realistic render engine would be to produce the same results than we can see with our eyes or capture with our camera.

OnoSendai, I tryed Bloom, Glare, etc... but thi's not god, because it affect another image zones.

I hope you find a good solution to solve it (may be doing a diferent treatment to the sun because thi's the only problematic lightsource?).

Thanks by your time ;)
Sorry about my poor english ;)

User avatar
Maluminas
Posts: 148
Joined: Fri Aug 18, 2006 11:06 am
Location: Canada>Quebec>Montreal

Post by Maluminas » Fri May 18, 2007 7:05 am

Sky turbidity is important, its what is responsible for the sun bloom in real life. The turbidity scatters the light and thats why the sun can be seen in real life as a big painfully bright blotch. I would be interested to see what would happen if someone made a 300m (indigo world size?) wide sphere with a very low scattering medium, im pretty sure we'd get sun bloom on the sky and on reflections... I might try it if i find the time later today.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Fri May 18, 2007 7:08 am

nope. not indigo world size ;)
that was once.
now, it's everytime 100*scene size.
So, if that overall fog-cod doesn't come, a perfect matching worldsized fog sphere isn't possible.

All this may come with the new skymodel (I hope) :D

Post Reply
20 posts

Who is online

Users browsing this forum: No registered users and 1 guest