Forums

Full Version: Scenegraph rewrite
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
I've rewritten the scenegraph and had to touch a LOT of files. I broke almost everything and will be going through fixing stuff but considering the heavy development pace right now I want to get this checked in before I have to rewrite other stuff that's about to get added. You can at least see your car and drive around. Performance will also be poor for a while until I reimplement optimizations. I'm going to check this in once I update to the latest trunk and finish fixing all the conflicts.
That's great news! I will defer the car skin support until after your check in. It is very wip now and will have to be adapted anyways. So the latest trunk(2680) is fine with me.
Awesome. Conflict resolution was harder than I had hoped. Some of the stylistic changes you made (adjusting whitespace in long function definitions/calls, moving public areas to the top, moving sub classes into their own files) really confused svn's diff. I liked your changes, though, I'm going to start doing things that way.
Okay, checked in R2681.

Your changes really increased performance! I can tell that the car/track collision detection code is way faster: on Le Mans (a particular worst case) with my old code (compiler optimizations off) I was getting maybe 20 FPS, heavily bottlenecked by collision detection. Now I get like 110. Which is great because it allowed me to check out the perf stats of the new scenegraph system... and they're pretty impressive! Le Mans has about 10,000 objects and traversal of everything is taking about 1.1ms on my AMD X4 with compiler optimizations off. This is without the fancy speedup algorithms which I had been considering for static geometry -- just traversing the whole graph as if it was dynamic.

I'll make another post in a sec with all of the known issues.
Known issues:
* wheels draw in the wrong place in the spinning car GUI widget
* particles aren't drawn (no tire smoke)
* dynamic reflections are wrong and really slow
* debug AI visualization isn't hooked up
* input graph doesn't display
* racing line doesn't have correct transparency
* track map doesn't display

Please test and post any other issues!
Fixed in R2682:
* particles aren't drawn (no tire smoke)
* input graph doesn't display
* racing line doesn't have correct transparency
* track map doesn't display

New issue:
* text from the HUD elements isn't covered by the pause game menu as it was before.
Fixed in R2683:
* wheels draw in the wrong place in the spinning car GUI widget
Fixed dynamic reflections in R2684.
having trouble building. scons returns

Code:
    CPP build/ai.o
In file included from include/scenegraph.h:15,
                 from include/ai.h:6,
                 from src/ai.cpp:1:
include/keyed_container.h: In constructor ‘keyed_container<DATATYPE>::keyed_container() [with DATATYPE = SCENENODE]’:
include/scenegraph.h:466:   instantiated from here
include/keyed_container.h:477: error: cast from ‘keyed_container<SCENENODE>*’ to ‘int’ loses precision
include/keyed_container.h: In constructor ‘keyed_container<DATATYPE>::keyed_container() [with DATATYPE = DRAWABLE]’:
include/scenegraph.h:343:   instantiated from here
include/keyed_container.h:477: error: cast from ‘keyed_container<DRAWABLE>*’ to ‘int’ loses precision
scons: *** [build/ai.o] Error 1
should be fixed in revision 2685. but vdrift still crashes if the car doesn't have a glass model (like F1-02).

--alex--
alex25 Wrote:vdrift crashes if the car doesn't have a glass model (like F1-02)

Fixed R2686.
thanks, it works.
Quote:Conflict resolution was harder than I had hoped.
Oops, I am sorry. Some of the changes haven't been strictly necessary.

Quote:traversal of everything is taking about 1.1ms
For 110fps that's about 10% of frame time. Wow!
I did some testing and found two bugs.

1. Go into assign car controls menu and try to edit one of the keys(click on the key symbol/button).
Code:
Assertion failed: key.containerid == containerid, file ..\..\include/keyed_container.h, line 466

2. If you start a game camera/car will freeze for some seconds occasionally. You can force this bug by switching to orbit view and moving the camera around.

Edit:
Forget the second bug. I set pause button to LMB while checking the first bug. I think we need an indicator that the game is paused.
Good catch, fixed in R2687.
Pages: 1 2 3 4