Game Development Community

How do you proceed to do render to texture in T3D?

by Kyrah Abattoir · in Torque 3D Professional · 08/06/2011 (7:20 pm) · 11 replies

Pretty much everything is in the topic, how do i take one or more 3D models and a camera and make the view of the camera display on a texture on the hud or another object.

The same way, how can i draw in 2D directly on a texture surface?

#1
08/08/2011 (6:57 am)
You're talking about something like the old Duke Nukem security cameras, correct?

This has been talked about a bit before, but I never did see a resource get done that had that working...

However, rendering to texture is supported for both Theora video and webpages (using the webkit resource). You can for example play a video on a texture or have a navigable web page (including Flash) display on a texture using existing resources. If you want to do that, look back a few pages in the Torque 3D private forum for the "T3D 1.1 Embedded Browser (webkit)" thread.
#2
08/08/2011 (8:21 am)
Maybe this will help - though there are issues at the moment - www.garagegames.com/community/forums/viewthread/127227
#3
08/08/2011 (12:57 pm)
@Paul the idea is to be able to render a scene to texture offscreen and use the result as a texture on an object, useful for modifying a texture on the fly, for example how many charges left in a medpack, or a bullet indicator screen on a gun.
#4
02/10/2012 (3:59 pm)
Sorry to start an oldish thread again but just curious did you get this to work? i might b able to help if u didn't
#5
02/10/2012 (5:36 pm)
Nope sorry, and i haven't seen any easy way to do it, you?
#6
02/11/2012 (4:40 pm)
hold on i have some examples i did a wile back im trying to find them 1 sec

jus to let u know a bullet indicator on a screen would not be render to texture if im rite in thinking that the best way or most memory efficient way is to make a series of images that are just numbers small texture size would do lik 32X32 and kinda the same way u would make tank treads look like they are moving you would create an if statement that would check to see how much ammo is left in the clip and display the correct textures for the numbers on the ammo counter
#7
02/13/2012 (3:08 pm)
Is it possible to treat a gui object as a texture? If it were then a 3space gui object could be rendered onto a surface. That would satisfy the render to texture. It should also be very configurable. Perhaps the ability to treat a texture as GUI canvas would be enough. That would make the resource much more useful than just rendering to a surface.

How was the webpage stuff rendered to a texture/surface? Is there some code that can be used from that? Has that code been released? GG?
#8
08/18/2012 (10:15 pm)
I'm also very interested in render to texture or GUI Canvas on a texture.
#9
08/19/2012 (12:28 pm)
I take it the thread I mentioned earlier didn't help? It is great for making "security camera" type objects and displaying the view in a GUI window....
#10
08/20/2012 (1:27 pm)
Sorry about that, I did look at that link briefly but I didn't quite realize it was applied to a plane in 3DSpace, just saw the shadow now. I'll give that resource a shot and hope for the best, thanks for the link.
#11
09/05/2012 (4:36 pm)
Search the site for QTWebKit, I believe there was a resource that was rendering web pages via the QTWebKit to textures