Khronos Public Bugzilla
Bug 27 - Default material colors in <phong>, <lambert>, etc
: Default material colors in <phong>, <lambert>, etc
Status: RESOLVED FIXED
Product: COLLADA
Classification: Unclassified
Component: Specification
: 1.4.1
: PC Windows
: P3 normal
: Spec 1.4.1 2nd Ed.
Assigned To: Ellen Finch
:
: collada-fx
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-26 11:33 PDT by Steven Thomas
Modified: 2008-06-10 12:50 PDT (History)
4 users (show)

See Also:
elf: relnotes_141b+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Thomas 2006-10-26 11:33:00 PDT
In the spec it says that a <diffuse> inside a <phong> (or <lambert>, etc) can be declared 0 or 1 times, however it lists the default value as "N/A". If it doesn't have to be declared then it needs a reasonable default (black probably), right? Same goes for the other material properties (<emission>, <ambient>, ...).

See this thread on collada.org for more details: https://collada.org/public_forum/viewtopic.php?t=600&sid=46503dc068197f75f45bcb39a56f4bba
Comment 1 Ellen Finch 2006-11-13 17:23:48 PST
Is this a documentation (Specification) omission  or a schema enhancement request? If former, need info--
Comment 2 Steven Thomas 2006-11-13 19:06:09 PST
I'm not sure if the default values should go in the schema or not, but the spec should definitely mention what they are. What additional info do you need?
Comment 3 Ellen Finch 2006-11-13 19:09:04 PST
What are the defaults & where/how are they defined? I couldn't find anything when I looked.
Comment 4 Steven Thomas 2006-11-13 19:22:26 PST
Yes, that's the problem: there are no defaults defined. Mark Barnes (or one of the other schema guys) should decide what the default values should be. Currently a Collada reader can interpret the lack of a <diffuse> element however it wants. That's probably not a good thing.

An alternative to default values would be making all elements required.
Comment 5 Mark Barnes 2006-11-29 18:02:56 PST
Reassigned.

These things are elements of 'type="common_color_or_texture_type"'. The type itself is a complexType choice of: {color, param, texture}. This choice cannot be defaulted, so it doesn't help to supply default values at this level.

Because the type is not a simple type, the elements cannot have schema supplied defaults either.

We cannot make the optional elements required in 1.4.2 because then existing 1.4.x documents will no longer validate.

We resist specifying default values that cannot be expressed in the schema.

Daniel what do you think about this issue?
Comment 6 Daniel Horowitz 2007-03-28 19:12:11 PDT
If this portion of the technique is missing then you should leave out that part of the equation.

Ex Phong without diffuse
Emissive + Ambient + Specular*(RdotL^SpecPower)


Ironically this provides equivilant results to using black.


Ellen can you document this? 

Comment 7 Mark Barnes 2007-06-26 13:29:48 PDT
Add to 1.4.1b release notes?
Comment 8 Mark Barnes 2007-07-25 17:26:30 PDT
Assigned.

(In reply to comment #6)
> If this portion of the technique is missing then you should leave out that
> part of the equation.
> 
> Example <phong> without <diffuse> calculation
> Emissive + Ambient + Specular*(RdotL^SpecPower)
> 
Comment 9 Ellen Finch 2007-07-27 18:23:38 PDT
Adding to 1.4.1B release notes.
Comment 10 Ellen Finch 2008-06-10 12:50:26 PDT
Fixed in 1.4.1 2nd Edition spec.