SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 01-25-20, 09:40 PM   #286
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
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:



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/...Masks.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)!

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

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!
__________________
_____________________
|May the Force be with you!|
...\/

Last edited by gap; 01-25-20 at 10:09 PM.
gap is offline   Reply With Quote
Old 01-26-20, 05:57 PM   #287
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,438
Downloads: 131
Uploads: 0


Default

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.
Jeff-Groves is offline   Reply With Quote
Old 01-26-20, 07:54 PM   #288
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
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
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-01-20, 04:22 PM   #289
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,438
Downloads: 131
Uploads: 0


Default

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 is offline   Reply With Quote
Old 02-01-20, 05:54 PM   #290
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,438
Downloads: 131
Uploads: 0


Default

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 is offline   Reply With Quote
Old 02-08-20, 01:14 PM   #291
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,438
Downloads: 131
Uploads: 0


Default

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.

http://www.mediafire.com/file/wd5gw9...RAW-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.

Last edited by Jeff-Groves; 02-08-20 at 01:24 PM.
Jeff-Groves is offline   Reply With Quote
Old 02-09-20, 12:02 PM   #292
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,438
Downloads: 131
Uploads: 0


Default

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.
Jeff-Groves is offline   Reply With Quote
Old 02-09-20, 08:45 PM   #293
Texas Red
Fastest Gun Around
 
Texas Red's Avatar
 
Join Date: Aug 2019
Location: Agua Fira, New Mexico
Posts: 2,368
Downloads: 527
Uploads: 5
Default

Absolutely amazing. Cannot wait to download it.
:K aleun_Applaud:
__________________
There are no secrets to success. It is the result of preparation, hard work, and learning from failure.
— Colin Powell


I'm not very active on the forums anymore. If you have a question, please DM me and I'll respond ASAP!
Texas Red is offline   Reply With Quote
Old 02-10-20, 12:27 PM   #294
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,438
Downloads: 131
Uploads: 0


Default

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 is offline   Reply With Quote
Old 02-11-20, 12:52 PM   #295
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,438
Downloads: 131
Uploads: 0


Default

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 is offline   Reply With Quote
Old 02-11-20, 02:03 PM   #296
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,438
Downloads: 131
Uploads: 0


Default

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.

Last edited by Jeff-Groves; 02-11-20 at 05:21 PM.
Jeff-Groves is offline   Reply With Quote
Old 02-11-20, 05:48 PM   #297
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Hi Jeff, sorry for the late feed-back

Quote:
Originally Posted by Jeff-Groves View Post
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!

Quote:
Originally Posted by Jeff-Groves View Post
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.

http://www.mediafire.com/file/wd5gw9...RAW-A7.7z/file
Thank you Sir, I appreciate all your work. This new version of the exporter will surely speed up the conversion process

Quote:
Originally Posted by Jeff-Groves View Post
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

Is the current alpha fixing the issue?

Quote:
Originally Posted by Jeff-Groves View Post
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.
Quote:
Originally Posted by Jeff-Groves View Post
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).

Quote:
Originally Posted by Jeff-Groves View Post
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

Quote:
Originally Posted by Jeff-Groves View Post
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!

Quote:
Originally Posted by Jeff-Groves View Post
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?

Quote:
Originally Posted by Jeff-Groves View Post
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?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-11-20, 05:54 PM   #298
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
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?
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-11-20, 06:16 PM   #299
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,438
Downloads: 131
Uploads: 0


Default

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.

Last edited by Jeff-Groves; 02-11-20 at 06:28 PM.
Jeff-Groves is offline   Reply With Quote
Old 02-11-20, 07:28 PM   #300
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by Jeff-Groves View Post
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

Quote:
Originally Posted by Jeff-Groves View Post
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

Quote:
Originally Posted by Jeff-Groves View Post
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!
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Reply

Tags
enviromental mod, environment, terrain, trees, vegetation


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:51 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.