SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
01-02-22, 06:17 PM | #61 |
Village Idiot
|
It's not important to limit the output since the TDW importer does round it down.
Not even sure He actually checks Normals from the Main object file to the AO object file. |
01-02-22, 06:29 PM | #62 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
That's the hard way, but depending on the model complexity this process can take a long time and it is not perfect. I give you an example. Let's say that we want to model a prism with a tear shaped base. Only one of its longitudinal edges is supposed to be hard, but there is no way you can have only one hard edge by detaching faces manually. This is where Blender Edge Split modifier comes in handy. It can detach even a single edge within an otherwise perfectly smooth surface, and it does that in one click |
|
01-02-22, 06:39 PM | #63 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
I know 3dsMax supports multiple UV sets for the same object. This is the best way to ensure that, once exported, main and AO objects are identical in all the respects but UV coordinates, and I bet devs exploited this feature to ease their job. Last edited by gap; 01-02-22 at 06:48 PM. |
|
01-04-22, 11:21 AM | #64 |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Lochinvar obj files, main and AO model
Yesterday I have had an insight into a couple of files, and I definitely see some problems.
This is a quick comparison of the two files: Vertices (v)
Texture vertices (vt)
Vertex normals (vn)
Faces (f)
If Almagest could obviate to my mistakes, sorting out texture coordinates and faces in one click, that would be terrific. I realize that setting up the needed automated routines might be more complicated than it sounds though. Alternatively, I could try to manual edit my AO model in the hope to correct at least in part the problems above. It that doesn't work, redoing the main UV mapping on the base of the AO model is still an option. That should not be a complicated task either. A little boring but not too complicated. For this particular task I think I would resort to Blender. Blender's advantage is that, like Max, it supports multiple UV sets, and it got advanced and configurable shader setting. Very useful for previewing the combined effect of diffuse, specular, normal and AO maps. Unfortunately I am not as proficient in Blender as I am in Wings3D, but learning it better would be an investment for future projects. Last edited by gap; 01-04-22 at 01:42 PM. |
01-04-22, 01:28 PM | #65 |
Village Idiot
|
All that stuff gets sorted automagically.
The nice thing about how Granny stores the files is that We can INSERT stuff that does NOT load! Extract a 3D model from a GR2 file and look at it! You'll see repeats of verts or textures that NEVER actually get called by any Face! So I balance the counts to match the largest of the input. In your case? V and VT will equal VN. The faces will be sorted which moves the VT placement of textures in the obj file. Thus one set of Faces that point to properly sorted information! Now since We NEVER call the extra information? It never gets loaded! I did try to point all this out to TDW several times. But I'm not sure he caught the idea so went with his way of doing the Loose Import. That, as We all know, causes HUGE increases in file size. Not only that but EACH line needs to be loaded to display properly in Game. Last edited by Jeff-Groves; 01-04-22 at 01:42 PM. |
01-04-22, 02:28 PM | #66 | |||
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
I like your automagic lol
Quote:
As I said, as far as hard edges are removed or split before GR2 import, vn's count will match v's count Quote:
I actually thought of a way for doing that in Excel, but it will work only for this specific set of files. Doing that spreadsheet generic would involve more work than it is probably worth. Nonetheless, while you work on a proper object sorter, I might give my stop-gap Excel tool a try... I am just curious to see my model in Blender with the two UV maps and connected textures applied, but I can't import the secondary UV map until the mismatch is fixed... (and I can't create a decent LOD model). Quote:
P.S: a big limit to performing only strict import with TDW's tool, will be vertex count. I am not even sure I can fit my puffer in the template given by the stock fishing boat... |
|||
01-04-22, 03:05 PM | #67 |
Village Idiot
|
I'm not criticizing TDW's work. It's BRILLIANT!
And the whole thing is kind of complicated if one does not have a full understanding of both the GR2 file storage and how obj files can be manipulated to match the GR2 format. I'll give you a quick example you can do. Cut say half the Faces in any object file and paste them to the top of the faces section of any obj file. So if you have 500 faces? Cut 250 and paste them at the top so you still have all 500. Then copy and paste say half your verts at the bottom of the verts section. Open the file in any 3D program. |
01-04-22, 03:07 PM | #68 |
Village Idiot
|
If you read back through this thread?
i've already told you HOW to adjust file sizes! Use the Loose import to grow or shrink things! It's going to take some work to determine how big a file to import under the loose setting to shrink or grow but it does work! |
01-04-22, 05:55 PM | #69 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
Good to know! I had missd that piece of information, sorry |
|
01-05-22, 01:49 PM | #70 |
Village Idiot
|
Redundant information is ignored with most programs.
And you can see that by exporting from a GR2 and then saving again in a program if you have optimize on save. Now how can you have 16150 faces but still have 25665 V, VT, VN? That's because the GR2 files SKIP some garbage information! It's simple math! 9515 lines are ignored. And that is directly from the NAGC_C2Appalachian GR2! I'm exploiting the way Granny works! I don't give a crap about Wings, Blender, nor 3D Max and how they may react once the files are run through Almagest. |
01-05-22, 02:12 PM | #71 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
|
|
01-05-22, 03:46 PM | #72 |
Village Idiot
|
Nice thing about the AO mapping is that it don't care about multiple textures for the main object file.
Now Almagest will determine WHICH faces structure it needs to use. Does it use the AO faces structure or the Main Object faces structure? It needs to scan the files, see if it's multi textured and choose the right way to sort things. A single mapped main object? It may be better to use the AO face structure. Multi mapped main object? Probably better to use that face structure THEN maybe fake some Faces. It's kind of like the Street Game where you try to follow the balls under cups! Everything has to be manipulated at just the right time, in the right order, to pass for magic! |
01-05-22, 05:24 PM | #73 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
First, I sorted AO faces so that they matched faces in the main obj file. For accomplishing this task I set my spreadsheet to compare vertex triplets in both files, as I knew that one triplet in one file corresponded with one triplet, and only one, in the other file. Matching face order in both files gave me information on which UV2 vt corresponded with which vt in the main object (the second numbers in each triplet), so I updated vt's in the AO model according to the order used in the main model. Now I need to copy the sorted AO vt's in main model's obj files, and I need to check in a 3D editor if I didn't make any mistake. If, as I hope, everything is in order I will send to you the new UV2 file so you can test your program on it too |
|
01-05-22, 06:32 PM | #74 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
There are only a few errors in the "new" UV2 map which I mostly know how to correct Last edited by gap; 01-05-22 at 07:22 PM. |
|
01-06-22, 12:35 PM | #75 |
Village Idiot
|
There you go!
You looked behind the curtain and saw the Magic. Now you can hand edit the rest of the file to be proper for GR2 format. Just copy and paste V or VT or VN's to MATCH which ever is highest in counts! You could also just add with 0's. So V 0.0 0.0 0.0 will work. Your just filling space. Since no FACE calls them? You'l never see them! I do suggest using Blender files as they are way smaller but produce the same results! Plus you get the modifier you like. Not sure WHY the Wings files have so many Normals compared to the Blender files? Last edited by Jeff-Groves; 01-06-22 at 12:50 PM. |
Thread Tools | |
Display Modes | |
|
|