View Full Version : [WIP] The SH5 EcoMod
Honestly I did not think it was an issue! I thought I was watching seasons change!!!
No, in that case you didn't witness a season change but an eco-region change. Of course season changes are featured too, most regions will have four seasons, deciduous trees will feature brownish/reddish/yellowish foliage in autumn, they will be bare in winter (and covered in snow where snowy winters are to be expected), and they will display new brilliant green leaves in spring. The look of conifers and other evergreen trees and shrubs will evolve too over the year, but the changes will be lesser dramatic. In any case, I doubt you will ever witness a sudden season change: the game switches seasons based on, dates which are configurable for each climate zone, but I think it updates them while the player is in open seas. :03:
excel4004
01-04-20, 11:02 AM
Just discovered this amazing mod.:o
Long time nothing was posted, how is the actual situation of this mod, GAP?
Runs it stable with actual TWoS? Is with the last version a campaign restart needed?
Will this mod be a part of TWoS, what are the future plans?
Lot of questions, but the mod looks amazing and iam very interested in this mod but also interested to have a stable TWoS.
:subsim:
Jeff-Groves
01-04-20, 12:29 PM
Gap is spending time on Sicily right now.
:up:
vdr1981
01-04-20, 04:37 PM
Just discovered this amazing mod.:o
Long time nothing was posted, how is the actual situation of this mod, GAP?
Runs it stable with actual TWoS? Is with the last version a campaign restart needed?
Will this mod be a part of TWoS, what are the future plans?
Lot of questions, but the mod looks amazing and iam very interested in this mod but also interested to have a stable TWoS.
:subsim:
Yes , it should be perfectly compatible. Gap has explained everything nicely in the mod's download page. :yep:
But, if I remember correctly, the mod is not completely finished and only few places have been edited. Gap will correct me if I'm wrong... :yep:
fitzcarraldo
01-04-20, 06:51 PM
Yes , it should be perfectly compatible. Gap has explained everything nicely in the mod's download page. :yep:
But, if I remember correctly, the mod is not completely finished and only few places have been edited. Gap will correct me if I'm wrong... :yep:
At the present state, the mod works fine with TWoS. I have installed the most "hard" options.
Best regards.
Fitzcarraldo :Kaleun_Salute:
Muckenberg
01-05-20, 03:32 AM
Hi
I have been using this mode with TWoS since Gap released it and without any problems.
As far as I remember, it should be done northern Germany and the coast of France. Gap had the coast of Scandinavia.
The mod is really perfect and greatly enhances the visual experience while sailing along the coast.
Just discovered this amazing mod.:o
Long time nothing was posted, how is the actual situation of this mod, GAP?
Hi excel,
thank you for your nice words and sorry for the long silence on this mod :salute:
Unfortunately some months ago the external hard disc where I had stored many WIP mods together with various SH modding resources, has failed. This was a little disaster for this mod too, as the said disc also contained many tree distribution maps, three cutouts, environmental data spreadsheets and other useful resources that I had gathered/built over the years and that the EcoMod was based on.
Those are bad news indeed, but let's focus on the good ones: many (though not all) of the EcoMod-related resources I have lost can be recovered from the web, and I still have in a safe place the terrain editing tools and the knowledge that, with the priceless help of good friends like Jeff (Groves) and Pintea, I earned during my past work on this mod. This is to say that me resurrecting it is all but an unlikely eventuality.
Moreover I have an unreleased version of the mod that I could share with the community if there is enough interest. If memory serves me well, it contains my reworks - based on satellite data - of the french coast and seabed between the cities of St-Malo and Le Havre, along the English Channel, as well as four or five new terrain/vegetation types spamming from the German Bight (Helgoland with its red cliffs and low vegetation) to SW France (Les Landes maritime pine forests). This is an area that was already covered by the previous version of the mod, but had uniform features.
Runs it stable with actual TWoS? Is with the last version a campaign restart needed?
Well, when I planned it, I had TWoS/OHII compatibility in mind. Besides the high level of detail of some of the textures used (which can be replaced by lower resolution textures also included in the mod in the form of optional mods), I see no reason why the EcoMod should affect game stability, and going by the report of vdr1981, fitzcarraldo and Muckenberg, which I thank for their extensive testing, I think we can exclude any major problem in the use of my mod with TWoS. Enabling the current version of the mod even in mid campaign should be totally safe.
Will this mod be a part of TWoS, what are the future plans?
Whether to make this mod part of TWoS or not, is entirely on Vecko. As he has already noted, in its current status the EcoMod is more a proof of concept over some little known/modded game features than a complete mod, but if in future he will decide to include my changes in TWoS, I will gladly give him my blessings :up:
Gap is spending time on Sicily right now.
:up:
Hi Jeff, talking about this mod and your OBJ to RAW converter, I think I have found an instance where it failed to convert height values correctly. I am pretty confident that it must be something related with the numeric format exported by Wings3D's wawefront exporter, though I am not 100% sure about that.
If you have time and are in the mood for digging in the issue, I could send to you the problematic file... :salute:
Muckenberg
01-11-20, 08:21 AM
Hello
If you have not yet released a part of your mode and are considering the release so I would definitely be interested. :Kaleun_Salute: As I wrote above, your mod is really a perfect job.:Kaleun_Applaud::Kaleun_Applaud:
fitzcarraldo
01-11-20, 08:49 AM
Hello
If you have not yet released a part of your mode and are considering the release so I would definitely be interested. :Kaleun_Salute: As I wrote above, your mod is really a perfect job.:Kaleun_Applaud::Kaleun_Applaud:
+ 1.
Regards.
Fitzcarraldo :Kaleun_Salute:
Hello
If you have not yet released a part of your mode and are considering the release so I would definitely be interested. :Kaleun_Salute: As I wrote above, your mod is really a perfect job.:Kaleun_Applaud::Kaleun_Applaud:
+ 1.
Regards.
Fitzcarraldo :Kaleun_Salute:
Okay guys, I have the files of the upcoming EcoMod version in front of me. Let me finish some incomplete features and write the documentation, etc. They should be ready for release in a few days. :salute:
Jeff-Groves
01-13-20, 01:21 PM
Hi excel,
Hi Jeff, talking about this mod and your OBJ to RAW converter, I think I have found an instance where it failed to convert height values correctly. I am pretty confident that it must be something related with the numeric format exported by Wings3D's wawefront exporter, though I am not 100% sure about that.
If you have time and are in the mood for digging in the issue, I could send to you the problematic file... :salute:
Yeah. Send me the file.
:up:
Muckenberg
01-13-20, 03:31 PM
Okay guys, I have the files of the upcoming EcoMod version in front of me. Let me finish some incomplete features and write the documentation, etc. They should be ready for release in a few days. :salute:
Thank you very much and I look forward to sailing around Helgoland. Since I read the thread and saw the pictures so it will definitely be a nice view of the island. :salute::salute::yeah:
Yeah. Send me the file.
:up:
Nevermind Jeff,
I think I found how to solve the issue, but maybe I should explain what was the problem and how I solved it.
Before I interrupted my work on this mod, I had been editing an area of the SH5 map spamming over several raw tiles. For ease of editing, after converting the said detail masks as obj-format meshes (using your RAWtoOBJ script), I offset their X/Z coordinates in W3d so that each tile was close to its in-game neighbours. After tweaking Y coordinates of the combined mesh, I re-exported each obj tile singularly. While doing so, I omitted to re-center them around the X and Z axes, thinking that your OBJtoRAW exporter ignores those values anyway (in theory only vertices order, as written on the obj file, and Y coordinate values should be relevant).
My assumption proved correct for all the tiles (that I successfully converted back to the raw format using your script) except one whose RAW output is obviously wrong: SH5 renders it totally flat, and Photoshop opens it as a 204x200 pixels array, rather than the usual 202x202. The fix, which I just discovered, was re-centering the problematic tile mesh on the X/Z axes before converting it back as a RAW file.
What I don't get at this point is why other obj meshes with similar offsets, were converted correctly without need to re-center them. If you want to investigate further the issue, I have uploaded for you three files:
W002N049_3_2.obj - the problematic wavefront file, which is converted incorrectly by your OBJtoRAW script;
W002N049_3_2'.obj - the same mesh, but centered: your converter deals with it flawlessly;
W002N049_3_3.obj - a terrain tile with similar X/Z offsets as the first tile mentioned in this list, but your script converted it correctly without need of re-centering it.
You can find them at the following link:
https://www.mediafire.com/file/t5micvuz47u4vck/DetailMasks.rar/file
Jeff-Groves
01-16-20, 10:43 AM
Somewhere in the conversion a few bytes are being skipped.
I have my suspicions why and I'll do more checking.
Nice thing is I have version 10 of SweetScape!
This version has a DeBug capability built in now.
I'll run the script on DeBug and step through each conversion to find the exact spot causing the issue.
:D
Somewhere in the conversion a few bytes are being skipped.
I have my suspicions why and I'll do more checking.
Nice thing is I have version 10 of SweetScape!
This version has a DeBug capability built in now.
I'll run the script on DeBug and step through each conversion to find the exact spot causing the issue.
:D
Thank Jeff, sweet!
Let me know if I can assist you in any way :salute:
Jeff-Groves
01-16-20, 06:11 PM
Just pointing out this helps for future work.
:up:
Just pointing out this helps for future work.
:up:
With the negligible exception of the file I uploaded yesterday, so far your conversion scripts have worked flawlessly.
With their help, and with the use of few more tools (Grass GIS (https://grass.osgeo.org/), the hgt data reader (https://github.com/zbycz/srtm-hgt-reader) that OldCoder recompiled for us, a photoshop pgm importer/exporter (http://richardrosenman.com/shop/portable-pixmap-importer-exporter/), Ref's SH4 terrain data importer/exporter, and couple of spreadsheets I created for converting from pgm to obj format and for 'blending' seamlessly the data of two obj meshes), I was able to convert RW height data into in-game heights with unprecedented precision.
At present we can rebuild directly in a 3D editor fairly realistic models of little islands, seabed reefs/trenches, cliffs, gulfs and entire coastlines which were poorly modelled in stock game. We can reliably predict how they will look in SH5, and we can check the positioning of various 3D objects relative to them, before importing them in game!
This is exactly what I had in mind when I observed that, though an useful tool, the Terrain Editor built into the game was not accurate enough, and when I started bothering you and Pintea on the possibility of creating new tools :D :sunny:
Jeff-Groves
01-18-20, 04:12 PM
I'm starting to believe there may be bug in 010 causing the odd ball issue.
:hmmm:
I plan a few more tests to verify before I send off a bug report.
propbeanie
01-18-20, 04:22 PM
Little endian versus big endian?... :salute:
Jeff-Groves
01-18-20, 04:55 PM
Found the problem!
Vert 8307 is 0.0000000e+0 on the Y
Thus does not get converted to a hex output properly!
Will code for that kind of situation.
When you re centered the other files you were slightly off on the Y axis so it changed things a bit.
Same vert is 1.0000000e-6 in the other file.
Still think it's a bug to be honest. A zero should be converted to a float no matter what!
Sent a bug report to SweetScape.
Jeff-Groves
01-19-20, 03:03 PM
New Obj to Raw converter script.
http://www.mediafire.com/file/42x3i7x325vo5nh/Obj2RAW.7z/file
This script will scan the file for any zero vert and convert it so as to avoid the above mentioned issue.
It also pops up a save dialogue when the script is done.
010 will do a conversion to a hex int but not to a hex float.
So a Float of .0000000 is only converted as a 0 in hex instead of 00000000
Will be asking them to consider that in the next version.
Jeff-Groves
01-20-20, 12:37 PM
Exchanging e-mails with SweetScape about a possible update to print out hex floats now.
:up:
New Obj to Raw converter script.
http://www.mediafire.com/file/42x3i7x325vo5nh/Obj2RAW.7z/file
This script will scan the file for any zero vert and convert it so as to avoid the above mentioned issue.
It also pops up a save dialogue when the script is done.
010 will do a conversion to a hex int but not to a hex float.
So a Float of .0000000 is only converted as a 0 in hex instead of 00000000
Will be asking them to consider that in the next version.
Exchanging e-mails with SweetScape about a possible update to print out hex floats now.
:up:
Thank you Jeff, I will test the new exporter version ASAP :up:
P.S: how difficult would be making your script to generate directly the .raw output, without need of the manual steps? Indeed I can live with them, but I know you like challenges :D
Jeff-Groves
01-20-20, 01:04 PM
That is something I'm working on and talking to the Devs of 010 about.
The main issue is the conversion to hex that the Import step does.
There is no function to do that at this time.
I'm looking at doing a command line option right now.
The Script would call batch file to open a command line window to 010 and complete the manual steps with nothing done by you.
I'm also adding code so you do not need to type in a name for the file.
It will grab the file name and use it for further processing.
excel4004
01-21-20, 03:51 PM
Hi Gap! Hi Jeff-Groves! :salute:
Iam so happy that you both work again on this mod! Thank you very much.
Thanks for the long answer to all my questions Gap. Iam so excited for the upcoming version(s). A better terrain is what this game still needs, it would be again a step, to make SH5 greater and in this case more beautiful.
And beautiful is always i nice thing to have. :D
You and Jeff are great, much appreciated.
:subsim:
Jeff-Groves
01-22-20, 09:08 PM
I hope gap gets the itch to do more work on his Mod.
I'm just trying to give him the Tools to make it easier.
:salute:
Hi Gap! Hi Jeff-Groves! :salute:
Iam so happy that you both work again on this mod! Thank you very much.
I hope gap gets the itch to do more work on his Mod.
I'm just trying to give him the Tools to make it easier.
:salute:
Maybe it is time for an update by me. I will report back in a few hours, just the time to gather some information on what I am currently working on :salute:
Muckenberg
01-23-20, 03:09 PM
I can't wait to see another mode update. I'll wait until "Happy Time" ends and I will start the next part of the campaign after the update is released. I'm really curious about Helgoland. :Kaleun_Salute:
I can't wait to see another mode update. I'll wait until "Happy Time" ends and I will start the next part of the campaign after the update is released. I'm really curious about Helgoland. :Kaleun_Salute:
First off, I am sorry for having been son quiet lately, but during the last few days all of my free time has been used for modding, and I must admit that I was so absorbed by the work on this mod, that every time I tried posting some update here I ended up looking at the files and... getting back to modding.
Answering Muckenberfg's question: except for the red cliffs (whose texture now is based on an HD picture of the real thing), the addition of the Lange Anna sea stack, and the absence of trees (I plan to replace them with low shrubs, but I don't know if they will be ready in time for the next release), don't expect too much from Helgoland.
A total rework of the island - including terrain and buildings - is in my todo list, but that's a complex task that I thought I would better leave for one of the next releases.
In order to check the validity of the terrain-editing method that I, Jeff, OldCoder and Pintea have been discussing over a year ago, I decided to focus instead on some smaller geographical feature that I could model from scratch without risking to mess with other mods. The occasion finally arose when I noticed that the Chausey Archipelago (a group of islets and rocks located in Lower Normandy, NE of St-Malo) was not featured in the stock game. Below are a couple of maps squeezed to fit in the SH world that show Grande-Île, the main island, together with the many islets and rocks composing the archipelago:
https://i.imgur.com/M8NWjZB.png (https://i.imgur.com/AUzqF6A.png)
With the help of those maps and of real world height data that I could import in game thanks to Jeff's scripts, I was able to bring the said islands in game. This is the result, so far:
https://i.imgur.com/C8Dcwp8.png
https://i.imgur.com/0Bheert.png
https://i.imgur.com/KeIrZuO.png
https://i.imgur.com/LKxMnQc.png
https://i.imgur.com/pTxZc9w.png
I still plan improving portions of the main island and some of the rocks, so to make their height profile too look more steep/sharp, and I want to improve the mapping of various textures on their surface (dev's Terrain Editor will be my tool of election for those tasks), but so far I must say that I am quite satisfied with the result.
As you can see some of the rocks raise a few meters above the sea level, while others are hidden below the surface, so make sure you will keep away from those U-boat-traps once the upcoming version is released!
Well, I must go now, but more updates are coming so stay tuned guys :salute:
NIDGE2112
01-24-20, 08:25 PM
You guys Rock, keep up the good work:Kaleun_Salute:
NIDGE
Jeff-Groves
01-24-20, 09:24 PM
That is pretty fantastic!
propbeanie
01-24-20, 09:59 PM
Wow fellers... We want this for SH4... :har: - Vielleicht ist gap Doktor Frankenstein? :o
:salute:
Wow fellers... We want this for SH4... :har: - Vielleicht ist gap Doktor Frankenstein? :o
:salute:
I wish that could be possible, but I am afraid it won't happen without hacking SH4's code.
I explain: while the bulk of the SH5 terrain files are in common with SHIV - which means a grid resolution of 200 m between an elevation point and the next one and just 256 height levels between the highest and the lowest point (8,000m and -1,500m respectively) - SH5 gives us the possibility of patching map areas of special interest. Each 'patch' or height mask covers a surface of 25 (5x5) sq. km, with height data set 25 m apart (i.e. 8 times the resolution of regular height maps); moreover, data stored in those files is encoded as float rather than grayscale values, thus enabling a much smoother and accurate transition between an height level and the next ones. The only disadvantage of the said height masks, new to SH5, is that unlike the 'regular' ones, they can't be edited directly with a raster graphics editor but, following the tricky but effective method devised by me and Jeff, they require the conversion of real world height data into a 3D mesh, which, on turn, is converted in the float format accepted by the game using the OBJ to RAW converter by Jeff.
Conversely, what can be partly converted from SH5 to SHIV and SHIII, is terrain type settings which control the different tree types and terrain textures mapped on the SH globe, with a maximum number of unique combinations amounting to 256. In this respect, one advantage of SHIV and SHIII over SH5 is that they can use more than 8 tree types per terran type, and that their trees can be actual 3D objects rather than flat billboards. If anyone wants to port parts of this mod to any other game of the SH series, he has all my encouragement :salute:
Such a dangerous place for the navigation as Chausey shouldn't be left without maritime beacons signaling the hazard. Actually the main island is home, in its SE tip, to a relatively small lighthouse which is my intention adding to the game together with several houses, a jetty (https://live.staticflickr.com/806/41033137541_4a8c08cb60_b.jpg), a Napoleonic fort (http://www.starforts.com/iles.html), a castle (https://live.staticflickr.com/3832/9524270047_7459e21aae_b.jpg), a chapel (https://www.google.com/maps/uv?hl=it&pb=!1s0x480c3df495ed0533:0x53f8e3383ca5dcaf!3m1!7e 115!4shttps://lh5.googleusercontent.com/p/AF1QipOhO-ZTQz3uF-j5yEK0Lj3egJPJDIxYTOvrrsrI%3Dw355-h200-k-no!5schapelle+chausey+-+Cerca+con+Google&imagekey=!1e10!2sAF1QipOhO-ZTQz3uF-j5yEK0Lj3egJPJDIxYTOvrrsrI&sa=X&ved=2ahUKEwjb6svYqp_nAhXN3KQKHa6NBK0QoiowE3oECBUQB g) and a semaphore (https://live.staticflickr.com/2848/9527053910_373537732f_b.jpg). The following map shows clearly the location of each building on the island:
http://geologie.discip.ac-caen.fr/precamb/chausey/cartes.htm
If any willing subsim mate wants to volunteer for creating some of those models, I will happily accept his contribution :D
In the meanwhile, I am working on a model of the lighthouse which some of you might have seen in an early state, as I started working on it long ago but then I put it in standby. This is how it looks after several additional hours of work:
https://i.imgur.com/R5T33tS.png
I will add for reference a few historic views and a modern picture of the real thing:
http://www.leuchtturm-welt.net/HTML/FRPK/ORIGINAL/CHAUSEY.JPG
http://mondedesphares.fr/local/cache-vignettes/L432xH276/hist-7e685af6c48b9b72c1e506a6b847ce0c-93aa6.jpg?1576095594 http://dhmcl.chez-alice.fr/Phares%20Pages%20Html/50%20Granville_2_fichiers/image012.jpg
https://i.pinimg.com/originals/8c/8f/70/8c8f70f6d68d894e89ce36b786bdcb6e.jpg
As you can see, even though still unfinished, my model reminds quite closely the original.
According to the essay "Les phares français pendant la Seconde Guerre mondiale" (https://www.cairn.info/revue-guerres-mondiales-et-conflits-contemporains-2001-4-page-109.htm?contenu=article) by Jean-Christophe Fichou, though with dimmed lights, French lighthouses kept in service until the Fall of France, when the occupying German forces ordered the deactivation of all the minor lights not essential to their shipping, starting from the offshore installations and from the lights that were facing the English Channel.
For this reason, I will set this lighthouse as a land unit rather than a terrain object and I will set its light effect as eqp-file-controlled equipment. Doing so, will enable us to switch its light off when the right time comes, with the additional advantage of being able to use a LOD model (terrain objects don't have those). There a few more advantages in this approach which I will discuss later, but there is also a a big con though. If the method I am suggesting is followed, a new campaign layer will be added where I will store lighthouses and similar units, but the game will read them only when a new career is started or, at best, on changing campaign.
What do you guys think? :hmm2:
Jeff-Groves
01-25-20, 07:11 PM
Is the newest files I did working out OK?
I'm busy running an important job right now but have started a newer version for 010.
That will be the final prototype for a stand alone version of the conversion scripts.
Is the newest files I did working out OK?
I'm busy running an important job right now but have started a newer version for 010.
That will be the final prototype for a stand alone version of the conversion scripts.
Yes, sorry Jeff, I had almost forgot. I have just exported the same obj file that had shown the problem with your previous RAW exporter (i.e. the mesh with the X/Z offset), but this time I used the tweaked exporter that you had uploaded the other day. I expected its raw output to be identical to the raw file generated by the old exporter used on the re-centered mesh, but to my surprise, the two files are all but identical:
https://i.imgur.com/5dv1EIk.png
I have uploaded the two files, in case you want to check them yourself (you should already have the two obj meshes that they are based on):
https://www.mediafire.com/file/null/DetailMasks.rar/file
I don't know if it is intended, but in any case the numeric difference of the two files are are so small that in game nothing seems to change if I switch one file with the other.
All in all: good job (be more aggressive)! :D :up:
P.S: what I like about this thread is that we move unconcerned from debating on the vegetation of a given eco-zone or on the snowfall in a certain corner of world to discussing hex numbers and triangles, and even more if you think that our attachments can vary from eye-candy screenshots to architectural pictures passing through maps, wireframe meshes and pieces of code lol :haha:
PPS: a standalone version of the conversion scripts would be awesome as it would enable anyone to make its own changes to the SH5 map!
Jeff-Groves
01-26-20, 05:57 PM
All 3 obj files you sent me are slightly off in the Y axis from each other.
The fix I added only looks for a zero and replaces it with a fraction so small it does not show in Game.
It does change the Z and X IF any are zero but those are skipped when conversion to RAW.
All 3 obj files you sent me are slightly off in the Y axis from each other.
Really?
That's odd actually. I remember having checked them, making sure that their Y values were identical :hmm2:
Jeff-Groves
02-01-20, 04:22 PM
I stepped down as a Moderator at another forum to get back to some needed coding work.
I also connect with an old friend that codes and he is fascinated with the things I'm working on.
So there looks to be big advances soon!
Part of the reason I stepped down as a Moderator is I am working on a program for the Cannabis Industry.
And I don't use the stuff! LOL!
Jeff-Groves
02-01-20, 05:54 PM
One thing that has bothered me for a long time now.
Since we have a gray scale image to work with?
How do We convert that to the RAW format?
I'm doing some research to do a conversion like that now.
Granted it would only have the details a grey scale map would have but would allow us to cut it down and modify it much faster!
You'd never have to go In Game to get areas to modify.
Jeff-Groves
02-08-20, 01:14 PM
Alpha 7 of the obj to RAW converter script is ready for testing.
Be sure to read the How to text file!
This version cuts down manual steps needed and has a more elegant way to handle those nasty zero Y verts.
:up:
http://www.mediafire.com/file/wd5gw97nevvr3zj/Obj2RAW-A7.7z/file
I will give you a heads up on an issue I came across.
IF you export an obj file with the RAW to obj script, then try to reconvert to RAW from that file?
It will not work! UNLESS!
You take out the 2 lines,
i=(i+1);
You do that like this,
//i=(i+1);
I'll probably code for that issue as there is always someone that will complain.
Jeff-Groves
02-09-20, 12:02 PM
Working on combining the different scripts into a single script now.
It will auto run on load and give you the option to choose a RAW or OBJ file.
Once selected it will do it's job, save the file, then close with no other interaction needed.
Texas Red
02-09-20, 08:45 PM
Absolutely amazing. Cannot wait to download it.
:Kaleun_Salute::Kaleun_Thumbs_Up::Kaleun_Cheers::K aleun_Applaud::subsim:
Jeff-Groves
02-10-20, 12:27 PM
I've added in some checks to be sure it's a valid RAW file or valid OBJ file.
Select a RAW file and it does it's job and saves the new OBJ file with the input file name.
Same if you select the OBJ file.
This will be the final stage before going to a stand alone program that does not require 010.
It's much faster to prototype in 010 then a regular compiler.
Jeff-Groves
02-11-20, 12:52 PM
Reducing the Vert textures and faces to a math formula now.
That reduces the size of the script.
Also adding commands to save the final output RAW in a JSGME structure for easily testing in Game.
You'll be able to turn that feature on or off as you wish.
One thing I noted from gap's files is he saves faces in the poly mode.
I save in a triangle mode. Not sure if that actually makes a difference?
Jeff-Groves
02-11-20, 02:03 PM
I'm wondering if I should add an option to do the texture mapping to be a side view.
The reason for that would be to allow one to see the height as moved in a 3D program.
I'm thinking to do a raw with a max height and a min height as per the numbers we have.
Then UV a side view for further editing.
0 or Sea level would be a sand color.
Each level change would be a color change.
Now that would require a totally different routine for textures to be coded but I'm positive I can handle that.
Again. It would be a selectable option.
Hi Jeff, sorry for the late feed-back :)
One thing that has bothered me for a long time now.
Since we have a gray scale image to work with?
How do We convert that to the RAW format?
I'm doing some research to do a conversion like that now.
Granted it would only have the details a grey scale map would have but would allow us to cut it down and modify it much faster!
You'd never have to go In Game to get areas to modify.
Indeed, reading HGT data in numeric format, instead of converting that data as a grayscale height map. If you find a way to extract heights values automatically from those files and to store them in an obj files, that would be a big step forward!
Alpha 7 of the obj to RAW converter script is ready for testing.
Be sure to read the How to text file!
This version cuts down manual steps needed and has a more elegant way to handle those nasty zero Y verts.
:up:
http://www.mediafire.com/file/wd5gw97nevvr3zj/Obj2RAW-A7.7z/file
Thank you Sir, I appreciate all your work. This new version of the exporter will surely speed up the conversion process :up:
I will give you a heads up on an issue I came across.
IF you export an obj file with the RAW to obj script, then try to reconvert to RAW from that file?
It will not work! UNLESS!
You take out the 2 lines,
i=(i+1);
You do that like this,
//i=(i+1);
I'll probably code for that issue as there is always someone that will complain.
Do you mean from RAW to OBJ and back from OBJ to RAW without further steps? I am pretty sure I tried doing that in the past and I didn't notice anything wrong :hmmm:
Is the current alpha fixing the issue?
Working on combining the different scripts into a single script now.
It will auto run on load and give you the option to choose a RAW or OBJ file.
Once selected it will do it's job, save the file, then close with no other interaction needed.
I've added in some checks to be sure it's a valid RAW file or valid OBJ file.
Select a RAW file and it does it's job and saves the new OBJ file with the input file name.
Same if you select the OBJ file.
This will be the final stage before going to a stand alone program that does not require 010.
It's much faster to prototype in 010 then a regular compiler.
Another nice idea actually, but there are many ways an OBJ file can be written down, each 3D program/exporter following its own rules. If I can give you a suggestion, make sure that your code will read correctly obj files exported from the most common 3D programs (let's say at least Max, Blender, Wings3D).
Reducing the Vert textures and faces to a math formula now.
That reduces the size of the script.
I could do without that feature and I am afraid that adding more formulas might increase the chances of a bug, but I understand that a programmer wants its code to be as clean and free from redundancy as possible, and I see the beauty of this approach :)
Also adding commands to save the final output RAW in a JSGME structure for easily testing in Game.
You'll be able to turn that feature on or off as you wish.
Sweet!
One thing I noted from gap's files is he saves faces in the poly mode.
I save in a triangle mode. Not sure if that actually makes a difference?
Well, it shouldn't. What matters are vertices, not faces. Isn't it?
I'm wondering if I should add an option to do the texture mapping to be a side view.
The reason for that would be to allow one to see the height as moved in a 3D program.
What do you mean?
I'm wondering if I should add an option to do the texture mapping to be a side view.
The reason for that would be to allow one to see the height as moved in a 3D program.
I'm thinking to do a raw with a max height and a min height as per the numbers we have.
Then UV a side view for further editing.
0 or Sea level would be a sand color.
Each level change would be a color change.
Now that would require a totally different routine for textures to be coded but I'm positive I can handle that.
Again. It would be a selectable option.
Oh, I got you now. I could do that in Photoshop or even in Excel probably, but having that directly in the exporter would be damn cool. Could map colors be customized (maybe a couple of colors for underwater gradients and another couple for land height gradients)? and could this color map be exported?
Jeff-Groves
02-11-20, 06:16 PM
As I played with a few files I found the over head texture map useless.
A side view mapping is crazy easy to play with!
We'd just do one and go from there as far as colors for levels.
I also use a single plane object file for sea level.
In Max I can turn it on and off.
This Script is highly advanced!
You run a simple .bat file I will provide and it goes automatic!
All you do is select a few options.
Select a RAW file? It checks to be sure it's the proper size and does the rest.
Select an OBJ file? Same thing. It knows what to look for and does the rest.
On OBJ to RAW? You have the option to have it save as a JSGME ready to go!
All you do is move the final output.
Unless you'd like the ability to save to the MODS folder in JSGME.
I can do that.
As far as the image file being encoded into the script then extracted on run?
Yeah. I can do that if need be.
I'd say just include that in the download and give good instructions on where to use it.
The whole idea and script is to save you time.
As I played with a few files I found the over head texture map useless.
Well, it depends: if mapped on top of the mesh you are editing, it can help you previewing better terrain levels. Another useful color-mapping feature would be if you could calculate slopes, and mark them with a certain color if they exceed a given value. That would help understanding where the game will map rock texture instead of grass or sand :yep:
A side view mapping is crazy easy to play with!
We'd just do one and go from there as far as colors for levels.
I also use a single plane object file for sea level.
In Max I can turn it on and off.
The same do I in Wings
This Script is highly advanced!
You run a simple .bat file I will provide and it goes automatic!
All you do is select a few options.
Select a RAW file? It checks to be sure it's the proper size and does the rest.
Select an OBJ file? Same thing. It knows what to look for and does the rest.
On OBJ to RAW? You have the option to have it save as a JSGME ready to go!
All you do is move the final output.
Unless you'd like the ability to save to the MODS folder in JSGME.
I can do that.
As far as the image file being encoded into the script then extracted on run?
Yeah. I can do that if need be.
I'd say just include that in the download and give good instructions on where to use it.
The whole idea and script is to save you time.
I can't wait to test those advanced features! :yeah:
Ashikaga
02-20-20, 05:59 PM
Jeff, please check your donations topic about buying the exporter and answer some of the questions there.
Ash.
.
Weinstube
10-05-20, 05:07 AM
Hi GAP just discovered your fantastic mod. I have it in combination with MOD 15 (with Submarinedeleted). I also use TDWs generic patcher and TDWs NewUI 7-4-2. Coming home on a wintry day and seeing from afar the coastline of Brunsbuttel with the white hills and trees, its little lights; it gives you a happy feeling!
Hi GAP just discovered your fantastic mod. I have it in combination with MOD 15 (with Submarinedeleted). I also use TDWs generic patcher and TDWs NewUI 7-4-2. Coming home on a wintry day and seeing from afar the coastline of Brunsbuttel with the white hills and trees, its little lights; it gives you a happy feeling!
You are welcome Weinstube, glad you like my mod! :salute:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.