View Full Version : [WIP] PIFT
Madox58
12-21-12, 03:46 PM
Privateer's Intellegent File Transformer.
Or the sound a cigarette makes when you drop it in a can of Beer.
:haha:
What it is is a program that adjusts obj files so one can import them with TWD's GR2 program in the strict manner.
You can see this post for the problem I'm addressing.
http://www.subsim.com/radioroom/showthread.php?p=1907739#post1907739
You may need to back up several posts to fully understand what I'm talking about.
Or you can ask here and I'll explain the issue.
I got very tired of doing things by hand so I'm codeing everything to do it automagically.
What you will be able to do is import anything from SH4 with the proper AO mappings intact!
Or create all new AO's (following certian rules) and import with no problems and no unneeded overhead.
Once TDW has time to work on his code I'll explain everything to him so he can code this into his Program.
Then mine will be depricated.
:D
Targor Avelany
12-21-12, 04:23 PM
woot! I'll test this as soon as I come back! :yeah:
Madox58
12-21-12, 04:42 PM
If one wants to see the problems as they stand now?
Try to import stuff from SH4 as exported by S3D.
:hmmm:
That's why, I believe, we don't see a mass conversion project in the works at this point in time.
Until the imports are correct? It won't happen and your stuck with the limited dat format.
A secondary issue is that each object needs to be exported one at a time with S3D.
I'll address that later.
:D
Great tool privateer, can't wait to put your PIFT into action :up:
Madox58
12-23-12, 04:29 PM
The first part of PIFT is nearly finished and I hope to have it ready for anyone to test soon.
:yep:
The first part will take files exported from SH4 and correct them so TDW's GR2 program will import them without all the overhead I'm seeing.
It should also work with self created obj files.
This first part does not address the problem of importing AO mappings yet.
The second part will handle that. (I hope! :haha:)
You'll need to download and install MeshLab as I do use the MeshLab Server to do the basic transformation.
:up:
The first part will take files exported from SH4 and correct them so TDW's GR2 program will import them without all the overhead I'm seeing.
It should also work with self created obj files.
Is it going to work the same way with SH3 exported meshes?
Madox58
12-24-12, 04:01 PM
Yes. It will handle SH3 files as well.
I'm useing the SH4 files because they have the AO mapping already.
Going through some old Notes and code snippets I also found a few lines that will make the final code work go alot quicker.
Yes. It will handle SH3 files as well.
I'm useing the SH4 files because they have the AO mapping already.
Going through some old Notes and code snippets I also found a few lines that will make the final code work go alot quicker.
Cool. Keep us informed on any progress, please :yeah:
silentmichal
01-01-13, 03:57 PM
Hmm, great name: PIFT :D
Like "pif-paf" :):
http://i.imgur.com/hINn4.gif
Hmm, great name: PIFT :D
Like "pif-paf" :):
yes agreed, cool name. I can imagine the following conversation taking place in a near future:
Q: "did it take very long importing the type II U-boat into SH5?"
R: "Oh, it was easy: I made it in a PIFT" :yep:
silentmichal
01-01-13, 05:08 PM
yes agreed, cool name. I can imagine the following conversation taking place in a near future:
Q: "did it take very long importing the type II U-boat into SH5?"
R: "Oh, it was easy: I made it in a PIFT" :yep:
Yes!!! Of course I'll use this program in future :up:.
Madox58
01-01-13, 06:01 PM
I wondered alot about why the GR2 editor from TDW did the loose imports the way it does. I spotted the problem after long hours of not thinking of how obj files actually work, but stareing at the exported files from GR2 files.
Then I took a step back and studied how an obj file works, looked at exports from GR2 files, and finally saw at lest part of the GR2 meshes scheme.
To encode a proper diffuse mesh and AO mesh, We need exact count matches for verts and such.
Sounds easy but it's not just that simple.
Well, it is, but it isn't also.
One major thing I found is that a mesh can contain references to a real-face/vert/texture as a placer but it does not get rendered.
It's a kind of OpenGL thing in some ways, but at render time is corrected by the granny engine.
(granny is not the only thing that handles this kind of issue)
We need to open 2 obj files, get a per vertext UV mapping for each.
Then do a bunch of compares and mixing to get 2 matched obj files for import with TDW's Program.
The hard part is what faces grouping can/should be duds to create the best false references?
Targor Avelany
01-03-13, 04:31 PM
I'll be home on saturday, my textures nearly ready too; so it is time to import my lifeboat into GR2 and start up the testing of this tool :)
Let me know if there are any particular things you need me to test, privateer.
Madox58
01-03-13, 08:55 PM
That sounds great.
I did a test conversion of some files sent to me.
The files converted fine and I'm still testing the results with TDW's version 272.
I found a few things I need to re-code due to a too strict structure issue when importing.
Your project probably has a better chance at this time of working right out of the gate.
Send me a link to the obj files you have and which GR2 file you want to work with and I'll run it all through.
From what I'm seeing the idea and codeing is proper but I still need to work within what TDW's program will handle at this time.
What I'm am aiming for is to solve enuff issues to allow him to re-code when he has the time.
(Unless he wants some help in areas)
Since you are looking for something to test your tool on, I was going to suggest you to do it with the whale I've imported for OHII... :O:
...but then it came to my mind that the whale got animated meshes. How is going GR2 editor to deal with them? In s3d this process was automatic but now, I guess, each mesh should be imported manually. Furthermore, the dat format had a MeshAnimationData controller, but what about GR2 format? I cannot think of any GR2 animated object featured in SH5 (flags are still in dat format by the way) :hmmm:
Okay, just talking out lout. Time to shut up and wait for your answer... unlike me you at least know what we are talking about ;) :D
Madox58
01-03-13, 09:48 PM
I have a basic understanding of the animations in GR2 files.
Not enuff to do anything meaningful at the moment though.
I probably/maybe can create a proper snorkel animation.
One that rotates up out of the deck.
:hmmm:
But getting the proper animation your talking about is still a ways off for us.
We could probably fall back and use the GR2 exporters other Games use but I have an issue with that.
RAD did not approve that release and it also codes in 16 bit.
I'll not chance pissing of the friends we have made with RAD at this point.
Targor Avelany
01-03-13, 10:00 PM
will do, privateer. Sat/Sun I will send you the files.
Yes, in fact I had a feeling that my reasoning was leading us to a blind alley... :shifty:
will do, privateer. Sat/Sun I will send you the files.
Tha's for sure a better idea :up:
Madox58
01-03-13, 10:21 PM
No. It's not a blind alley. Just a dark alley for now.
If one gives up and says it can't be done?
It never will get done.
silentmichal
01-05-13, 05:41 AM
Privateer, any progress with my files? I hope yes :yep:.
No. It's not a blind alley. Just a dark alley for now.
If one gives up and says it can't be done?
It never will get done.
:sunny:
silentmichal
01-05-13, 12:55 PM
No. It's not a blind alley. Just a dark alley for now.
If one gives up and says it can't be done?
It never will get done.
So... it means that PIFT won't release :06:
So... it means that PIFT won't release :06:
No, precisely the opposite :up:
privateer was answering a question of mine, about the possibility of inporting animated meshes into GR2 format. Read here (http://www.subsim.com/radioroom/showpost.php?p=1987891&postcount=15) :yep:
silentmichal
01-05-13, 01:03 PM
No, precisely the opposite :up:
privateer was answering a question of mine, about the possibility of inporting animated meshes into GR2 format. Read here (http://www.subsim.com/radioroom/showpost.php?p=1987891&postcount=15) :yep:
Ohh, my English :shifty:. But I'm learning still :know:!
]
Ohh, my English :shifty:. But I'm learning still :know:!
You will, but your wild nights in Bangkok won't help your learning process :O: :haha:
Madox58
01-06-13, 12:08 AM
Privateer, any progress with my files? I hope yes :yep:.
I had to do alot of conversion by hand but it codes pretty much proper.
I need to change a few lines in my code to avoid the hand editing.
:doh:
I also need to do some testing with TDW's GR2 program as to how it's handleing multipule subsets like you sent me.
According to how meshes are built in a GR2 file?
It's proper in the fact that all stats are dead on!
Targor Avelany
01-17-13, 02:16 AM
sorry for the delay, privateer.
Unfortunately, for some reason, 3ds max is messing up the textures when exporting to OBJ file and than re-importing. I'm figuring this problem atm.
Once again - sorry.
silentmichal
01-19-13, 07:41 AM
Any news :06:
SteelViking
01-20-13, 03:46 AM
Hey there privateer, glad to see you haven't been keelhauled...yet:haha:
Madox58
01-23-13, 07:07 PM
Hey there privateer, glad to see you haven't been keelhauled...yet:haha:
You must mean again?
:03:
Been keelhauled. Didn't like it.
Had to earn my way back in here at SubSim.
:salute:
Believe me when I say I am Honored to have this second chance for so long now!
:yep:
Madox58
12-03-13, 05:59 PM
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.
gap has a copy of the Sorter and I'm sure he is just waiting to get started.
:D
Sure, you can bet on it :03:
First a few things about Meshlab.
Do we need it for giving the sorted obj files the last touch-ups before importing them in GR2 editor?
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.
Just for reference, I am posting here the content of the original mtl file:
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
Targor Avelany
12-03-13, 06:48 PM
what is the logic behind calculations for edited mtls? or does the Sorter does it atm?
Madox58
12-03-13, 06:52 PM
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/n12/privateer_2006/SH5%20Stuff/c3541391-3cc8-4d8c-8cd6-dd034d09962a.jpg
Madox58
12-03-13, 06:53 PM
what is the logic behind calculations for edited mtls? or does the Sorter does it atm?
Meshlab does not like the format.
Just like the GR2 importer/Exporter does not like some formats.
Limitations of the programs. We work around them for now.
:)
Targor Avelany
12-03-13, 06:58 PM
Meshlab does not like the format.
Just like the GR2 importer/Exporter does not like some formats.
Limitations of the programs. We work around them for now.
:)
sorry, privateer, I guess I still have problems expressing my thought sometimes :)
What I meant was not the reason of why we doing it, but how :)
Madox58
12-03-13, 06:59 PM
Do one filter on this mesh!!
Select filters, go down to texture, select Perwedge to pervertex UV.
http://i108.photobucket.com/albums/n12/privateer_2006/SH5%20Stuff/ML-Balloon-2.jpg
Madox58
12-03-13, 07:04 PM
sorry, privateer, I guess I still have problems expressing my thought sometimes :)
What I meant was not the reason of why we doing it, but how :)
Ah, Yes Mate.
:)
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.
Ah, Yes Mate.
:)
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.
I also guess that we should have as many newmtl statements as the different materials used on our models :hmm2:
@ 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:
Madox58
12-03-13, 07:14 PM
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/n12/privateer_2006/SH5%20Stuff/ML-Balloon-3.jpg
Do one filter on this mesh!!
Select filters, go down to texture, select Perwedge to pervertex UV.
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
Is that all we need to do in meshlab before using your sorter? :sunny:
I need to make some cleaning on my HD: I only have 54.4 GB of free space, and meshlab require 54.3 :doh:
Madox58
12-03-13, 07:20 PM
I also guess that we should have as many newmtl statements as the different materials used on our models :hmm2:
Right.
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:
Madox58
12-03-13, 07:25 PM
Is that all we need to do in meshlab before using your sorter?
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!
: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)
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!
: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)
Okay, tomorrow I will free up some space on my hard drive (I guess I have too many SH files in my downloads folder), and I will make sure to follow your instructions step by step.
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?
Madox58
12-03-13, 07:46 PM
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.
Madox58
12-03-13, 07:53 PM
gap,
Bear with me as we go through this first part of working with the sorter as you have it now.
That is a version I did not want to release as I could fore see the very questions your asking.
:)
It will fix your issues now once you understand the limitations and how to edit things.
Future versions will make all this a non-issue and will just be a 'click-done'
type thing.
:D
If you've gotten this far? Open the obj file you just exported and search for use.
You should have 2. Those will be listed as material_0 and material_1
There should also be a new mtl file.
Now you can run the sorter on the obj file exported from Meshlab.
gap,
Bear with me as we go through this first part of working with the sorter as you have it now.
That is a version I did not want to release as I could fore see the very questions your asking.
:)
Take my questions as reminders of features which need for attenction. At this stage, I think I am the one who knows more about the limitations of TDW's importer, as most other modders who have messed with his tool seem to use max as their main 3d program, and TDW himself has probably designed his importer over max-generated files :yep:
It will fix your issues now once you understand the limitations and how to edit things.
Future versions will make all this a non-issue and will just be a 'click-done'
type thing.
:D
:up:
I am sorry that I can't test your full method right away, but it is 2 AM here in the old Europe, and my HD cleaning will take some time. I hope to install meshlab within the next 24 hours :salute:
Madox58
12-03-13, 08:15 PM
Take your time Mate.
:)
Your issues have solved several things I was unsure of and could not prove.
Now that they are known? I can program around them and help TDW improve his fantastic work with some real great info.
:up:
Madox58
12-03-13, 08:36 PM
Take my questions as reminders of features which need for attenction. At this stage, I think I am the one who knows more about the limitations of TDW's importer, as most other modders who have messed with his tool seem to use max as their main 3d program, and TDW himself has probably designed his importer over max-generated files
I'm thinking he did do alot with wings-3d at one time.
:hmmm:
I still can not figure out what he is doing on import though.
I did take your files and run them through S3D into a dat, exported then imported to a GR2. That GR2 showed a weird ratio compared to going through Meshlab and my sorter.
Now I may have a better understanding of 3D file formats and how they work. I don't know for sure.
I know TDW is the better at programming once he understands things.
Me? I hack along to get things to work.
:haha:
He creates ART!
:up:
As for you doing the most with importing and such?
I agree you have the most detailed information and knowledge on useing the GR2 Importer by TDW.
I would not be working with you if it was any other way.
:salute:
Say the problem of messed up textures never happened? I'd never had started up a project that I lost all the source code for. I'm weird that way.
:har:
Targor Avelany
12-04-13, 12:31 PM
considering that I don't have the sorter, I guess I'll just have to wait.
But I will mess around with the meshlab to see if I can figure out at least the UVs.
In the mean time I'll work on correcting my model encompassing your suggestions. :)
Madox58
12-04-13, 12:56 PM
The sorter won't fix your UV problems.
All it does is re-order the information of an obj file to allow TDW's program to read it.
If everything goes as I hope today I'll have a little better version ready.
It will eliminate alot of the hand editing on the sorted file.
tonschk
12-04-13, 01:27 PM
Thank you a lot :D :up::yeah:privateer :rock::salute::sunny:
Madox58
12-04-13, 03:07 PM
I mentioned I did an import/export useing S3D to adjust the file.
Here's a screen shot of both test imports to GR2.
Look closely at the Vertices count.
http://i108.photobucket.com/albums/n12/privateer_2006/SH5%20Stuff/Compare_Imports.jpg
The top file was done useing S3D , the bottom useing Meshlab and then sorting the file.
The top GR2 file size is 1,485 KB
The bottom is 411 KB
That is a major saveings and the UV's for both are correct.
:yep:
I'm thinking he did do alot with wings-3d at one time.
:hmmm:
Yes, I used to think so until recently, but all my attempts to perform loose imports of Wings3d-exported object files have failed. Only max-exported objects gave the desired results with loose imports. Strict imports didn't pose any problem though, no matter the exporter used.
I still can not figure out what he is doing on import though.
I did take your files and run them through S3D into a dat, exported then imported to a GR2. That GR2 showed a weird ratio compared to going through Meshlab and my sorter.
Tried that. S3d, Softimage Mod Tool and Blender obj files all show UV map distorsions when imported through GR2 Editor.
As for you doing the most with importing and such?
I agree you have the most detailed information and knowledge on useing the GR2 Importer by TDW.
I would not be working with you if it was any other way.
:salute:
I got to amend your statement: I am the one who had the worst problems using the GR2 Importer by TDW. I would be curious to hear from BIGREG and Silentmichel who have laso used it extensively.
I mentioned I did an import/export useing S3D to adjust the file.
Here's a screen shot of both test imports to GR2.
Look closely at the Vertices count.
...
The top file was done useing S3D , the bottom useing Meshlab and then sorting the file.
The top GR2 file size is 1,485 KB
The bottom is 411 KB
That is a major saveings and the UV's for both are correct.
:yep:
Is that the last version of the balloon that I sent you yesterday? Exported straight from Wings3d, that object only has 3,226 vertices, which is even lesser than the 4,020 vertices count of the meshlab export...
Madox58
12-04-13, 04:48 PM
Is that the last version of the balloon that I sent you yesterday? Exported straight from Wings3d, that object only has 3,226 vertices, which is even lesser than the 4,020 vertices count of the meshlab export...
Yes it is.
BUT! it gets the filter in mesh lab run on it!
We converted to pervertex from perwedge.
Some of the verts are repeats but with specific tex co-ords.
It's that whole thing I told you about on shuffleing things like that.
You can't think of an import to a GR2 as a 'perfect copy' of your obj file.
Also, look at the version done through S3D? Not even close to your verts count!
So did you get Meshlab installed yet?
Yes it is.
BUT! it gets the filter in mesh lab run on it!
We converted to pervertex from perwedge.
Some of the verts are repeats but with specific tex co-ords.
It's that whole thing I told you about on shuffleing things like that.
You can't think of an import to a GR2 as a 'perfect copy' of your obj file.
Ok thank you, that makes perfect sense, and it explains why objects exported from game (both using GR2 editor or S3d) have so many redundant vertices/edges. :up:
Until now I was erroneously convinced it was due to poor optimization by devs :doh:
Madox58
12-04-13, 05:09 PM
Ok thank you, that makes perfect sense, and it explains why objects exported from game (both using GR2 editor or S3d) have so many redundant vertices/edges. :up:
Exporting from a GR2 or with S3D?
I'd run it through Meshlab and use a couple of filters to reduce things right off the bat.
:D
It's not the Tool used causeing that extra info. They are direct exports of information in the files converted to the obj format with no post-processing done. It's perfect translation so to speak.
Exporting from a GR2 or with S3D?
I'd run it through Meshlab and use a couple of filters to reduce things right off the bat.
:D
I always use Wings3d's 'Cleanup' command on recently exported objects for getting rid of isolated or very close vertices, followed by a 'Weld Point Tool' processing in Softimage Mod Tool. I also find Mod Tool's poly reduction tool very useful, but I only use it on my own high poly models. :yep:
@ privateer
I have saved the texture in jpg format and changed model's mtl file according to your instructions, but everytime I open the model in MeshLab (v 1.3.2_64bit), I receive the following message:
http://img811.imageshack.us/img811/6807/knso.jpg
The obj file itself is still the one exported from Wings 3d, of course. What do I do wrong? :hmmm:
...
Until now I was erroneously convinced it was due to poor optimization by devs :doh:
Are you the wrong (bad) opinions about the developers?
Import/export from/to obj-files by TDW's (or privateer's) program does not have any relation to developers.
I think. :D
Are you the wrong (bad) opinions about the developers?
Import/export from/to obj-files by TDW's (or privateer's) program does not have any relation to developers.
I think. :D
So many game flaws and bugs were blamed to devs that I thought that one more would have passed unobserved. :haha:
Madox58
12-14-13, 02:50 PM
@ gap,
E-Mail with new ObjSorter version sent.
:)
@ gap,
E-Mail with new ObjSorter version sent.
:)
Thanks privateer, trying it out :yeah:
Madox58
12-14-13, 03:08 PM
This version sets the usemtl line in the proper place now.
The G line still needs edited by hand but I'll get that adjusted in a bit I hope.
Doc's got me on some good drugs right now.
:D
This version sets the usemtl line in the proper place now.
The G line still needs edited by hand but I'll get that adjusted in a bit I hope.
Doc's got me on some good drugs right now.
:D
Sorry for the late reply privateer, had to go out. Testing the new version right away :up:
@ privateer
I followed your instructions: I prepared manually the mtl file for compatibility with MeshLab, filtered the model in MeshLab and re-exported it using the options you had recommended, I processed the obj file using your obj sorter v2, and last I added the subset names manually (I didn't re-edit the mtl file though).
This time GR2Editor v .374.1 didn't throw any error on importing the sorted object (used the file previously edited by Targor as GR2 template). :up:
I was also surprised to see that now subsets are processed correctly. :up:
Anyway, when I tried saving the file, I got the message that some chains were broken, and GR2E refused to go on with the saving. :-?
I tried then with v 320.1 of TDW's program. This time no broken chain were reported, and yes, the newly generated file was much smaller than the old one :up:
I opened the new file in GR2 E v .374.1, to check that nothing was corrupted, but no, the model was rendered correctly and no error was thrown on opening the file. I was about to report full success but at the last minute I decided having a look in the new file with Goblin, and this is how it looked:
http://img209.imageshack.us/img209/7043/7glf.jpg
Might it depend on the file that I imported the sorted meshes in, or on some other mistake on my part? Can you replicate my result? :hmmm:
I feel we are just a step from the ultimate solution :)
Update:
I tried again importing the same sorted obj file as used in my previous attempt, but in a clean GR2 file (stock Iceberg01.GR2). This time GR2Editor v .374.1 didn't report any error on saving the file (so yes, something might be corrupted in Targor's file :hmmm:), but the result seen in Goblin was exactly the same as before.
Madox58
12-15-13, 01:58 PM
It's in the normals as done by Meshlab.
:hmmm:
Imported with no normals and that effect is gone.
Doing some testing with Meshlab to see if the problem can be sorted out.
It's in the normals as done by Meshlab.
:hmmm:
Imported with no normals and that effect is gone.
Yep, during my tests of yesterday, normals were checked; the one unchecked import option was AO map.
Might be unrelevant, but the Goblin render I have posted at post #66, reminds me of another screenie I took a while back:
http://www.subsim.com/radioroom/showpost.php?p=2116817&postcount=3847
That one was the result of importing the obj file exported by Targor in 3ds Max (which is the one working so far), but using costal_guns_small.GR2 or
ger_c3.GR2 -don't remember which one exactly- instead of Iceberg01.GR2, as base file for the importing. :hmmm:
Doing some testing with Meshlab to see if the problem can be sorted out.
Looking forward to your news! :Kaleun_Salute:
Madox58
12-15-13, 05:43 PM
Figured it out in Meshlab.
Now I have to repeat it a few times to be sure I have the filters correct.
Here's the last import, with normals, useing Version 281_1
I use the Stuka as it's easy to view in game also.
http://i108.photobucket.com/albums/n12/privateer_2006/SH5%20Stuff/nailed-it.jpg
File size is not changed much through different tests, so that's a big plus.
Another thing I did was do a new Alpha channel for the main texture when converting to DXT5 DDS format.
I copied the Blue channel to the Alpha channel but that still needs some work.
Figured it out in Meshlab.
Now I have to repeat it a few times to be sure I have the filters correct.
Here's the last import, with normals, useing Version 281_1
I use the Stuka as it's easy to view in game also.
much better :yeah:
...but can you see that different UV regions have drastically different diffuse/reflection properties? It is as if each of them had its own material. I think I have never seen this before in Goblin :hmm2:
Madox58
12-15-13, 06:03 PM
Yes, I see the regions getting the normals to cause that look is my guess at this point.
A coded smoothing effect maybe?
:hmmm:
It's a step in the right direction anyway.
:haha:
Yes, I see the regions getting the normals to cause that look is my guess at this point.
A coded smoothing effect maybe?
:hmmm:
This is how Targor's obj looks in Goblin, seen from a similar perspective:
http://img716.imageshack.us/img716/8250/ginz.jpg
It's a step in the right direction anyway.
:haha:
Absolutely! :up:
Madox58
12-16-13, 04:26 PM
Here's a new Obj Sorter.
It now numbers the g object_ so you don't need to edit it.
https://www.mediafire.com/?lzcrdp7mlx59jjf
Checking the mesh I imported above, I see one of the Filters split some verts to cause the weird look.
The Normals are great, just not the splitting of verts causeing dual normals in the same position.
Here's a new Obj Sorter.
It now numbers the g object_ so you don't need to edit it.
https://www.mediafire.com/?lzcrdp7mlx59jjf
Gonna try it :up:
Checking the mesh I imported above, I see one of the Filters split some verts to cause the weird look.
The Normals are great, just not the splitting of verts causeing dual normals in the same position.
Yep, the vertex splitting seem to happen along the seams of different UV regions. Does the new version of your sorter fix the problem, or not yet?
Madox58
12-16-13, 05:15 PM
The problem is one of the filters I tried in Meshlab.
I really, REALLY, need to write down what Filters I'm testing!
:haha:
The Sorter ONLY adjusts a file to work with TDW's import standards right now.
The problem is one of the filters I tried in Meshlab.
I really, REALLY, need to write down what Filters I'm testing!
:haha:
The Sorter ONLY adjusts a file to work with TDW's import standards right now.
In other words, I could be used even on non-filtered obj files? :hmm2:
Madox58
12-16-13, 05:53 PM
Yes.
I have 4 programs that read and export obj files that can not be imported unless adjusted.
So I wrote this as a time saver.
:)
Yes.
I have 4 programs that read and export obj files that can not be imported unless adjusted.
So I wrote this as a time saver.
:)
Okay, I will test the latest version of your sorter on a wings 3d exported object then. :up:
P.S: I have just been promoted :smug: :D
Madox58
12-16-13, 06:24 PM
Make a small donation and you can be anything you want.
Even a Grinch!
:haha:
Make a small donation and you can be anything you want.
Even a Grinch!
:haha:
Paying for getting a better ranking? :hmmm:
Nah, thanks, I want to work hard my promotion to Grinch :D
Madox58
12-16-13, 07:40 PM
I think that is out of your hands now.
:haha:
:03:
Madox58
12-18-13, 10:47 PM
Did some checking and saw something that blew my mind!
Once I exported from meshlab after doing the filter, I opened the exported file.
Now once that is opened? Go to Render and select Show Vertex Normals.
:har:
http://i108.photobucket.com/albums/n12/privateer_2006/SH5%20Stuff/Normals_WTH.jpg
THE_MASK
12-18-13, 10:58 PM
OT , you trying to scare the kids mate .
Madox58
12-18-13, 11:00 PM
You mean the sig?
:haha:
Did some checking and saw something that blew my mind!
Once I exported from meshlab after doing the filter, I opened the exported file.
Now once that is opened? Go to Render and select Show Vertex Normals.
:har:
Normals are pointing all in the same direction :o
I suppose this is the reason for the odd reflections. Hope you fince a soluce for that :hmm2:
On a side note, I have tested the latest version of your sorter on an unfiltered version of the balloon (i.e. a straight Wings 3d export).
The UV map is still corrupt. :yep:
Sailor Steve
12-19-13, 12:59 PM
You mean the sig?
:haha:
That, and the avatar. And the fact that you're so...well...you. :O:
just one thought re. the normals issue as per your description @ post #83:
TDW's editor got a button for calculating normals. I ignore if the option is actually implemented or just a future feature (never actually used it), but if it worked it could fix the wrong normals :hmm2:
Madox58
01-01-14, 05:43 PM
I'm seeing some really strange stuff that does not follow a proper GR2 file format useing version 281.
:hmm2:
The files work with Goblin and the Game itself but it breaks structures I'm well aware of.
This may be the problem of files being corrupted after editing them to much?
I'm seeing some really strange stuff that does not follow a proper GR2 file format useing version 281.
:hmm2:
The files work with Goblin and the Game itself but it breaks structures I'm well aware of.
This may be the problem of files being corrupted after editing them to much?
Possible. V 281 is relatively old. I think TDW fixed some of the bug flawing the early versions of his editor, but not all of them were ironed out, and v 374.1 (last public release) introduced some new bugs which were not present in the previous versions :doh:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.