Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: PienueDut

26. May 2012, 07:48:28 am
Xith3D CommunityXith3D InternalsDeveloper discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)Shading/Lighting/Color Models?
Pages: [1]
Print
Author Topic: Shading/Lighting/Color Models?  (Read 973 times)
qbproger
developers
Becoming dependent
***
Offline Offline

Posts: 217


View Profile
« on: 30. July 2008, 01:29:42 pm »

I'm not sure exactly what they're called (maybe color models?), but collada supports different shading/lighting/color models than are supported in Xith3D.  If these map to what I'm asking for, I'm not sure how they would map.

In ColoringAttributes I see these:
Code:
static ColoringAttributes.ShadeModel FASTEST
static ColoringAttributes.ShadeModel NICEST
static ColoringAttributes.ShadeModel SHADE_FLAT
static ColoringAttributes.ShadeModel SHADE_GOURAUD

I don't know if these map to what I'm looking for or not.

I'm looking for:
  • constant
  • lambert
  • phong
  • blinn
Logged

Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 30. July 2008, 07:04:07 pm »

I don't know constant, lambert and blinn. But Phong is very well known. I guess, the other ones are similar. Phong is only supported through user-defined shaders. OpenGL doesn't support that natively. The same will be true for lambert and blinn. Maybe constant is an alias for flat shading. Possibly one of the other two remaining ones is an alias for gouraud.

FLAT means, that the color is constant over the whole primitive. GOURAUD means, that the color is linearly interpolated between the vertices over the primitive's surface.

FASTEST and NICEST are simply aliases for FLAT and GOURAUD.

Does that help?

Marvin
Logged
qbproger
developers
Becoming dependent
***
Offline Offline

Posts: 217


View Profile
« Reply #2 on: 30. July 2008, 07:13:06 pm »

Ok, a collada file let's you specify any of the shading types from the list I specified.  I was just curious how to render them.  Since they all contain emission, diffuse, specular, etc... in any combination, I guess I can just set what is passed in on the material that's all that's supported.
Logged

Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #3 on: 30. July 2008, 07:22:57 pm »

Ok, a collada file let's you specify any of the shading types from the list I specified.  I was just curious how to render them.  Since they all contain emission, diffuse, specular, etc... in any combination, I guess I can just set what is passed in on the material that's all that's supported.

Yes. If I was assuming right, and the 'constant' keyword maps to OpenGL's flat shading, I would simply use GOURAUD for all the other ones and when Xith has an integrated phong shader one day, we can change the mapping.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic