![]() |
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. :D 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. |
Quote:
Quote:
Quote:
Code:
newmtl Balloon |
what is the logic behind calculations for edited mtls? or does the Sorter does it atm?
|
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.......... http://i108.photobucket.com/albums/n...034d09962a.jpg |
Quote:
Just like the GR2 importer/Exporter does not like some formats. Limitations of the programs. We work around them for now. :) |
Quote:
What I meant was not the reason of why we doing it, but how :) |
Do one filter on this mesh!!
Select filters, go down to texture, select Perwedge to pervertex UV. http://i108.photobucket.com/albums/n...-Balloon-2.jpg |
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. |
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/ :up: |
Once you 'filter' do a 'save as' and select wavefront obj.
Your export options need to look like this. Notice 'color' selected for face? :D http://i108.photobucket.com/albums/n...-Balloon-3.jpg |
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 :doh: |
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. :haha: |
Quote:
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! :o Then to use just some source the licenses became more then I was willing to mess with. Easier to write my own sorter. :88) |
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? |
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! :haha: 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. :up: 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. |
All times are GMT -5. The time now is 03:13 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.