Forum Replies Created
-
AuthorPosts
-
Chessking
ParticipantThe data that is gathered by the main camera and is then drawn on the screen. All of my searches have come up empty. The only thing I have found is creating a new canvas, which can be applied to the camera. But this would cover up objects in the game, I think. The purpose of this is to eliminate the giant blurry pixels caused by putting an image in the game world in front of the camera.
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantSo, regarding skyboxes. Remember what I said about raycasting each pixel, and if nothing collides running the background algorithm? I think we can do that. All we have to do is access the raw screen data in a script placed on the camera, before anything else is drawn. Run the x and y variables through the algorithm, making adjustments for the x y and z rotations as well as the Field of View. What I need help with is accessing the camera data.
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantSo, regarding skyboxes. Remember what I said about raycasting each pixel, and if nothing collides running the background algorithm? I think we can do that. All we have to do is access the raw screen data in a script placed on the camera, before anything else is drawn. Run the x and y variables through the algorithm, making adjustments for the x y and z rotations as well as the Field of View. What I need help with is accessing the camera data.
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantI have finally finished working the bugs out of the autopilot approach script. Here is a video of a bunch of ships following each other around. It feels good to see it working so well.
[video]https://www.youtube.com/watch?v=HoCJkq9P6AQ[/video]
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantI have finally finished working the bugs out of the autopilot approach script. Here is a video of a bunch of ships following each other around. It feels good to see it working so well.
[video]https://www.youtube.com/watch?v=HoCJkq9P6AQ[/video]
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantI have come as close as I can to a solution. I positioned a plane in front of the camera at its far clipping plane. I have not found a way to ensure the plane fills the view perfectly, since the FOV and screen resolution are both taken into account. So I have the plane set to be larger than the view. I then generate a texture for the plane. There are two problems:
The program runs fairly slow.
The texture does not look like stars. I cannot get the gray pixels to draw correctly, and they look like they are white. I have tried several color modes.
I have attached the most recent version of the script.
Attachments:
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantI have come as close as I can to a solution. I positioned a plane in front of the camera at its far clipping plane. I have not found a way to ensure the plane fills the view perfectly, since the FOV and screen resolution are both taken into account. So I have the plane set to be larger than the view. I then generate a texture for the plane. There are two problems:
The program runs fairly slow.
The texture does not look like stars. I cannot get the gray pixels to draw correctly, and they look like they are white. I have tried several color modes.
I have attached the most recent version of the script.
Attachments:
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantHmmm. I turns out the scripts are JS not C#. I suspect line 21 may be responsible for the blurry texture. With the width and height variables higher (they can be changed in the Unity editor as well) the game runs slowly. It would probably run faster in C#, but I am not sure. I am working on finding the problem in the algorithm responsible for the amount of white in the texture.
Edit: Perhaps we could use Skype, but not now.
Attachments:
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantHmmm. I turns out the scripts are JS not C#. I suspect line 21 may be responsible for the blurry texture. With the width and height variables higher (they can be changed in the Unity editor as well) the game runs slowly. It would probably run faster in C#, but I am not sure. I am working on finding the problem in the algorithm responsible for the amount of white in the texture.
Edit: Perhaps we could use Skype, but not now.
Attachments:
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantI have customized the algorithm used to generate the texture in the fractal texture generating program, and haven’t perfected it yet. Everything is black and white, and does not yet resemble stars, but the pattern is obviously from my algorithm. I tried increasing the texture quality of the sphere, and… crashed Unity. I am just too much for it to handle, I guess. Or maybe I am just that bad of a C# scripter. Being as this is my first day scripting in C#, I don’t think I am doing that bad.
Here is a screenshot of the sphere from the outside without normals inverted.
And now I crashed my computer by exiting Space Engine. :dry:
Anyways, it is nearly midnight where I live. Perhaps I should get some sleep. :huh:
Attachments:
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantI have customized the algorithm used to generate the texture in the fractal texture generating program, and haven’t perfected it yet. Everything is black and white, and does not yet resemble stars, but the pattern is obviously from my algorithm. I tried increasing the texture quality of the sphere, and… crashed Unity. I am just too much for it to handle, I guess. Or maybe I am just that bad of a C# scripter. Being as this is my first day scripting in C#, I don’t think I am doing that bad.
Here is a screenshot of the sphere from the outside without normals inverted.
And now I crashed my computer by exiting Space Engine. :dry:
Anyways, it is nearly midnight where I live. Perhaps I should get some sleep. :huh:
Attachments:
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantThanks for spelling out how to make a sky-sphere. It has been a long time since I used Blender, and its design is not exactly self-explanatory. Now that I have figured out how to go into edit-mode, things should be a bit easier.
What I need to know now is how to make the UV map.
My rapid discovery of these things is due to a couple hours spend googling. B) As a result I have twenty tabs open right now… Most of them are sky-sphere related.
Edit: hey, look what I found: Epic Findings
Edit2: I have this new method working in Unity now. However, if the script is being run each frame, it would be more efficient to use a permanently modified mesh/UV. On the other hand, this is what I need to try to adapt the procedural code to the sphere.
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantThanks for spelling out how to make a sky-sphere. It has been a long time since I used Blender, and its design is not exactly self-explanatory. Now that I have figured out how to go into edit-mode, things should be a bit easier.
What I need to know now is how to make the UV map.
My rapid discovery of these things is due to a couple hours spend googling. B) As a result I have twenty tabs open right now… Most of them are sky-sphere related.
Edit: hey, look what I found: Epic Findings
Edit2: I have this new method working in Unity now. However, if the script is being run each frame, it would be more efficient to use a permanently modified mesh/UV. On the other hand, this is what I need to try to adapt the procedural code to the sphere.
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantRegarding the galactic center: Thanks for pointing that out. That would definitely add to the scene. I will plan on adding that when I have both figured out how and have completed more important parts of the generator.
Regarding generated stars: Here’s how I would do it in my own engine. I would send out a raycast for every pixel on the screen If it doesn’t collide with any objects after a certain distance, input the coordinates into a 3-dimensional algorithm generating the background and stars. This way, the higher the zoom (and therefore the lower the FOV) the more detail will be generated, without any extra. Perhaps I can pull up some useful information regarding procedural generation within Unity.
Here is a free sample project regarding procedural generation: Procedural Examples.
Hey look, an asteroid generator!
Here is some other stuff I found: stuff and more stuff.
Edit: and this: getting closer…
Now to re-download Blender!
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
Chessking
ParticipantRegarding the galactic center: Thanks for pointing that out. That would definitely add to the scene. I will plan on adding that when I have both figured out how and have completed more important parts of the generator.
Regarding generated stars: Here’s how I would do it in my own engine. I would send out a raycast for every pixel on the screen If it doesn’t collide with any objects after a certain distance, input the coordinates into a 3-dimensional algorithm generating the background and stars. This way, the higher the zoom (and therefore the lower the FOV) the more detail will be generated, without any extra. Perhaps I can pull up some useful information regarding procedural generation within Unity.
Here is a free sample project regarding procedural generation: Procedural Examples.
Hey look, an asteroid generator!
Here is some other stuff I found: stuff and more stuff.
Edit: and this: getting closer…
Now to re-download Blender!
This is one tough navy, boy. They don’t give you time off, even for being dead. -Clay
Storm Petrel
-
AuthorPosts