Jump to content

Photo
- - - - -

Render to Texture Examples


  • Please log in to reply
23 replies to this topic
Thread Starter
sxp2high
sxp2high

    Master Sergeant

  • Members
  • 779 posts

Posted 12 January 2012 - 14:17 #1

Render to Texture (RTT) Examples
aka Picture in Picture (PiP)


Using and editing the demo missions
- Just extract the rar file to your missions folder "Users\USERNAME\Documents\Take On Helicopters\Missions".
- Open the in-game Editor and load the example mission.
- Open the SQF files with an text editor. I recommend Notepad++ with C++ Syntax highlighting and a mono space font, like Consolas.


Related links, threads and tutorials
- SQF syntax
- camera.sqs
- Unit Rec/play + Camera training.
- Spawn a helo with camera



1. Basic usage with camera, changing texture renders on-the-fly and multiple "rendertargets"

Posted Image

Download Demo Mission

List of Commands that I used in this Demo:







2. Using heli mounted cameras, auto-zoom and user controlled camera changes (Zoom and FLIR)

Posted Image

Download Demo Mission

List of Commands that I used in this Demo:

Edited by sxp2high, 16 February 2013 - 14:06.

Posted Image

Sealife
Sealife

    Banned

  • 1362 posts

Posted 12 January 2012 - 18:48 #2

Fantastic thing :)
one day i hope to get to play with more ,

Keep up good work and Knowledge sharing it will keep this game alive ;)

[EVO] Dan
[EVO] Dan

    Master Gunnery Sergeant

  • Members
  • 1269 posts

Posted 12 January 2012 - 21:10 #3

awesome, some new stuff to help us along with missions
My custom missions:
TOH - COOP5 Operation Pegasus http://forums.bistud...eration-Pegasus
TOH - COOP Convoy attack (both Hinds and stock versions) http://forums.bistud...O-Convoy-Attack
A2CO Multi-mission Template http://forums.bistud...048#post2182048
Basic Vehicle respawn script (A3 Alpha) http://forums.bistud...272#post2389272

[EVO] Multigaming Clan is recuiting at ts3.evoclan.net

Master85
Master85

    Staff Sergeant

  • Members
  • 213 posts

Posted 12 January 2012 - 21:25 #4

really nice demo mission

but perhaps it's better not to use "rendertarget0" - "rendertarget2" but own names (perhaps with author tags) when creating rendertargets (with cameraEffect)
because those names are used for the mirrors in cars/helis

[EVO] Dan
[EVO] Dan

    Master Gunnery Sergeant

  • Members
  • 1269 posts

Posted 12 January 2012 - 21:28 #5

or perhaps use vehiclenametarget or objectnametarget
My custom missions:
TOH - COOP5 Operation Pegasus http://forums.bistud...eration-Pegasus
TOH - COOP Convoy attack (both Hinds and stock versions) http://forums.bistud...O-Convoy-Attack
A2CO Multi-mission Template http://forums.bistud...048#post2182048
Basic Vehicle respawn script (A3 Alpha) http://forums.bistud...272#post2389272

[EVO] Multigaming Clan is recuiting at ts3.evoclan.net

Thread Starter
sxp2high
sxp2high

    Master Sergeant

  • Members
  • 779 posts

Posted 12 January 2012 - 22:08 #6

but perhaps it's better not to use "rendertarget0" - "rendertarget2" but own names (perhaps with author tags) when creating rendertargets (with cameraEffect)
because those names are used for the mirrors in cars/helis


Yep, you're totally right. Didn't thought of that. :thumbsup:
Posted Image

james2464
james2464

    Master Sergeant

  • Members
  • 756 posts

Posted 14 January 2012 - 13:14 #7

awesome!! when can we see FLIR and cockpit stuff??

Thread Starter
sxp2high
sxp2high

    Master Sergeant

  • Members
  • 779 posts

Posted 14 January 2012 - 14:54 #8

It will be up soon, by tomorrow I think.

It's a lot more regarding heli mounted cameras I'm going to demonstrate. Auto-zoom, manual zoom, switching target, switching to FLIR, etc. Almost everything you'll need to create a camera-based scenario. :)
Posted Image

james2464
james2464

    Master Sergeant

  • Members
  • 756 posts

Posted 15 January 2012 - 04:14 #9

It will be up soon, by tomorrow I think.

It's a lot more regarding heli mounted cameras I'm going to demonstrate. Auto-zoom, manual zoom, switching target, switching to FLIR, etc. Almost everything you'll need to create a camera-based scenario. :)


