Page 2 of 2
Re: XNA 3.1
Posted: Mon Jun 15, 2009 11:03 pm
by schulzor2004
ok, this sounds like a good hint, I'll give it a try, I think, I can make something that deactives all objects, that are not around the character....
Do you have a time plan, when you will release version 0.10?
Re: XNA 3.1
Posted: Tue Jun 16, 2009 12:45 am
by Norbo
Not a definite date, no. It will probably be more than one week, but hopefully before mid July.
Re: XNA 3.1
Posted: Tue Jun 16, 2009 7:12 am
by schulzor2004
ok, sounds great!
Fluid physics performance
Posted: Thu Jun 18, 2009 10:13 am
by schulzor2004
Hallo,
As you can see in my Video, I have a fluid-component (the water basin). When this gets activated, the XBox Version gets suddenly very slow. As you can see there is one object within the fluid. When I put a second one in there it gets extremly slow. At this time only 3 Entities are active, the fluid and the two Box-Objects. Is there anything I have to think about, when using fluids on the XBox?
Re: XNA 3.1
Posted: Thu Jun 18, 2009 1:13 pm
by Norbo
How much of a slowdown is it? A millisecond or two per frame, or more like 10-50 milliseconds? On the PC do you notice any similar, though smaller, slowdown?
Is the water's surface defined by only two triangles, or is it more? Keeping it very simple will help speed it up. How many samplesPerDimension (sixth fluid volume parameter) are you taking? This is a very large part of the overall computation, so keeping it at or below 8 on the Xbox is important. Nothing else immediately jumps out at me as a reason for poor Xbox performance. If you could provide a little code for how you set up the fluid volume I could run it and try to diagnose it further.
Re: XNA 3.1
Posted: Thu Jun 18, 2009 3:53 pm
by schulzor2004
Hard to say how much in ms (didn't measure it yet), but my FPS drops from smooth 30 fps down to 15 fps, here is a code snippet:
Code: Select all
tris.Add(new Vector3[] { new Vector3(-basinWidth / 2, waterHeight, -basinLength / 2) + pos, new Vector3(basinWidth / 2, waterHeight, -basinLength / 2) + pos, new Vector3(-basinWidth / 2, waterHeight, basinLength / 2) + pos });
tris.Add(new Vector3[] { new Vector3(-basinWidth / 2, waterHeight, basinLength / 2) + pos, new Vector3(basinWidth / 2, waterHeight, -basinLength / 2) + pos, new Vector3(basinWidth / 2, waterHeight, basinLength / 2) + pos });
fluid = new FluidVolume(new Vector3(0, pos.Y + waterHeight, 0), Vector3.Up, tris, waterHeight, 20f, 8, .7f, .7f);
it is mostly from your demo code. I had to do trial and error to find out, what the parameters mean, I hav increased the density a little bit, so that my object did not fall through the fluid.
Re: XNA 3.1
Posted: Thu Jun 18, 2009 10:38 pm
by Norbo
Copy and pasting that into the demos (which were very similar as you said) and running it with a few blocks in the water took only about 1-2 milliseconds per frame, so that implies the problem lies somewhere besides just fluid volume updating. When running the demos using only a few blocks do you observe similar results?
Re: XNA 3.1
Posted: Fri Jun 19, 2009 1:00 am
by Norbo
I've also tracked down and eliminated some unnecessary allocations which could have caused some GC 'jigs' when using the FluidVolume.
Re: XNA 3.1
Posted: Fri Jun 19, 2009 6:47 am
by schulzor2004
Thanks for trying.... Mhh, I have to retry this and do some measurement...
Re: XNA 3.1
Posted: Mon Jul 13, 2009 4:45 pm
by schulzor2004
Hi,
how is it going on with Version 0.10? How long will it still take?
Thanks for answering!
Re: XNA 3.1
Posted: Mon Jul 13, 2009 4:48 pm
by Norbo
I'm aiming to have it out in the next few days. I'm on track so far, assuming I don't hit any showstopping bugs.
Re: XNA 3.1
Posted: Mon Jul 13, 2009 4:49 pm
by schulzor2004
ok, perfekt!