Code Monkey home page Code Monkey logo

solar-system's Introduction

solar-system's People

Contributors

seblague avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solar-system's Issues

How do i play it?

I'm new to GitHub, and i don't know how to play this (if i even can).

How to randomise shape/shading at runtime?

Even if the seed and everything changes, the planet doesn't change while playing. When the game stops the changes are applied. Is there any way to change such settings at runtime?

I need this for my project. Generally a way to instantiate randomised planets. The only way I could think of doing that is spawning one in then randomising the seeds? Thanks.

How to sync system gravity for multiplayer ?

Awesome project :)
But i feel alone in this universe...
I'd like to make it multiplayer. (Colyseus.io or Mirror, I tried both)

The server (one of the player) update nBodySimulation and send bodies transform relative to endlessManager to clients.
The client receive bodies position and apply them to gameObject relative to endlessManager.

In spaceship in space, everything works fine.
When trying to land, the ship don't stick to the planet, nor the player.

Any ideas?

Compute URP

Will there be a version of the shaders that work with the URP?
or does any1 want to help?
I've already stated to covert the shaders over to HLSL but I haven't got them to work yet.

Unity Forum

LOD index/mesh not changing with SetLOD()

It stays on the highest resolution. I think I understand how the code generally works for this, selecting an LOD mesh from an array with LOD meshes.

Below, you can see that 3 meshes are in fact generated and put into the array:

image

SetLOD() with index 0, 1, or 2, appears to refresh the mesh in game as it disappears for a very brief moment but it's still at the highest resolution, which is LOD index 0.

The active LOD never changes. I did try to change the SetLOD() function a bit so that it is FORCED to change the active LOD but still seems like it doesn't change:

image

The SetLOD() function to show that I have it in its normal state now:

image

If anyone can help it would be appreciated because I need to lower LODs with distance for optimisation reasons. If any more info is required let me know. Thanks.

hi i cant seem to run it in unity

so im very dumb when it comes to stuff like this. I downloaded the project files and opened it with unity but all i get is a blank unity project, could someone give me a step by step on how to open this in unity correctly? Im very new to unity and github.

cant see the space ship

i downloaded the projetc and ran it in unity. everything works. but I cannot see the space ship. it is invisible. How do I fix this ?

Easier way to use editor

Greetings!
I have a project where I want to add prefabs to the planets. However, I have encountered a small hurdle... I cant see the terrain in the editor witch makes the process of placing 3D models on the planet much harder. Could I make it possible to add the terrain to the editor.
Btw, I dont randomize the shape/shading every start.

Mesh Filter of Terrain Mesh is not set in Play Mode

Hello together!
I know, Issue#38 is pretty similar to my request, however I was not satisfied with the answer there.
I tried to debug the problem, however I was not able to find the correct solution for myself.

In Edit Mode, I can generate different planets and I can edit them in terms of shape and shading (Picture 1). Sadly, if i press Play Mode, the terrain filter is not set in the inspector(picture 2). However, if i mark the terrain mesh within the inspector the shape of the terrain is drawn(picture 3). This means, that there is a terrain shape but the shading does not work correctly, right?

I tried to fix this but I did not get it right.
Additionally, I am curious how to save a planet if i am satisfied with it?

I hope someone can help me :)

EditMode
PlayMode_Unselected
PlayMode_Selected

How to view orbit paths in game view

Basically title, I tried removing the if(!application.running):drawOrbits() line in the Orbit Debug Display script and also tried adding in linerenderer.useworldspace = true;, but neither had any effect.

Everything keeps shaking!

When I am inside the ship it runs as normal but when I get out everything starts shaking everywhere. If anybody has a way to fix this then that would be greatly appreciated! Thanks!

Planets only render water in WebGL build

Hello, I am having an issue testing in WebGL. It Builds successfully, but then when running in the browser the terrain is not visible only the water. I think it may be related to the compute shaders not compiling, however there is no errors in unity indicating that.

Unity version 2019.4.1f1

repeated errors from webgl build in the browser console:
IndexOutOfRangeException: Invalid kernelIndex (0) passed, must be non-negative less than 0.
Kernel index (0) out of range

Thanks

Atmosphere disappears when I change the scene

When I change the scene or reload the current one (using SceneManager.LoadScene) it seems that the PlanetEffect postprocessing effect no longer works (all the image is black except unlit shaders), and I get the error :

MissingReferenceException: The object of type 'CelestialBodyGenerator' has been destroyed but you are still trying to access it.

and the warning :

OnRenderImage() possibly didn't write anything to the destination texture!

Does anyone know where this is coming from?

concave MeshColliders are not supported

I'm getting this message in the console:

Triggers on concave MeshColliders are not supported
UnityEngine.Collider:set_isTrigger(Boolean)
CelestialBodyGenerator:HandleGameModeGeneration() (at Assets/Solar-System-Episode_02/Assets/Celestial Body/Scripts/CelestialBodyGenerator.cs:90)
CelestialBodyGenerator:Start() (at Assets/Solar-System-Episode_02/Assets/Celestial Body/Scripts/CelestialBodyGenerator.cs:42)

