Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Sun rotation

Discussion in 'General' started by Seth82, Mar 18, 2016.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Seth82 Trainee Engineer

    Messages:
    12
    I love space engineers, but I've always wondered to myself why the decision to have the sun rotate around the planet and not have the planet rotate around the sun?

    This is not a complaint nor a trolling attempt, just a curious guy wondering why the programmers made this decision.
     
    • Like Like x 1
  2. frannic Apprentice Engineer

    Messages:
    316
    The other way would be to rotate all ships and planet around.
    So if every block and voxel would have to move in the world, your computer would explode or shit itself.:)
     
    • Agree Agree x 4
  3. Seth82 Trainee Engineer

    Messages:
    12
    Nice point. But I don't think it would make a difference would it? I'm not sure but to me I see no difference.
     
  4. PurrfectBlinky Trainee Engineer

    Messages:
    26
    Calculations of a light source and baking information is less intense on you cpu and gpu then when physics of astral bodies have to be calculated and moved around a single light source which then also would be given a physical point in space. Think of it as moving a lamp around your house or rebuilding your house around a lamp that stays in the same position... now tell me, what would be more effort? ;)
     
    • Funny Funny x 4
    • Agree Agree x 3
  5. Hotshot Jimmy Senior Engineer

    Messages:
    1,500
    Big difference, Blinkys analogy is it. A game built on physics and those calculations having objects moving would be cpu intensive. Easier to move something that has no form.
     
    • Agree Agree x 2
  6. kcjunkbox Senior Engineer

    Messages:
    1,131
    Also, and this mistake is made a lot for some reason. The opposite of rotating the sun around the planet is not rotating the planet around the sun, it is rotating the planet on it's own axis. rotating the planet around the sun would result in a yearly cycle not a daily cycle like rotating the planet on its own axis and of course the cheat we use now which is to just rotate the sun around the planet for easy math.

    Planet orbiting sun = yearly cycle
    Planet spining around itself = daily cycle
    Sun orbiting planet = daily cycle (the cheater way, not ideal, but it works...kinda)
     
    • Agree Agree x 3
  7. FlakMagnet Senior Engineer

    Messages:
    1,551
    If you imagine the things that actually move in the world ... whih is basically NONE of it other than the ships.
    The 'sun' is not a physical object, so you don;t have to atually move it. It;s a light soure and a picture.

    To make the sun revolve around the world you just move the picture and work out the shadows. Every object in the game is static ( aside from the ships ) and it's position only has to be added to a file just once when it is spawned.

    Now to make the planets/asteroids/ships/stations revolve around the sun.... you have to continually calculate, render and recalulate in order to move every object in the game around the sun. Even the ones that are not visible have to have their positions constantly calculated as things move around in an infinite volume of space ( as you can have infinite asteroid fields ). Consider then, ho much data is required to record a planet, an asteroid, and every thing in the universe.

    Would be lovely to have actual planets in orbit around a star, with proper orbital relationships and moons orbiting the planets too ... but this multiplies the calculations, and CPU burden, to the point that current tech isn't able to deal with it. What Keen have done is to apply a low cost effect that givs day/night with minimal stress. It's not real, an it's not 'right' but it gives a feel of day/night and that's all it needs to do for the game.
     
    • Agree Agree x 1
  8. OrfanKrippler Apprentice Engineer

    Messages:
    145
    From a rendering perspective, I don't think anything would change. The same things would still be rendered, regardless of whether they're moving or not. As for rotation and revolution, I think the overhead could be mitigated by reverting to local vector coordinates for each object, and then treating each "macro" object as just one point mass. I don't imagine it would be hard if done properly, and would add dimension.

    I get what you're saying about the game, though, and it gets the job done.
     
  9. kcjunkbox Senior Engineer

    Messages:
    1,131
    Do you really think it's that easy? I wish/hope you are right cause I like realism and the rotating sun works on planets but once your out in space, it's stupid. If it is so easy, why all this talk about how difficult it is? I think of little things like how ships interact at speed and how buggy they are, I can't imagine a whole planet moving and having ships moving around independent of that motion in their own vectors and having it all just not explode.
     
  10. OrfanKrippler Apprentice Engineer

    Messages:
    145
    To be honest, I don't know. It depends on how it's handled, and the inner workings of the engine. If it's based on a complete grid, with independent voxels, than it'll probably melt the cpu. Using a vector-based approach from the center-of-mass of an object, then no matter how big it is, it's just a matter of calculating movement based on the COM, in theory of course. Rendering shouldn't be affected, as it renders a number of frames anyway that are constantly changing, due to the player's movements. I don't think moving objects would affect that.

    Full disclosure: I'm an armchair game developer, so take what I say with a grain of salt. From what I've done, though, where there's a will, there's a way
     
  11. The Q Apprentice Engineer

    Messages:
    247
    [QU]Do you really think it's that easy? I wish/hope you are right.[/QUOTE]

    [/QUOTE]
    Moving voxels is geneally a VERY bad idea... VERY VERY VEEERY bad idea. not to code but to do, your pc would look like the atom bom tests... (no joke if keen moved an planet in any way with physics you would get an instatn blue screen and thounsads over thounsands of ram/cpu/gpu errors
     
    • Funny Funny x 1
  12. OrfanKrippler Apprentice Engineer

    Messages:
    145
    Too bad, it would hold such promise if it were possible. Whatever happened to dynamic meshes?
     
  13. zDeveloper10 Junior Engineer

    Messages:
    742
    this is something I've had many people be confused about when trying to describe it to them irl or on other channels.
    I think a lot of people don't get what it takes to simulate so many small objects moving even for just a large ship, much less a 20+km wide planet. the lighting would need to be recalculated on every body as it turns. there's probably some fancy LOD tricks that could be used though those come with sacrifices(game slows down a lot when getting within a certain distance as the object becomes "real") and doesn't help servers so much for similar reasons. there probably will be improvements later but for now it was easier just to have a light sliding along the outside of the world code wise. (a "simple" concept isn't always simple to write)
     
  14. kcjunkbox Senior Engineer

    Messages:
    1,131
    So how does elite dangerous have entire moving galaxy and solar systems with planets and moons? Is it because those are static objects not voxels that aren't volumetric?
     
    • Agree Agree x 1
  15. OrfanKrippler Apprentice Engineer

    Messages:
    145
    With a rotating skybox, doesn't the lighting need to be recalculated anyway?
     
  16. OrfanKrippler Apprentice Engineer

    Messages:
    145
    That would be my guess, none of the terrain is destructible? I haven't played the game to know.
     
  17. Hotshot Jimmy Senior Engineer

    Messages:
    1,500
    Want to boggle the mind people? We (as in the Milky Way galaxy) are currently travelling at around 1.2 MILLION miles an hour towards the constellation of Leo (iirc).
     
    • Agree Agree x 1
    • Informative Informative x 1
  18. kcjunkbox Senior Engineer

    Messages:
    1,131
    God must have a really fast computer cause I don't notice any lag at all, must be a working quantum computer
     
    • Funny Funny x 5
    • Like Like x 1
  19. Hotshot Jimmy Senior Engineer

    Messages:
    1,500
    They say the big bang explosion may have been god trying out a rotor but it's only a theory...
     
    • Funny Funny x 6
  20. Light_gemini Junior Engineer

    Messages:
    671
    Because each planet and roid is a single entity with a defined 3d model. Moving those around is easy.

    Each roid or ship in SE can be made by several thousands of entities (blocks)with its own 3d model each. Moving those around is demanding. Now a planet or moon how many entities may have? Tens of thousands? No other game including Space Sandbox can keep moving that many around and dont experience a core meltdown. Can you imagine Elite Dangerous moving tens of thousands of planets or roids around the sun? Its impossible.

    That doesnt mean SE cant have moving planets. There can be some cheats or tricks, like converting the planet into a single entity or whatever. It would require lots of work for sure and likely rewrite parts of the engine.
    Maybe for a future SE2 they may prepare the engine better to handle all this.
     
    • Agree Agree x 3
  21. Mix-martes86 Senior Engineer

    Messages:
    1,110
    For those of us not quite into miles and all the imperial units:

    Earth rotates on its axis at 1,600 km/h, that'd be 444.444444 m/s in SE.
    Earth rotates around the sun at 107,000 km/h, that'd be 29,722.2222 m/s in SE.
    Our system rotates around the galaxy at 792,000 km/h, that'd be 220,000 m/s in SE.
    What Jimmy said is about 2,000,000 km/h, that'd be 555,555.556 m/s in SE.
    Light travels at 1,090,000,000 km/h, that'd be 302,777,778 m/s in SE.

    Source: https://astrosociety.org/edu/publications/tnl/71/howfast.html

    [​IMG]
     
    • Informative Informative x 2
    • Agree Agree x 1
  22. kcjunkbox Senior Engineer

    Messages:
    1,131
    I really hope they make an SE2 because I have a bad feeling that SE will not become all it could be and that saddens me. This is the coolest game I have ever played but really it's just a shadow of what it could be and hearing some of the things they say on the live stream and the roadmap makes me wonder if they have a clue how good this game could be.
     
    • Agree Agree x 3
  23. Hotshot Jimmy Senior Engineer

    Messages:
    1,500
    They do otherwise it would have been abandoned donkeys ago. Enjoy it for what it is and when you know how to change volumetric objects into single entities that can be positioned with less than half the calculations currently necessary then give them a call and let them know :tu:
     
  24. Seth82 Trainee Engineer

    Messages:
    12
    I'm not sure if it's possible or not but couldn't they make it so yes you see the planets orbit around the sun but not load anything on the planets until you get a certain distance from them? maybe make the planets detail from a distance just an image but as you get closer to that planet the details improve and as you actually get close enough to see anything of value have the whole planet load in?

    From what I'm understanding right now is that everything in game loads at once, is that correct? or just partially?

    I have tried my hand at coding once before but i couldn't understand it fully, but wouldn't it work to have voxels load as you go near them or is that what would chew up cpu/gpu? obviously it would, but would it really be that bad?
     
  25. Light_gemini Junior Engineer

    Messages:
    671
    Then you have MP. What if theres people down that planet? And soon or later when you try to land it has to go back to real voxels, wich are moving and then the meltdown begins. In a simple case of just you standing still in a planet, you may pull it off by having the inmediate surrounding be voxels and the rest be still a simple 3d model (if you pull out the transition right). But what if a ship crashes the other side of the planet, or some one digs a tunnel far in the distance? It can soon become a CTD.

    I dont know how exactly they handle grids in the engine but it may be that its impossible to avoid having all the data of all blocks from updating and being tracked. If thats so then you cant move a planet without having to update massive amounts of data. You will either run out of ram or melt the cpu. They should need to redo how grids work from the ground up.

    Or they may find a workaround in the future, but I dont think they are willing to invest on the time it may take.
     
    • Agree Agree x 1
  26. Hotshot Jimmy Senior Engineer

    Messages:
    1,500
    This is the thing people forget, every little deviation needs to be thought of. If player A does this how will it affect player B. Now do the same again but player Bs somewhere else travelling at speed etc etc etc. Its just too much for the game engine to handle. Iteration upon iteration etc. We can suggest something ye BUT Havok has its limits :(

    Edit: just realised this was the issue they had with ladders when they were chatting about it in a stream.
     
  27. kcjunkbox Senior Engineer

    Messages:
    1,131
    Are there issues with Digi's ladders?
     
  28. Hotshot Jimmy Senior Engineer

    Messages:
    1,500
    Not sure I haven't used that mod.
     
  29. LFCavalcanti Senior Engineer

    Messages:
    1,378
    I skipped the other posts, so sorry if someone already said what I'm about to say...

    I was one against the current sun rotation, but their explanation was enough. The only way to make it "realistic" to us was to make the planet rotate, something that would require a whole new level of gravity, acceleration, physics calculations in general.
     
    • Late Late x 1
  30. kcjunkbox Senior Engineer

    Messages:
    1,131
    I've used it and its amazing and have had no problems with it. It feels like a professional feature and completely fits into the game. I was curious if anyone else has had a problem with it.
     
Thread Status:
This last post in this thread was made more than 31 days old.