Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
More than 1 texture in a face

bagg
Registered User
Quote
2011-01-14 08:00:43

Hi Niko.

I would like to ask you if it's possible to have more than one texture in a face.And if it's possible how can i do this?

Thanks


niko
Moderator
Quote
2011-01-14 08:23:26

Depends on what you want to do exaclty. Do you mean two layers of textures? Then set the Material.Tex1 and Material.Tex2. If you mean more than one material per face, then you need to create one mesh buffer per material.


bagg
Registered User
Quote
2011-01-14 10:09:49

Sorry i mean same material but with let's say 6 textures in the same meshbuffer.

Can you please give me an example with a mesh buffer?

And another one.How can i get the material from a custom meshscenenode?

And Something happend with firefox beta 9 i think it has to do with normals?

Thanks


niko
Moderator
Quote
2011-01-15 19:33:59

When you do something like this:


var buf = new CL3D.MeshBuffer();
this.MyMesh.AddMeshBuffer(buf);

you can set the material and texture for all vertices in that buffer using buf.Mat.Tex1 = something. Now simply add a second buffer with the same code as above, and set another material/texture to it.

To get the material from a custom mesh scene node: Well if it is custom, you should know how to get it. You wrote it.

wrote:
And Something happend with firefox beta 9 i think it has to do with normals?


Hm, what do you mean with that?


bagg
Registered User
Quote
2011-01-16 08:29:36

I know that i can have 1 texture in every meshbuffer my question was if i can have MORE THAN 1 TEXTURE IN 1 MESHBUFFER.

How can i set the material of a meshbuffer to be let's say transparent?

i tried buf.Mat.Type = EMT_etc but it's not working

Try the tutorial 2 in firefox4 beta 9.


niko
Moderator
Quote
2011-01-16 13:07:06

Not possible to have more than one texture in one meshbuffer.
To set a material transparent, set the material type to a transparent one, like EMT_TRANSPARENT_ADD_COLOR. Maybe you didn't set it to "CL3D.Material.EMT_TRANSPARENT_ADD_COLOR" ?

About firefox 4: You are right, saw it too now. But that's a bug in FireFox, all WebGL engines now suffer this. They somehow broke the z-buffer precision.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "?nternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact