ESD_SubObj ( ) -> does it really show the first sub_obj in the shape?
#1
Posted 19 December 2023 - 11:01 AM
Does anyone know exactly which sub_object of an s-file is addressed by the line ESD_SubObj ( ) in the sd-file?
It says here that it is the first sub_object of an s-file. But in the MSTS s-file "US2lamp1.s", for example, it is the second sub_object, which is then "switched on" at night.
Does "sub-object" even mean a sub_object entry in the s-files?
Greetings
Jonas
EDIT, Dec. 29, 2023: My last findings to the above questions are here.
#2
Posted 20 December 2023 - 11:45 PM
jonas, on 19 December 2023 - 11:01 AM, said:
It says here that it is the first sub_object of an s-file. But in the MSTS s-file "US2lamp1.s", for example, it is the second sub_object, which is then "switched on" at night.
Does "sub-object" even mean a sub_object entry in the s-files?
Hi Jonas,
It's definitely only the first sub-object. Additional sub-objects are not affected. The US2lamp1.s file only has one sub-object, named LIGHTPOOL. (The part name shouldn't matter, though.)
https://msts.jovet.net/files/images/US2LampHierarchy1.png
I just tested a shape with multiple sub-objects (e.g. the bright icon in the hierarchy list) and only the first one is affected, both in MSTS and Open Rails.
#3
Posted 21 December 2023 - 11:01 AM
So sub-objects mean the first matrix that is subordinate to the root matrix?
And sub-objects does not mean the (first) so called "sub_object" listed in the shape files?
... distance_level ( distance_level_header ( dlevel_selection ( 1500 ) hierarchy ( 2 -1 0 ) ) sub_objects ( 4 sub_object ( sub_object_header ( 00000400 -1 -1 000001d2 000001c4 ...
#4
Posted 22 December 2023 - 10:51 AM
Jovet, on 20 December 2023 - 11:45 PM, said:
I have created this shape and have this ESD_SubObj ( ) problem in OR:
The reception building shape consists of 2 matrices: "Main" and "Night". "Night" is the first and only child matrix and consists of 1 primitive which is textured with "BlendATex". The root matrix "Main" consists of 3 primitives, which are all textured with "TexDiff".
OR apparently considers the first primitive (80 polys, texture "BfTrglw_Jm.ace") of the root matrix to be the first sub-object and therefore does not draw it on the day.
In the shape's code, the first "sub_object" in the "sub_objects" section is the 8 poly primitive of the "Night" matrix. The second "sub_object" is the 80-poly-"sub_object" of the root marix "Main".
I come to the conclusion that OR is incorrectly using the second "sub_object" listed in the shape as being switched day/night by "ESD_SubObj ( )".
OR does not seem to evaluate the matices but the primitives - more precisely: the 2nd "sub_object" in the shapes code with its primitive.
Since it works correctly in MSTS, I think it should be treated as an OR bug.
Do I see this correctly or what is wrong with my shape? -> BfTrglw_Jm.zip (158.04K)
Number of downloads: 35
#5
Posted 23 December 2023 - 07:26 AM
jonas, on 21 December 2023 - 11:01 AM, said:
And sub-objects does not mean the (first) so called "sub_object" listed in the shape files?
Yes, and yes. The terminology gets confusing because a lot of it is used inappropriately. That's one reason I like the nice, generic term part.
jonas, on 22 December 2023 - 10:51 AM, said:
OR apparently considers the first primitive (80 polys, texture "BfTrglw_Jm.ace") of the root matrix to be the first sub-object and therefore does not draw it on the day.
It may help to know which software you used to create this building shape?
jonas, on 22 December 2023 - 10:51 AM, said:
I don't really understand why your part Night shows 8 "static" polygons and none of the other parts seem related to or peers of that. I don't believe your shape is structured or exported correctly. When you click on the "1" node in the hierarchy list, the part you show that disappears highlights.
Additionally, you say things work in MSTS, but in MSTS shape textures must be sized to a square power of two. Maybe you've lucked out somehow, but that's definitely not a supported design.
#6
Posted 23 December 2023 - 12:57 PM
Jovet, on 23 December 2023 - 07:26 AM, said:
Additionally, you say things work in MSTS, but in MSTS shape textures must be sized to a square power of two. Maybe you've lucked out somehow, but that's definitely not a supported design.
Sorry, I reduced the size of the texture files of the shape in order to let the download here not become too big. Here again the shape with the original sized texture files: BfTrglw_Jm.zip (1.3MB)
Number of downloads: 41
#7
Posted 23 December 2023 - 01:38 PM
About the terms: Because "sub_object" is used by Kuju in the shape code, I assumed that "ESD_SubObj ( )" might refer to ... might refer to.
In fact, however, it seems to refer to the first sub-matrix, at least in MSTS.
What does the "1" in an orange primitiv cube shown in the Model Hierarchy window actually mean? Is that known?
I can't read anything about the meaning of the numbers in the Shape Viewer help. It only says about the orange cubes: "Orange indicates a primitive in the higher sub-objects - these are usually alpha textured (translucent) parts."
#8
Posted 23 December 2023 - 04:57 PM
This order can be recognized by the numbers in the orange cubes of the primitive (the orange parts ;-). The brown cube is part of the order stands for the number 0, i.e. the first sub_object in the shape, the number 1 for the second and so on.
It is now interesting that MSTS hides the first sub_object/primitive, OR the second sub_object/primitive because of ESD_subObj () on the day:
The matrices and their hierarchy seem to play no role at all for the ESD_subObj () parameter!
OR differ and does not correctly simulate the MSTS-ESD_subObj functionality in my eyes.
#9
Posted 24 December 2023 - 01:32 AM
jonas, on 23 December 2023 - 01:38 PM, said:
jonas, on 23 December 2023 - 01:38 PM, said:
I can't read anything about the meaning of the numbers in the Shape Viewer help. It only says about the orange cubes: "Orange indicates a primitive in the higher sub-objects - these are usually alpha textured (translucent) parts."
The Shape Viewer Hierarchy window will show special numbered icons for the first four subordinate parts, which the MSTS documentation does call "subobjects". The rest of the subordinate parts have generic icons, as I suspect the program's creator did not want to take the time to make and manage all 32 custom icons.
jonas, on 23 December 2023 - 04:57 PM, said:
This order can be recognized by the numbers in the orange cubes of the primitive (the orange parts ;-). The brown cube is part of the order stands for the number 0, i.e. the first sub_object in the shape, the number 1 for the second and so on.
It is now interesting that MSTS hides the first sub_object/primitive, OR the second sub_object/primitive because of ESD_subObj () on the day:
The matrices and their hierarchy seem to play no role at all for the ESD_subObj () parameter!
OR differ and does not correctly simulate the MSTS-ESD_subObj functionality in my eyes.
My modeling avenue of choice has been Gmax. When I export to shape files from Gmax, I can explicitly control which parts are which "subobjects" in the final shape. For example, to test functionality for this thread, I made this test shape:
https://msts.jovet.net/files/images/TestEsdSubObject1.png
With this shape, I can confirm that MSTS and Open Rails behave identically, and only the first "sub-object" SUB1 is hidden during the day for ESD_SubObj.
Please notice that the bright, numbered icon polygons are all listed subordinate to the part names. This is how it should look, as those polygons belong to those parts. The same is true of the US2Lamp1.s shape I posted above. Your shape's hierarchy does not look like this, which is what I believe is causing you problems. If you don't have the Conversion of Shapes and Textures 1.01.doc file to review, I will be happy to send it to you.
#10
Posted 24 December 2023 - 01:40 AM