How to load a 3ds and mask it?

Blitz3D Forums/Blitz3D Programming/How to load a 3ds and mask it?

I have a 3ds model that has black areas on it. How can I make these masked?

Use Flag4 on LoadTexture? (defaults to masking RGB 0,0,0)

Unsure how to mask it if the texture is loaded with the model itself though.

[EDIT] Ah yes, I believe you use TextureFilter command before loading the model if model contains the textures. Hope that works, havent dabbled in B3d for ages now.

yes, TextureFIlter is your friend here. Do something like this:
Cleartexturefilters()
texturefilter "",4 or 9
mesh=loadmesh("whatever.3ds")
texturefilter "",9

9 (1+8) is default and should be reset after using other filters.

Thanks JFK - perfect.

Its simpler if you define a beginning sequence like m_ on which you set 4 + 9 as default filter. then you can simply name all textures m_something.bmp /png /tga and it will work without reseting the texture filter.

problems may arise when the meshes are arleady textured with certain files and you don't want/can alter the texture paths in the mesh file.

At the other hand, using a prefix like Dreamore said is useful since it allows to use various flags on the surfaces of a mesh. Tho it requires to follow a naming convention already in the creation process of the meshes.