Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Questions Concerning Draw Calls

edited 2014 May 24 in General
Did some searching but didn't find anything so I'm not sure how relevant these questions are to Doomsday Engine and/or to .MD2 meshes.

1) Is there currently a way to view draw calls during gameplay?

2) If an .md2 model is set to use one texture but then the ded tells it to use a different texture, will that add an additional call?

3) What is the current maximum texture pixel dimensions if there is one? I'm creating large texture atlases to reduce the number of calls but I don't want to create something that is too large.

4) What effects (i.e, fullbright) would increase draw calls if added to sub-models?

Comments

  • 1) Not at present no.

    2/3) Presently yes that will result in an additional fetch/context switch if the submodels use different skin textures. However, I wouldn't bother creating your own atlases for model textures as the new 2.0 model renderer (scheduled for 1.15) loads them into atlases automatically.

    4) The main reasons for an additional model rendering pass are the use of special blending modes and shiny textures. Fullbright, being a uniformly-applied lighting adjustment has no effect on the number of passes needed to draw a model.

    As mentioned though, the new model renderer is quite a game changer from a technological perspective. Optimizing for the soon to be replaced model renderer is probably a waste of time to be honest.

    I'm sure skyjake can give you some pointers/additional info when he sees this :)
  • Thanks for the quick reply. I had hoped for news as good as this... Actually this is better than I had hoped.

    1) Didn't think so. Sort of a newer-ish thing for developers to track.

    2/3) Woah... You guys really are going modern with this. This one is going to save me a lot of time.

    4) So, fullbright is free. Good to know.

    I would love some pointers/additional info on the new model renderer. Is there somewhere I can go to read up on that?
  • NiuHaka wrote:
    I would love some pointers/additional info on the new model renderer.
    I will put together a wiki page with best practices and recommended file formats once I've made more progress with the new model renderer. I'll share this info also on the dev blog posts as the implementation matures.

    Some important points that are already certain:
    • As DaniJ mentioned, texture atlases are constructed automatically.
    • Skeletal animation is supported. The model's definitions will need to specify how the mobj's animation state is mapped to the bones (torso vs. feet, etc.), however this mapping hasn't been designed yet in detail. In all likelihood it will be quite simple with the feet being animated for walking/running and the torso for shooting/aiming.
    • When it comes to any effects applied to models, the new renderer will rely on GL shaders and blending modes. We will likely put together a couple of shaders with the basic/full feature set, however any model can also use its own shaders for different vertex and/or fragment effects. The old set of DED model flags etc. etc. will be deprecated.

    I haven't yet decided how exactly to handle the old model renderer. It is not compatible with the GL2 graphics, so it will have to be dropped at some point. Possibly the best approach is to make an importer for old model definitions that reproduce the appearance using the new renderer, although that might not result in the best performance.
    • Skeletal animation is supported. The model's definitions will need to specify how the mobj's animation state is mapped to the bones (torso vs. feet, etc.), however this mapping hasn't been designed yet in detail. In all likelihood it will be quite simple with the feet being animated for walking/running and the torso for shooting/aiming.
    Very cool. Am I correct in assuming that this is something that would most benefit player (Doom Marine) characters that will be seen during multi-play?
    skyjake wrote:
    • When it comes to any effects applied to models, the new renderer will rely on GL shaders and blending modes. We will likely put together a couple of shaders with the basic/full feature set, however any model can also use its own shaders for different vertex and/or fragment effects. The old set of DED model flags etc. etc. will be deprecated.
    [/*]
    This is great too. These kinds of changes will only make it easier for modders to create 3d assets.
    skyjake wrote:
    I haven't yet decided how exactly to handle the old model renderer. It is not compatible with the GL2 graphics, so it will have to be dropped at some point. Possibly the best approach is to make an importer for old model definitions that reproduce the appearance using the new renderer, although that might not result in the best performance.
    In my opinion, it would be best to just completely dump the old model renderer and formats (md2 is the ugliest and most difficult model format i've ever worked with!)once the new model renderer is in place. Like a nasty dirty old bandaid.

    I've got all of my source models waiting for this day.
  • LOL, so, are you saying that we can make our own GL Shaders if possible? That will make things very interesting indeed if that is the case. You could have TF2 style lighting or you could even have a 'Sikk Mod' style pack for Doomsday.

    The sooner that MD2 is consigned to the great 5 1/4 floppy drive in the sky, the better. It's a format that really needs to be put out of it's (read as: 'our') misery.
  • I've got some more questions about draw calls pertaining to the Targa image format.

    1) Does the alpha channel of a .TGA image add an additional draw call?

    2) When a .TGA is added to the image atlas, are the alpha channels atlased as well? And are there any special considerations that should be taken when creating alpha channels?
Sign In or Register to comment.