wow, are you hired by BIS? Is this for Arma 3? it better be! :D

Thread Starter
sxp2high
sxp2high

    Master Sergeant

  • Members
  • 779 posts

Posted 25 January 2012 - 22:56 #10

Sorry about the delay, didn't had much time to finish it yet. But I'm almost done. Will post it asap.

Is this for Arma 3?

I think Render To Texture is on the "confirmed features" list for ArmA3. :thumbsup:
Posted Image

Xeno
Xeno

    ACE Team Leader

  • Members
  • 1814 posts

Posted 01 February 2012 - 20:44 #11

Just a little bit fun based on your script...

The camera follows players so it's basically for MP (others can watch what a randomly selected player is doing, all players are seeing the same player):

Posted Image

Xeno
[SIZE=1][/SIZE]

Sealife
Sealife

    Banned

  • 1362 posts

Posted 02 February 2012 - 22:05 #12

Hmm ,
this would make good scenario for multiplayer
timetrial mission maybe 6 players , 1 pilot 5 spectators watch the helo and then next person take turn to fly :) , just sit and watch the screen until its your turn ?
its possible with this script ?

Prize = You was there and had fun :)

Thread Starter
sxp2high
sxp2high

    Master Sergeant

  • Members
  • 779 posts

Posted 14 February 2012 - 10:36 #13

Posted Image

Good idea, Thomp! It's definitely possible!
Posted Image

Slapstick
Slapstick

    Corporal

  • Members
  • 66 posts

Posted 06 March 2012 - 01:53 #14

Has anyone tried these examples with the latest 1.04 release candidate? I was going to try something similar with Java, but I can't even get the first example mission working. The scripts "work", but the three screens remain black (sometimes white). I've tried moving closer or farther away, but all I have achieved is causing the game to CTD...

I'm using a GTX260 with 295.73 drivers.

Slapstick
Slapstick

    Corporal

  • Members
  • 66 posts

Posted 08 March 2012 - 01:00 #15

Ok, I was able to solve the problem with the images not rendering by tweaking my video options.

But now I have a a problem that has me stumped... the camera is pointing in (approx) 180 degrees the wrong direction. See this screen shot.

Note that in the screenshot the camera is projecting images that contain the shadows from the screens themselves. So the camera is working, it is just pointed in the wrong direction. The parts of the demo that change the mode (TI, Color Correction, etc) work just fine, and the bit with the three screens displaying three different modes at once works. But anything that involves moving, zooming or re-aiming the camera doesn't.

I've made no changes to the mission, and just downloaded a new copy to take this screenshot.

Edited by Slapstick, 08 March 2012 - 02:41.
Fixed grammar and spelling

In theory there is no difference between theory and practice; but in practice there is.

Sealife
Sealife

    Banned

  • 1362 posts

Posted 08 March 2012 - 18:20 #16

Ok, I was able to solve the problem with the images not rendering by tweaking my video options.


I had same problem and used same fix :( however some still dont work just show blackout with some pixelating blue black ocasionally )
It really is hard to debug now there adding three new shader bollocks in toh.cfg , i am on verge of giving this up until i am on the dole / retired its all a bit of needle and haystack at the moment .

Slapstick
Slapstick

    Corporal

  • Members
  • 66 posts

Posted 13 March 2012 - 00:13 #17

I went ahead and ported (most of) the mission to Java and the Java mission works (and doesn't work) in exactly the same manner as the SQF mission. So either something has changed in the game engine or I'm still having settings/driver issues.
In theory there is no difference between theory and practice; but in practice there is.

Sealife
Sealife

    Banned

  • 1362 posts

Posted 13 March 2012 - 23:09 #18

there is some new Renderto texture changes in the latest Beta try them now, could have fixed your problems

Slapstick
Slapstick

    Corporal

  • Members
  • 66 posts

Posted 14 March 2012 - 18:08 #19

And indeed it did. The first time I tried the SQF mission I had a CTD with a popup dialog from nVidia saying the graphics card drivers had crashed and been restarted. However, subsequent attempts ran fine and both missions (SQF and Java version) worked as expected. The nVidia updater just notified me that new drivers are available so hopefully all will be good now.
In theory there is no difference between theory and practice; but in practice there is.

Sealife
Sealife

    Banned

  • 1362 posts

Posted 14 March 2012 - 20:21 #20

Nice one
Yeah just got the Nvidia pop up too , hopefully it will fix the alt tab retardness i am having lately too