Page 1 of 2

Age Of Empires 4 / IV ( .rgm )

Posted: Tue Nov 02, 2021 4:50 am
by shinzef
Its relic chunky
but i dont know any tools to open / convert it

Engine: Essence Engine 5.0

( i also added other files since i dont know if its a model or something )
FIle Samples: https://drive.google.com/drive/u/3/fold ... 0kyt6-ZinO

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Tue Nov 02, 2021 9:56 am
by dimis9138
RRGeom appears to be the mesh file, appears to have what I can only assume is multiple LODs packed in each file (or maybe different age upgrades from the game when you go to the next age).

Last LOD I could find starts at offset 107048, 5256 verts, 10 padding - half floats. Vert count is at offset 193299. Faces I can't figure out however for now after a quick look.

Result so far
Image

Faces at 2F324, seems like it's half-float for verts and short faces.
Count 5256 also
Image

Settings: Image

This is pretty much all I can do with my limited knowledge for this file.

EDIT 2: It isn't LODs by the looks of it, just the submeshes split or something of the sort, couldn't combine all of them together with parameter sets on AXE unfortunately.

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Tue Nov 02, 2021 2:55 pm
by Bigchillghost
dimis9138 wrote: Tue Nov 02, 2021 9:56 amcouldn't combine all of them together with parameter sets on AXE unfortunately.
Why? You've made it with the last one. :)
chi_archery_range_control_age02.rrgeom.png
chi_archery_range_control_age02.rgm contains the same model as the one in chi_archery_range_control_age02.rrgeom BTW. Just without normals and texcoords though.

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Tue Nov 02, 2021 3:27 pm
by dimis9138
Bigchillghost wrote: Tue Nov 02, 2021 2:55 pm
dimis9138 wrote: Tue Nov 02, 2021 9:56 amcouldn't combine all of them together with parameter sets on AXE unfortunately.
Why? You've made it with the last one. :)
My result with the same settings:

Image

Is it because I haven't done multiple meshes on the parameter list on the top left? And if so how did you use it to separate mesh 0, 1 and 2? Or what am I missing here? :D
Although that does make me wonder, are the other meshes in the same file showing anything else that I can't see like I can't see with the last mesh due to something being wrong in my settings?

By the way, quick question - why does AXE convert the 10 for stride to 16?

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Tue Nov 02, 2021 4:12 pm
by Bigchillghost
dimis9138 wrote: Tue Nov 02, 2021 3:27 pm Is it because I haven't done multiple meshes on the parameter list on the top left?
Yes. All params you can see from the panel, except for the endianness and those of the materials and bones, are properties of ONE mesh. To save multiple mesh objects, you must add it to the Prameter List and use the "from/in List" operations for export/preview. Thought I'd already mentioned that:
Bigchillghost wrote: Sun Oct 31, 2021 7:26 am ... So you have to save the existing params of the 1st mesh into the "Paramter List" (by clicking the "Add" button, yes), and start over for the rest "mesh" objects.

dimis9138 wrote: Tue Nov 02, 2021 3:27 pm are the other meshes in the same file showing anything else that I can't see like I can't see with the last mesh due to something being wrong in my settings?
No. Nothing different in particular.
dimis9138 wrote: Tue Nov 02, 2021 3:27 pmwhy does AXE convert the 10 for stride to 16?
What's "10" for? The size of each vertex element (including pos, norm & uv) is 16 bytes, that's what the stride stands for.

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Tue Nov 02, 2021 4:30 pm
by dimis9138
Bigchillghost wrote: Tue Nov 02, 2021 4:12 pm Yes. All params you can see from the panel, except for the endianness and those of the materials and bones, are properties of ONE mesh. To save multiple mesh objects, you must add it to the Prameter List and use the "from/in List" operations for export/preview. Thought I'd already mentioned that:
That actually worked, nice! I just need to figure out material groups now hah but shouldn't be too hard, just assign a material to each mesh parameter.

Also 10 stood for the padding (the hex length) cause I used MR initially to figure out the mesh before going over to AXE, hence why I was wondering why it converted it to 16 but I was dumb cause I didn't consider that in HxD that it was 16 indeed. You should defo offer tutoring by the way, would definitely pay by the hour! :D

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Tue Nov 02, 2021 5:04 pm
by Bigchillghost
dimis9138 wrote: Tue Nov 02, 2021 4:30 pm Also 10 stood for the padding (the hex length) cause I used MR initially to figure out the mesh before going over to AXE
If I ever remember correctly the "padding" indicates the number of bytes to skip, after reading the data, not because it's in hex notation.
dimis9138 wrote: Tue Nov 02, 2021 4:30 pm You should defo offer tutoring by the way, would definitely pay by the hour!
That, however, will cost much more hours which I have no intention for. Read the specification of AMR instead for detailed explanation.
Bigchillghost wrote: Mon Aug 19, 2019 7:27 am

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Thu Nov 04, 2021 2:56 pm
by shinzef
i tried this method by Bigchillghost

so i downloaded AXE
but it says its missing some ddl
and i cant the view scene

( edit nvm i just noticed the txt file )

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Thu Nov 04, 2021 3:00 pm
by Bigchillghost
The links to the required components are included in the download. Just read the post and follow the instructions.

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Thu Nov 04, 2021 3:17 pm
by shinzef
ye thanks
I just noticed it

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Fri Nov 05, 2021 1:13 pm
by dimis9138
Thanks to DKDave & Joschka I was able to come up with this noesis plugin, this doesn't work with all stuff since it essentially looks for the DATAGEOB header, counts it's verts count and offsets it for the verts buffer, then looks for next DATAGEOB faces count and counts that as faces count and offsets it for the faces buffer, however in some cases it has two DATAGEOB headers for vertices, meaning that it doesn't work in those cases and I don't know how to fix it for that - but it should work with most props. If someone could fix it for that and post their version so I could understand Noesis better I'd really appreciate it!

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Fri Nov 05, 2021 2:41 pm
by dimis9138
Example of a file it won't work with:

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Fri Nov 05, 2021 11:21 pm
by dimis9138
Fixed issue above thanks to DKDave's help, it now grabs the correct stride, should work with most if not all models.
Please use this only to reverse models to fix bugs and such and not commercialized reasons.
fmt_aoe4.rar

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Sun Nov 07, 2021 11:26 am
by shinzef
Damnnnn, Thanks for this plugin

It works on all models i have tested

Re: Age Of Empires 4 / IV ( .rgm )

Posted: Thu Dec 02, 2021 2:15 am
by Tora
Hey, thank you for the information in this thread. I added initial .rrgeom support to https://github.com/aoemods/AOEMods.Essence. I noticed some rrgeoms have 28 bytes per vertex and some (like the first one in this thread) have 16, perhaps there are even more. Right now I just read the first two GEOB chunks of each geometry object in the file and assume the first stores positions as halfs (and I skip the rest of the vertex data) and the second stores faces. Hopefully we can figure everything out and also convert the material files (I already have a converter for the textures too).