![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#31 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Well since I lost all the original code somehow? I've started over.
That's not all bad as I have figured out a few more things that I had overlooked before. The most recent issue is with some obj files gap is working with. The textures are getting destroyed so We started takeing a good hard look at the problem. I'm convinced at this time that it's the way his tex co-ords and faces are being written to file. It confuses TDW's program and some information is being lost on import. I did 2 seperate work arounds to get an import that was good and I'm going to explain the best (IMO) of the 2. There are limitations that we will need to work with by hand editing a few files for now. Those will be corrected once I get some more codeing done on the Sorter. It's good enuff to do what is needed for now but not finished yet. It only sorts things into place where TDW's program expects to find them. A good example of this is to do an export from Meshlab and try to import that. gap has a copy of the Sorter and I'm sure he is just waiting to get started. ![]() First a few things about Meshlab. It does not like tga or dds files so have your textures also saved as jpg images. We also need to change the mtl file as it hates those also. Here's an edited version that will work. newmtl Balloon Ka 0.200000 0.200000 0.200000 Kd 1.000000 1.000000 1.000000 Ks 1.000000 1.000000 1.000000 Tr 0.000000 illum 2 Ns 0.000000 map_Kd Barrage_Balloon.jpg newmtl Rope Ka 0.200000 0.200000 0.200000 Kd 0.850980 0.850980 0.850980 Ks 1.000000 1.000000 1.000000 Tr 0.000000 illum 2 Ns 0.000000 map_Kd Barrage_Balloon.jpg Don't worry that it's different as we only use it for Meshlab so we get proper 'colors' when we export. Future updates to the Sorter will pre-adjust any mtl files, send the info to Meshlab, grap and then sort the exported file. You'll have no need to do all the editing we're doing now. Last edited by Madox58; 12-03-13 at 06:31 PM. |
![]() |
![]() |
#32 | ||
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
![]() Quote:
![]() Do we need it for giving the sorted obj files the last touch-ups before importing them in GR2 editor? Quote:
Code:
newmtl Balloon Ns 100.0 d 1.0 illum 2 Kd 1.0 1.0 1.0 Ka 0.6803199999999999 0.6803199999999999 0.6803199999999999 Ks 1.0 1.0 1.0 Ke 0.001 0.001 0.001 map_Kd Barrage_Balloon.tga newmtl Rope Ns 100.0 d 1.0 illum 2 Kd 0.85348 0.85348 0.85348 Ka 0.3673 0.3673 0.3673 Ks 0.001 0.001 0.001 Ke 0.0 0.0 0.0 map_Kd Barrage_Balloon.tga newmtl default Ns 100.0 d 1.0 illum 2 Kd 0.8333333333333334 0.7428571428571428 0.6444444444444445 Ka 0.8333333333333334 0.7428571428571428 0.6444444444444445 Ks 1.0 1.0 1.0 Ke 0.0 0.0 0.0 |
||
![]() |
![]() |
![]() |
#33 |
Ace of the Deep
![]() |
![]()
what is the logic behind calculations for edited mtls? or does the Sorter does it atm?
|
![]() |
![]() |
![]() |
#34 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Good point on showing the original mtl information.
Meshlab just will not read it and we need to import your file with textures to Meshlab BEFORE you use the Sorter as it is now. You should see this.......... ![]() |
![]() |
![]() |
#35 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]() |
![]() |
![]() |
#36 | |
Ace of the Deep
![]() |
![]() Quote:
![]() What I meant was not the reason of why we doing it, but how ![]() |
|
![]() |
![]() |
![]() |
#37 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Do one filter on this mesh!!
Select filters, go down to texture, select Perwedge to pervertex UV. ![]() |
![]() |
![]() |
#38 | |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]() Quote:
![]() Just copy paste what I posted to a new file safe from original files and rename it. Create a new txt file, paste the info and save. Rename to 'whatever.mtl' and use it for Meshlab. So if your original mtl file is Balloon.mtl? Name this one the same. Then you only need to rename the textures in it to fit your textures. Sorter will do all that later on. |
|
![]() |
![]() |
#39 | |
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
![]() Quote:
![]() @ Targor: if you want to understand what each row is meant for, you might be interested in the following link: http://paulbourke.net/dataformats/mtl/ the same for obj file format: http://paulbourke.net/dataformats/obj/ ![]() |
|
![]() |
![]() |
![]() |
#40 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Once you 'filter' do a 'save as' and select wavefront obj.
Your export options need to look like this. Notice 'color' selected for face? ![]() ![]() |
![]() |
![]() |
#41 | ||
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
![]() Quote:
Quote:
![]() I need to make some cleaning on my HD: I only have 54.4 GB of free space, and meshlab require 54.3 ![]() |
||
![]() |
![]() |
![]() |
#42 | |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]() Quote:
It's a limitation of Meshlab we're just working around for now. One thing nice about Meshlab? It can be command line called. So I can program to change the mtl, send all the files to Meshlab, have it do it's thing and export, then do the sort with you doing nothing aside from clicking cancel when the window pops back up. ![]() |
|
![]() |
![]() |
#43 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
That's all. The only function we need is that filter.
At one time I was working on the source for Meshlab to have it export proper objs but you would not believe the hoops you need to jump through to get all the needed libraries to build! ![]() Then to use just some source the licenses became more then I was willing to mess with. Easier to write my own sorter. ![]() |
![]() |
![]() |
#44 | |
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
![]() Quote:
At this stage I just have a few questions: - are we allowed to set more than one material per object? As I have told you before, after processing the balloon model with your sorter (without the meshlab part), Wings only saw one material used for the whole model, rather than the expected two materials. Did it happen because I had skipped the meshlab pre-processing, it is just Wings3d which can't read the sorted file properly, or what else? - have you looked into smoothing groups already? GR2 editor can't process Wings3d-generated obj files containing smoothing groups but, as I have learned today from targor, it has not problems with smoothing groups exported in 3ds max. - should we restore the original mtl file, after exporting from meshlab? |
|
![]() |
![]() |
![]() |
#45 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
Open the obj you exported with Notepad or whatever you use to edit text files.
You'll see this structure. vn 5.528841 -0.572654 0.029990 vt 0.701080 0.382580 v 5.194420 2.167730 -33.668861 TDW's program will puke that up on you faster then I can type! ![]() That's OK, We can work around it till he adjusts for that. As I've said before. Once he adjusts his program? Mine should be depricated and no longer needed. ![]() This is the point where we use the sorter as it is now. It reads the file and writes a new file sorted into the order TDW expects. It adds -sorted to the file name and is saved in the same folder as the original file for now. |
![]() |
![]() |
|
|