Torque 3D Embedded Browser (WebKit)
by Josh Engebretson · in Torque 3D Professional · 01/15/2010 (8:55 pm) · 305 replies
Hey guys,
Here are some highlights:
1) It uses QtWebKit which is based off Apple's WebKit, the same HTML5/Canvas based web rendering engine from Chrome, Safari, Adobe AIR
2) QtWebKit is *easily* the best designed embeddable web browser I have found in exhaustive travels... (I actually compiled Chrome from source at one point, not recommended). Qt is *extremely* well supported and owned by Nokia who recently paid $153,000,000 for it. So, it is probably going to be around for some time.
3) Flash works :)
4) It is setup as a GuiControl so interacts perfectly with mouse events, control overlap, filters...
There are currently 3 rendering modes:

1) Render to Texture: This mode renders the web view to an offscreen buffer and then uploads it to a GFXTexHandle. It uses the Torque GUI system input for mouse and keyboard. As we're rendering to a texture, compositing and rendering to 3d surfaces is possible. Flash renders as long as it is set to windowless mode in the HTML (not a big deal). Instead of using Flash for anything other than presentation/video playback, I would suggest looking into Canvas/HTML5/CSS animations/effects in this mode.

2) Render Native: This mode integrates a native child window with Gui Control, giving the best of both worlds :) There is no need to render to texture as we're using an actual clipped child HWND which uses the Torque GUI system for position/extents and focus :) Transparency does not currently work, however under Vista/Win7 this should be possible. I should be able to get masking working with minimal effort, which would allow for shaped windows and transparent areas.

3) Render Popup: This mode pops up a standalone window, which is owned by the application and consistent in scripting with other modes. This is useful for things like integrated document browsing, tutorial video watching, game doc reading, game forum reading, etc... where you don't want to crowd your game interface with browser. However, you want CLOSE scripted integration with a standard browser (no worries of IE/Mozilla/Chrome), which isn't possible with the current "launch browser" functionality.
These modes work with HTTPS adding a nice way to authenticate to servers, secure purchasing, etc.
It is still pretty early in the development and the idea with the code release will be to get feedback on usability and features... especially WRT integration with Javascript on the page, etc.
EDIT: The first version has been released and is available HERE
Regards,
- Josh Engebretson
Mythos Labs, LLC
Here are some highlights:
1) It uses QtWebKit which is based off Apple's WebKit, the same HTML5/Canvas based web rendering engine from Chrome, Safari, Adobe AIR
2) QtWebKit is *easily* the best designed embeddable web browser I have found in exhaustive travels... (I actually compiled Chrome from source at one point, not recommended). Qt is *extremely* well supported and owned by Nokia who recently paid $153,000,000 for it. So, it is probably going to be around for some time.
3) Flash works :)
4) It is setup as a GuiControl so interacts perfectly with mouse events, control overlap, filters...
There are currently 3 rendering modes:

1) Render to Texture: This mode renders the web view to an offscreen buffer and then uploads it to a GFXTexHandle. It uses the Torque GUI system input for mouse and keyboard. As we're rendering to a texture, compositing and rendering to 3d surfaces is possible. Flash renders as long as it is set to windowless mode in the HTML (not a big deal). Instead of using Flash for anything other than presentation/video playback, I would suggest looking into Canvas/HTML5/CSS animations/effects in this mode.

2) Render Native: This mode integrates a native child window with Gui Control, giving the best of both worlds :) There is no need to render to texture as we're using an actual clipped child HWND which uses the Torque GUI system for position/extents and focus :) Transparency does not currently work, however under Vista/Win7 this should be possible. I should be able to get masking working with minimal effort, which would allow for shaped windows and transparent areas.

