|
From: Jose' C. <cru...@ce...> - 2007-04-27 09:50:03
|
We're working to update the rayshade renderer we'we added support to reflection, controlled by the standard SpecularControl attribute, the effect is pseudo logaritmic, a matte surface has a specular control less than 5 a glossy surface is some where arround 1000 a mirror is someting above 1000 it works with textures too!! fire your CVSs Pax et Bonum # Dott. Jos=E9 Cruanyes Aguilar - C.E. Soft srl # Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA # 02,3923101 0372,460602 |
|
From: Roger H. <rog...@mi...> - 2007-04-27 10:49:20
|
On 27 Apr, 2007, at 10:49, Jose' Cruanyes wrote: > We're working to update the rayshade renderer > > we'we added support to reflection, > > controlled by the standard SpecularControl attribute, > the effect is pseudo logaritmic, > a matte surface has a specular control less than 5 > a glossy surface is some where arround 1000 > a mirror is someting above 1000 > > it works with textures too!! > > fire your CVSs > Well done! But please can you explain. With other renderers a specular control of 200 is matt, and a specular control of 0.2 is gloss. Not only are the values bigger, they are also inverted. Can't we make these compatible with other renderers? Thanks to you both. Roger. |
|
From: Jose' C. <cru...@ce...> - 2007-04-27 12:45:19
|
Il giorno 27/apr/07, alle ore 12:30, Roger Holmes ha scritto:
>
> Well done! But please can you explain.
>
> With other renderers a specular control of 200 is matt, and a
> specular control of 0.2 is gloss.
>
> Not only are the values bigger, they are also inverted.
>
> Can't we make these compatible with other renderers?
>
mmm which other renderers?
I'm taking those values going back and forth from the values passed =20
in the open GL renderer in GL_SHININESS (it's not the same, I know, =20
but is clese anough)
I want the parameters in the geometry were used untouched by every =20
renderer, but I can be wrong - (not tested too much indeed)
this parameter controls how big is the reflection light spot on the =20
figure.
in GL it goes from
0 (no spot (because too big) and hence rough and hence not reflecting)
to
128 (pointy spot, hence polish hence reflecting)
in Rayshade it goes from
0 no reflecting
to
100 perfect mirror
seems obvious to map rayshade =3D GL_SHININESS / 1.28
now lets map this to Quesa specular control values (that BTW defaults =20=
to 4)
the mapping between Quesa-OGl is done in GLUtils.c 419:441
--8<------8<------8<------8<------8<------8<------8<------8<------8<----=20=
--8<------8<------8<----
//=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
=3D=3D=3D=3D=3D
// GLUtils_SpecularControlToGLShininess :
// Map Quesa specular control to =
OpenGL shininess.
//----------------------------------------------------------------------=20=
-------
// This function was arrived at heuristically, but notice =
several =20
properties:
// 1. as long as specularControl >=3D 0, shininess >=3D 0.
// 2. as specularControl increases, shininess increases.
// 3. as specularControl tends to infinity, shininess =
approaches 128 =20
(the maximum
// allowed by OpenGL).
GLfloat GLUtils_SpecularControlToGLShininess( float =
inSpecControl )
{
GLfloat shininess;
=09
if (inSpecControl < 0.0f)
inSpecControl =3D 0.0f;
shininess =3D 128.0f - (20.0f * 128.0f)/(inSpecControl + 20.0f);
=09
return shininess;
}
--8<------8<------8<------8<------8<------8<------8<------8<------8<----=20=
--8<------8<-----
the default 4 value of specularControl, maps to 21 of shininess
but 17 is too reflecting for a default value, so instead of do a =20
linear interpolation, I've adjusted the curve of translation to
result->reflect =3D (128.0f - (100.0f * 128.0f)/(data-=20
>specularControl + 100.0f))*0.008;
of course all this reasoning is genuine out of my a**, so it can be =20
discussed
Pax et Bonum
# Dott. Jos=E9 Cruanyes Aguilar - C.E. Soft srl
# Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA
# 02,3923101 0372,460602
|
|
From: Roger H. <rog...@mi...> - 2007-04-27 20:14:47
|
On 27 Apr, 2007, at 13:45, Jose' Cruanyes wrote:
>
> Il giorno 27/apr/07, alle ore 12:30, Roger Holmes ha scritto:
>
>>
>> Well done! But please can you explain.
>>
>> With other renderers a specular control of 200 is matt, and a
>> specular control of 0.2 is gloss.
>>
>> Not only are the values bigger, they are also inverted.
>>
>> Can't we make these compatible with other renderers?
>>
>
> mmm which other renderers?
The Quesa Interactive renderer, the QuickDraw3D Interactive renderer =20
and the Microspot renderer.
> I'm taking those values going back and forth from the values passed
> in the open GL renderer in GL_SHININESS (it's not the same, I know,
> but is clese anough)
So if you have a matt object and a glossy object and switch between =20
the interactive render and RayShade, do they look (about) the same?
>
> I want the parameters in the geometry were used untouched by every
> renderer, but I can be wrong - (not tested too much indeed)
I don't quite get your meaning.
>
> this parameter controls how big is the reflection light spot on the
> figure.
>
> in GL it goes from
>
> 0 (no spot (because too big) and hence rough and hence not reflecting)
> to
> 128 (pointy spot, hence polish hence reflecting)
Is it the other way round perhaps?
>
> in Rayshade it goes from
> 0 no reflecting
> to
> 100 perfect mirror
>
> seems obvious to map rayshade =3D GL_SHININESS / 1.28
>
> now lets map this to Quesa specular control values (that BTW defaults
> to 4)
>
> the mapping between Quesa-OGl is done in GLUtils.c 419:441
>
> --8<------8<------8<------8<------8<------8<------8<------8<------8<--=20=
> --
> --8<------8<------8<----
>
> //
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
> =3D=3D
> =3D=3D=3D=3D=3D
> // GLUtils_SpecularControlToGLShininess :
> // Map Quesa specular control to =
OpenGL shininess.
> //--------------------------------------------------------------------=20=
> --
> -------
> // This function was arrived at heuristically, but notice =
several
> properties:
> // 1. as long as specularControl >=3D 0, shininess >=3D 0.
> // 2. as specularControl increases, shininess increases.
> // 3. as specularControl tends to infinity, shininess =
approaches 128
> (the maximum
> // allowed by OpenGL).
> GLfloat GLUtils_SpecularControlToGLShininess( float =
inSpecControl )
> {
> GLfloat shininess;
> =09
> if (inSpecControl < 0.0f)
> inSpecControl =3D 0.0f;
>
>
> shininess =3D 128.0f - (20.0f * 128.0f)/(inSpecControl + 20.0f);
> =09
> return shininess;
> }
>
> --8<------8<------8<------8<------8<------8<------8<------8<------8<--=20=
> --
> --8<------8<-----
>
> the default 4 value of specularControl, maps to 21 of shininess
> but 17 is too reflecting for a default value, so instead of do a
> linear interpolation, I've adjusted the curve of translation to
>
> result->reflect =3D (128.0f - (100.0f * 128.0f)/(data-
>> specularControl + 100.0f))*0.008;
>
> of course all this reasoning is genuine out of my a**, so it can be
> discussed
>
>
> Pax et Bonum
>
> # Dott. Jos=E9 Cruanyes Aguilar - C.E. Soft srl
> # Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA
> # 02,3923101 0372,460602
>
>
>
> ----------------------------------------------------------------------=20=
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quesa-develop mailing list
> Que...@li...
> https://lists.sourceforge.net/lists/listinfo/quesa-develop
|
|
From: James W. <ja...@fr...> - 2007-04-27 20:45:16
|
Roger Holmes wrote: > On 27 Apr, 2007, at 13:45, Jose' Cruanyes wrote: >> this parameter controls how big is the reflection light spot on the >> figure. >> >> in GL it goes from >> >> 0 (no spot (because too big) and hence rough and hence not reflecting) >> to >> 128 (pointy spot, hence polish hence reflecting) > > Is it the other way round perhaps? No, it is not the other way around, but it is a bit more complicated, because specular color is also involved. In OpenGL it is more accurate to say that you get a non-reflecting surface by setting the specular color to black, never mind the value of GL_SHININESS. -- James W. Walker, Innoventive Software LLC <http://www.frameforge3d.com/> |
|
From: Jose' C. <cru...@ce...> - 2007-04-27 21:33:15
|
Il giorno 27/apr/07, alle ore 22:45, James Walker ha scritto: > Roger Holmes wrote: >> On 27 Apr, 2007, at 13:45, Jose' Cruanyes wrote: > >>> this parameter controls how big is the reflection light spot on the >>> figure. >>> >>> in GL it goes from >>> >>> 0 (no spot (because too big) and hence rough and hence not =20 >>> reflecting) >>> to >>> 128 (pointy spot, hence polish hence reflecting) >> >> Is it the other way round perhaps? > > No, it is not the other way around, but it is a bit more complicated, > because specular color is also involved. In OpenGL it is more =20 > accurate > to say that you get a non-reflecting surface by setting the specular > color to black, never mind the value of GL_SHININESS. I've think about it, to make the reflection value based in the =20 luminance of the specular color, but at last I've opted for the =20 reasoning in the previous mail, to have a parameter easier to set by =20 the user I'm open to suggestions Pax et Bonum # Dott. Jos=E9 Cruanyes Aguilar - C.E. Soft srl # Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA # 02,3923101 0372,460602 |
|
From: James W. <ja...@fr...> - 2007-04-27 22:07:28
|
Jose' Cruanyes wrote: > Il giorno 27/apr/07, alle ore 22:45, James Walker ha scritto: > >> Roger Holmes wrote: >>> On 27 Apr, 2007, at 13:45, Jose' Cruanyes wrote: >>>> this parameter controls how big is the reflection light spot on the >>>> figure. >>>> >>>> in GL it goes from >>>> >>>> 0 (no spot (because too big) and hence rough and hence not >>>> reflecting) >>>> to >>>> 128 (pointy spot, hence polish hence reflecting) >>> Is it the other way round perhaps? >> No, it is not the other way around, but it is a bit more complicated, >> because specular color is also involved. In OpenGL it is more >> accurate >> to say that you get a non-reflecting surface by setting the specular >> color to black, never mind the value of GL_SHININESS. > > I've think about it, to make the reflection value based in the > luminance of the specular color, but at last I've opted for the > reasoning in the previous mail, to have a parameter easier to set by > the user > > I'm open to suggestions There is no perfect way to map two degrees of freedom to one. But perhaps you could use some function of the product of specular control and specular luminance. -- James W. Walker, Innoventive Software LLC <http://www.frameforge3d.com/> |
|
From: Jose' C. <cru...@ce...> - 2007-04-27 21:26:50
Attachments:
Immagine 2.png
Immagine 1.png
|
Il giorno 27/apr/07, alle ore 22:14, Roger Holmes ha scritto: > > So if you have a matt object and a glossy object and switch between > the interactive render and RayShade, do they look (about) the same? > which is which? hint: look the shadows |
|
From: Jose' C. <cru...@ce...> - 2007-04-27 12:21:51
|
oops error... a matte surface has a specular control less than 5 (five) a glossy surface is somewhere around 100 (hundred) a mirror is something above 1000 (thousand) Il giorno 27/apr/07, alle ore 11:49, Jose' Cruanyes ha scritto: > a matte surface has a specular control less than 5 > a glossy surface is some where arround 1000 > a mirror is someting above 1000 Pax et Bonum # Dott. Jos=E9 Cruanyes Aguilar - C.E. Soft srl # Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA # 02,3923101 0372,460602 |
|
From: Jose' C. <cru...@ce...> - 2007-04-27 21:15:11
|
Il giorno 27/apr/07, alle ore 22:14, Roger Holmes ha scritto: >>> >> >> mmm which other renderers? > > The Quesa Interactive renderer, the QuickDraw3D Interactive renderer > and the Microspot renderer. don't know about microspot renderer, but the others does't support =20 reflecting... anyway I'd like to be as compatible as possible... > > >> I'm taking those values going back and forth from the values passed >> in the open GL renderer in GL_SHININESS (it's not the same, I know, >> but is clese anough) > > So if you have a matt object and a glossy object and switch between > the interactive render and RayShade, do they look (about) the same? > you can test it by yourself in geom test the quesa logo in Geom test is almost the same (so much that I've =20 even got the feel that nothing was changed, till I saw the shadow) a glossy object is MUCH more "Brilliant" in the 'wow' sense of the =20 term, but seems quite right (edit GeomTest to make the Quesa logo =20 glossy) every thing is perfectible anyway >> Pax et Bonum # Dott. Jos=E9 Cruanyes Aguilar - C.E. Soft srl # Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA # 02,3923101 0372,460602 |
|
From: Jose' C. <cru...@ce...> - 2007-04-27 21:33:15
|
Il giorno 27/apr/07, alle ore 23:15, Jose' Cruanyes ha scritto: >>>> >>> >>> mmm which other renderers? >> >> The Quesa Interactive renderer, the QuickDraw3D Interactive renderer >> and the Microspot renderer. > > don't know about microspot renderer, but the others does't support =20 > reflecting... > > anyway I'd like to be as compatible as possible... how are the parameters in the microspot renderer? and while at that, how do you pass the materials to the renderer? a =20 custom attribute? why don't make it a standard in Quesa, We're planning to support bump mappings, procedural shaders and other =20= features already present in RayShade Pax et Bonum # Dott. Jos=E9 Cruanyes Aguilar - C.E. Soft srl # Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA # 02,3923101 0372,460602 |
|
From: Sauro A. <int...@in...> - 2007-04-28 08:43:57
|
>Il giorno 27/apr/07, alle ore 23:15, Jose' Cruanyes ha scritto: > >>>>> >>>> >>>> mmm which other renderers? >>> >>> The Quesa Interactive renderer, the QuickDraw3D Interactive renderer >>> and the Microspot renderer. >> >> don't know about microspot renderer, but the others does't support >> reflecting... >> >> anyway I'd like to be as compatible as possible... > >how are the parameters in the microspot renderer? > >and while at that, how do you pass the materials to the renderer? a >custom attribute? >why don't make it a standard in Quesa, >We're planning to support bump mappings, procedural shaders and other >features already present in RayShade > The internal code of RayShade supports a complete=20 ray tracing renderer, we could have all these=20 features in Quesa passing in some way the=20 necessary parameters, but the most part of these=20 parameters aren't actually present in Quesa. It makes sense for me to go on with this simple=20 and fast implementation of reflection, because it=20 doesn't request any modification to the=20 applications that actually support Quesa and all=20 of us can try and experiment this solution. But there aren't simple solutions like this for=20 other RayShade functions, like procedural=20 shaders, bump mapping and others. We could implement these parameters in Quesa or=20 pass them to RayShade and other renderers as=20 custom attributes. I prefer the first solution, because it is more=20 general and the same parameters can be shared by=20 all the renderers. The second solution has the=20 advantage of not requesting any modification of=20 the Quesa code, it could be done modifying=20 Rayshade only, anyway a standardization of the=20 attributes is necessary. Sauro > > >Pax et Bonum > ># Dott. Jos=E9 Cruanyes Aguilar - C.E. Soft srl ># Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA ># 02,3923101 0372,460602 > > > >------------------------------------------------------------------------- >This SF.net email is sponsored by DB2 Express >Download DB2 Express C - the FREE version of DB2 express and take >control of your XML. No limits. Just data. Click to get it now. >http://sourceforge.net/powerbar/db2/ >_______________________________________________ >Quesa-develop mailing list >Que...@li... >https://lists.sourceforge.net/lists/listinfo/quesa-develop -- ----------------------------------------------------------------------------= - _ ___ |_| __| Interstudio S.r.l. Tel + 39 0573 99291 Fax + 39 0573= 992930 | |__ | Piazza Monteoliveto 6a http://www.interstudio.ne= t |_____| I-51100 Pistoia Italy mailto:int...@in...= t ----------------------------------------------------------------------------= - |
|
From: Jose' C. <cru...@ce...> - 2007-04-27 21:42:29
Attachments:
Immagine 3.png
Immagine 4.png
|
These are with an specular control of 100 put side by side with the other, made with delault (4) specular control |
|
From: Jose' C. <cru...@ce...> - 2007-04-27 22:04:51
|
and those with an specular control of 1000 the Quesa logo is not the best geometry to see the effect, but overall the lighting effect is pretty much the same |
|
From: Roger H. <rog...@mi...> - 2007-04-28 10:16:00
|
Here is a screen dump of the Quesa Interactive renderer. On the left is a 50% grey torus with Quesa's SpecularControl set to 0.2. On the right is an identical torus but with Quesa's SpecularControl set to about 219. There is an ambient light and a a directional light. Are you saying the more reflective one on the left is matt and the less reflective one on the right is glossy? If so our program has had its controls labelled back to front for many years. Interesting! |
|
From: Jose' C. <cru...@ce...> - 2007-04-28 10:48:21
|
Il giorno 28/apr/07, alle ore 12:15, Roger Holmes ha scritto: > Are you saying the more reflective one on the left is matt and the =20 > less reflective one on the right is glossy? > If so our program has had its controls labelled back to front for =20 > many years. Interesting! keep aside the fact that my english is limited, so certain details of =20= the adjectives can be misunderstanding... #define "wheat flour" matte #define "car paint" glossy with these definitions the right torus is glossy and the left one is =20 matte another aspect is which one cast more light in the direction of the =20 observer in this case a matte object is more "brilliant" because it's rough =20 surface reflect light in every direction, while a glossy object =20 reflects the light in just one in a limit case, a perfect mirror in a black space is invisible =20 except in the direction where the light is reflected so in my opinion one thing is the amount of light reflected, and =20 another is how mirror-like is an object so the "sugar coated donut" in the left, can't reflect the objects =20 around it, even if it is more bright, while I expect to see the =20 objects around the right torus reflected on it you can see a discussion at: <http://www.artifice.com/support/user_guide/documents/tips/=20 specularity.html> Pax et Bonum # Dott. Jos=E9 Cruanyes Aguilar - C.E. Soft srl # Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA # 02,3923101 0372,460602 |
|
From: Roger H. <rog...@mi...> - 2007-04-28 15:17:20
|
I see now. Perhaps it might be better for me to change my program to refer to =20 roughness and smoothness rather than matt and gloss. Thank you very much for the lesson, please disregard my earlier =20 ramblings. On 28 Apr, 2007, at 11:48, Jose' Cruanyes wrote: > > Il giorno 28/apr/07, alle ore 12:15, Roger Holmes ha scritto: > >> Are you saying the more reflective one on the left is matt and the >> less reflective one on the right is glossy? >> If so our program has had its controls labelled back to front for >> many years. Interesting! > > > keep aside the fact that my english is limited, so certain details of > the adjectives can be misunderstanding... > > #define "wheat flour" matte > #define "car paint" glossy > > with these definitions the right torus is glossy and the left one is > matte > > another aspect is which one cast more light in the direction of the > observer > in this case a matte object is more "brilliant" because it's rough > surface reflect light in every direction, while a glossy object > reflects the light in just one > > in a limit case, a perfect mirror in a black space is invisible > except in the direction where the light is reflected > > > so in my opinion one thing is the amount of light reflected, and > another is how mirror-like is an object > > so the "sugar coated donut" in the left, can't reflect the objects > around it, even if it is more bright, while I expect to see the > objects around the right torus reflected on it > > you can see a discussion at: > > <http://www.artifice.com/support/user_guide/documents/tips/ > specularity.html> > > > > Pax et Bonum > > # Dott. Jos=E9 Cruanyes Aguilar - C.E. Soft srl > # Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA > # 02,3923101 0372,460602 > > > > ----------------------------------------------------------------------=20= > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Quesa-develop mailing list > Que...@li... > https://lists.sourceforge.net/lists/listinfo/quesa-develop |