Captaintoottoot Posted February 4, 2015 I downloaded the D3 engine code. Followed the instructions to get it to compile. Made a new exe and dll. Then I went into a test map. with r_showprimitives the count was something like 60,000 triangles. I exited the game. Then re-entered the game with the original unaltered doom3.exe and the count was 35,000... I was in the same spot looking in the same direction. Something is being rendered that shouldn't be. There are some particle effects going on around the map and that's the only thing that I could think of that would cause that much change. What difference between the original doom3 and the released code could be doing this? Does anyone know where the extra triangles are coming from and what could be done to get the values the same as the original doom3.exe ? 0 Share this post Link to post
Linguica Posted February 4, 2015 Well, the released Doom 3 source uses a different algorithm for calculating the shadow volumes because of a patent someone holds. That could be it. 0 Share this post Link to post
Quasar Posted February 5, 2015 Did you build debug or release in Visual Studio? For an engine of Doom 3's complexity, the difference is enormous. I ask because Visual Studio seems to always default to debug build when you open a new project. 0 Share this post Link to post
Avoozl Posted February 6, 2015 I seem to recall a certain community made an edit of the source code to create better shadows that were similar to the original, you could try searching for it. 0 Share this post Link to post
Archi Posted February 6, 2015 Are you sure that you built an optimized version? 0 Share this post Link to post
Caffeine Freak Posted February 6, 2015 Linguica said:Well, the released Doom 3 source uses a different algorithm for calculating the shadow volumes because of a patent someone holds. That could be it. That's exactly what it is. When we used the released source code and went standalone with Hexen: EOC, and experienced the same slowdown, I asked Carmack about it on Twitter. He told me that the 'Carmack's Reverse' algorithm had been removed to avoid infringing on the Creative Labs patent. We since added a community-created version of it back, and got the speed back to normal. 0 Share this post Link to post
Captaintoottoot Posted February 7, 2015 Caffeine Freak, did you know of a link to this revised version? Quasar, yes it was set to release rather than debug. Edit: Ok I see the links to the patch thing for hexen EOC. I would prefer not to patch over anything. Is there a link anywhere to the engine source code? So I can examine the difference between it and vanilla D3 source? 0 Share this post Link to post
Caffeine Freak Posted February 7, 2015 Unless I'm mistaken, the Hexen: EOC patch you're referring to was for something completely different (a freeze on a particular level.) When I said we went standalone, I meant we did internally (the standalone version of EOC has not been released yet.) Anyway, I don't know where you'd find the community-created fix that we used, as we got it from the now-defunct doom3world forums. You might try the id Tech forums that replaced doom3world: http://idtechforums.fuzzylogicinc.com As I recall, the fix was created by a user known as 'raynorpat' on Doom3world, so if he migrated over to the id tech forums like many of the other regulars, he probably uses the same name. 0 Share this post Link to post
Captaintoottoot Posted February 7, 2015 Thanks for the help caffinefreak. I haven't found a solution for sure yet but I think this all points me in the right direction. 0 Share this post Link to post
Captaintoottoot Posted February 9, 2015 I checked out a link through the inside3d forums that showed how to put the patented carmack's reverse back in, because I just wanted to rule out if that was causing the performance difference. And... no difference. The tris counts were the same: 23,000 original D3, 35,000 rebuilt D3. Shadows: 10,000 original, 21,000 rebuilt. Something else is different that's causing this and it's not Carmack's Reverse not being there. I Removed all particles on the map. Result: No change. I Removed the skybox. Result: No change I set all lights to noshadows and ambientLight 1 then I saw a change. The numbers between original and rebuilt are the same now, with shadow count to 0 obviously. and exact same tris counts. So the clue is it has something to do with shadows. Anyone have any guesses what's different between the original D3 exe and the rebuilt exe that would do this? 0 Share this post Link to post
Caffeine Freak Posted February 24, 2015 At this point, I'm puzzled. Can you paste links to exactly where you got the code and instructions? I *know* that we got the performance boosts once we put the re-created Carmack's Reverse code back in because I checked the numbers, but maybe there's something different about the code you're using. 0 Share this post Link to post
Captaintoottoot Posted March 1, 2015 Sorry for the delay here but I got snowed in for more than a week and I can only get on the net when I'm in town... It would take me foever to try to find the link to restoring the carmacks reverse. I think it was github or something. From what I saw, restoring Carmack's reverse was basically just altering a couple lines in a file I can't even remember. I thought it seemed too simple to be true. Was it something really that simple or did it require altering a lot more to get the carmack's reverse working again? 0 Share this post Link to post
Caffeine Freak Posted March 2, 2015 I distinctly remember Carmack saying via Twitter that all he did to avoid the patent lawsuit was remove two lines of code. So yeah. As far as the steps you would take to compile it correctly, I don't know. 0 Share this post Link to post
Captaintoottoot Posted March 2, 2015 The link I referred to was: https://github.com/ljbade/doom3.gpl/commit/d4de024341e79e0ac1dfb54fb528859f8ccea605 0 Share this post Link to post