google-code-export / o3d

Automatically exported from code.google.com/p/o3d
0 stars 0 forks source link

opaque texture but mtl into zorderddrawlist #185

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. a scene with 1 transparent mtl + 1 opaque textured mtl
2.
3.

What is the expected output? What do you see instead?
transparent mtl is loaded and set into zordereddrawlist
opaque textured mtl is loaded and set into performancedrawlist

instead
opaque textured mtl is loaded but set into zordereddrawlist

After some investigation, I found this :

o3djs.material.prepareMaterial() check if material is transparent :
o3djs.material.hasNonOneAlpha_(material, 'diffuse');

and this function o3djs.material.hasNonOneAlpha_() check if texture is
opaque or not
  if (texture && !texture.alphaIsOne) {
    nonOneAlpha = true;
  }

and the JPG texture I assigned which is totally opaque is seen as
non-opaque !!!
texture.alphaIsOne = false

+ is it possible to take into account the transparency or transparent
attribute from collada when computing diffuse param into o3dconverter ?
thank you

What version of the product are you using? On what operating system?
O3D plugin 0.1.42
PC vista

What hardware are you using:  graphics card type?  motherboard type?
nVidia 8600 MGT

Please provide any additional information below.

Original issue reported on code.google.com by gregory...@gmail.com on 19 Nov 2009 at 11:52