Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

64bit precision

Discussion in 'General Discussion' started by Rodolfo-Rubens, Oct 12, 2016.

  1. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,197
    Did you guys saw the latest gameplay vids for star citizen?


    I couldn't believe when I saw the space station at 12:36, how cool is that?
     
  2. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    64 bit game engines had to happen sooner or later.
     
    AntonioModer likes this.
  3. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    Will it be the messiah of space game or a debacle like all others?
     
    Martin_H likes this.
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,943
    Development has been very transparent with frequent videos released showing what they have been working on and there are playable demos available for those who crowdfunded the game. Chris Roberts has experience developing space games.

    At the very least it stands a very good chance of being a quality space game which is what we really need on the market.
     
  5. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    I know but there was other space game, aside from no man sky, that were going well, they either get stuck in perpetual limbo or were outright cancel, all suffered from feature creep. Those who see completion are either 2d game, very old games before this age of gaming or broken game with missing feature. It's the doom genre by excellence.
     
  6. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    I think it looks great and it would no doubt be a fun game to play. That said, for all it's magnificent graphics it always has struck me as lacking a little bit of something - I always feel disappointed by the lack of sophistication in the gameplay compared to the visuals. The demos always seem boringly straightforward, the animations a bit lackluster and the ease with which the players swim around from one ship to the other, or just land on a tiny platform in deep space and step out and run around like they're in their mum's backyard, makes the space experience lose a lot of its awe imo. There's no feeling of pressure or danger or apprehension from being outside an airlock.

    But anyway about 64 bit precision, I would definitely like to see it but I can hardly imagine Unity doing something that none of the other mainstream engines have already, especially when it's a 'hardcore' feature. From watching the talk from the guys doing Kerbal I would rather not fiddle around with multiple cameras and layers and custom 32-64 bit vector transitions and so on just to make everything look right, but for now it's the only way to go.
     
  7. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    CPU's and OS's have gone 64 bit.

    Are GPU's, Physics and Graphical API's holding us back from true 64 bit gaming?

    Or are CPU's and GPU's just not powerful enough at 64 bit calculations to provide a truly 64 bit platform for games?
     
  8. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    You really don't want this project to be finished :D scope or density, even with their budget, will always be a problem. I can't imagine the nightmare of making all these system works together.

    As a designer I cringe more about the way they translate reference frame from one to another (the smaller ship parking into the bigger ship in a previous demo), a small design adjustment (like tractor beam and other signal) to signal the shift of reference, would have been more useful and still enhance the fantasy (we have tech irl that does that) and allow to correctly feedback state to player, the game is full of soft shift like that, it potentially weaken the design by creating potential confusion (which state are we in, are we still inside the reference? did the object was acquired correctly? what happen if I accelerate will a the incoming ship left behind? etc ...)
     
  9. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    You're doing your thing again. Unity can be built in 64bit mode, so it is already a 64bit engine.
     
    dadude123 likes this.
  10. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,943
    This sentence right here makes it apparent you don't know what you're talking about. You can use 64-bit floating point numbers with a 32-bit CPU/OS. The width of the processor's architecture was never a limiting factor.

    Yes and no. Most modern games simply do not need 64-bit for the majority of their tasks and thus it is not focused on by the hardware manufacturers. A GTX 1080, for example, is still 32 times faster with single precision than it is with double precision floating point numbers.

    That being said it doesn't truly hold our games back because both the engine developers and the game developers can implement workarounds that allow you to have worlds with more precision than 32-bit floating point numbers offer.

    Otherwise you wouldn't see engines like Unigine offering it.

    Once again graphics hardware is simply not focusing on double precision math. Your processor is more than capable.
     
    dadude123, MV10 and Kiwasi like this.
  11. ToshoDaimos

    ToshoDaimos

    Joined:
    Jan 30, 2013
    Posts:
    679
    In that video you can see CryEngine trademark tree LoD with visible pop-in. I hate it.

    I also don't like their art direction. It looks very generic, lacking any kind of distinct visual style.
     
  12. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Really I thought the Physics and Graphics API's are limited to 32 bit.

    So you need multiple scaled cameras and origin shifting in the physics, game and terrain/world engine to provide the illusion of 64 bit range.

    I'm a dreamer, and as a game developer dream of the day we have 64 bit game worlds out of the box when we open our game engines.
     
  13. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,943
    Both Havok and PhysX are capable of using 64-bit floating point numbers.
     
  14. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I don't think primarily 64-bit graphics cards are ever going to make sense. With 32-bits you can already render far more precision then the human eye can see. And sending an entire 64-bit universe to the graphics card then having the graphics card do the culling strikes me as very inefficient. What would be the point of rendering a mesh that one million miles away to the precision of one micron? The human eye can't see one micron even at an optimal viewing distance. Current 32-bit systems can render an object 1 km away to a precision of 1 mm. That's more then enough to do anything you might ever need on screen.

    The physics API is the same, do you really need 1 mm precision of an object 1 km away from your main game area?

    A 64-bit transform is closer to what you are after. So you can position objects in 64-bit space, and the engine automagically takes care of switching it down to 32-bit space for physics and rendering. As well as doing some fancy LOD stuff for you.

    Edit: Fixed up some numbers
     
    Last edited: Oct 13, 2016
    Ryiah likes this.
  15. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Source, Proof or Unity Example as in Unity I find the 10k limit is where Z fighting, camera shake and physics precision fall apart.

    Ideally a smoothly rotating and rendering 1mm cube with a radius of 1000km from origin. You can zoom the camera in as much as you want e.g. FOV angle or place the camera next to the cube.
     
    AlanMattano likes this.
  16. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Whoops, my numbers are a little off. Will fix that now. But the logic still applies, why do you need precise rendering and physics 10 km away from where the game play is happening?

    The place the issue needs to be solved is not in the physics engine or the graphics card, but rather in the engine where you are feeding those two systems. And for virtually all games in existence a 64 bit transform with local physics and rendering is enough.
     
  17. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,943
    Physics would at least be understandable as we're already seeing games where an entire solar system is kept in memory and simulated. Recent releases of PhysX do have support for origin shifting implemented but it's expensive and doesn't eliminate all of the necessary work.

    For those games though it may be better to choose a more appropriate engine that supports it out of the box. Like Unigine.
     
    AlanMattano, Kiwasi and angrypenguin like this.
  18. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,614
    I've a game where that'd be cool. It'd also be really useful for simulations, multi-user scenarios and such. Those things are all possible, but as @Ryiah says there's a bunch of work in it, where just being more precise would make it "just work".
     
    Ryiah and Kiwasi like this.
  19. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    You're confusing 32/64 bit with single/double precision. It is not the same thing.


    Aand z-fighting is ALSO a separate issue.
     
    Ostwind, MV10, Ryiah and 2 others like this.
  20. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    I bellieve Ryiah mentioned earlier that PhysX source is now available. Which means someone could try recompiling it with double precision (I'd expect it to be difficult)

    Actual rendering would still need to use smoke and mirrors, however.
     
  21. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,943
  22. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Yeah I saw that demo. There's definitely a serious threat to immersion when they do things like get the speeder and zoom in and out of cargo bays the size of corridors - it's not so much that it isn't cool that you could do it, but inevitably if something goes wrong (like you miss the doorway coming in etc) not only does it make the whole idea look silly but it's handled very awkwardly by the physics engine.

    I also thought in that demo the 'enemies' you found in the wrecked ship floated around like space debris and only incidentally took a shot at you every once in a blue moon. To be fair they were probably scared of having to restart the demo but it looked weird. And floating around in zero gravity looks like you just turned off gravity and went into a T-pose. And there's nothing quite like seeing a generic fps camera/gun view as you float along deep space to make things look even weirder.

    The best thing I saw recently (in the same demo) was the interaction with the NPC who gave you missions, it was fairly nicely done although the guy seemed like he already knew you, wore the same facial expression the whole time and there was no attempt to build up mystery and intrigue. And at the end of the demo, well you saw how that just sort of ended randomly!

    Every time I see the game there's some great new feature, but I've yet to see any part of it except maybe dogfighting which is polished enough to be anywhere near release. I can't help but feel that at some point the budget's simply going to run out and whatever's there at the time will be released.
     
  23. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    Speaking of which... how is this game doing currently? I remember back in 2014..2015 they missed every deadline they had with dogfighting module of theirs and I haven't been watching SC's progress after that point.


    Also this planetary zoom made me think...

    Have anyone ever tried to properly make a planet by simulating tectonic movement of the crust? Because those snowy mountains look like thousands of snowy mountains from other games, and honestly instead of mountains I see fractal noise applied to a heightmap here. (plus there's a lot of popping up on ground).

    Vehicle and Ship physics also look a bit off. Ship looks like it rotates about wrong point and not around of its center of mass, and everything looks a bit too light.
     
    Kiwasi likes this.
  24. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    CIG got so lucky snapping up so many of ex Crytek employees in Germany to carry working on the engine for their game. Because that planet 2.0 tech is impressive, when I watch that, its daayumn that's all I want, just to build game(s) within a game that is that is getting that fleshed out. None of this stupid crap terrain systems like Unity's or trying to get detailed terrain that can be that large procedurally generated at first and then artist driven, all the while performant and scalable, so much damn F***ing setup just for a base from which to build any sort of game needing to use terrain and stick to being realistic. I mean even the clouds/weather and time of day stuff.. everything a damn plugin with Unity.

    Also I noticed the terrain system is using a chunk based system, I'm wondering if they ever push it into using voxel patches for actual mining into terrain.. maybe have a star destroyer ship that can blast a hole through a planet turning it into a donut :D
     
    Kridian likes this.
  25. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    It's not all smooth sailing so I would take anything related to this project with a mountain of salt. It's not representative of anything typical in the games industry and shouldn't be held as a standard for any other developer, just use their mistakes to learn.

    Kotaku (I know, but it's actually a good bit of journalism for once), did a great write up on the studio that is pretty interesting from a development perspective:
    http://www.kotaku.co.uk/2016/09/23/inside-the-troubled-development-of-star-citizen

    Specifically the section titled 'A tale of two studios'.

    As for the tech side, it's technically impressive though still quite rough around the edges. Having full planets is nice and all, but it looks so boring to play honestly, I hope they put more thought into that at some point in the project.
     
    Last edited: Oct 13, 2016
    MV10 likes this.
  26. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
  27. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    Is that from the time when derek smart managed to raise some stink about star citizen, or is that a new material? 2016/09 looks like it is the new one...
     
  28. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    It's unrelated to that incident, I don't think it even mentions it since it's not really very noteworthy.
     
  29. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,081
    Derek Smart has something to say about Star Citizen every other week but he never actually says it.
     
  30. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    And the award for not paying attention to the topic at hand (hint: watch the video in the OP) goes to you, good sir or mam :cool:
     
  31. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    Frankly ... it looks like typical AAA game dev to me ... almost all post mortem on earth have element of this, in the end the final product will speak for itself.

    https://experilous.com/1/blog/post/procedural-planet-generation
    http://www.gamedev.net/topic/623145-terrain-generation-with-plate-tectonics/

    Its' not new, random fault line was used in the past too
    http://www.gamasutra.com/view/feature/3377/algorithms_for_an_infinite_universe.php?print=1
     
    neginfinity likes this.
  32. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,943
    My understanding was that you were able to recompile PhysX to use double precision numbers.
     
  33. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,943
    Thanks for digging up the quote! I'm actually curious now if Unigine is silently shifting the physics origin behind the scenes or if it really does have a 64-bit physics engine. It definitely has 64-bit transforms though because it has an entire page dedicated to the subject. Not that it really matters in the end for those of us with an indie budget.
     
    Martin_H likes this.
  34. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,015
    It is kind of neat from a game developer point of view that we can see the space station from the surface of the planet. However, that is not especially meaningful to most players, since that was something we could easily fake. As long as the game looks cool and is lots of fun to play, most players don't care how the effects are actually implemented under the hood. The obsession with overhauling the game engine to make sure everything could be simulated instead of being faked has only served to delay the game.
     
    mathiasj and Kiwasi like this.
  35. Pagi

    Pagi

    Joined:
    Dec 18, 2015
    Posts:
    132
    I think so too, they have to do some kind of LOD because of performance anyway, so why not fake it and smoothly transition when closer. 64bit sure is a big leap, but it doesn't solve anything, only moves the problem few years away. These things need a smart solution, sure there will be space simulator in ten years demanding 128bit math to show all the visible universe at once.
     
  36. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,614
    Well, no, his question still stands. When rendering the space station in orbit viewed from the ground you do not need the same level of precision as you would need to render it on a docking approach. I bet that even in that video they're not rendering the space station at the same fidelity in both scenarios, because even if you can it's a massive waste of resources (this is why LODing is a thing even in games that are easily covered by normal float precision).

    He's not saying that you never have to work with objects far away. He's saying that when you do, you can usually get away with doing it at a lower fidelity where reduced precision isn't a big issue, and/or that you might want to have different simulations for near and far things anyway.
     
    Kiwasi likes this.
  37. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    I'm still trying to figure out the formula that give the texel ratio of a quad of a given size at a certain camera depth. By that I mean I need to allocate time, but someone have already that I'll take it :D
     
  38. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I make a habit of not watching videos in the OP. Its a quirk of mine. ;)

    But just for you I watched the first minute and the space station section called out in the OP.

    The video basically demonstrates my point. There are LOD pops all over the show. Just watch what the trees are doing in the first minute of the video. And the terrain is moving so fast below the player that there is zero point in rendering it at full resolution. Finally the space station is also in such low detail that there is no point actually rendering a mesh for it.

    Basically it can all be done using a 64-bit precision transform system, with the rendering and the physics kept at 32-bit precision.

    Yes, there would be some cool stuff you could do with this if it was built into the engine. There is some cool stuff that has been done by people already working inside existing engines. But none of this calls for a physics engine or graphics card with 64-bit precision.
     
    Ryiah likes this.
  39. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Yeah 64 bit transforms are what we need. The most important thing by far is to be able to fly around in the same 'sector' without having to shift the whole universe. A 10k radius can be crossed in no time, and even before that (5k or so) jitter becomes noticeable if you're paying attention.
     
    Kiwasi likes this.
  40. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    One of the things to consider here is scale. If your player is regularly moving around quickly enough to pass over several km in a matter of seconds, then it might make sense to rescale everything in your world.
     
  41. AndreasU

    AndreasU

    Joined:
    Apr 23, 2015
    Posts:
    98
    Has it really been so long? Have people forgotten the NMS ads/presentation videos?

    Nobody doubts that you can make cool stuff as a cut scene or scripted. We've seen it. We've seen better.

    As i see it, what was actually shown outside of the cutscenes is an 8x8km region (CryEngine standard) of a bit of (slow) flying, walking and driving around. The zoom in and out, planet wise, i would regard as cutscenes. The final cutscene you can even watch twice if you watch the end of the video.
    There is nothing indicating that this isnt a skybox.
     
    Kiwasi likes this.
  42. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    But this is different!!!

    This time the hype is going to get even bigger. That way when the game comes out as nothing like what the internet expects, we can start being mean to the devs about it. Then everybody can complain about lies and go get steam refunds.

    This can't happen unless people hype the game up with ridiculous promises first.
     
  43. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,943
    It is different. The developers are actually being transparent. They've released screenshots and videos showcasing the game as they've developed it. Some of it is not making it into the game and they've actually labeled it as such. Contrast this to Hello Games which showed the same old content over and over again and almost none of it actually reached the final game.

    It may help that they're not being funded by Sony but by the community interested in the game, but I also chalk it up to them not being a team of inexperienced indie developers with only relatively simple games released prior to this project.

    They may still not meet expectations but these days I go into a video game with little to no expectations. If they can create a game that lasts me a few dozen hours at least I'll be happy.
     
    Rodolfo-Rubens and Kiwasi like this.
  44. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    Also you can play star citizen RIGHT NOW, it's progressive updating.

    Regarding technicalities about 64bit, this is a discussion that is already had happen so let's invoke hard hitting facts :D :
    https://forum.unity3d.com/threads/h...of-star-citizen-in-unity.434303/#post-2809325
    BTW I think no man sky is 32bits, they have floating point error at "very early" stage when trying to leave the small pocket where you have all the planet.
     
  45. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    But that doesn't solve anything really does it - if you scale down, the errors scale up by comparison, what used to be a tiny error of position now becomes a large one. So while it means that you could move less 'real' distance the effect of the errors would become noticeable at a smaller distance from the origin.

    Shifting the origin seems to be the only way, but it seems to be a hell of a lot of work just to be able to cover 10km distance without everything shaking around.
     
    angrypenguin likes this.
  46. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Yes. If using a 64-bit transform with a 32-bit renderer and physics API you would need a system to keep the relevant things in 32-bit space. Origin shifting is one way to do this. But you could also have multiple origins.

    If you want to keep your entire universe loaded in 32 or 64 bit space you are going to run out of system resources long before precision is a problem.

    My point on scale was that if your character is moving at a normal human speed you've got about an hour to move the origin, reload assets, and do anything else you need to do. If your character is moving at speeds of 10km a second, they don't actually get to see that much of the scenery, so you might as well scale it down to suit.
     
  47. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    Ha, good find here. I knew there would be something like that.

    The issue here is that AFAIK Bullet is not very good compared to physx.
     
  48. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    That's the problem I had with the video. I see an amazing work done by artists.... but not much of a gameplay/procedural gneeration.

    If they crashed that spaceship, and THEN nomads built a base out of it in unscripted fashion, now that would've been cool.
     
    Kiwasi likes this.
  49. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    I'm not sure I understand your point.

    Let's put it this way. I want to cross 12km of space in the 'game reality', starting at the origin.

    If I have everything at a normal scale, jitter becomes a big problem at 10km or so.

    If I halve the scale of everything in the game, I only actually go 6km (so far so good), but the jitter effect doubles (effectively becoming a problem at 5km instead of 10km) which cancels it out.

    The problem is that in a space game it's not a case of everything flashing by really fast right next to you - the fore/mid/background object types and distances are not the same as an fps game. So just because you're going fast doesn't mean that the scenery will be a blur.

    As to keeping the whole universe loaded, well it depends what 'loaded' means - a good LOD system (even down to using sprites at far distances like a lot of games do) can take care of that. The issue is that you have to be able to move to a very distant object seamlessly and fast, while preserving the ability to move to much, much closer objects with the same quality of experience.
     
  50. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    I think it is a good idea to differentiate between 32/64 bits and single/double precision.

    32/64 bits is matter of available memory space.
    Single/double precision is numeric limits.

    8bit or 16bit cpu can use double precision math with the right library.


    I think the idea might be about reducing rendering precision based on player speed.

    Meaning if you go faster, geometry that is being fed up into GPU "shrinks", and unit size goes up along with your speed. Or going faster disables lods that are close to you.

    I'm fairly sure that clip planes aside, you can render the moon at real scale and real distance (from earth) using single precision. when you're standing at origin. Problems happen when you move too far away from origin. Not when some object is too far away from it.
     
    Last edited: Oct 14, 2016
    roojerry and Kiwasi like this.