Page MenuHome

Collada import does not read emission
Open, NormalPublic

Description

System Information
Operating system: linux
Graphics card:

Blender Version
Broken: 2.79b (probably all (later) versions).

Short description of error

When a material has Shader -> Emit set to a non-zero value, a collada export
reflects this in the phong section as

<emission>
  <color sid="emission">0.33 0.33 0.33 1</color>
</emission>

but importing that (or any other) .dae the Emit value always ends up having value 0.

Details

Type
Bug

Event Timeline

Just tested 2.8 - that's three steps backwards. That version doesn't even export anything regarding materials (like alpha masking, colors, emission, etc).

Gaia Clary (gaiaclary) triaged this task as Normal priority.Apr 11 2019, 9:08 AM

last time i was looking into this the material system was not yet fully completed. Because of this the material support is not yet fully finished. It is on the todo list for 2.80. Maybe better look at this as "not yet there" instead of "three steps backwards" :)

regarding missing colors... actually the basic features should be available (diffuse color has been implemented for sure)

Hi Gaia. I'm not even sure if collada supports having a diffuse color and a diffuse texture at the same time? At least, I couldn't find it. Other formats do.
At any rate, I'm only testing with textures; this is for Second Life, and SL almost always has a texture on any surface, but also allows a color at the same time.

Not just that, but SL has three 'alpha modes' 'None', 'Blending' and 'Masking' - the latter has an Alpha Masking cutoff value associated with it that I can't
find in blender (let alone that blender exports that to .dae). The ideal case would be where I can implement an export file from the SL viewer that when
read into blender shows more or less the same thing, but specifically, when exported from blender to the same format still contains the exact same data
that the viewer will need to import an object to the same state.

I'm currently using the <extra> element of collada, inside a <profile_COMMON>. It would be cool if you could add to 2.80 that it just reads that and remembers it (even though blender can't use it) when you import something from collada - so it can export it again for the profile_COMMON in an <effect> with the same id?

For example, currently I'm doing:

		<effect id="Material6-fx">
			<profile_COMMON>
				<newparam sid="7b8015d9-d505-e74e-ce1f-42f657031f73_png-surface">
					<surface type="2D">
						<init_from>7b8015d9-d505-e74e-ce1f-42f657031f73_png</init_from>
					</surface>
				</newparam>
				<newparam sid="7b8015d9-d505-e74e-ce1f-42f657031f73_png-sampler">
					<sampler2D>
						<source>7b8015d9-d505-e74e-ce1f-42f657031f73_png-surface</source>
					</sampler2D>
				</newparam>
				<technique sid="common">
					<phong>
						<diffuse>
							<texture texture="7b8015d9-d505-e74e-ce1f-42f657031f73_png-sampler" texcoord="7b8015d9-d505-e74e-ce1f-42f657031f73_png"/>
						</diffuse>
						<specular>
							<color sid="specular">0 0 0 0</color>
						</specular>
					</phong>
				</technique>
				<extra>
					<technique profile="Aleric">
						<diffuse_alpha_mode>2</diffuse_alpha_mode>
						<alpha_cutoff>13</alpha_cutoff>
                                                <diffuse_color>0.639216 0.639216 0.639216 1</diffuse_color>
						<bump_shiny_fullbright>3</bump_shiny_fullbright>
					</technique>
				</extra>
			</profile_COMMON>
		</effect>