XNA Creators Club Online
Page 2 of 2 (32 items) < Previous 1 2
Sort Posts: Previous Next

XNA Procedural Trees

Last post 11/20/2007 11:12 AM by Klasker. 31 replies.
  • 11/11/2007 6:00 AM In reply to

    Re: XNA Procedural Trees

    Any comments on perf? I've not profiled it to see which bits are taking up time yet, but from 1300Hz to 100Hz to draw one tree is a serious hit.

    That is a very poor measure of performance you have given me. Drawing nothing at all has a theoretical framerate of infinite frames per second, so comparing one tree to nothing at all does not measure anything. The 100 Hz by themselves does not mean a lot without knowing your video card at least. Try rendering a model of similar polygon count and see how they compare.

    I tried profiling it with nVIDIA PerfHUD, but the frame profiler seems to be broken - it tells me that render call #1 takes several million seconds to render. A quick run with nProf didn't bring up anything suspicious. It says that TreeDemo.Draw() only takes 1.48% of the total CPU time, but my CPU usage is only ~4% when running the demo, so that is also a poor measurement.

    With that said, I am not an expert on profiling, and neither on billboards. If anything can be optimized, it would definitely be the leaves (since the trunk is just a mesh, nothing special about it).

    If the performance is a big let-down, you can use LOD to increase performance. Generating a high-poly and low-poly version of the same tree is easy. To render a very low-poly version, set radialSegments to 5 and cutoffLevel to 1 when calling GenerateTree. The high-poly and low-poly should still look alike (apart from the level of detail) if they were generated using the same seed.
  • 11/12/2007 9:13 AM In reply to

    Re: XNA Procedural Trees

    Klasker, you're my hero :-)

    No, seriously!  This is awsome, thanks for fixing it so quickly.

    If anyone wants to see Klaskers tree's in action in a nearly-complete game, please check this out:

    www.darkomengames.co.uk

    And download the Beta for OctaneX.

     

  • 11/12/2007 10:37 AM In reply to

    Re: XNA Procedural Trees

    FYI your 'mail' and 'feed' links on http://www.darkomengames.co.uk/ do not work
    Play Kissy Poo - a game for 4 year olds on Xbox and windows
    The ZBuffer
    News and information for XNA
      Follow The Zman on twitter, Email me
        Please read the forum FAQs - Bug/Feature reporting
          Don't forget to mark good answers and good playtest feedback when you see it!!!
  • 11/12/2007 10:52 AM In reply to

    Re: XNA Procedural Trees

    The ZMan:
    FYI your 'mail' and 'feed' links on http://www.darkomengames.co.uk/ do not work

    Thanks, I was aware.  One of our other guys (Nemo) is responsible (at the moment) for getting the site up and running - it's early days.

    Cheers for the heads up though! 

    This tree component is truly awsome. 

    [TODO] Add Klasker to credits screen in OctaneX...

    Now if you can give me leaves that move in the breeze..... :-)

    Klasker - fancy joining our little team?

  • 11/12/2007 4:40 PM In reply to

    Re: XNA Procedural Trees

    Mail link is now up and you can subscribe to the Dark Omen Games News feed here.
  • 11/16/2007 10:54 AM In reply to

    Re: XNA Procedural Trees

    First off, great tool you have created here, but I have an issue with it, I am runing it on my laptop, the manky old card on it doesnot support 32bit index buffers so I dont get any trees drawn, I have tried setting the buffer type to short but ended up killing the project :(

    Any chance you can rebuild it to use shorts for the index buffers??

  • 11/20/2007 11:12 AM In reply to

    Re: XNA Procedural Trees

    Chazsoft:

    First off, great tool you have created here, but I have an issue with it, I am runing it on my laptop, the manky old card on it doesnot support 32bit index buffers so I dont get any trees drawn, I have tried setting the buffer type to short but ended up killing the project :(

    Any chance you can rebuild it to use shorts for the index buffers??


    Sorry, I won't add support for 16-bit indices at the moment - extending the Mesh class to support both would be a serious hassle without making it immutable, and I dislike having a several mesh-classes and immutable meshes aren't my favourite kind either.
Page 2 of 2 (32 items) < Previous 1 2 Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG