Gaming Creating an ocean exploration simulator

DSR1
dsr1.jpg


Just import the file into unity (model + textures inside the package)

Main texture: dds DXT5 RGB - colormap, Alpha - specular map.
Normal map: no explanation needed

Needs some work on texture/specmap and normal maps)

http://alteaaerospace.com/loru/sea_sim/dsr1.unitypackage
 
Last edited:
Reminder to all: If your using GitHub for windows, after you make a commit you need to press the sync button to push it to the repo.

You may do so (on any git). You can also simply just commit unfinished changes on your local repository for also being able to revert to an earlier state.

Syncing means that you pull changes from the global repository and push your own changes to it. You may do so, but it is not mandatory.

Finally, if I'm going to start work on a first attempt a physics, is it best for me to work on my own branch or the develop branch?

For now, start on the development branch. I think a feature branch is too early, since we have nearly nothing yet. Also, if you create a feature branch, branch it of the development branch.

Also, on git, you have the choice to publish branches. unpublished branches are good for developing features without having to include all changes to the development branch during the development. A unpublished branch only exists on your local computer.

I think it would be good to also use the issue tracker on github for keeping track on the tasks.

Now... who does what?

---------- Post added 02-16-15 at 12:03 AM ---------- Previous post was 02-15-15 at 11:21 PM ----------

Just pushing my current state into the repository. Added Lorus DSR-1 and some basic scene, still have to find out more about using Unity.
 
DEM conversion:

1zuCTbR.png


The resulting PNG file and Octave scripts you can get here.

The output file is a 16-bit greyscale PNG, where pixel value is 32768 + 10*elevation_in_meters.

Please let me know if the PNG file is suitable for use in Unity.

HOW-TO for doing the conversion yourself:

1. Install Octave from this link.

2. Create directory, e.g. c:\bathymetry.

3. Put the .m files (from here) in the directory.

4. Go to this site, select the region you like, then click "Download Entire 3 Arc-Second Grid" -> XYZ. (Note: if you go for 1 Arc Second grid, then see step 11). Unpack the zip and put the resulting .xyz file under c:\bathymetry, e.g. c:\bathymetry\hawaii_crm_v1.xyz

E7BeZO5.png


5. Launch Octave.

6. At the command prompt enter: cd('c:\bathymetry');

7. Load the DEM file: xyz = load('hawaii_crm_v1.xyz');

8. Go get yourself a coffee.

9. Save the file as a binary version to speed up subsequent loads: save -binary hawaii.dat. This will enable you to load the DEM from the binary file by doing load hawaii.dat, which will be much faster.

10. Convert the DEM: maketile(xyz, [-157 -156], [20 21], "t.png");. The second parameter is the longitude (X) range (157W to 156W), the third parameter is latitude (Y) range (20N to 21N) and the fourth parameter is the PNG file name.

11. If you are using a DEM with resolution different than 3 arcsec, then pass the resolution as the fifth parameter to maketile. For example, for 1 arcsec DEM use: maketile(xyz, [-157 -156], [20 21], "t.png", 1/3600);
 
Last edited:
The output file is a 16-bit greyscale PNG, where pixel value is 32768 + 10*elevation_in_meters.

Please let me know if the PNG file is suitable for use in Unity.

Unity accepts only RAW as format for heightmaps, as far as I can tell... it is also a 16-bit grayscale graphic format.

Can you also find a way to remove the areas without depth data?
 
Reminder to all: If your using GitHub for windows, after you make a commit you need to press the sync button to push it to the repo. Someone said above that they had set the project to text meta files, but that's not been pushed to the repo. Also be sure to fully exit out of Unity and MonoDevelop before making a commit, 'cause temp files. Finally, if I'm going to start work on a first attempt a physics, is it best for me to work on my own branch or the develop branch?

Or just use the git shell for windows :RnR1:

as simple as

Code:
git commit -a (after which notepad will prompt you to write a quick message describing the commit)
git push -u
to push your changes up to the repo

and

Code:
git pull -u
to get the latest changes from the repo

I know its a very linux person thing to prefer the shell, but I can never seem to get the hang of the gui app that github uses for windows :shrug:

Now... who does what?

Perhaps we should figure out what needs to be done. I think a reasonable first step would be to create a quick build with the DSR-1 floating in a void, and then get the camera & translation working. We can then progress to the underwater terrains, rendering and so on...

Just pushing my current state into the repository. Added Lorus DSR-1 and some basic scene, still have to find out more about using Unity.

pulling, pulling pulling.

Also learning some unity. I have a really basic scene program with a ball rolling around and colliding with flying blocks so far.
 
Perhaps we should figure out what needs to be done.

I rather meant as project responsibilities - Who manages product and sprint backlogs and manages the issue list, who is architect specialist for which special subsystem of the game?

We pretty much know already what needs to be done. We just don't yet know how to do it. But we are getting ahead.
 
Unity accepts only RAW as format for heightmaps, as far as I can tell... it is also a 16-bit grayscale graphic format.

I give you PNG for now so you can convert to RAW yourself and test how it looks in the engine.

I can make you a RAW if you can give me a spec and a way to test.

Can you also find a way to remove the areas without depth data?

It appears they use zero (=sea level) for that.

I can reset these pixels to a different value, just tell me what.

Here is a 3D plot with zero'd pixels set to NaN (i.e. removed):

AnllfWV.png


OK, I have a thought. What if I simply interpolate there?
 
Last edited:
I rather meant as project responsibilities - Who manages product and sprint backlogs and manages the issue list, who is architect specialist for which special subsystem of the game?

We pretty much know already what needs to be done. We just don't yet know how to do it. But we are getting ahead.

I guess I could handle the issues list, that should be easiest for me since I have all access permissions for the repo

Ive almost got things working here, but the diver keeps falling through the floor plane without colliding for some reason. Is there some way I can use the diver mesh while having the collision detection work with a bounding box?
 
Ive almost got things working here, but the diver keeps falling through the floor plane without colliding for some reason. Is there some way I can use the diver mesh while having the collision detection work with a bounding box?

Add to your gameobject box or capsule colider (Add Component > Physics)
 
OK, I have a thought. What if I simply interpolate there?

Exactly that - just the raw height data is not always useful, I remember that from SRTM data, which made rivers stick out because of their electromagnetic properties.

---------- Post added at 01:04 AM ---------- Previous post was at 01:01 AM ----------

I guess I could handle the issues list, that should be easiest for me since I have all access permissions for the repo

OK, then manage this. Please feel free to be restrictive on the feature requests - what we can't do right now in the next development step, should not appear there, such ideas can be dumped into the game concept.
 
Ok, I've got basic buoyancy. It currently assumes the object is a sphere, and that the water is a flat plane at y=0. At the minute you supply the script with the radius, and it takes the mass from the RigidBody component. This basically means the mass needs to be calculated and shouldn't be eyeballed. For example:
Take a sphere, radius [math]0.5m[/math], density [math]500kg/m^3[/math]
Its volume is [math]0.5236m^3[/math] giving it a mass of [math]261.8kg[/math]
This is probably also a good time to remind everyone that the density of water is [math]1000kg/m^3[/math]
and Vol of sphere: [math]\frac{4}{3} \pi r^3[/math]
 
This is probably also a good time to remind everyone that the density of water is [math]1000kg/m^3[/math]

Thats for sweet water.

Sea water is somewhere between 1020 and 1030 kg/m³ and increases up to 1050 kg/m³ and above at higher depths.
 
Add to your gameobject box or capsule colider (Add Component > Physics)

Yesss, it works, this is awesome...

Changes pushed to the repo, can anyone else confirm that it is working?
 
We're currently .gitignore-ing .meta files, which is bad, because it means we're loosing all the import settings, and it throws warnings any time you change branch due to orphaned .meta files.
 
We're currently .gitignore-ing .meta files, which is bad, because it means we're loosing all the import settings, and it throws warnings any time you change branch due to orphaned .meta files.

So a good solution could be just to comment this out in .gitignore?

Code:
# Unity3D generated meta files
*.pidb.meta
 
Ah, Problem is a file extension overlap with "Build Results of an ATL Project", which also produces a .meta file, but evidently that one isn't required to be kept. I've removed the offending line from the repo. I haven't put any of my meta files in, as I never imported Loru's package, so my import settings for that stuff might be wrong. I suggest we all go though and add the meta files for the stuff we added.
 
We're currently .gitignore-ing .meta files, which is bad, because it means we're loosing all the import settings, and it throws warnings any time you change branch due to orphaned .meta files.

Fixed this. .meta was ignored by the VS2013 presets for the gitignore, not by Unity.
 
Urwumpe ninja'd my commit... Give me a min I need to fix my local state.
 
am I good to pull the gitignore change, or should that wait for now?
 
Back
Top