Jump to content

Capture camera view to bitmap


Simone

Recommended Posts

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

Link to comment
Share on other sites

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)?

 

Link to comment
Share on other sites

Thank you irei1as.

This link is more akin to what I need.


Best regards

Simone

 

I've done some of that in https://forums.torque3d.org/viewtopic.php?f=10&t=866&sid=26ef5ec3b97cb06d44a72b05f9b1d9e7 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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...