Jump to content
thetrooper

Set texture problem

Recommended Posts

Hi all. I'm currently using

setObjectTexture

Works great. Just one problem, textures don't always appear until you get really close to the vehicles. Is there a script anywhere that preloads the textures before game start? Im guessing it's a caching issue?

Doesn't look that good at the moment with my vehicles all black because textures not loaded.

Thanks

Share this post


Link to post
Share on other sites

That shouldn't be happening. What texture are you using, aswell as which format are you saving it in? Oh and also the size of the actual texture (widthxheight) should be a power of two (256x256 512x512 etc), keep that in mind.

Share this post


Link to post
Share on other sites

I'm using a texture taken from a tutorial. The size is 1024x622. Is that going to cause a drama? Format is .jpg

PC settings are set pretty high. It's only my textures its having a problem with.

Share this post


Link to post
Share on other sites
It's only my textures its having a problem with.

Oh okay. I only asked because it sounded like a texture rendering quality/distance bs.

Share this post


Link to post
Share on other sites

It's a odd width x height and also .jpg. I'm not entirely sure if A3 supports .jpg but I suggest you use .png instead (or maybe even .paa). What does your texture look like by the way? Is it a regular pattern? In that case you may even be able to resize it to something like 512x512.

Share this post


Link to post
Share on other sites

I actually have this same issue with some .jpg textures I am using. I will try them in .png instead.

When I test the first time it is black until I get real close. Then every start in the editor after that is fine. Just the first time in the editor. btw, 1024 x 1024. If the .png does not work I will try them in .paa as well.

---------- Post added at 11:01 PM ---------- Previous post was at 10:21 PM ----------

Okay, after testing I do not get this issue when convert the custom texture back to .paa. However, the image is really bad until you get close. With the .jpg it starts off black until you get to about 20 meters or so. Then the image pops up. Then, when you back away it stays up and continues to stay up with a restart in the editor. It is like it is black a ways back the first time you run the game. I am using "this setObjectTexture [0, "path.jpg"] in the init of the unit. Is there a way to put it in the ini.sqf perhaps? How would the script look or need to look If I wanted this to happen on start up. I tried putting _objectname setObjectTexture [0, "path.jpg"] in the ini.sqf but it did not work.

Any help with how to put setobject texture in the ini.sqf would be great. Thank you all for your time.

Ohh, and I did try the .png and it would not load at all.

Share this post


Link to post
Share on other sites

That issue is also there in ArmA2. From a long distance any texture on an object looks black till you go close and it then loads the texture. Weirdly enough it does load properly on vehicles (for me). They should introduce a command that lets you cache custom textures from the init file when the mission loads.

Share this post


Link to post
Share on other sites
That issue is also there in ArmA2. From a long distance any texture on an object looks black till you go close and it then loads the texture. Weirdly enough it does load properly on vehicles (for me). They should introduce a command that lets you cache custom textures from the init file when the mission loads.

Is there no way to set the textures in the ini.sqf file? I wonder if that would help. The .paa after a change looks real bad so I guess we use what we got for now as far as pop up targets go. If anyone knows how to re-texture using the ini file that would be great. Thank you all for your time my friends.

Share this post


Link to post
Share on other sites

Are there any news on this one?

I'm facing the exact same problem. Custom textures as .jpg only load once the player is very close to the object but then the game seems to cache them. And .paa loads correctly but looks totally f*cked because the scaling is messed up. My textures are based on the standard sign textures and the resolution is 1024x512.

Share this post


Link to post
Share on other sites
Are there any news on this one?

I'm facing the exact same problem. Custom textures as .jpg only load once the player is very close to the object but then the game seems to cache them. And .paa loads correctly but looks totally f*cked because the scaling is messed up. My textures are based on the standard sign textures and the resolution is 1024x512.

Hey, yeah I know exactly what you mean. I have managed to sort it. Explained below.

The game will cache jpg or PAA. No getting around that I'm afraid. I rename the file everytime to get around the caching while designing skins.

First off, don't use jpg...Can't remember why but there is a good reason.

Use PAA, and like you said it will appear messed up if the scaling is not correct so you will need to get the right scaling. As far as signs go, there are only two sizes and they are square (small and large). I can't think of the dimentions off the top of my head. I found them on youtube.

Share this post


Link to post
Share on other sites

You talk about the user texture object I think. I'm working on signs and I basically use the original textures - just added some text or merged it with other textures like in this example:

2014-04-27_000029zzqw.jpg

Once it's cached it's no problem because the player will see them from far away. But the first time is like driving into a roadblock with lots of black signs, totally weird. :/

Share this post


Link to post
Share on other sites
Are there any news on this one?

I'm facing the exact same problem. Custom textures as .jpg only load once the player is very close to the object but then the game seems to cache them. And .paa loads correctly but looks totally f*cked because the scaling is messed up. My textures are based on the standard sign textures and the resolution is 1024x512.

bump...

I would really like to get some textures to preload for a few projects involving setObjectTextureGlobal...

-bh

Share this post


Link to post
Share on other sites

I've successfully switched to .paa. The sign in the picture above has a resolution of 2048x1024. It's readable but could be better.

Share this post


Link to post
Share on other sites

Hi. I need help with changing the textures of stones. I use this Init: this SetObjectTexture [0,"snowtex.jpg"]; BUT nothing happens. I use jpg picture format and the pic size is: 1024 x 512. Can someone please help?

Share this post


Link to post
Share on other sites

stones?

what stones?

 

Anyway, setobjecttexture does not simply work on any object. They have to be configured for it and I don't think any of the stones are.

Share this post


Link to post
Share on other sites

Heres a pic of the stones i want to re texture:

 

!no pic

 

How do you configure them for it?

Share this post


Link to post
Share on other sites

You don't. It's part of their model/config file.

 

Only way to do that would be by making a mod.

Share this post


Link to post
Share on other sites

If i export the pbo files of a map re texture the files in there is there any way of saving it as a new map? I tried editing a paa texture file with my own skin and repack all the files as a pbo. But when i get into the game and find the object i get a message saying "object not found". What am i doing wrong?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×