Hey Jacob

Is it possible to apply multiple materials to a single mesh?


yes, try using composite material. You can add a stack of materials to a
single mesh then by doing addMaterial on the compositeMaterial instance

is there a performance hit for doing so?


yes, using multiple material layers increases the number of triangles drawn
per screen refresh, whcih impacts on framerate

Rob



On Tue, Dec 9, 2008 at 11:51 PM, Li <[EMAIL PROTECTED]> wrote:

> A mesh has a materialLibrary right?
>
> I've done this with ObjectContainer3Ds, dont know if it will work with
> meshes, but you can try... Anyway, the new AS3Exporter produces
> ObjectContainer3D's instead of meshes.
>
> for each(var mdata:MaterialData in container3d.materialLibrary)
> {
>      if(mdata.type == "textureMaterial")
>           mdata.material = new BitmapMaterial(Cast.bitmap(img));
>      else
>           mdata.material = new ColorMaterial(0xFF0000);
> }
>
> If the model comes from collada, the parser should have produced a material
> data element for each of the material mappings in the original model, so you
> could replace them this way.
>
> Not sure if this helps, but no loss in trying to help
> Cheers!
>
>
> On Tue, Dec 9, 2008 at 7:54 PM, Fabrice <[EMAIL PROTECTED]> wrote:
>
>>
>> no.
>> in fact many primitives, some extrudes are supporting multiple textures on
>> one mesh.
>> you can set a material per face if you want to.
>>
>> Fabrice
>>
>>
>> On Dec 9, 2008, at 10:37 PM, Jacob Henry wrote:
>>
>>
>>> I just got off the phone with a buddy who is familiar with modeling.
>>> He said I had two options: unwrap UVW or multi subobject maps.  He
>>> told me multi subobject maps break apart a model, leaving nothing
>>> intersecting.  Do I still have to worry about the performance hit even
>>> if the meshes do not intersect?
>>>
>>> On Tue, Dec 9, 2008 at 11:34 AM, Jacob Henry <[EMAIL PROTECTED]> wrote:
>>>
>>>> Hey Rob,
>>>>
>>>> Is it possible to apply multiple materials to a single mesh?  If so,
>>>> is there a performance hit for doing so?
>>>>
>>>> Jacob
>>>>
>>>> On Mon, Dec 8, 2008 at 4:44 PM, Rob Bateman <[EMAIL PROTECTED]>
>>>> wrote:
>>>>
>>>>> Hey Jacob
>>>>>
>>>>> generally it is not the best approach purposely importing intersecting
>>>>> meshes into the away3d engine, as this will require the intersecting
>>>>> objects
>>>>> renderer to be drawn, which takes a lot more processing overhead than
>>>>> the
>>>>> basic renderer. As for your other two questions, i'm unfamiliar with
>>>>> using
>>>>> blender (in fact I have limited knowledge of any 3d package) so would
>>>>> ask
>>>>> whether someone else on the list can help out here?
>>>>>
>>>>> cheers
>>>>>
>>>>> Rob
>>>>>
>>>>> On Mon, Dec 1, 2008 at 2:53 AM, Jacob <[EMAIL PROTECTED]> wrote:
>>>>>
>>>>>>
>>>>>> In the initial post about the new addition of the AS3Exporter, Fabrice
>>>>>> mentioned a good use case would be a scene with "a human model, with
>>>>>> t-
>>>>>> shirt, hair, shoes etc".  I am building an application with a similar
>>>>>> use case that requires me to separate components (body and sleeves) of
>>>>>> a model (tshirt) into unique meshes which will later reference dynamic
>>>>>> materials designed by users.  Instead of giving the user a blank
>>>>>> rectangle to design on, I would rather provide users with an outline
>>>>>> of the surface area for each mesh.
>>>>>>
>>>>>> Since I am new to both 3d modeling and the away3d engine, I could use
>>>>>> your help to find resources on:
>>>>>> 1) separating components (sleeves and body) of a single model (tshirt)
>>>>>> in blender
>>>>>> 2) generating separate materials for each component that will later be
>>>>>> used as surface area outlines
>>>>>> 3) importing intersecting meshes into away3d
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Rob Bateman
>>>>> Flash Development & Consultancy
>>>>>
>>>>> [EMAIL PROTECTED]
>>>>> www.infiniteturtles.co.uk
>>>>> www.away3d.com
>>>>>
>>>>>
>>>>
>>
>


-- 
Rob Bateman
Flash Development & Consultancy

[EMAIL PROTECTED]
www.infiniteturtles.co.uk
www.away3d.com

Reply via email to