3) Render Popup: This mode pops up a standalone window, which is owned by the application and consistent in scripting with other modes. This is useful for things like integrated document browsing, tutorial video watching, game doc reading, game forum reading, etc... where you don't want to crowd your game interface with browser. However, you want CLOSE scripted integration with a standard browser (no worries of IE/Mozilla/Chrome), which isn't possible with the current "launch browser" functionality.
These modes work with HTTPS adding a nice way to authenticate to servers, secure purchasing, etc.
It is still pretty early in the development and the idea with the code release will be to get feedback on usability and features... especially WRT integration with Javascript on the page, etc.
EDIT: The first version has been released and is available HERE
Regards,
- Josh Engebretson
Mythos Labs, LLC
About the author
http://www.TheEngine.Co
#22
01/21/2010 (5:50 am)
for sure, I will buy it too !
#23
01/21/2010 (8:13 pm)
Nod, the features and the look at how the threading code works would be great :-).
#24
A binary demo and the source will be available as a resource once the 1.1 Beta is released. There is some new stuff in the beta and it would be a pain to write workarounds for the alpha. So, it won't be terribly long now. Once you see the beta go live, this is sure to follow :)
- Josh
01/21/2010 (11:51 pm)
Hey guys, just a quick update here... I put a bunch of work into this over the last few days. It is really coming together and I am quite pleased with the current features and performance.A binary demo and the source will be available as a resource once the 1.1 Beta is released. There is some new stuff in the beta and it would be a pain to write workarounds for the alpha. So, it won't be terribly long now. Once you see the beta go live, this is sure to follow :)
- Josh
#25
01/22/2010 (2:29 am)
Thank you very much ! Looking forward to it !
#26
01/22/2010 (3:51 am)
Yes ! really cool... But What's about T3D 1.01 (Stable version)?
#27
01/22/2010 (8:13 am)
great stuff..and I don't have to muck around in it to get it done ? ..even better! thx Josh.
#28
01/23/2010 (6:10 pm)
Here's a quick development video that shows some new features (and performance):
#29
I offer to help test this i could really use what this offers in a project im starting. Let me know if i can be of any help. Great work again. I'm very impressed.
01/23/2010 (6:30 pm)
ummm that is deliciously awesome :) *lays prostrate in your awesomeness* No seriously your making some of us <--- extremely excited about this capability. I offer to help test this i could really use what this offers in a project im starting. Let me know if i can be of any help. Great work again. I'm very impressed.
#30
I don't know if it is very useful.
But what is more important : accessing Torque from Facebook, or accessing Facebook from Torque ? :-)
Nicolas Buquet
www.buquet-net.com/cv/
01/23/2010 (6:33 pm)
Simply amazing !I don't know if it is very useful.
But what is more important : accessing Torque from Facebook, or accessing Facebook from Torque ? :-)
Nicolas Buquet
www.buquet-net.com/cv/
#31
01/24/2010 (10:21 am)
Awesome video.
#32
01/27/2010 (2:53 am)
This is fantastic - I could see so many uses for this. Can you have hooks from the web UI back into torque? Could you, for example, click a button in a flash movie and have it launch a mission? That would open up the ability to use flash for the entire UI for a game.
#33
Yes, though the initial release focuses on rendering performance and catching issues. This would be trivial to hook up.
Once I get some other pressing work moved forward, I do plan on swinging back for a 2nd release of the WebKit integration with some more examples and scripting hooks. If someone doesn't beat me to it first :)
01/27/2010 (12:31 pm)
"Could you, for example, click a button in a flash movie and have it launch a mission?"Yes, though the initial release focuses on rendering performance and catching issues. This would be trivial to hook up.
Once I get some other pressing work moved forward, I do plan on swinging back for a 2nd release of the WebKit integration with some more examples and scripting hooks. If someone doesn't beat me to it first :)
#34
question, any chance of getting a basic pdf viewer supported in this?
yeh I know feature creap, but you never know ;-)
01/27/2010 (3:42 pm)
Blimey Josh that's cool. This is something I could definantly use!question, any chance of getting a basic pdf viewer supported in this?
yeh I know feature creap, but you never know ;-)
#35
02/11/2010 (1:48 pm)
This is fantastic!
#36
There are building instructions in the docs folder, please lemme know if there are any issues you run into... This version has been modified/packaged to run against Beta 1.1, so it is possible issues may be present due to code/engine changes.
- Josh Engebretson
Mythos Labs, LLC
02/18/2010 (2:29 am)
Hey guys, as mentioned in this BLOG, we've put together the first release... you can snag it HEREThere are building instructions in the docs folder, please lemme know if there are any issues you run into... This version has been modified/packaged to run against Beta 1.1, so it is possible issues may be present due to code/engine changes.
- Josh Engebretson
Mythos Labs, LLC
#37
This is huge. I'm throwing all my static info windows out the.. uhm.. window. Hell, I'm even going to flash-stream the intro logo animation! :)
02/18/2010 (6:43 am)
@Josh: What is the final price going to be, and where can we pay? Also, are there any license restrictions to using this in commercial apps? This is huge. I'm throwing all my static info windows out the.. uhm.. window. Hell, I'm even going to flash-stream the intro logo animation! :)
#38
02/18/2010 (6:50 am)
@Josh - great work. This would come in handy - opening all sorts of possibilities within a game.
#39
02/18/2010 (8:40 am)
@Konrad: I doubt webkit has restrictions, but it's very likely that the Flash plugin does. You'd need to check with adobe about redistribution.
#40
Here's a link to Adobe's redistributable license application page:
http://www.adobe.com/products/players/fpsh_distribution1.html
Update: in just a few hours I got the nod from Adobe along with the license valid for one year and the download location of the redistributable files (which I can't expose here, unfortunately).
02/18/2010 (9:00 am)
Thanks Manoel. I've looked into it. I need to apply for a license to be able to redistribute the flash player. As I understand licenses for the traditional PC platforms are of no charge (in case the request is accepted). Mobile platforms are treated differently however.Here's a link to Adobe's redistributable license application page:
http://www.adobe.com/products/players/fpsh_distribution1.html
Update: in just a few hours I got the nod from Adobe along with the license valid for one year and the download location of the redistributable files (which I can't expose here, unfortunately).
Torque Owner Sei
Default Studio Name