Home   Help Search Login Register  

Author Topic: setTexture  (Read 3012 times)

0 Members and 1 Guest are viewing this topic.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
setTexture
« on: 07 Jul 2009, 23:33:49 »
Has anyone figured out what command to use, in order to display images on the video screen found in ArmA2. I have dePbo'ed the campaign mission where I've seen it done, to no avail. I also suspected that a simple setTexture command would be enough, but failed to display any images in game. Maybe ArmA2 requires a new format for this. Does anyone know how the video screen works?

EDIT: I'm such an idiot. I just missed a back slash \ in the file path. setObjectTexture works perfectly with the video projector wall found under objects. It accepts the same paa-files that were used in Operation Flashpoint. TexView2 works perfectly for converting any image into a working in-game image.
« Last Edit: 09 Jul 2009, 20:23:58 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Rommel92

  • Members
  • *
Re: setTexture [SOLVED]
« Reply #1 on: 08 Jul 2009, 06:10:35 »
There appears to be some problems with this in MP, and its not a locality issue, they simply don't like loading the JPG files over the network?  :dunno:

Offline i0n0s

  • Moderator
  • *****
Re: setTexture [SOLVED]
« Reply #2 on: 08 Jul 2009, 06:15:41 »
setObjectTexture is local and has to run on every client.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: setTexture [SOLVED]
« Reply #3 on: 08 Jul 2009, 06:41:24 »
To clarify... setObjectTexture can only load .paa-files to be seen in game. It cannot handle .jpg, though it will not result in any error messages if you try.

 :no:

What I meant in my post above was that the aged warhorse known as texView2 (an image file converter) can still convert normal jpg's into working .paa files. Tested and working

 :yes:
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Rommel92

  • Members
  • *
Re: setTexture [SOLVED]
« Reply #4 on: 09 Jul 2009, 16:54:35 »
Not true.

I had this executed on clients only (not broadcasted, was run on init.sqf). Why it wasn't working may have been a host problem.

JPEG file formats do work with setObjectTexture, I had them coming up perfect and made a sky marquee with an alphabet folder of images.  :good:

It just wouldn't work in multi - player, and it was local script that was launching correctly (it created the projectors locally) and they were seen, just not the texture change (by certain users, I confirmed one user seeing them, but did not work on rejoin...).

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: setTexture
« Reply #5 on: 09 Jul 2009, 20:21:53 »
This obviously needs more testing. Anyway: Mine is working in MP. The textures are set in init.sqm and thus runs on all clients. I use .paa files. When I run the same script with .jpg files nothing shows (.jpg version only tested in editor).

EDIT: Removed [Solved] tag from subject

EDIT2: Can it be a lag problem in MP? It takes time to upload image files so that the texture can be applied to the surface, and .jpg's are considerably larger than .paa-files (more than twice the size at 72 dpi resolution). Just a thought.
« Last Edit: 09 Jul 2009, 20:28:13 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Rommel92

  • Members
  • *
Re: setTexture
« Reply #6 on: 10 Jul 2009, 02:15:10 »
My textures were also set in init.sqf, and appeared fine, perhaps this could be a GPU related matter? If it is only showing up on mine, then it could be for good reason why it may not have shown for others.

 :dunno:

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: setTexture
« Reply #7 on: 10 Jul 2009, 06:48:22 »
I just tested once again in a MP environment, to make sure everything works. It does  :D

The objects are displayed on the video projector wall, and can be seen in game by all players. Serverside as well as remote clients. I intend to release the mission for Beta test within a week or so (one trigger needs finetuning).

Meanwhile you can look at some of the screen in the uTube promo video I recorded while testing the mission. The projected .paa-files are visible behind the breifing officer. Most of the these shots were taken during a MP game with Laggy, before I edited them to use them in the video.

I'll try to swap the .paa-texture for .jpgs during next weeks testing. Will se how the game handles them. Now I'm off to work...
 ;)
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: setTexture
« Reply #8 on: 10 Jul 2009, 07:41:27 »
JPG are said to load way slower due the compression they have
and the engine needing to convert them on the flow.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: setTexture
« Reply #9 on: 10 Jul 2009, 15:44:32 »
Thanks for the confirmation kju. I suspected as much:

It takes time to upload image files so that the texture can be applied to the surface, and .jpg's are considerably larger than .paa-files (more than twice the size at 72 dpi resolution). Just a thought.
OFPEC | Intel Depot
RETARDED Ooops... Retired!