Audi R18 2012 - Wip (no release)

Discussion in 'Vehicles' started by tommy86, May 11, 2012.

Thread Status:
Not open for further replies.
  1. Max Angelo

    Max Angelo Registered

    Joined:
    Oct 5, 2010
    Messages:
    4,958
    Likes Received:
    10
    mmm ... having to change cars detail just to play 1 mod is the best way to never play that mod, at least for lazy people as i am! :)

    Or, you forget to lower the detail, you join a server, try 3 mins asking yourself why you have so low performances, you remenber you have to set lower details, exit from the server, change the setting, try to rejoin and the server is in race session!. :)

    Seriously, an ideal situation, i think at least for the first 2 years of rF2 life, is a sort of standard LoDs polycount, taking as sample the ISI cars.

    In short, my advice is to follow Luc guideline! :)
     
  2. Nestor A Bogo

    Nestor A Bogo Registered

    Joined:
    Mar 18, 2012
    Messages:
    21
    Likes Received:
    0
    WOW!!!!!!!!!!!!!!!!!!

    :D

    Fantastico!!!!!!!!!!!!!
     
  3. feels3

    feels3 Member Staff Member

    Joined:
    Sep 4, 2011
    Messages:
    1,201
    Likes Received:
    142
    I know how we can solve this problem :)

    Each car in rf2 should be very detailed :p
     
  4. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    Here's a little something to consider :)

    Minimum number of times car needs to be rendered:

    1. Into shadowmaps
    There is a cascade of shadowmaps in rFactor. If well optimized - car will be rendered once or twice (if at edge between two shadowmaps)

    2. Into reflection on the road, reflections in building windows, etc.
    Once for each reflection.

    3. Into reflection in other cars
    Since reflection in other car is a cubemap, car will have to be rendered 2-4 times, depending on how many faces of the other car's cubemap it spans.
    Multiply that by number of cars that need reflection of this car.

    4. Into rearview mirrors
    Once, or even 3 times if mirrors use separate views.

    5. Onto screen
    Once, or even multiple times, for multi monitor setups with separate views.


    Now multiply all that by 200k triangles :)


    Yes, if you disable reflections and shadows you can get smooth graphics with high-poly cars. So you can get high poly cars into rFactor engine, but not necessarily into rFactor 2 engine running at full details.


    But polygon count is not all that matters. For every batch of polygons is rendered, there is a render command issued by game engine. Each such command also have it's cost and it's not a low cost. One of most important optimizations nowadays is to render as much polygons as possible with as little draw calls as possible. That's because GPU's are very powerfull and can't waste too much time waiting for CPU to give command (loosely speaking, but I don't want to go into details here).

    For example - Crytek engine is capable of rendering one frame with just hundreds of commands passed from CPU to GPU.

    Now think of how many GMT files you have for one car and how many objects with different materials each one of these GMT files has. You will need one command for each mesh. And of course issued more than once because of shadows and reflections.
    You may end up with hundreds of draw commands just for one car.

    And each of these draw calls can even take amout of time that GPU would take to render more than a thousand triangles. So you may have a car that is low-poly but still renders slow if you split it into too many little objects.

    Defining good LOD's for car is not just about defining the same set of meshes with less triangles, but more importantly, about reducing number of meshes. You can remove those that become irrelevant (brake calipers, cockpit details), but you should also combine meshes with similar appearance and give them single material whenever possible.


    And there are collisions. You need a good low-poly collision model, because collisions have pretty high per-tiangle cost. In worst case, time to detect a collision may be even dependent on the square of number of triangles. Costs of collision detection is something very often underestimated.


    And finally - don't forget body deformations during collisions. These will be costly aswell, unless implemented on GPU.



    That's a bit too much to describe in one post, but what I wrote above should give you a good idea of what you need to deal with.


    That's why many game engines cheat nowadays on shadows and reflections. You either go for realism or you go for details.
     
    Last edited by a moderator: May 11, 2012
    1 person likes this.
  5. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    That's a very informative post for a hobbyist like me K, thanks!
     
  6. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    If I find the time, I'm planning on writting two documents.

    One would be on GPU's in general - so people would know more about stuff like blending, z-buffering, transformation precision and performance hints (some of tracks I've seen in rFactor 1 were literally anti-performance designed ;) )

    The other would be about lighting (and shadows) - how it works in real world and how it's implemented in game engines like rFactor.

    But of course, when I find the time... :)
     
  7. tommy86

    tommy86 Registered

    Joined:
    Jan 10, 2012
    Messages:
    161
    Likes Received:
    4
    I removed 50k tris only lowering wheels mesh :)

    I've got a turbosmooth on all rims and a huge polys calipers eheh

    Now 150k tris, going on with optimizing! Thanks all for replies and for such interesting data posted. I hope this can help all other modders, especially for those practising like me :)
     
  8. Johannes Rojola

    Johannes Rojola Registered

    Joined:
    Sep 8, 2011
    Messages:
    1,038
    Likes Received:
    38
    :(
     
  9. tommy86

    tommy86 Registered

    Joined:
    Jan 10, 2012
    Messages:
    161
    Likes Received:
    4
    Here is the optimizing result :)

    I've exported max model to obj and then import in lightwave3d (i use it a lot at work and know it better than max) and cleanup the mesh. Now the count tells me 96k tris and 68k polys.

    A lot better than it was before :p

    View attachment 2348
     
  10. deBorgo83

    deBorgo83 Registered

    Joined:
    Oct 5, 2010
    Messages:
    653
    Likes Received:
    14
    This is looking very good, just the sort of content I'm hoping to see in rF2. Good luck with this, tommy86. :)
     
  11. GTClub_wajdi

    GTClub_wajdi Registered

    Joined:
    Feb 28, 2012
    Messages:
    3,239
    Likes Received:
    572
    Ben fatto.well done!
     
  12. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    Oh my God !!

    Amazing, Work
    Is what you would do on rFactor 1 an audi?
    Sorry if the question was posed
     
  13. Magzire

    Magzire Registered

    Joined:
    Mar 26, 2012
    Messages:
    493
    Likes Received:
    1
    O m g looks amazing, but how do you get the sound for the audi?
     
    Last edited by a moderator: May 12, 2012
  14. tommy86

    tommy86 Registered

    Joined:
    Jan 10, 2012
    Messages:
    161
    Likes Received:
    4
  15. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    Amazing work!!!
     
  16. mrk37

    mrk37 Registered

    Joined:
    Oct 4, 2010
    Messages:
    10
    Likes Received:
    0
    Ultra! :cool:
     
  17. tommy86

    tommy86 Registered

    Joined:
    Jan 10, 2012
    Messages:
    161
    Likes Received:
    4
  18. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    Please NO!!
    :)

    Use modeling stuff under the plexi cover...
     
  19. FONismo

    FONismo Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,100
    Likes Received:
    54
    Agree totally
     
  20. tommy86

    tommy86 Registered

    Joined:
    Jan 10, 2012
    Messages:
    161
    Likes Received:
    4
    ok ok I'll recover old modelled headlight, don't worry :p
     
Thread Status:
Not open for further replies.

Share This Page