Skip to main content
Up and Coming
February 27, 2013

Making Progress with Torque 3D

Hey Rift Peeps!

I've decided to tackle the barrel distortion shader first with Torque 3D. That way I can immediately see my results of my work in the Rift.

For now, I've not worried about rendering a stereo pair from the engine as that will require some modifications to Torque 3D's graphics pipeline. In its place I take T3D's standard rendering and crop out a center strip (with the cropping shifted left and right to simulate the eye separation based on values from the OVR SDK) and build a stereo-like pair. So far this has been a decent stand-in for true stereo rendering.

I then apply the OVR SDK given barrel distortion shader to my fake stereo-pair image and end up with the following:

T3D-Rift-Test-02.jpg

I'm also not scaling up the input texture (as discussed in section 5.6.3 of the docs) and instead am taking a hit to the resolution of the final image to get the larger FOV. In the image above I'm scaling the distortion shader's Scale constant by 0.8. Down the road I'll add proper support for the larger input texture to Torque 3D (which will also require some graphics pipeline changes).

Even without true stereo rendering the experience in quite compelling. Next up, head tracking!

My ultimate goal would be to combine my Razer Hydra integration with the Rift for a sweet demo. If you're interested, you can read about my T3D Hydra integration here: Torque 3D Now Supports the Razer Hydra Controller.

- Dave

EDIT: Image attachments are pretty limited in size, eh? It would be great if the forum supported auto-scaling of the image with a link to the full size.

    43 replies

    Up and Coming
    April 4, 2013
    You could PM me here on this board, or look me up my profile on the GarageGames web site and send me an email there. I have email capabilities turned on for this board but I don't know if it works.

    But in general, I think discussions should happen in the open. That way we can help others, too.

    - Dave
    Torque 3D, open source game engine Torque 3D Game Development Cookbook
    Up and Coming
    April 5, 2013
    Are you guys planning on moving up to DirectX 11 and/or OpenGL 4.3 in the near future?
    Up and Coming
    April 5, 2013
    @aabel:
    As we are an open source game engine we rely on the community to help move the product along. So far, the community has asked for cross platform support over improving the graphics pipeline so that is likely the direction we will take in the near term.

    I would love to see us adopt DirectX 11 and OpenGL 4.3. Unfortunately, it is a big undertaking, so we'll have to see where our development leads us. Maybe one of our community members will surprise us!

    - Dave
    Torque 3D, open source game engine Torque 3D Game Development Cookbook
    Up and Coming
    April 8, 2013
    I just tried Torque 3D for the first time. - Impressive! I'm looking forward to using it more. esp. in VR! :D
    Up and Coming
    April 8, 2013
    Is the deferred rendering pipeline in T3D going to fully support the Rift? I don't know if it's possible or not, I am an artist not a programmer. I am getting very frustrated with a certain other engines lack of support for 'pro' rendering features on the Oculus Rift.
    Up and Coming
    April 9, 2013
    @aabel:
    Yes, everything you've seen in the blog I posted uses Torque 3D's deferred (actually light pre-pass renderer) rendering pipeline, known as Advanced Lighting. In my blog, all of those errors I had to correct for were due to how deferred lighting works. That certainly is the advantage of having access to the source code -- you can make these low level changes.

    It likely isn't perfect yet. I haven't yet tested out every possible feature. And I know there is an issue with the edges of soft shadows being a little swimmy (is that a word?) but it certainly is completely usable right now. It will only continue to improve over time.

    - Dave
    Torque 3D, open source game engine Torque 3D Game Development Cookbook
    Up and Coming
    April 11, 2013
    Heya Rift Peeps!

    We've just launched our Oculus Rift support for Torque 3D! :D

    Torque 3D Now Supports the Oculus Rift

    This support is currently in our development branch on GitHub. When we release v3.0 at the end of April it will become part of our precompiled package.

    - Dave
    Torque 3D, open source game engine Torque 3D Game Development Cookbook
    Inspiring
    April 11, 2013
    Looks awesome, man! This is great work, and very valuable to the community.

    I especially like how you guys handled rendering the gun when coming close to a wall. Very nice!
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Up and Coming
    April 12, 2013
    With the Player class its 3rd person camera is also supported. This is a really interesting mode as your head rotation has the camera rotate about the player rather than in place. This actually is quite cool and not as disorienting as you would first expect.

    So the character always stays in view, acting like a pivot for orientation? Genius. It's the opposite of chase-cam which is always pointing in the direction you are NOT going. :mrgreen:


    I wish I could remember that where that video of a psychological experiment where a subject's perspective was shifted to just behind them using an HMD and video cameras in stereo so that the subject was looking at their own back. The objective of the test was to demonstrate how our brains fill in the blanks, culminating in a hammer hitting a plate just below the camera and the subject reacting to it as if their own chest had been hit.

    It seems intuitive to me that seeing your avatar get hit from this 3rd person perspective will cause the player react similarly, due to the same effect as above. This might be what the talk about the sympathetic nervous system is about. It could perhaps be used to cure narcissism and other psychopathy that appears as insensitivity to others.
    Up and Coming
    April 12, 2013
    "cybereality" wrote:
    I especially like how you guys handled rendering the gun when coming close to a wall. Very nice!


    Thanks! That's part of our FPS heritage showing through.

    "ganzuul" wrote:
    So the character always stays in view, acting like a pivot for orientation? Genius. It's the opposite of chase-cam which is always pointing in the direction you are NOT going. :mrgreen:


    Yup, that is exactly how it works. The 3rd person camera orbits about a "cam" node on the player's shape. So you could place this node anywhere you want, such as the player's feet, chest, etc. Our standard Camera class can also orbit around any object or point in space, as you can see when you die (the death cam). Step on a few mines in Rift Valley if you want to see that in action. :D

    - Dave
    Torque 3D, open source game engine Torque 3D Game Development Cookbook