SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   [WIP] The SH5 EcoMod (https://www.subsim.com/radioroom/showthread.php?t=239310)

gap 01-20-19 07:05 PM

Quote:

Originally Posted by Jeff-Groves (Post 2587634)
I'm playing with one of the RAW files now.
In hex they are not a perfect match to what I think is the floats chart listed but real close.

So the scale is 256 colors as the code snippet shows.
Each pixel is 8 bytes I believe.

Before you waste your time on complex calculations read my edit below please: :03:

Quote:

Originally Posted by gap (Post 2587628)
EDIT: I have just received confirmation; my guessing was correct :up:

Now I need to create two custom palettes: one for sorting grey values of those raw files in ascending height order, so that we can edit them in photoshop, and a second palette for sorting values back in the SH5 (dis-)order :doh:


gap 01-20-19 08:08 PM

Something doesn't add up :hmmm:

At first I thought that the height values in the code provided by Mihai was in casual order, but with only a few exceptions that's not true. Most values are sorted in ascending order. If the matrix was read from top left to bottom right, the grey values on the raw heightmaps should be much more intelligible than they actually are...

gap 01-20-19 09:11 PM

These are the five heightmaps composing Helgoland and Dune, assembled together:

https://i.imgur.com/JkZiQOt.png

As a test, I selected all the white pixels (#ffffff). If there was an univocal correspondance between grey values on the raw maps and elevations in game, I would have expected pixels with the same intensity to coincide with areas having at least similar heights. Well, this is the result of my selection, overlayed to the chart of the two islands, as we see it on the navigation map:

https://i.imgur.com/VbmZ5Ia.png

Obviously some kind of noise gets applied to the height information of those heightmaps, and/or they don't represent absolute elevation values, but variations of elevation over terrain elevation data stored in TerrainData.BFD :-?

Jeff-Groves 01-22-19 01:03 AM

Quote:

Originally Posted by gap (Post 2587403)

What matters for terrain object's rendering distance isn't actually the size of the collision mesh, but the radius of main model's bounding sphere.

Something I posted from back in 2011.

"The bounding sphere is not relevant for SH5 that I could prove.
Maybe in a LOD situation?"

:har:

gap 01-22-19 12:56 PM

Quote:

Originally Posted by Jeff-Groves (Post 2587838)
Something I posted from back in 2011.

"The bounding sphere is not relevant for SH5 that I could prove.
Maybe in a LOD situation?"

:har:

You see in the future :D

Jeff-Groves 01-22-19 01:59 PM

Reading back through that thread? I forgot how much I knew or suspected about the GR2 files at the time.
:o

gap 01-22-19 02:09 PM

Quote:

Originally Posted by Jeff-Groves (Post 2587925)
Reading back through that thread? I forgot how much I knew or suspected about the GR2 files at the time.
:o

Can you post a link to it? I like reading old threads, I must be affected by some sort of necrophilia :O:

Jeff-Groves 01-22-19 02:12 PM

The GR2 viewer/editor thread.
:)
http://www.subsim.com/radioroom/showthread.php?t=188290

Post 284 is where I got that quote I posted above.

gap 01-22-19 05:52 PM

Quote:

Originally Posted by Jeff-Groves (Post 2587931)
The GR2 viewer/editor thread.
:)
http://www.subsim.com/radioroom/showthread.php?t=188290

Post 284 is where I got that quote I posted above.

That long thread is one of those that I need to re-read from the first to the last post. When it was started I wasn't probably sure even about the difference between a mesh and a texture, but with the little experience I have gained in the meanwhile I am sure I would learn a lot of new things from it :up:

skipjack578 01-23-19 11:14 AM

What a great "little" project, really great mod. Not only that we gonna have new beautiful terrain but also an education. :salute:
May i ask how did you get to this idea in the first place to make EcoMod?

Jeff-Groves 01-23-19 12:32 PM

You'll have to wait to see what he's working on next.
Lot's going on in the background!
:yeah:

gap 01-25-19 01:44 PM

Quote:

