SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
01-18-19, 04:36 PM | #76 |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quick update on terrain object's LOD issue
As expected, the MinRenderDim controller does nothing on GR2 object, but there is more: wanting to discover what made LOD ranges too short for my sea stack model, I created a copy of one of the stock objects with the longest ranges, and I imported my model into it. I supposed LOD ranges to be governed by some little know or hidden parameter in mesh's extended data, and I hoped that after switching to a GR2 file with the appropriate ExtendedData settings my model would have been visible from further away, but unfortunately I was wrong and, at close distance, the model was popping in and out as I moved closer of further away from it. The next step was copying the same (stock) GR2 file used in my previous test, and using it in place of the sea stack without further changes. Result: I could see the model (a group of buildings) from a long distance with no sudden "pop up effect". At this point I started thinking that LOD distances could be ID/bone name related and that by renaming the bones I could have made the game not to recognize my object as a proper terrain object. To check that I imported the sea stack mesh in the same file as before without changing bone names, but again LOD ranges were too short. That excluded bone names from my list of suspects and it left me with just one reasonable hypothesis LOD ranges are mesh-related. To confirm that, I re-imported the original (stock) mesh in the file of my tests and, in accordance with my last statement, the object was visible again from a long distance. What can tie meshes and LOD distances? There must be an obvious link, but I am missing it |
01-18-19, 04:49 PM | #77 |
Village Idiot
|
Can you post pics of what your talking about?
|
01-18-19, 06:37 PM | #78 |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Please check your e-amail: I sent you a copy of my working files and a description of them. I hope that by reproducing the issue on your machine and by looking directly into the files, you will make yourself a better idea on the issue than you could get from simple screenshots
|
01-19-19, 11:55 AM | #79 |
Village Idiot
|
OK. I see what you are talking about now.
Try changing the collision mesh with the one the city GR2 has. I'd do it but I'm not home and don't have all the needed programs with me. If that solves the issue create a new collision mesh with a broad base but deep enough to not hit a sub or ship in the area. I'm looking out the window of my temporary apartment in Cleveland, Ohio right now. All that view needs is a VIIA in the river. LOL Last edited by Jeff-Groves; 01-19-19 at 12:15 PM. |
01-19-19, 01:06 PM | #80 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
So nice! I wish we had a SH Great Lakes campaign lol |
|
01-19-19, 04:22 PM | #81 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
After so much messing, the too short LOD range issue is gone for good, and the red pillar rock is now visible from far, far away 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. You put me in the right direction, thank you very much! This little discovery means that we can add to the game any kind of landmark with all the goodies of the GR2 format. You know what will the next model that I am going to import. Time to PM Jim |
|
01-19-19, 09:26 PM | #82 |
Sailor man
Join Date: Nov 2018
Posts: 43
Downloads: 66
Uploads: 0
|
Amazing!
Thanks to both of you for all these efforts. Beeing on the edge for the next release now... |
01-20-19, 04:39 AM | #83 |
Planesman
Join Date: Dec 2014
Location: Czech Republic
Posts: 193
Downloads: 527
Uploads: 0
|
|
01-20-19, 03:11 PM | #84 |
Village Idiot
|
Fantastic work My Friend!
|
01-20-19, 03:45 PM | #85 |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Now that the rendering range issue is solved, something else bothers me
How it is: How it should be: Bottom drawing courtesy of Kendras, re-scaled and georeferenced by me. Each quadrant in the above charts corresponds to one of the SH5 height maps and it measures 2.5 x 2.5 minutes (i.e. 5 x 5 km2). The map resolution is 25 meters. SH5 terrain can be edited using the inbuilt Terrain Editor. The output is one or more of the height maps that I described above. Unfortunately their editing in photoshop is not easy. You can open them, but all you is an apparently meaningless bunch of grey pixels. The height information contained in them seems encoded or mixed with noise of some sort |
01-20-19, 05:11 PM | #86 |
Village Idiot
|
You can see better details if you zoom out to 12.5% actual size.
Not that it will help to hand edit them but take a look at them like this. You may figure something out. |
01-20-19, 05:43 PM | #87 | ||
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
Quote:
|
||
01-20-19, 06:31 PM | #88 |
Village Idiot
|
Appears to be what is hard coded somewhere is my guess at the moment.
|
01-20-19, 06:39 PM | #89 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
-1500=0 ; -448=1 ; ... ; 7888=254 ; 8000=255 Am I asking too much? EDIT: I have just received confirmation; my guessing was correct 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 Last edited by gap; 01-20-19 at 06:58 PM. |
|
01-20-19, 06:59 PM | #90 |
Village Idiot
|
I'm playing with one of the RAW files now.
So the scale is 256 colors as the code snippet shows. Each pixel is 8 bits I believe. In Hex that all checks out. Last edited by Jeff-Groves; 01-20-19 at 07:17 PM. |
Tags |
enviromental mod, environment, terrain, trees, vegetation |
|
|