It does work, nonetheless, for what I'm using it for, but I assume something could/should be done about this issue. I'm just not that well versed in Unity (yet?) to figure it out.

How to use a layermask for the atmosphere and ocean shader/post processing?

Not so much an issue but since this is the closest thing to a forum about this here I am again.

With the way the shader works right now even disabling a celestial body or making it invisible to a specific camera doesn't remove the ocean and atmosphere. Is there a simple way to implement a layermask for which atmospheres/oceans a post processing effect can render (which would be different per camera)? Thanks.

No scene when first load

Got the same Unity version and Blender and still won't work. is it due to the Untitled scene?
I'm new to this and want to learn and was going to help advance my learning by looking at the vales in this and mess around to see how they work.

Exiting space ship while flying

aside from rotation it can be very buggy with the collisions when you exit the space ship while flying especially while far away from the origin.

MissingReference of type CelestialBodyGenerator when changin scene

Hello everyone, I've been struggling for few days with a null ref when I want to reload or change scene.
image
image
image
I feel like the script keeps running when I change scenes. I tried to destroy and re instantiate or disable and enable my script for my planet and my camera but still the same error.

The error seems to come from the PlanetEffects.cs because when I remove it, the error disappears but I have no more ocean or atmosphere.
I also noticed that in runtime, when I refresh PlanetsEffect (line break and save) the error disappears and everything works again.
I'm pretty new to gamedev and I'm sure I'm missing a concept or something.
If anyone can enlighten me that would be great!
I hope I was clear in my explanation.

in advance, thank you

Getting this strange error when trying to use this in a new Project

IndexOutOfRangeException: Invalid kernelIndex (0) passed, must be non-negative less than 1.
ComputeHelper.GetThreadGroupSizes (UnityEngine.ComputeShader compute, System.Int32 kernelIndex) (at Assets/Scripts/Script Utilities/ComputeHelper.cs:104)
ComputeHelper.Run (UnityEngine.ComputeShader cs, System.Int32 numIterationsX, System.Int32 numIterationsY, System.Int32 numIterationsZ, System.Int32 kernelIndex) (at Assets/Scripts/Script Utilities/ComputeHelper.cs:16)
AtmosphereSettings.PrecomputeOutScattering () (at Assets/Scripts/Celestial/Effects/AtmosphereSettings.cs:91)
AtmosphereSettings.SetProperties (UnityEngine.Material material, System.Single bodyRadius) (at Assets/Scripts/Celestial/Effects/AtmosphereSettings.cs:75)
AtmosphereEffect.UpdateSettings (CelestialBodyGenerator generator) (at Assets/Scripts/Celestial/Effects/AtmosphereEffect.cs:23)
PlanetEffects.GetMaterials () (at Assets/Scripts/Post Processing/Planet Effects/PlanetEffects.cs:79)
PlanetEffects.Render (UnityEngine.RenderTexture source, UnityEngine.RenderTexture destination) (at Assets/Scripts/Post Processing/Planet Effects/PlanetEffects.cs:24)
CustomPostProcessing.OnRenderImage (UnityEngine.RenderTexture intialSource, UnityEngine.RenderTexture finalDestination) (at Assets/Scripts/Game/CustomPostProcessing.cs:48)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

wont start in unity

i try to launch the project and i have to update the files but now its stuck on resolving packages
unity resolving packages

Mesh disappears when you press play

