Capture camera view to bitmap

There are no stupid questions, just stupid answers.
5 posts Page 1 of 1
Simone
Posts: 3
Joined: Sun Jul 21, 2019 5:52 pm
by Simone » Sun Jul 21, 2019 5:59 pm
Hello everybody,
I'm a beginner in Torque3D but a competent programmer. I was able to run a basic project on macOS.

I want to couple a Torque3D world with an external AI (python) and I need to feed multiple camera views to my neural net.
What I need is to capture a frame buffer/ image buffer, whatever, of one or more Torque3D cameras.

I looked and searched for some API, but I was not able to find anything useful.
Anybody could help? Some link or information?

Thanks in advance
Best regards
Simone
Azaezel
Posts: 464
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Mon Jul 22, 2019 5:45 am
Simone
Posts: 3
Joined: Sun Jul 21, 2019 5:52 pm
by Simone » Mon Jul 22, 2019 11:00 am
Dear Azaezel,
thanks for the link :)

The screenshot functionality requires to save to a file; this would not do because we are sampling multiple times per second and using the filesystem would be a huge bottleneck.

On the other side, If I understood correctly, this screenshot is taken on the current 'viewport' (I don't know if it is correct terminology); we require to take multiple camera views at the same time.

Does anybody know if it is possible to capture multiple cameras view in a fast way (not passing through a file)?
irei1as
Posts: 84
Joined: Fri Feb 27, 2015 5:13 pm
by irei1as » Mon Jul 22, 2019 1:10 pm
I've done some of that in viewtopic.php?f=10&t=866&sid=26ef5ec3b9 ... 05f9b1d9e7 but it's just basics and a bit outdated.

Feel free to check it and fix it.
The part about using it as bitmap comes from named textures and dump function, not sure.

On a side note, maybe in 4.1 we'll have camera-based texture render targets.
Simone
Posts: 3
Joined: Sun Jul 21, 2019 5:52 pm
by Simone » Mon Jul 22, 2019 2:17 pm
Thank you irei1as.
This link is more akin to what I need.

Best regards
Simone
I've done some of that in viewtopic.php?f=10&t=866&sid=26ef5ec3b9 ... 05f9b1d9e7 but it's just basics and a bit outdated.

Feel free to check it and fix it.
The part about using it as bitmap comes from named textures and dump function, not sure.

On a side note, maybe in 4.1 we'll have camera-based texture render targets.
5 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest