![]() |
#1 |
Junior Member
Member
Join Date: Sep 2003
Posts: 13
|
![]()
Hi
Yet another problem with the SDK in my .3ds importer: I use ok = search_and_set_texture(object, g_filename, texture); to apply a texture to an object. g_filename if the filename, as given to the loading function of the plugin. texture is the name of the texture as it appears in the .3ds file. For most models this works perfectly. But some models seem to have problems: only a _single_ texture is used for all objects, although the model uses different textures. The function call uses the correct values for the "texture" parameter, according to the printf() I added next to it. Also according to ac_object_get_texture_index(object) the objects actually use different textures. I have the impression that this is due to a more complex hierarchy of the model. This particular model looks (in the .3ds file) like this: Code:
- Box04 - $$$DUMMY - rocketbo10 - rocketbo11 - rocketbo12 - [...] - Box02 - $$$DUMMY - Box03 - Box03 - Box05 [...] Other models have $$$DUMMY objects on top level only. Could this be related? Any hints why only one texture appears? CU Andi |
![]() |
![]() |
![]() |
#2 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
![]()
AC3D objects allow one texture per object.
Currently, if you need to have >1 texture per object (i.e. collection of surfaces), you should either create a single texture which is a composite of all textures used on one object, OR cut away surfaces that share the same texture and put them in inidivdual objects. Andy |
![]() |
![]() |
![]() |
#3 |
Junior Member
Member
Join Date: Sep 2003
Posts: 13
|
![]()
Thats exactly what I mean - I have one texture per object (one for Box04, one for rocketbo10, one for rocketbo11, one for rocketbo12, ...).
But only a single texture is displayed for the whole _model_ CU Andi |
![]() |
![]() |
![]() |
#4 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
![]()
Send me the .ac file with the textures and I'll have a look.
Andy |
![]() |
![]() |
![]() |
#5 |
Junior Member
Member
Join Date: Sep 2003
Posts: 13
|
![]()
Hi
the problem has been resolved now: search_and_set_texture() does not only apply to the object itself, but also to all child objects. I had not thought about this. CU Andi |
![]() |
![]() |
![]() |
#6 |
Junior Member
Junior member
Join Date: Mar 2005
Posts: 5
|
![]()
Hi
I'm interting in know how can i set 2 or more textures in 1 object!. Can anybody send me an example. Joz |
![]() |
![]() |
![]() |
|
|