SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   GR2 Editor/Viewer/Extractor/Importer (https://www.subsim.com/radioroom/showthread.php?t=188290)

TheDarkWraith 06-23-12 02:32 PM

For the AO MTL files I can't just place one material entry in them. This is because each subset can have a different material and thus there would be different entries. I'm thinking it over as to how I want to remedy the duplicate entries though.

The 'd' parameter and 'map_bump' and 'bump' entries have been removed from the AO MTL file.

I played around with the material bindings to ensure the app wasn't causing an error in the file. App is writing files fine. The problem is it appears Goblin and the game will only allow x material bindings for x mesh subsets. i.e.: if the mesh has 5 subsets then you HAVE to define 5 material bindings for the mesh. Anything more or less and Goblin and the game will crash. This is the devs not understanding the Granny format it appears. Granny Viewer will load GR2 files with more or less material bindings than subsets with no problems. Not much I can do about that - those are the rules defined by Goblin and the game :shifty:

@BIGREG - the error you are getting when you rename a mesh I can't reproduce. I'll need to see the GR2 file and tell me what you did so I can try and recreate the problem to see why it's throwing an error.

BIGREG 06-23-12 02:51 PM

Quote:

For the AO MTL files I can't just place one material entry in them. This is because each subset can have a different material and thus there would be different entries. I'm thinking it over as to how I want to remedy the duplicate entries though.
OK ,if you want i can send you a "redo" .obj ,to see how is writting the .mtl :06:

Quote:

The 'd' parameter and 'map_bump' and 'bump' entries have been removed from the AO MTL file.
:yeah:

Quote:

I played around with the material bindings to ensure the app wasn't causing an error in the file. App is writing files fine. The problem is it appears Goblin and the game will only allow x material bindings for x mesh subsets. i.e.: if the mesh has 5 subsets then you HAVE to define 5 material bindings for the mesh. Anything more or less and Goblin and the game will crash. This is the devs not understanding the Granny format it appears. Granny Viewer will load GR2 files with more or less material bindings than subsets with no problems. Not much I can do about that - those are the rules defined by Goblin and the game :shifty:
Yes ,but now i have more subsets (eg : in CT_body mesh,i have more as 20 subsets now) :hmmm:
and I think as you, to the "knowledge" of the guys who made the game :nope:
That seem all are working in his corner,and a guy tried to bring all together ! in a format that was unknown to him !

Quote:

@BIGREG - the error you are getting when you rename a mesh I can't reproduce. I'll need to see the GR2 file and tell me what you did so I can try and recreate the problem to see why it's throwing an error
That is with the original CT_room.GR2,try to rename the chepeng mesh :yep:

TheDarkWraith 06-23-12 02:56 PM

Quote:

Originally Posted by BIGREG (Post 1900737)
OK ,if you want i can send you a "redo" .obj ,to see how is writting the .mtl :06:

Send away

Yes ,but now i have more subsets (eg : in CT_body mesh,i have more as 20 subsets now) :hmmm:

There is another 'anomoly' with Goblin/the game. The material bindings HAVE to be in subset order. i.e.: the first material binding will be for subset 0, the second material binding will be for subset 1. If you have a subset referencing a material binding out of order (either greater or less than) Goblin/the game will crash. I don't understand why Goblin/the game is like this :shifty:

That is with the original CT_room.GR2,try to rename the chepeng mesh :yep:

I'll try it now and report back :up:

see above in yellow.

EDIT:

was able to rename that mesh with no problems.

BIGREG 06-23-12 03:25 PM

Quote:

OK ,if you want i can send you a "redo" .obj ,to see how is writting the .mtl :06:

Send away
Here the CT_body AO with just one material assigned for all subsets (bump+opacity deleted) ,all subsets are present in (i think in .obj :06:) : https://dl.dropbox.com/u/8655607/CT_Body_AO.7z

Quote:

Yes ,but now i have more subsets (eg : in CT_body mesh,i have more as 20 subsets now) :hmmm:

There is another 'anomoly' with Goblin/the game. The material bindings HAVE to be in subset order. i.e.: the first material binding will be for subset 0, the second material binding will be for subset 1. If you have a subset referencing a material binding out of order (either greater or less than) Goblin/the game will crash. I don't understand why Goblin/the game is like this :shifty:
Do you think ,if i sort in good place my materials ,it will work :06:

Quote:

was able to rename that mesh with no problems.
:o i have just retry ,and i have always the error :doh:
(but the new name is taken into account) :hmmm:

TheDarkWraith 06-23-12 03:35 PM

Quote:

Originally Posted by BIGREG (Post 1900751)
Do you think ,if i sort in good place my materials ,it will work :06:

:o i have just retry ,and i have always the error :doh:
(but the new name is taken into account) :hmmm:

Would love to know how to reproduce the error you are getting.

As far as sorting your materials: do you have any subsets that reference the same material? This is where I see there might be a problem. I'll have to test some more things. First I have to let the app be able to add the same material to a mesh's material bindings that way subsets referencing the same material still follow the rule of material bindings/subset ordering set forth by Goblin/the game.

BIGREG 06-23-12 03:57 PM

Quote:

Would love to know how to reproduce the error you are getting.
Yes,but i don't can help ,i have take the original file and just rename the chepeng :shifty: and me i would love that not reproduce any more :haha:
(that is not a big problem in any case :yep:)

Well, I think I need to store all the materials in the order of the subsets
and assign the new material every time I add a subset

TheDarkWraith 06-23-12 03:59 PM

Quote:

Originally Posted by BIGREG (Post 1900770)
Well, I think I need to store all the materials in the order of the subsets
and assign the new material every time I add a subset

Do you have any subsets that reference the same material? Or is each subset using a different material?

BIGREG 06-23-12 04:08 PM

I have send you my .gr2
and yes after importing all "new" subsets take the first material in the list (floor_metal) ,but i have reassign existing material to some subsets
(table,chepeng..)

TheDarkWraith 06-23-12 04:15 PM

Quote:

Originally Posted by BIGREG (Post 1900783)
I have send you my .gr2
and yes after importing all "new" subsets take the first material in the list (floor_metal) ,but i have reassign existing material to some subsets
(table,chepeng..)

I'll have to send you a new version of the app that will allow you to add a material binding already defined to material bindings. Not sure how Goblin/the game will handle this but we're about to find out!

BIGREG 06-23-12 04:19 PM

Thank I'll try that, as soon as I receive it :D

TheDarkWraith 06-23-12 04:57 PM

Quote:

Originally Posted by BIGREG (Post 1900794)
Thank I'll try that, as soon as I receive it :D

Just finished making the necessary changes. Did a test run. Opened up Room_CT. Added a new material binding - Metal_01 (same material subset 0 is using). Deleted subset 4's material binding. Set subset 4's material binding to new Metal_01 thus preserving subset/material binding index ordering. Fired up Granny Viewer and of course no problems. Fired up Goblin and no problems :D

@BIGREG - I'll send you new version here in a few :up:

BIGREG 06-23-12 05:40 PM

Ok,that say ,that i need to sorting all materials :06:

i have test version 1.260.1.1 : add tile_metal_01 to CT_body (position 16) and try to assign off the subset 16 ,but that give me this error :

https://dl.dropbox.com/u/8655607/errormaterial.jpg

Off other subsets ,before the news ,i have added all work fine)

Edit :Oups ! :oops: i have forgot to assign the 15eme :88)


BIGREG 06-23-12 05:49 PM

:woot:All work fine :D

You are a Master TDW :yep: :up:

TheDarkWraith 06-23-12 06:02 PM

Quote:

Originally Posted by BIGREG (Post 1900836)
Ok,that say ,that i need to sorting all materials :06:

i have test version 1.260.1.1 : add tile_metal_01 to CT_body (position 16) and try to assign off the subset 16 ,but that give me this error :

Off other subsets ,before the news ,i have added all work fine)

Edit :Oups ! :oops: i have forgot to assign the 15eme :88)

That's my error and I just caught it myself :shifty: I was giving the actual subset index vice the subset's material index :/\\!! It has been fixed.

I also found that removing a material from a mesh's material bindings could go irai if the material bindings contains duplicate materials. This has also been fixed. Sending you updated version now :up:

BIGREG 06-23-12 06:19 PM

Merci:salute:

Tomorrow I try it as soon as I wake up :yep:


All times are GMT -5. The time now is 01:08 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.