[Papervision 3D] Shaded Material - still an issue with cubes and planes?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Papervision 3D] Shaded Material - still an issue with cubes and planes?

o renken
Hi Visioners,

is there still an issue with Shaded Material an planes and cubes?
is it the proper way to assign each side of the cube a own Shaded Material and its shader ( like in the following), or is there something iam missing?


this way brings up some kind of z-fighting inside of the material ( kinda look like that)

[AS]

var shader : FlatShader = new FlatShader(_light, _light_color, _ambient_color, _specular_level); // or something else

var compMat : ShadedMaterial = new ShadedMaterial(movieMaterial, shader_b, 0);
           
var mat_list : MaterialsList = new MaterialsList();
mat_list.addMaterial(compMat, "all");

 _cube = new Cube(mat_list, w, w, h, tri, tri, tri);

[/AS]


Is this the proper way?

[AS]

var shader_f : FlatShader = new FlatShader(_light, _light_color, _ambient_color, _specular_level); // or something else
var shader_b : FlatShader = new FlatShader(_light, _light_color, _ambient_color, _specular_level);
           
var compMat_front : ShadedMaterial = new ShadedMaterial(movieMaterial, shader_f, 0);
var compMat_back : ShadedMaterial = new ShadedMaterial(movieMaterial, shader_b, 0);
           
 var mat_list : MaterialsList = new MaterialsList();
mat_list.addMaterial(compMat_front, "front");
mat_list.addMaterial(compMat_back, "back");

 _cube = new Cube(mat_list, w, w, h, tri, tri, tri);

[/AS]


Thanks in advance,
olee





--
http://www.renkster.de/

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: [Papervision 3D] Shaded Material - still an issue with cubes and planes?

o renken
Nobody knows if this is the proper way to shade a cube?


And there comes up another problem with the shadedMaterial and interactivity. In Words: It doent work any longer in spite of having all materials.ineractive = true.
I found a few post here around this issue, but so solvings.

Does anybody have some hints for me?


Cheers and a fine day or night,
olee



2009/1/27 o renken <[hidden email]>
Hi Visioners,

is there still an issue with Shaded Material an planes and cubes?
is it the proper way to assign each side of the cube a own Shaded Material and its shader ( like in the following), or is there something iam missing?


this way brings up some kind of z-fighting inside of the material ( kinda look like that)

[AS]

var shader : FlatShader = new FlatShader(_light, _light_color, _ambient_color, _specular_level); // or something else

var compMat : ShadedMaterial = new ShadedMaterial(movieMaterial, shader_b, 0);
           
var mat_list : MaterialsList = new MaterialsList();
mat_list.addMaterial(compMat, "all");

 _cube = new Cube(mat_list, w, w, h, tri, tri, tri);

[/AS]


Is this the proper way?

[AS]

var shader_f : FlatShader = new FlatShader(_light, _light_color, _ambient_color, _specular_level); // or something else
var shader_b : FlatShader = new FlatShader(_light, _light_color, _ambient_color, _specular_level);
           
var compMat_front : ShadedMaterial = new ShadedMaterial(movieMaterial, shader_f, 0);
var compMat_back : ShadedMaterial = new ShadedMaterial(movieMaterial, shader_b, 0);
           
 var mat_list : MaterialsList = new MaterialsList();
mat_list.addMaterial(compMat_front, "front");
mat_list.addMaterial(compMat_back, "back");

 _cube = new Cube(mat_list, w, w, h, tri, tri, tri);

[/AS]


Thanks in advance,
olee





--
http://www.renkster.de/



--
http://www.renkster.de/

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: [Papervision 3D] Shaded Material - still an issue with cubes and planes?

speedok1
Aloha,

I think the first seems as  a propper way, but i am not 100% sure.

Maybe you can use viewportlayers and add a mouse event on them to bypass the fact that interactive is not working ?

Good luck.


o renken wrote
Nobody knows if this is the proper way to shade a cube?


And there comes up another problem with the shadedMaterial and
interactivity. In Words: It doent work any longer in spite of having all
materials.ineractive = true.
I found a few post here around this issue, but so solvings.

Does anybody have some hints for me?


Cheers and a fine day or night,
olee



2009/1/27 o renken <renkster@gmail.com>

> Hi Visioners,
>
> is there still an issue with Shaded Material an planes and cubes?
> is it the proper way to assign each side of the cube a own Shaded Material
> and its shader ( like in the following), or is there something iam missing?
>
>
> this way brings up some kind of z-fighting inside of the material ( kinda
> look like that)
>
> [AS]
>
> var shader : FlatShader = new FlatShader(_light, _light_color,
> _ambient_color, _specular_level); // or something else
>
> var compMat : ShadedMaterial = new ShadedMaterial(movieMaterial, shader_b,
> 0);
>
> var mat_list : MaterialsList = new MaterialsList();
> mat_list.addMaterial(compMat, "all");
>
>  _cube = new Cube(mat_list, w, w, h, tri, tri, tri);
>
> [/AS]
>
>
> Is this the proper way?
>
> [AS]
>
> var shader_f : FlatShader = new FlatShader(_light, _light_color,
> _ambient_color, _specular_level); // or something else
> var shader_b : FlatShader = new FlatShader(_light, _light_color,
> _ambient_color, _specular_level);
>
> var compMat_front : ShadedMaterial = new ShadedMaterial(movieMaterial,
> shader_f, 0);
> var compMat_back : ShadedMaterial = new ShadedMaterial(movieMaterial,
> shader_b, 0);
>
>  var mat_list : MaterialsList = new MaterialsList();
> mat_list.addMaterial(compMat_front, "front");
> mat_list.addMaterial(compMat_back, "back");
>
>  _cube = new Cube(mat_list, w, w, h, tri, tri, tri);
>
> [/AS]
>
>
> Thanks in advance,
> olee
>
>
>
>
>
> --
> http://www.renkster.de/
>



--
http://www.renkster.de/

_______________________________________________
Papervision3D mailing list
Papervision3D@osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: [Papervision 3D] Shaded Material - still an issue with cubes and planes?

sepion
This post has NOT been accepted by the mailing list yet.
In reply to this post by o renken
Hi,

Did you find a solution to this interactivity issue ?