Afx And Tgea (tse)?
by Thomas Phillips · in Torque Game Engine Advanced · 12/13/2006 (8:10 pm) · 115 replies
Has anyone here picked up AFX? Any idea how tightly coupled it is to TGE? Can anyone say where the integration points would be for TGEA (TSE)?
For those who live under a rock and don't know what I'm talking about, visit this page and take a look:
http://www.garagegames.com/products/127/
Tom
For those who live under a rock and don't know what I'm talking about, visit this page and take a look:
http://www.garagegames.com/products/127/
Tom
#2
TGEA and TGE have a lot in common, but they have diverged in many areas, so even though AFX has flexibly adapted to TGE 1.3-1.5 and the ways TLK has changed, the TGEA port is much more complicated. Big parts of AFX convert right over, but there are some important parts that don't. Actually, one of the key things that makes it messy, is just the low level graphics calls which are easy to fix, but they're sprinkled all over the place.
The first goal is just to get a straight port done, and we'll see how that goes. Then comes making zodiacs work on atlas. After that comes the real fun, taking advantage of new capabilities to create new advanced effects.
12/14/2006 (8:02 am)
@ Thomas Phillips -- I'm currently working on adapting AFX to TGEA. At this point I have no idea what the timeline is or even how it might be sold, but it is a high priority.TGEA and TGE have a lot in common, but they have diverged in many areas, so even though AFX has flexibly adapted to TGE 1.3-1.5 and the ways TLK has changed, the TGEA port is much more complicated. Big parts of AFX convert right over, but there are some important parts that don't. Actually, one of the key things that makes it messy, is just the low level graphics calls which are easy to fix, but they're sprinkled all over the place.
The first goal is just to get a straight port done, and we'll see how that goes. Then comes making zodiacs work on atlas. After that comes the real fun, taking advantage of new capabilities to create new advanced effects.
#3
Tom
12/14/2006 (5:38 pm)
That's great news, Jeff. For something as good as AFX, I'm certainly willing to be patient. Congratulations on the release, and I look forward to more good stuff in the future. ;-)Tom
#4
12/14/2006 (10:45 pm)
That is good news. A quick way to jumpstart some good special effects in TGEA will be really nice.
#5
Mike
12/23/2006 (11:49 am)
I'd just like to add that I'm anxiously awaiting the port to TGEA as well.Mike
#6
So far I've completed the first pass of the port. Basically this means that all of the AFX code has been merged into TGEA, but any areas that looked difficult to migrate are basically just commented out.
The main areas that need attention:
- any code that was rendering (models, zodiacs on legacy terrain, zodiacs on interiors)
- particle system enhancements (TGEA uses basically the same particle system, but it's been heavily rearranged making the port of AFX enhancments a bit tricky.)
- fixes to cursor mode problems are a little different
- water related things are broken
12/23/2006 (12:32 pm)
Here's a quick update on progress of AFX for TGEA. I'll be reporting progress from time to time on this thread so subscribe to it if you'd like to follow along.So far I've completed the first pass of the port. Basically this means that all of the AFX code has been merged into TGEA, but any areas that looked difficult to migrate are basically just commented out.
The main areas that need attention:
- any code that was rendering (models, zodiacs on legacy terrain, zodiacs on interiors)
- particle system enhancements (TGEA uses basically the same particle system, but it's been heavily rearranged making the port of AFX enhancments a bit tricky.)
- fixes to cursor mode problems are a little different
- water related things are broken
#7
With help from Joseph Helm's starter.fps port to TGEA, I've been able to create a working version of the standard AFX Demo under TGEA. Many parts are working:
- Interface is fully functioning
- Target orcs run around as usual
- Corpses can be resurrected or destroyed
- Player can teleport
- Spells execute properly, including missiles, impacts, and damage dealing
- Audio is playing correctly
- Most lighting appears to be functioning
What remains boils down to these three items:
- model effects
- particles
- zodiacs
Model effects are generally working with basic texture materials, but I've been having some trouble getting transparency working. I get the impression that transparency is not fully working in TGEA, although volume lights are one thing that seems to be working right. Light flares are not sorting properly with particles, but that may be a particle problem.
Particles are a big mess. TGEA uses the same basic particle system as TGE, but it's been heavily rearranged. The new arrangement is an improvement, but it makes it very difficult to port over the AFX enhancements. Also, TGEA only supports a single particle datablock per emitter rather than the multiple particle datablocks allowed with TGE particles. I'm not sure if there's a technical reason for this or if it was simplified to make the porting easier, but the AFX spells make extensive use of this feature, so it will be important to add it back in. Given the improved arrangement of the particle system classes, it may now be possible to implement some of the AFX particle system extensions as subclasses to the standard classes rather than as direct modifications. The result would be an easier to maintain system with clearer separation between standard and enhanced emitter types.
Zodiacs are also not working yet, either on legacy terrain, Atlas terrain, or interiors. I'll need to brush up on my DirectX calls to figure out the best way to make zodiacs work again.
The fact that many features are still missing in TGEA makes the migration of these last features go slow. When implementing some effect under TGE, I could often look at some other part of TGE that did something similar for clues on how to make it work. When I try to do the same under TGEA, I often find a block of code commented out where a piece of similar difficult code was left for later. This means I have to work out more solutions from scratch and that takes longer. Still, progress has been study, and it's nice to have just a few areas left to concentrate on.
Note - There is a similar thread in the AFX forums on this topic:
www.garagegames.com/mg/forums/result.thread.php?qt=55936
12/30/2006 (10:45 am)
I've been making good progress on the basic port of AFX to TGEA. By "basic port", I mean a full functioning version that reproduces as much as possible what AFX for TGE does, leaving special features like zodiacs on Atlas, special materials, and shader effects, for later. I'd say about 90% of the AFX system is working, although that's somewhat misleading in that the pieces that are left are both difficult to port and very important. With help from Joseph Helm's starter.fps port to TGEA, I've been able to create a working version of the standard AFX Demo under TGEA. Many parts are working:
- Interface is fully functioning
- Target orcs run around as usual
- Corpses can be resurrected or destroyed
- Player can teleport
- Spells execute properly, including missiles, impacts, and damage dealing
- Audio is playing correctly
- Most lighting appears to be functioning
What remains boils down to these three items:
- model effects
- particles
- zodiacs
Model effects are generally working with basic texture materials, but I've been having some trouble getting transparency working. I get the impression that transparency is not fully working in TGEA, although volume lights are one thing that seems to be working right. Light flares are not sorting properly with particles, but that may be a particle problem.
Particles are a big mess. TGEA uses the same basic particle system as TGE, but it's been heavily rearranged. The new arrangement is an improvement, but it makes it very difficult to port over the AFX enhancements. Also, TGEA only supports a single particle datablock per emitter rather than the multiple particle datablocks allowed with TGE particles. I'm not sure if there's a technical reason for this or if it was simplified to make the porting easier, but the AFX spells make extensive use of this feature, so it will be important to add it back in. Given the improved arrangement of the particle system classes, it may now be possible to implement some of the AFX particle system extensions as subclasses to the standard classes rather than as direct modifications. The result would be an easier to maintain system with clearer separation between standard and enhanced emitter types.
Zodiacs are also not working yet, either on legacy terrain, Atlas terrain, or interiors. I'll need to brush up on my DirectX calls to figure out the best way to make zodiacs work again.
The fact that many features are still missing in TGEA makes the migration of these last features go slow. When implementing some effect under TGE, I could often look at some other part of TGE that did something similar for clues on how to make it work. When I try to do the same under TGEA, I often find a block of code commented out where a piece of similar difficult code was left for later. This means I have to work out more solutions from scratch and that takes longer. Still, progress has been study, and it's nice to have just a few areas left to concentrate on.
Note - There is a similar thread in the AFX forums on this topic:
www.garagegames.com/mg/forums/result.thread.php?qt=55936
#8
You need to set the correct blendOp, or implement your own. There is good documentation on how to do so on msdn, if I remember correctly.
I have noticed this too and it's a hassle. :/ Hope you get it working.
12/30/2006 (11:04 am)
Quote:
Model effects are generally working with basic texture materials, but I've been having some trouble getting transparency working. I get the impression that transparency is not fully working in TGEA, although volume lights are one thing that seems to be working right. Light flares are not sorting properly with particles, but that may be a particle problem.
You need to set the correct blendOp, or implement your own. There is good documentation on how to do so on msdn, if I remember correctly.
Quote:
Also, TGEA only supports a single particle datablock per emitter rather than the multiple particle datablocks allowed with TGE particles. I'm not sure if there's a technical reason for this or if it was simplified to make the porting easier, but the AFX spells make extensive use of this feature, so it will be important to add it back in.
I have noticed this too and it's a hassle. :/ Hope you get it working.
#9
12/30/2006 (11:16 am)
@ Stefan Lundmark -- I'm certain that getting the material defined properly is part of the equation, but AFX has a custom client-only model, afxModel, that I'm adapting. Making it a well-behaved renderable object is where I *think* the transparency problem is. I'm having some difficulty finding the right way to implement prepRenderImage() and renderObject() and how to properly set the opacity.
#10
Using this thread www.garagegames.com/mg/forums/result.thread.php?qt=56500, I was able to verify that the current TGEA particle system is cobbled to only allow a single particle texture per emitter. While there is some performance rationale here, this is a serious limitation. Since particles from different emitters are sorted according to emitter bounding boxes, the only way to mix correctly-sorted particles with different textures is to allow more than one particle texture per emitter. The one particle texture per emitter requirement severely limits the visual complexity one can achieve with particles.
The thread describes at least one efficient approach for implementing this, and with a little thought, I think more legacy-friendly solutions are possible, however, it seems that implementing this is a low priority for TGEA. Based on the info I have, it looks like the "Advanced" system will be shipping with a "toy" particle system inferior to the one in TGE. Categorically, we won't ship a version of AFX with such a limited particle system. If we have to, we'll implement our own enhancements, but that will of course take time.
For now, I'm going to set aside particles and move on to zodiac rendering...
01/19/2007 (7:58 am)
I've mainly been focusing on the particle system port since my last post here. I got most of it working, including all of the AFX enhancements, except for the rendering limitations that are currently built into the implementation. Using this thread www.garagegames.com/mg/forums/result.thread.php?qt=56500, I was able to verify that the current TGEA particle system is cobbled to only allow a single particle texture per emitter. While there is some performance rationale here, this is a serious limitation. Since particles from different emitters are sorted according to emitter bounding boxes, the only way to mix correctly-sorted particles with different textures is to allow more than one particle texture per emitter. The one particle texture per emitter requirement severely limits the visual complexity one can achieve with particles.
The thread describes at least one efficient approach for implementing this, and with a little thought, I think more legacy-friendly solutions are possible, however, it seems that implementing this is a low priority for TGEA. Based on the info I have, it looks like the "Advanced" system will be shipping with a "toy" particle system inferior to the one in TGE. Categorically, we won't ship a version of AFX with such a limited particle system. If we have to, we'll implement our own enhancements, but that will of course take time.
For now, I'm going to set aside particles and move on to zodiac rendering...
#11
We really really do want AFX in TGE-A...and we understand your issues regarding decisions that were made early on regarding priorities. I personally am extremely excited that you are working on doing what you can to make it work!
Even though you aren't appearing to get a lot of public interest/support, I wanted to let you know that we're paying close attention, and will adress what we can just as soon as we can.
01/19/2007 (2:12 pm)
Jeff: personal/professional note:We really really do want AFX in TGE-A...and we understand your issues regarding decisions that were made early on regarding priorities. I personally am extremely excited that you are working on doing what you can to make it work!
Even though you aren't appearing to get a lot of public interest/support, I wanted to let you know that we're paying close attention, and will adress what we can just as soon as we can.
#12
01/19/2007 (6:04 pm)
Thanks for the support, Stephen. :)
#13
01/19/2007 (8:25 pm)
I know I for one would love to see AFX in TSE. I loved the TGE implementation, but my project is TSE. Even if it wound up being a slimmed down version of the TGE version, that would still be useful for a lot of people.
#14
01/20/2007 (6:25 pm)
After reviewing my most recent progress report I can see that I revealed more of my frustration with the TGEA particle system than I intended. The basic situation is this... I had been optimistic that TGEA would be a little more legacy-friendly than it is, especially regarding the particle system, which means that AFX for TGEA will most likely take a bit longer than I had hoped for. I think the folks at GG are seriously committed to making sure TGEA offers the basic features required by AFX, but the general inertia of the TGEA project will probably mean that any AFX-driven changes will come about slowly. All of us looking forward to seeing AFX for TGEA will just have to be patient.
#15
I am the programmer on a funded RPG now, and we want to use both Afx and Shader.
My question would be, is it better for me to code on 1.5 with AFX and port to Shader when finished, OR build on Shader and merge in AFX when finished. The latter is less ideal as AFX and other COTS (commercial off the shelf software) are sure to impress the funding people at milestone meetings.
Ashley Leach
www.silhouette-studios.com.au
01/24/2007 (11:17 am)
Hi Jeff i really appreciate your work, so far it has been superb. I am the programmer on a funded RPG now, and we want to use both Afx and Shader.
My question would be, is it better for me to code on 1.5 with AFX and port to Shader when finished, OR build on Shader and merge in AFX when finished. The latter is less ideal as AFX and other COTS (commercial off the shelf software) are sure to impress the funding people at milestone meetings.
Ashley Leach
www.silhouette-studios.com.au
#16
01/24/2007 (11:41 am)
Ashley, I'll get back to you once I get a look at Milestone 4.2. (I've downloaded it but haven't worked with it yet.)
#17
02/05/2007 (5:10 am)
Hi Jeff, any updates on TGEA integration and when you might have a rough estimate (in months/quarters?)
#18
The current AFX port to TGEA is now working with Milestone 4.2. This milestone improved a few things but nothing visually dramatic. It appears to focus on stability improvements and bug fixes and avoiding new features. This is probably a good thing as it makes for less of a moving target, and less code rewriting, but also suggests that the version 1 TGEA release will be missing some features.
I've got legacy enhancements designed for the particle system. They're not yet implemented but the changes are not significant. These changes bring the particle system feature set up to about the same that TGE particles offer, but it won't be perfectly backwards compatible. Some asset changes will be required to adapt existing TGE particles and emitters to the TGEA system. Primarily it means that multiple-particle emitters will require existing separate texture maps to be tiled together into a common texture map, one per emitter.
Still need to implement zodiacs on legacy terrain and interiors. Interior implementation appears to be the easiest consisting primarily of rendering adaptations from OpenGL to GFX/DirectX. Terrain zodiacs will be more work since the internal implementation structure of legacy terrain has changed significantly, which means that it's more than just a rendering adaptation and nearly a complete rewrite is required.
Also, I'm seeing fairly stark differences in the way the lighting looks under TGEA, including lighting artifacts on legacy terrain that I don't see in TGE. This needs more analysis before I can draw any conclusions from it. There could be some documented differences that I haven't taken into account yet. It could also mean that lighting is just too subtle to expect identical results between TGE and TGEA or perhaps more importantly, between OpenGL and DirectX. Needs more study.
02/05/2007 (8:08 am)
Migration update:The current AFX port to TGEA is now working with Milestone 4.2. This milestone improved a few things but nothing visually dramatic. It appears to focus on stability improvements and bug fixes and avoiding new features. This is probably a good thing as it makes for less of a moving target, and less code rewriting, but also suggests that the version 1 TGEA release will be missing some features.
I've got legacy enhancements designed for the particle system. They're not yet implemented but the changes are not significant. These changes bring the particle system feature set up to about the same that TGE particles offer, but it won't be perfectly backwards compatible. Some asset changes will be required to adapt existing TGE particles and emitters to the TGEA system. Primarily it means that multiple-particle emitters will require existing separate texture maps to be tiled together into a common texture map, one per emitter.
Still need to implement zodiacs on legacy terrain and interiors. Interior implementation appears to be the easiest consisting primarily of rendering adaptations from OpenGL to GFX/DirectX. Terrain zodiacs will be more work since the internal implementation structure of legacy terrain has changed significantly, which means that it's more than just a rendering adaptation and nearly a complete rewrite is required.
Also, I'm seeing fairly stark differences in the way the lighting looks under TGEA, including lighting artifacts on legacy terrain that I don't see in TGE. This needs more analysis before I can draw any conclusions from it. There could be some documented differences that I haven't taken into account yet. It could also mean that lighting is just too subtle to expect identical results between TGE and TGEA or perhaps more importantly, between OpenGL and DirectX. Needs more study.
#19
I can't really hazard a guess as to how long it will take before this port is ready. There are just too many unknowns as well as dependencies on TGEA things that I don't control or even know the schedule for. What I can say is that my initial plan was to treat the AFX to TGEA port as the highest priority, hoping to churn through it, get a new product out, and move on to other things. As it turns out, the number of changed, missing, broken, or postponed features in TGEA combined with my own steeper-than-expected learning curve with the nuances of the GFX/DirectX rendering layer, make the original plan pretty unrealistic. I've changed to a lower priority approach which interleaves work on the TGEA port with other AFX efforts. This probably seems like it will take a whole lot longer, but not necessarily. A careful approach that's better paced to match the progress of TGEA itself will hopefully proceed more efficiently with less code rewriting.
02/05/2007 (8:52 am)
@ Ashley -- re: timelineI can't really hazard a guess as to how long it will take before this port is ready. There are just too many unknowns as well as dependencies on TGEA things that I don't control or even know the schedule for. What I can say is that my initial plan was to treat the AFX to TGEA port as the highest priority, hoping to churn through it, get a new product out, and move on to other things. As it turns out, the number of changed, missing, broken, or postponed features in TGEA combined with my own steeper-than-expected learning curve with the nuances of the GFX/DirectX rendering layer, make the original plan pretty unrealistic. I've changed to a lower priority approach which interleaves work on the TGEA port with other AFX efforts. This probably seems like it will take a whole lot longer, but not necessarily. A careful approach that's better paced to match the progress of TGEA itself will hopefully proceed more efficiently with less code rewriting.
#20
Here's my 2-cents-worth... If I had a project with relatively limited requirements that happened to match TGEA's strengths and avoided its current shortcomings, I would jump right into developing under TGEA. If my project was a bit more general, requiring a well-rounded feature set and a more stable engine, I'd opt to implement under TGE now with the intent to port to TGEA later. Simultaneously, I would do prototyping under TGEA of any TGEA features that I felt were very important to the project and keep careful track of the migration path between TGE and TGEA for other important features.
In about six months or so, the balance will probably shift in favor of TGEA, but with a number of it's features postponed beyond version 1, I think there remains a certain amount of risk in jumping totally into TGEA development and linking your own project to its unknowns. Unfortunately, for now, one may have to do a balancing act between the two engines. On the other hand, if your project has a long schedule extending into 2008, the risk of linking up with TGEA is much smaller.
The most useful thing you can do is understand how the most important features in you project would be implemented under each engine and also understand the complexity of porting each from the TGE implementation to the TGEA implementation.
Regarding AFX specifically... A complete and stable port to TGEA is likely to take several months. Architecturally, AFX will be nearly identical between engines, but subtle differences in appearances and capability of the building block effects will ultimately mean that effects designed using TGE will not look identical under TGEA, and may even require some asset changes. We'll try to keep these required changes to a minimum.
02/05/2007 (9:30 am)
@ Ashley -- re: porting strategyQuote:My question would be, is it better for me to code on 1.5 with AFX and port to Shader when finished, OR build on Shader and merge in AFX when finished.
Here's my 2-cents-worth... If I had a project with relatively limited requirements that happened to match TGEA's strengths and avoided its current shortcomings, I would jump right into developing under TGEA. If my project was a bit more general, requiring a well-rounded feature set and a more stable engine, I'd opt to implement under TGE now with the intent to port to TGEA later. Simultaneously, I would do prototyping under TGEA of any TGEA features that I felt were very important to the project and keep careful track of the migration path between TGE and TGEA for other important features.
In about six months or so, the balance will probably shift in favor of TGEA, but with a number of it's features postponed beyond version 1, I think there remains a certain amount of risk in jumping totally into TGEA development and linking your own project to its unknowns. Unfortunately, for now, one may have to do a balancing act between the two engines. On the other hand, if your project has a long schedule extending into 2008, the risk of linking up with TGEA is much smaller.
The most useful thing you can do is understand how the most important features in you project would be implemented under each engine and also understand the complexity of porting each from the TGE implementation to the TGEA implementation.
Regarding AFX specifically... A complete and stable port to TGEA is likely to take several months. Architecturally, AFX will be nearly identical between engines, but subtle differences in appearances and capability of the building block effects will ultimately mean that effects designed using TGE will not look identical under TGEA, and may even require some asset changes. We'll try to keep these required changes to a minimum.
Torque 3D Owner J.C. Smith