Results 1 to 4 of 4

Thread: Textures in 1.5

  1. #1
    christoph_nenning
    Guest

    Textures in 1.5

    I have a question how textures should be defined in COLLADA 1.5.

    Here is a sample file portion:
    Code :
    		<effect id="blinn3-fx">
    			<profile_COMMON>
    				<newparam sid="file2-sampler">
    					<sampler2D>
    						<instance_image url="#image-id" />
    					</sampler2D>
    				</newparam>
    				<technique sid="common">
    					<phong>
    						<emission>
    							<color>0 0 0 1</color>
    						</emission>
    						<ambient>
    							<color>0 0 0 1</color>
    						</ambient>
    						<diffuse>
    							<texture texture="file2-sampler" texcoord="TEX0"/>
    						</diffuse>
    						<specular>
    							<texture texture="file2-sampler" texcoord="TEX0"/>
    						</specular>
    						<shininess>
    							<float>0.3</float>
    						</shininess>
    						<reflective>
    							<color>0 0 0 1</color>
    						</reflective>
    						<reflectivity>
    							<float>0.5</float>
    						</reflectivity>
    						<transparent>
    							<color>0 0 0 1</color>
    						</transparent>
    						<transparency>
    							<float>1</float>
    						</transparency>
    						<index_of_refraction>
    							<float>1</float>
    						</index_of_refraction>
    					</phong>
    				</technique>
    			</profile_COMMON>
    		</effect>

    IMHO <instance_image> should be inside <sampler2D> as fx_sampler2D_type inherits fx_sampler_type which uses instance_image_type for a <instance_image> child element.

    But the above XML does not validate with several tools:
    - libxml
    - apache xerces
    - altova xml spy

    xml spy gives me following error message:
    Quote Originally Posted by altova xml spy
    The content of complex type definition 'fx_sampler2D_type' is 'empty'. This forbids any content for element <sampler2D>.
    Error location: COLLADA / library_effects / effect / profile_COMMON / newparam / sampler2D

    Details:
    cvc-complex-type.2.1: The content of complex type definition 'fx_sampler2D_type' is 'empty'. This forbids any content for element <sampler2D>.
    cvc-elt.5.2.1: The element <sampler2D> is not valid with respect to the actual type definition 'fx_sampler2D_type'.
    Please tell me how to define textures in 1.5 !

  2. #2
    christoph_nenning
    Guest

    Re: Textures in 1.5

    note:
    when I change the inheritance method in XSD from xs:restriction to xs:extension, the validation errors are gone.

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Textures in 1.5

    Seems like XSD rules have changed for that. This schema bug should be reported at khronos.org/bugzilla

  4. #4
    christoph_nenning
    Guest

    Re: Textures in 1.5

    I have entered a bug in khronos bugzilla. It got ID 191.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •