Tuesday 1 October 2013

Tuesday Tinker

Avalanche

My Tuesday, such as it was, bobbed along quite nicely until I hit a document that would choke an elephant.  Turns out Rick got his hands on a beta version and proceeded to rip into every facet, producing a list worth of Wordsworth. Not a surprising list, and in many ways welcoming to have everything in one place, but a shock to a system that had a simple save/load system to add in.

Upon

Looking at the list, I decided to shift my focus and get some of these little niggles ironed out of the version I would present Wednesday morning.  
Keeping a working copy to once side (of course), I proceeded with a decent pace to make some small corrections.  Among them allowing entities to deactivate their cull so single sided polygons could be drawn, making the start marker actually work in test game mode, ensuring the player does not penetrate the water (as underwater action will be the subject of a post-V1 series of feature additions), stealing the W,A,S,D keys in the editor to double up as scroll keys which makes the bouncing from editor to test game much friendlier. I dare say a handful more of these small considerations, and every little will help for the final editor presented at the end of the month as a beta.

As we're almost to the point of not being embarrassed about our screenshots, I have posted another one for you which I title simply; 'barren'.  


The general feedback received over the last few days have definitely been absorbed into my brain.  The two highest vibrations are from the necessity to activate Anti-alias filtering by default on future scenes to soften the jaggies (as they are commonly called). The above shot has been post-render smoothed so you can see the general effect of jaggy removal (sort of). The other one, though extremely expensive from a real-time rendering point of view, is the advanced depth of field technique which not only 'blurs' the distance but subjects each pixel in the scene to a process of expansion based on light intensities. The result is a VERY convincing camera effect that is almost indistinguishable than that used in the movies.  I have yet to delve into this technology, and my gut feel is that it won't be fast enough, but I am willing to check out some more links and downloadable items so I can performance text them if they are out there.

Signing Off

Anyhoo, almost out of time now.  Wednesday won't be overly productive from a coding point of view, but I should return from the meeting with a clear list of objectives and priorities which I might be able to chronicle for you.  The general feel is to create a good beta for the end of the month, and the more edges we can smooth off, and functionally pleasing we can make the editing experience, AND the resulting games created in test game, we should be in a pleasing place.  I can also report the new graphics card came today which means I can do some quick performance testing before the end of the week, and find out which of my amazing shaders are stealing all the cycles. I only hesitate to install it now as I have a demo to prepare :)

P.S. To save me some time, if anyone can dig out a few links to quickly setting a DX9 app up for multisampling AA, post it here :)  Also, if anyone knows the math for working out the actual 3D position of a coordinate from the combination of an overhead 2D mouse coordinate and the terrain under which the 2D pointer is apparently touching, post that too. I am sure my brain can figure it out by trial and error, but maybe there is a simple formula out there that can save me a few minutes (or hours) :)

