Go Back   AC3D Forums > Technical > AC3D Developers
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 30th October 2003, 07:53 AM   #1
andi
Junior Member
Member
 
Join Date: Sep 2003
Posts: 13
Default Different textures?

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
[...]
Where $$$DUMMY objects are objects that do not contain any faces.

Other models have $$$DUMMY objects on top level only.
Could this be related?

Any hints why only one texture appears?

CU
Andi
andi is offline   Reply With Quote
Old 1st November 2003, 07:16 AM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,379
Default Re: Different textures?

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
Andy is offline   Reply With Quote
Old 1st November 2003, 07:31 AM   #3
andi
Junior Member
Member
 
Join Date: Sep 2003
Posts: 13
Default Re: Different textures?

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
andi is offline   Reply With Quote
Old 1st November 2003, 07:35 AM   #4
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,379
Default Re: Different textures?

Send me the .ac file with the textures and I'll have a look.

Andy
Andy is offline   Reply With Quote
Old 1st November 2003, 02:35 PM   #5
andi
Junior Member
Member
 
Join Date: Sep 2003
Posts: 13
Default Re: Different textures?

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
andi is offline   Reply With Quote
Old 8th April 2005, 10:24 AM   #6
Joz
Junior Member
Junior member
 
Join Date: Mar 2005
Posts: 5
Default 2 textures in 1 object?

Hi
I'm interting in know how can i set 2 or more textures in 1 object!.
Can anybody send me an example.
Joz
Joz is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 08:11 PM.


AC3D Forum
(C) Inivis Limited 2020