Originally Posted by skipjack578 (Post 2588077)
What a great "little" project, really great mod. Not only that we gonna have new beautiful terrain but also an education. :salute:
May i ask how did you get to this idea in the first place to make EcoMod?

Hi skipjack578 and thank you for showing your interest in this mod, forgive me for my late reply, but as Jeff said, besides private life routine there is something else - related to this mod - that kept us busy lately. More on it within the next few days.

To reply to your question: I like exploring new places, both real and virtual, and I have always been disappointed by the lack of variety/realism of the SH5 world. For this reason, in 2011 I and stoianm started working on Dynamic Environment, a mod that added to the game several new climate zones, weather patterns and environment colors (i.e. sea and atmosphere colors). See DynEnv's old thread if you are interested in the history of its development.

Back then, stoianm asked me to have a look into terrain files. I did, and that disclosed to me a whole range of new modding potentials, but at that time I lacked some important information for exploiting them. The most important piece of information came more than a year after the first release of DynEnv, with this post by Pintea on echolot's "Smaller trees" thread. By then, other personal and modding projects prevented me from explicitly working on anything related to SH5 terrain, but in the free time I started gathering the real world information needed for the planning of the "SH5 EcoMod".

More recently, I started helping my good friend Kendras with his SHIII Lighthouse mod project, and during its making we found that some little islands off NW France were missing from the SHIII world. That prompted me to edit the terrain of the latter game and to create a new terrain type for one of the missing islands, but while working on those items I realized the limits of SHIII when it comes to terrain's 3D shape and textures (though I think it has a more flexible handling of trees than SH5). That observation prompted me to go back to SH5 and to apply to it the little experience I had learned in the meanwhile, starting the present mod.

Despite some important differences, the core systems defining terrain and tree textures in the two games are pretty similar; converting from a SH5 terrain type mod to a SHIII or SHIV one, shouldn't be impossible. Things are more complicated when it comes to terrain shape though. Again, the core files of the two games are pretty similar, but SH5 adopts a completely new method for adding more detail to the areas of biggest interest. So far, we had the inbuilt SH5 Terrain Editor for creating mountains, plains, shallow water basins and deep canyons directly in game, but while enabling us to manually perform very precise terrain changes, to the level of ± a few decimeters, that tool doesn't allow the overlapping of a grid system or real world topographic maps, needed for very accurate terrain modifications. This is where a raster graphics editor or a 3D modelling program could be preferable to TE.

This brings us to these days; as far as I know, no one before has tried to bring in game the level of terrain realism that I am aiming at. Jeff and Pintea are helping me to understand the file format used for storing SH5's detailed height maps and to build the tools needed for converting that data to a format that can be easily edited with Photoshop or 3dsMax and re-imported in game. Thanks to them, tings are finally starting to make sense; we have already a tool capable of extracting height information from the game files, work of Jeff, and I have created a rudimentary tool based on Excel for visualizing that information as a greyscale map. If there is anyone interested in knowing more in detail the ins and outs of our work, I will be glad to explain them when our tools will be finished and when we will be sure about the correctness of our method.

The reshaping of the game terrain so that if reflects the geography of some conspicuous areas, the re-making of some cities and harbors so that they resemble more closely their real counterparts, and the addition to the game of some new 3D landmarks where they were to be expected in the world of 80 years ago, are features that I didn't plan initially for this mod. They will slow down somewhat the main plan of adding in game new vegetation types and terrain textures, but I hope that at the end they will be worth your patience and all the efforts we are putting on them.

Stay tuned guys :salute:

Jeff-Groves 01-25-19 04:20 PM

gap gives good credits to several of us but believe me! He's kicking out some killer ideas that will actually work for what We are doing.
:rock:

gap 01-25-19 08:53 PM

Quote:

Originally Posted by Jeff-Groves (Post 2588385)
gap gives good credits to several of us but believe me! He's kicking out some killer ideas that will actually work for what We are doing.
:rock:

You are too kind. I am just lucky because I know who to ask when I need help :|\\

Jeff-Groves 01-25-19 09:24 PM

I think Pintea would be impressed with your latest idea.
I know I was!
:salute:


All times are GMT -5. The time now is 07:38 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.