Hi, when I hit play the mesh for the TerainMesh program just disappears, but in the editing mode(When play hasn't been hit) everything looks great. Most of the time in play mode it doesn't display anything. If anyone has an idea please let me know how to fix this, I have tried a lot of things, but I'm new to game development and not too familiar with coding... especially to c#
Screenshot 2022-01-02 224802
Screenshot 2022-01-02 224828
.

Rotation via mouse when walking causes violent shaking

I must say i absolutely love this project!
But unfortunately every time i get off the spaceship onto the surface of a planet, the character controller starts spasming violently every time i rotate the player via moving the mouse. If anyone has found an easy way to fix this issue id love to hear it or hopefully someone can at-least help me brainstorm why this problem happens.

Thanks!

How to recreate the solar system

im aware there is a scene for the solar system that was used for the videos but i was wondering if i could make my own (if possible)
Thanks in advance!

Seperate Code

Is there a shortcut/repo to just use the gravitational part of the code and explore it on my own. Like there a way to get the code from the 1st part of the video where he explores gravity by itself.

How to use celestial body generator?

I keep getting this error whenever I update any values in the generator or click one of the generate options:

IndexOutOfRangeException: Invalid kernelIndex (0) passed, must be non-negative less than 1. ComputeHelper.GetThreadGroupSizes (UnityEngine.ComputeShader compute, System.Int32 kernelIndex) (at Assets/Script Utilities/ComputeHelper.cs:109) ComputeHelper.Run (UnityEngine.ComputeShader cs, System.Int32 numIterationsX, System.Int32 numIterationsY, System.Int32 numIterationsZ, System.Int32 kernelIndex) (at Assets/Script Utilities/ComputeHelper.cs:15) CelestialBodyShading.GenerateShadingData (UnityEngine.ComputeBuffer vertexBuffer) (at Assets/Celestial Body/Scripts/Shading/CelestialBodyShading.cs:45) CelestialBodyGenerator.GenerateTerrainMesh (UnityEngine.Mesh& mesh, System.Int32 resolution) (at Assets/Celestial Body/Scripts/CelestialBodyGenerator.cs:240) CelestialBodyGenerator.HandleEditModeGeneration () (at Assets/Celestial Body/Scripts/CelestialBodyGenerator.cs:115) CelestialBodyGenerator.Update () (at Assets/Celestial Body/Scripts/CelestialBodyGenerator.cs:48)

I just attached the script to the Mesh Holder under Constant Companion, then selected Constant Companion at the body.

What is the correct way to use it?
also, is there anyway to resize the planets/moons

Some ideas on your next Solar System project/update

Hi, I came across your YouTube video "Coding Adventure: Solar System" which was recommended to me when watching the KSP video pertaining to floating origin issues when doing vast space projects ( https://www.youtube.com/watch?v=mXTxQko-JH0 )

As someone who uses 3ds max, Unreal Engine and C++ rather than Blender, Unity and C#, I still found your video incredibly neat and very informative while presented simply and in an approachable and entertaining manner... thanks for putting out great video content like this and especially when including the source on github so anyone can just jump right in... I wish I had access to free resources like this when I was a kid...

I know you mentioned potentially making a second or multi-part addition to the Solar System project/video, and I watched a couple other of your more recent videos including the excellent Portal one, and have a few thoughts /suggestions to brainstorm and throw out there in case you may wish to try a few of them in your subsequent vids in case you haven't already had those ideas on your todo list:

  1. There is open source unity project on github that incorporates relativistic effects that would be awesome if you could adopt to your solar system project. They released a standalone demo/game called "A Slower Speed of Light" but it was more of a 2D walking game and not a 3D spaceship game... If this was adopted to your solar system game it would be much cooler, and maybe you could even make it interstellar and the "stars" in the background other procedural based suns of other solar systems one day!

http://gamelab.mit.edu/games/a-slower-speed-of-light/

  1. You had mentioned maybe generating textures and even doing procedural planet/terrain generation on the planets in the solar system(s) at a later update, I think you could add a "spin"/rotation element to the planets to give the sense of "time" passing. So whenever the user in the spaceship accelerates close enough to "c" (the speed of light in the game obviously would be set to something much much slower etc) from the astronaught's point of view inside the spaceship the outside world would be passing quickly and the planets rotating frantically.. but if there was a way for the gamer to "save"/"record" his mission path and then reply it by having the spaceship essentially retrace exact steps from the saved flight logs with the user stationary back on the ground of home planet then from the user point of view (assuming he has a telescope or ability to zoom in etc) he'd see the spaceship appearing to slow down more and more and get distorted as well to be flatter and flatter etc... after all the speed of light inside the game would be the speed of causality of the game itself! You can also make the "universe" keep expanding slowly over time, so that if a user keeps accelerating closer and closer to "c" in his spaceship nonstop in straight-line eventually after a few minutes he ends up in a completely dark/blank/black universe basically like this: https://www.youtube.com/watch?v=b_TkFhj9mgk

As far as I know, there is currently no space-based simulation, game, etc that does relativistic effects in addition to N-body Newtonian stuff, indeed not Space Engine, not Outerra, not Universe Sandbox(1&2), not KSP, not OrbiterSim, nothing that I know of at all!

  1. Would be awesome if you could add some wormholes too, as I imagine your portal project would come in handy with such an implementation! Transports to furthest reaches of the universe without needing to cross the light speed limit!

Atmosphere settings not updating when changing the celestial body settings of a planet.

Atmosphere settings don't update when switching, for example, from Cyclops settings to Humble Abode settings.

I can still see the purple cyclops atmosphere. A way I found to fix this is changing any setting in the atmosphere settings (from wavelengths to simply the unticking and ticking the enabled bool in the inspector) however this doesn't work when done through script for whatever reason. Turning object off and on or unassigning and reassigning the atmosphere settings through script doesn't fix it even though I can see the change in the inspector.

How to force the shaders to use the updated settings?

Ocean disappears when moving far away.

Reproduce by loading into the solar system and flying away, towards the sun. Look at humble abode and the ocean fades away. How can I increase the range the oceans render at?

Gravity wont work on game build

I tried to make a build of it but there was no gravity. I couldn't land on any planets and the planets ended up floating off into space.
Also how can I edit the orbits of the planets like how it was done in the video?

Sometimes unable to move in specific direction on a planet

Some times, when outside the ship, walking around, and jetpacking in the air, it seems I am pulled to a certain direction. If I stop myself completely I then accelerate to this direction. It doesn't seem to be caused by another celestial body like a moon.

Even stopping the planet orbits doesn't seem to fix this issue, which was what I thought was causing it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.