FreeTexture!
Blitz3D Forums/Blitz3D Programming/FreeTexture!
| ||
Hello, I have a little problem: Load a model and texture and is assigned to the model, however is that I need to remove the texture of the model, use FreeTexture, but this is still displayed in the model sige ... Any chance to remove the texture of the model or make it invisible. |
| ||
Any chance to remove the texture of the model or make it invisible. No. There is no way to "un-texture" a model once it has had a texture applied. (FreeTexture does not delete a texture: it just decrements the built-in reference count to no longer include the handle for manipulating the texture in your code. The texture is not deleted until the reference count hits zero, which requires it to also not be in use on any meshes or entities.) You have two options: 1) Delete the model and rebuild it. This is overkill, but it should work if you keep an untextured original and just make new ones with CopyEntity. 2) Have a "blank" texture on standby (e.g. 1x1 white pixel) to replace the texture you want to remove. While the entity will technically still be textured, in practice you won't see the difference, and it'll get rid of the one you want to free. |
| ||
This is a pretty minour thing, but isn't 2x2 the smallest possible texture size? |
| ||
You could do:model_temp = copymesh(model) freeentity model model = model_temp model_temp = 0 This would create an untexture copy. Or, you could paint it with an untextured brush. Not ideal, but better than nothing. Though, I reckon the 1x1 texture idea is better. |
| ||
Well, I can not understand it very well established, the Google translator does not help much. The problem I have is this: Noise OFF ![]() Noise ON ![]() Layer 1: Normal texture. Layer 2: difuse texture. Layer3: Texture Noise for shadows. Layer4: Texture shadow. I have a few options for the shade to change the quality of the shadows, and noise can be set in the shade. The change comes as the shadow it tends not noise, but the rest to the choice of noise for this constant shadow. My question is, I can replace this texture Noise, the other with Alpha channel, with the idea that it is invisible. Last edited 2012 Last edited 2012 |
| ||
can't you just paintentity with a blank brush? |
| ||
Ok!!, i use copyentity, Thanks!! |
| ||
CopyMesh is best, as it creates a blank copy :) |
| ||
Hey, sorry my English is very bad, do you mean by a blank space to usaro copymesh |
| ||
temp_model = CopyMesh(model) FreeEntity model model = temp_model temp_model = 0 It's ok. The above is what I mean. CopyMesh() will produce an untexture copy of the mesh. |