Polysoup Shadows for TGEA 1.0.3?
by Ronald J Nelson · in Torque Game Engine Advanced · 04/06/2008 (12:46 pm) · 19 replies
I wanted to see if this had been successfully done in TGEA 1.0.3? Yes I know it is there in 1.7.0 but I have already found that all of revisions to TGEA for 1.7.0 have just made it incompatible with my current project.
I will likely use it for another, but since we would like to use PolySoup in TGEA 1.03, the shadows are the only issue I am having. I saw in a file comparison how to prevent wall walking, but I have no idea where to look to find the shadow fixes for Polysoup.
Any assistance you can provide me would be appreciated
I will likely use it for another, but since we would like to use PolySoup in TGEA 1.03, the shadows are the only issue I am having. I saw in a file comparison how to prevent wall walking, but I have no idea where to look to find the shadow fixes for Polysoup.
Any assistance you can provide me would be appreciated
#2
I am just to close to completion of my code to start all of that.
But like I said, next project for sure.
04/06/2008 (2:34 pm)
Sure Stephen- Several reasons actually. One is the changes made to the terrain code, they have made it incomaptible with my material lookup code. Additionally my custom vehicle code really does not seem to like 1.7 at all. Finally, it killed many of the TGEA based resources that I had been using to include fullscreen shaders, tgea tree replicator, and and per material detections. It is just far more feasible and practicle for me to just get this one detail to work than convert everything then try to make each of the resources work too.I am just to close to completion of my code to start all of that.
But like I said, next project for sure.
#3
In this case, I would focus on looking at how the poly soup lighting was done in TGEA 1.7, and back port what you can as appropriate, assuming that it works the way you would like in 1.7.
04/06/2008 (6:09 pm)
Fair enough, and good call in the long run. It's good to see someone thinking things through logically, and even though with quite a bit of research and dev time you'd be able to get all of those resources working again, it's smart to not force it to happen.In this case, I would focus on looking at how the poly soup lighting was done in TGEA 1.7, and back port what you can as appropriate, assuming that it works the way you would like in 1.7.
#4
04/06/2008 (9:54 pm)
Well so far I already got the code to make PolySoup objects generate shadows working. I would really appreciate a point in the direction to the code that lets the object recieve shadows.
#5
?
(on a side note, the way things are going lately, not real sure if I can even suggest the possibility of looking into the terrain<->FXIndex hookup any time before next month, but I do recall discussing it with matt quickly a bit. might check
04/06/2008 (10:19 pm)
LightingSystem/synapseGaming/sgobjectbasedprojector.cppvoid sgShadowProjector::collisionCallback(SceneObject *obj, void *shadow)
{
...
if(obj->getTypeMask() & StaticTSObjectType)
{
if(!tsstatic->usesPolysoup())
return;
...
}?
(on a side note, the way things are going lately, not real sure if I can even suggest the possibility of looking into the terrain<->FXIndex hookup any time before next month, but I do recall discussing it with matt quickly a bit. might check
class TerrainConvex: public Convex U32 material;for a simliar-but-not-quite setup there as a starting point, if you have time before I do.
#6
04/06/2008 (10:41 pm)
Yeah Kirk thats part of what had to be done to get the Polysoup object to generate shadows. What I need to get is the code to have other objects generate shadows on the Polysoup object.
#7
www.garagegames.com/mg/forums/result.thread.php?qt=66616
tell ya right now, those don't exist in the current codebase for comparrison, but I do remmeber tinkering with that with notions of adding dynamic shadowcasting to cars (*shudder* don't ask for screenshots of the results. printed em out just so i could burn em) notions's basicly based on getting the collisionmesh, and using that as a shadow render target iirc..
04/06/2008 (11:39 pm)
Actually, just remmebered.. there was a thread laying arround here already dealing with adding something simliar that could be a place to start looking at least...www.garagegames.com/mg/forums/result.thread.php?qt=66616
tell ya right now, those don't exist in the current codebase for comparrison, but I do remmeber tinkering with that with notions of adding dynamic shadowcasting to cars (*shudder* don't ask for screenshots of the results. printed em out just so i could burn em) notions's basicly based on getting the collisionmesh, and using that as a shadow render target iirc..
#8
Same here with about 30+ resources and lots of script changes in our engine.
I'm interested in that polysoup shadowing for 1.0.3 as well. I'd love to help figuring it out, but I'm afraid it's too much for an amateur like me :)
04/07/2008 (12:07 am)
Quote:I am just to close to completion of my code to start all of that.
But like I said, next project for sure.
Same here with about 30+ resources and lots of script changes in our engine.
I'm interested in that polysoup shadowing for 1.0.3 as well. I'd love to help figuring it out, but I'm afraid it's too much for an amateur like me :)
#9
04/07/2008 (7:39 am)
Quote:One is the changes made to the terrain code, they have made it incompatible with my material lookup code.Oh no, that means the nice different explosion for different materials code you wrote does not work now? :/
#10
As I said, I am not upgrading this time. I am just going to rip the polysoup shadow code out of 1.7 and press on with 1.0.3.
04/07/2008 (3:27 pm)
Chris - Bingo. Too bad too, I have been working on some new stuff with it in 1.0.3 that lets me get materials from DTS objects as well thanks to a resource by Kirk. As I said, I am not upgrading this time. I am just going to rip the polysoup shadow code out of 1.7 and press on with 1.0.3.
#11
I have tested this with a simple box with and without collision mesh to test statics with and without polysoup. There are no signs of shadows on the object anywhere.
04/07/2008 (7:28 pm)
Well Kirk I used that method and modified so collisionCallback in the shadow.cpp code to work in the smae manner required in sgObjectBasedProjector.cpp. Still no help.I have tested this with a simple box with and without collision mesh to test statics with and without polysoup. There are no signs of shadows on the object anywhere.
#12
04/07/2008 (7:42 pm)
tdn.garagegames.com/wiki/Torque_Shader_Engine/PolySoupAddon <-wiki's back up. looks like it's even got a 1.03 zip up there.
#13
04/07/2008 (7:59 pm)
Yeah Kirk already been there, I have working PolySoup in 1.0.3.
#14
It would be nice if someone that worked on this could just throw me a bone here. By the way to set it up other than that there is quite a bit more to it than just that small bit of code Kirk referenced. I have managed to get that part to work perfectly.
The code includes changes to the sgSceneLightingTerrain, Player, TSMesh, shapebase, TSStatic, as well as the sgObjectBasedProjector files.
It is obvious that there is something I am missing. Anyone?
04/07/2008 (9:28 pm)
Well I have tried just about everything, I figured out that the old shadow files are now blobShadow and most of the code is similar. I tried merging as much as applied without replacing the lighting system with no luck.It would be nice if someone that worked on this could just throw me a bone here. By the way to set it up other than that there is quite a bit more to it than just that small bit of code Kirk referenced. I have managed to get that part to work perfectly.
The code includes changes to the sgSceneLightingTerrain, Player, TSMesh, shapebase, TSStatic, as well as the sgObjectBasedProjector files.
It is obvious that there is something I am missing. Anyone?
#15
04/08/2008 (12:32 pm)
We checked all the resources we added so far in 1.0.3 and agreed to go on with 1.7.0 instead of trying to get things like polysoup shadows fixed. We'll lose some minor "nice to have" resources and some days or maybe weeks, but we hope to gain more with the newer and far more powerful update. Maybe you should reconsider as well Ron.
#16
04/08/2008 (2:31 pm)
Not really an option for me right now Stefan. Since 1.7 is not compatible as I said above with much of my modified code(lots of it my own stuff), it would be more work to fix the compatibility than just rip the polysoup code. Since I already got most of it working, it should be fairly simple to ge the rest.
#17
As shown above in Kirk's post the only real difference that can be found easily is the allowClipping flag which I traced back all the way the the cookieCutter functions in the collision's code. None of the code seemed to have any real differences.
Just about to give up on this one and say screw polysoup. Can't upgrade to 1.7 in any sort of timely manner (it would take months to get all of my code converted), so a couple of days on this isn't a big deal. I would really appreciate a point in the right direction from say one of the GG people that actually know where the difference is, or if it is just something that would involve massively restructuring the lighting code as I have seen they did in 1.7 , if they could just let me know so I can stop spinning my wheels.
04/08/2008 (11:13 pm)
OK thanks to a bit of help, I have shadows on Static objects. I just need to find the place where they got them to work when the object is using polysoup as well.As shown above in Kirk's post the only real difference that can be found easily is the allowClipping flag which I traced back all the way the the cookieCutter functions in the collision's code. None of the code seemed to have any real differences.
Just about to give up on this one and say screw polysoup. Can't upgrade to 1.7 in any sort of timely manner (it would take months to get all of my code converted), so a couple of days on this isn't a big deal. I would really appreciate a point in the right direction from say one of the GG people that actually know where the difference is, or if it is just something that would involve massively restructuring the lighting code as I have seen they did in 1.7 , if they could just let me know so I can stop spinning my wheels.
#18
Not sure if anyone would be interested in the code, but if there are I guess I could make it a resource for others to use that just can't move along to 1.7 just yet.
Final question I have, its always been there in TGEA is if anyone had smoothed out the jitter in player shadows when side stepping?
04/09/2008 (4:18 pm)
Well in combination with the code Kirk posted above you have to severely modify alot of TS code, but yeah I got Polysoup and Static objects to generate and recieve shaows just fine in TGEA 1.03.Not sure if anyone would be interested in the code, but if there are I guess I could make it a resource for others to use that just can't move along to 1.7 just yet.
Final question I have, its always been there in TGEA is if anyone had smoothed out the jitter in player shadows when side stepping?
#19
04/09/2008 (4:37 pm)
Well I updated the TDN site with my updated files. Enjoy.
Torque 3D Owner Stephen Zepp