question-circle Engine injection? Or wizardry?

  • ??sfvbfb
  • ??sfvbfb's Avatar Topic Author
  • Offline
  • Novice Marbler
  • Novice Marbler
  • Posts: 15
  • Thank you received: 5
17 Aug 2017 20:28 #1
So PQ has lots of pretty [strike]shaders[/strike]shader-like things and marble reflection and things, which TGE didn't have. I remember MBExtender(not the graphics extender) and didn't see any hints to graphics hooking. I'm not asking for the source code to pq's engine mods[strike]actually if any of you would post that then that would be really awesome but you won't but pls[/strike], but rather a starting point to do something similar. Like what MBExtender did with providing a framework to develop engine extensions in C++. If you can't tell me anything because top secret that's alright but it really would be cool to see how this engine that seems like it's older than I am has been pushed to do all it has been.TIA.

Please Log in or Create an account to join the conversation.

  • whirligig
  • whirligig's Avatar
  • Offline
  • Professional Marbler
  • Professional Marbler
  • Posts: 444
  • Thank you received: 261
17 Aug 2017 22:27 #2
PQ's shader code is basically using MBExtender to its fullest extent. It took a lot of blood, sweat, and yelling at Jeff for them to put it all in, I'm sure.

If you're content with post-processing shaders (which you can actually do quite a bit with), Quaternion uses a watered-down version of PQ's shader system whose code will be released with the game next month.
The following user(s) said Thank You: CylinderKnot, ??sfvbfb

Please Log in or Create an account to join the conversation.

  • Posts: 194
  • Thank you received: 401
18 Aug 2017 10:59 #3

Engine injection? Or wizardry?


Is "both" an acceptable answer here? :silly:

Anyway, I wrote MBExtender, and in general you can pretty much use it to do anything with the game that you want to if you're able to reverse-engineer the engine. The main goal is to provide a framework which lets developers easily run custom code, interface with the engine at runtime, and override engine functions. There's nothing graphics-specific in the public build of it mainly because the intention is for users to fill in function definitions themselves.

PQ's graphics plugin is pretty specific to what we wanted to do for PQ, so the only real framework that we have is our MBExtender fork with a bunch of Torque's graphics interface mapped out. It essentially works by overriding the methods for marble and interior rendering and then replacing them entirely with our own code. Then we can do whatever we want, including activating shaders and rendering a realtime reflection cubemap. It's pretty complex and took quite a while to get working correctly. MBExtender was started in 2014, the graphics plugin was started no later than 2015, and both of them together add up to about 20,000 lines of C++ code. Calling it "wizardry" isn't much of an overstatement, and I'm pretty impressed myself with what we've done.

Feel free to ask me if you have any more questions, but I'm not providing any code at this time due to several reasons.

"You know you've spelled something wrong when the only search results are Jeff convos" - HiGuy
The following user(s) said Thank You: Phil, RDs.The-dts-guy, Weather

Please Log in or Create an account to join the conversation.

Moderators: Doomblah
Time to create page: 0.928 seconds
We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.