13 comments:

  1. That screenshot looked an awful lot like a Skyrim scene. It looks great. the AA has really, really helped improve the quality. There is still something odd about the image though, I can't quite put my finger on it.

    ReplyDelete
  2. Is it the texture of the grass that has so sharp and lowres edges? if so, will the texture be improved?

    ReplyDelete
  3. About the mouse/terrain, I'm not sure there is a 'simple' formula unfortunatly... This is equivalent to a 'Raytracing a heightfield problem'. There is a lot of litterature on this exciting topic. (ex:www.eng.utah.edu/~cs7940/papers09/height-fields.pdf)
    With DBP, I get the ray vectors with:
    Set vector3 to camera position (Ray origin)
    Pick Screen MouseX(), MouseY(), 1.0 (Ray direction)

    ReplyDelete
  4. I have a lot of comments to make. Here I go...

    First, good on Rick for giving you list of things to fix! And WASD for scrolling around the editor, WOO! That's right up there with fixing the jumping entities when you select them. Brilliant!

    Second, the screenshot looks 10x better with anti-aliasing turned on! Excellent. However, I have some tips. When I open the full-sized image, it's all blurry. If this is due to the anti-aliasing, MSAA should aid in fixing that. Even though it seems to me as though MSAA is enabled by default in DX9, here's a link explaining how to achieve it:

    http://msdn.microsoft.com/en-us/library/windows/desktop/bb173422(v=vs.85).aspx

    Third, the scene needs to some tweaking to look great. Here's a list of what to do:

    1. Darken the shadows a LOT. They're nearly invisible. This is the biggest problem.
    2. Increase the grass texture resolution 2x AND remove the gaps (there's bits of floating grass) in the alpha map (same goes for the thin twigs on the trees). Also, alpha-to-coverage may help:
    http://en.wikipedia.org/wiki/Alpha_to_coverage
    3. Make the sun shine from where it is in the skybox. It's no good having a sun in one place and light coming from another. If you feel the sun is too low-down in the skybox, get a different skybox.

    Do those three things, give us another screenshot and we'll tell you whether you need to do any more with it.

    Fourth, to accurately obtain a 3D coordinate from 2D mouse position, I do this:

    pick object mousex(),mousey(),object_num,object_num
    x#=get pick vector x()
    z#=get pick vector z()

    If you would prefer to use raycasting, I've thought about this before and think it should be easily possible. I'll get back to you with the maths for it in a few minutes (when I've gone and figured it out).

    VERY happy with progress so far, and happy that I was able to attempt to help so much :D

    ReplyDelete
  5. Just been reading through the past week-and-a-bits comments and...well...wow; I'm SO glad I backed this now!

    ReplyDelete
  6. I agree with most of the comments about the new screen shot.

    I understand that this is not a final Reloaded screen shot so I don't see the need to make adjustments and redo this shot that wont be actually be improvements to the rendering quality just so we can have another look of something that's not actually been built in as an improvement to update that rendering system - yet. Hopefully we can see further screen shots and including any improvement to the rendering system in Actual game level in particular.

    Most of the issues with the jaggies are though generally apparent and have been so reminiscent of the base technology past are obviously most so when considering the finer details of entities as previously said before. Grass, fine tree twigs and branches, leaves and yes they should not really be broken up too much with bits floating visually away from the main. This kind of thing may be perhaps improved somewhat by better preparation of the textures perhaps though FPSC has always suffered from this issue, transparency and so on adding to the general pixelation of edges or not helping at least. Effectively the quality and resolution of in game graphics rendering has not really been of professional/commercial game standard and so it seems it is not at this moment in Reloaded not trying to be too harsh.

    I don't know how the screen shots are taken or at what size/resolution or if that can be improved for screen shots also but presumable the internal rendering display of levels currently is not helping if that, in and of itself irrespective of the screen shot resolution is not of an expected rending quality on screen - either in editor or level game play if there is actually any at this stage.

    I am sure Lee already knows the situation better than any of us being able to see what the actual quality in editor/game is - I guess its what we see in the screen shots. Lee and Rick I am sure will be able to adjudge if the rendering quality is what they can find acceptable for what is a major promotional angle for Reloaded and rightly so and that is visual Quality not seen before and that should include jaggy visuals as well as the Eye candy stuff like explosions and shaders. The general overall screen rendering quality is the base line texture quality.

    Personally I do not think that the current screen shots with the jagged grass and trees and to a lesser extent seen elsewhere is doing Reloaded any justice at all and will be seen as much like reflecting an FPSC classic issue that has not changed a great deal if at all when it is so important as the first impression anyone will see.

    I do not think the current quality of those things should be made public or to the wider Indie game making community in screen shots as promotional images. Hopefully it can be improved.

    I presume that Lee has already said that this latest screen shot has been effectively Photo Shopped or similar when we need to see actual in game renders true so everyone watching Reloaded can see it will be a quality and professional visual display for their end games. Again presumable the smoothing procedure however it was done is what has affected the image and caused the lesser contrast in the image and the lighter shadows - the lesser contrast tends to hide the jaggies especially of the bright grass as was and somewhat blurs the image which is what has been done as you see when enlarged. Obviously we want a sharp image but not "Sharpened" sharp - crisp, clean and bright with default, standard contrast, not blurred and burnt out contrast or flat image which is not a pro thing.

    If it cant be improved then that is fair enough - lets move on. I am just giving my personal opinion here so wont harp on about that any more.

    Again thanks for the continued progress.

    ReplyDelete
  7. Ok I think there are only 2 issues we are looking at here

    1) applying some smoothing to the jaggies in the overall scene which AA should be fine with as they are not too bad on the terrain, rocks or trees. If the actual in game rendering is close or better than the screenshot Lee posted that will be fine.

    2) The foliage quality is purely a texture issue. There are multiple ways of compressing an image and masking the alpha transparency so there is a good chance this just hasn't been done to the optimal level of quality on the texture itself. Clearly there should not be any actual gaps in the texture so this might just be something that needs to be cleaned up.

    There are multiple ways of doing aliasing e.g. AA, MSAA and SSAA which all give an increasing level of smoothness to your scene but with an equal performance hit. I would recommend Lee tries all 3 approaches to see what the tradeoffs are there. The foliage texture also needs to be looked at closely for quality issues.

    I also looked at shadow quality and one thing Lee could consider if he finds turning this on for all static entities, dynamic entities and characters etc is too heavy on performance, it might be viable to go with hard shadows using some transparency rather than soft shadows. In my experience hard shadows work out just fine and I would rather have these working across everything than compromise on the general purpose use of real time dynamic shadows just to have them all soft.

    The overall quality of the Reloaded visuals is still improving and I'm very happy with the progress here. There are some things which need to be improved on the overall quality of the final image being processed but thats to be expected until Lee really starts working on this.

    ReplyDelete
    Replies
    1. Just remember, SSAA has to render the scene twice, once at real resolution and once at a minimum of 4x original resolution. It's extremely performance intensive.

      Delete
  8. I'me not to woried about anything,i think its very early days yet.Reloaded will only get better,very hapy that i put my well earned money in.Nice work lee.

    ReplyDelete
  9. I like daves post. It's positive and to the point :)

    ReplyDelete
  10. Oops, I didn't realise that Lee had said he post-render smoothed the image - sorry about commenting on the blurriness.

    However I am left wondering why he did not simply activate AA in DBPro. Is there some issue with his shaders that he can't simply use SET DISPLAY MODE to turn on AA?

    ReplyDelete
  11. Hope this comment gets read:
    Big issue with FPSC is when you hold the jump button it makes the player repeatably jump. This can cause major issues when the player finds himself in a corner with his head blocked, it forces the player to fall out of the geometry and into the abyss. Also I can't think of an FPS game where you jump repeatedly like this.

    ReplyDelete
  12. FPSC Reloaded is enjoying an almost complete re-write. The jump code is entirely new. The physics that deals with collision is entirely new. When you get your hands on the new beta, let me know if the same thing occurs :)

    ReplyDelete