you could do the following:
Load the mat file with lib3ds. Search for the material. Copy it and put 
the material in the 3ds file you are writing out..

Adrian Bedeau wrote:
> Thank you Jan for your reply.
>
> So I assume that there is no way to programmatically apply a material 
> in a .mat file to an object when writing out a 3ds file. The only way 
> you can apply a material in a .mat file to an object would be to do it 
> in 3ds Max. Am I correct?
>
> Thanks very much!
>
> Adrian
>
> On Thu, Jul 31, 2008 at 11:07 AM, Kyprianidis, Jan Eric 
> <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hi,
>     the 3ds file format only allows to specify images for texture maps
>     (and
>     SXP plugins).
>     Jan Eric
>
>
>     Adrian Bedeau wrote:
>     > Hi again,
>     >
>     > I have a 3dsMax material library file (.mat file) "gems.mat" which
>     > contains materials named "diamond," "gold," etc. I am using
>     lib3ds to
>     > create a cube and would like to map the material "diamond" onto the
>     > faces of my cube. I have tried doing
>     >
>     > strcpy(material->texture1_map.name <http://texture1_map.name>
>     <http://texture1_map.name>, "diamond");
>     >
>     > and set Lib3dsFace.material field to the index of "material" for the
>     > faces of my cube. I then added the directory containing
>     "gems.mat"  to
>     > the user path for external files in 3ds Max. However when I
>     render my
>     > object, I do not see the diamond mapped on to the faces. This
>     makes me
>     > wonder if it is possible to set texture map name to a material
>     in .mat
>     > file using lib3ds, or I can only set texture map name to an
>     image file
>     > which is not contained in a .mat file? If anyone knows about this,
>     > will you please enlighten me?
>     >
>     > Thanks again!
>     >
>     > Adrian
>     >
>     ------------------------------------------------------------------------
>     >
>     >
>     -------------------------------------------------------------------------
>     > This SF.Net email is sponsored by the Moblin Your Move
>     Developer's challenge
>     > Build the coolest Linux based applications with Moblin SDK & win
>     great prizes
>     > Grand prize is a trip for two to an Open Source event anywhere
>     in the world
>     > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>     <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > lib3ds-devel mailing list
>     > [email protected]
>     <mailto:[email protected]>
>     > https://lists.sourceforge.net/lists/listinfo/lib3ds-devel
>     >
>
>
>     -------------------------------------------------------------------------
>     This SF.Net email is sponsored by the Moblin Your Move Developer's
>     challenge
>     Build the coolest Linux based applications with Moblin SDK & win
>     great prizes
>     Grand prize is a trip for two to an Open Source event anywhere in
>     the world
>     http://moblin-contest.org/redirect.php?banner_id=100&url=/
>     <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>     _______________________________________________
>     lib3ds-devel mailing list
>     [email protected]
>     <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/lib3ds-devel
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> lib3ds-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/lib3ds-devel
>   


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
lib3ds-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lib3ds-devel

Reply via email to