|
Post by rscott on Aug 4, 2022 16:57:13 GMT
I started to download some models from the jedipedia, anyone know where each texture goes in the blender nodes? Most are simple...look at the last designator on each texture _d.png...so d would be Diffuse, _s.png Specular, Metalness, Normal etc...the only one I am unsure about is _h.png which sounds like a height map for displacement, but rarely is that used in a game file...so I would need to see the texture file...but perhaps some of the others here can tell you what that is... EDIT... I just went and looked at one of the _h.png files and it looks like a tint texture, for hue fot the object reflected light...you could use it for the Specular Tint on the principled.bsdf, or just ignore that one..
|
|
|
Post by abeja on Aug 4, 2022 19:34:54 GMT
Most are simple...look at the last designator on each texture _d.png...so d would be Diffuse, _s.png Specular, Metalness, Normal etc...the only one I am unsure about is _h.png which sounds like a height map for displacement, but rarely is that used in a game file...so I would need to see the texture file...but perhaps some of the others here can tell you what that is... EDIT... I just went and looked at one of the _h.png files and it looks like a tint texture, for hue fot the object reflected light...you could use it for the Specular Tint on the principled.bsdf, or just ignore that one.. I have set everything up, but the normal map is acting wierd on the chest armor, any idea why? Attachments:
|
|
|
Post by rscott on Aug 5, 2022 9:48:09 GMT
Most are simple...look at the last designator on each texture _d.png...so d would be Diffuse, _s.png Specular, Metalness, Normal etc...the only one I am unsure about is _h.png which sounds like a height map for displacement, but rarely is that used in a game file...so I would need to see the texture file...but perhaps some of the others here can tell you what that is... EDIT... I just went and looked at one of the _h.png files and it looks like a tint texture, for hue fot the object reflected light...you could use it for the Specular Tint on the principled.bsdf, or just ignore that one.. I have set everything up, but the normal map is acting wierd on the chest armor, any idea why? Make sure that it isn't mapped to a different UV channel...Go to side panel Properties/ data Properties ( triangle icon) and under UV maps...if there are 2 UV's in there then it more than likely is...so just for the Normals add in a UV Node, and select the second UV... You can also see the channels in the UV editor in the top bar all the way to the right there is a UV dropdown...
|
|
|
Post by BadHorse on Aug 25, 2022 19:16:28 GMT
Well, I almost did it. I spent a day and a half teaching myself Blender Python (I HATE Python), and I almost managed to convert my MaxScript importer for Frostbite assemblies based on their blueprint info. Yes, the MaxScript version still works fine, but not everybody has access to 3DS Max, whereas Blender is much more widely used by amateurs. You still have to use Excel to import and parse the blueprint XML exported from Frosty, but then you just save that data out as a simple CSV file. The Blender script imports the CSV data, and then uses that to import the individual FBX files and apply the blueprint transforms ... and it almost worked. Looks good, yes? Everything imported and transformed along orthographic axes are fine. But when you look closer, anything transformed with an oblique angle is just a little bit wonky. I've tried every combination of flipped/rotated axes prior to matrix transform to get it to line up, but nothing seems to work. I can't quite tell which aspect of my inexperience is the problem: Blender, Python, 3D matrix math, or all of the above. I though maybe the parenting of each FBX's component meshes to an empty was related somehow to the problem, but I ran a version of the script without said parenting (the Outliner was a mess) and the wonkiness persisted. If any of you are particularly good with this stuff, especially the 3D matrix math aspect, let me know and I'll send off a copy of the Python script as-is for you to look at. Update: Okay, so now I'm thinking I might want to decompose the transform matrix and work directly with the quaternion rotation axis vector. I suspect it might be pointing to the wrong octant, or maybe some components are flipped.
|
|
|
Post by BadHorse on Aug 27, 2022 3:10:09 GMT
Update: I think I've got it sorted. It was mostly a matter of swapping the position and signs of some of the transform matrix components, but I've tried it on three different models now with no signs of the wonkiness. I'm going to test it out on a few more models just to be sure, but it seems to be working really well. For reference, this is an example of what the input CSV file looks like. It's based on an Excel table formula, fed with data from the SpatialPrefabBlueprint XML exported by Frosty. ImperialCruiser_CommandBridge_01,1,0,0,0,1,0,0,0,1,0,0,0
ImperialCruiser_DetailsBottom_01,1,0,0,0,1,0,0,0,1,0,0,0
ImperialCruiser_DetailsEngine_01,-1,0,0.00000008742278,0,1,0,-0.00000008742278,0,-1,0,-20.967,-128.2166
ImperialCruiser_DetailsEngine_01,1,0,0,0,1,0,0,0,1,0,-20.967,-155.3888
ImperialCruiser_DetailsFront_01,1,0,0,0,1,0,0,0,1,0,-20.967,0
ImperialCruiser_DetailsSide_01,1,0,0,0,1,0,0,0,1,0,-20.967,0
ImperialCruiser_DetailsSide_02,1,0,0,0,1,0,0,0,1,0,-20.967,0
ImperialCruiser_DetailsTop_01,1,0,0,0,1,0,0,0,1,0,-20.967,0
ImperialCruiser_DetailsTop_02,1,0,0,0,1,0,0,0,1,0,-20.967,0
ImperialCruiser_Engine_01,1,0,0,0,1,0,0,0,1,48.1134,-2.19967,-137.5933
ImperialCruiser_Engine_01,1,0,0,0,1,0,0,0,1,0,-2.19967,-137.5933
ImperialCruiser_Engine_01,1,0,0,0,1,0,0,0,1,-48.0741,-2.19967,-137.5933
ImperialCruiser_Hatch_01,-1,0,0.00000008742278,0,1,0,-0.00000008742278,0,-1,-59.19066,-1.94813,-17.5693
ImperialCruiser_Hatch_01,1,0,0,0,1,0,0,0,1,59.17737,-1.94813,-17.5693
ImperialCruiser_Hull_01,1,0,0,0,1,0,0,0,1,0,0,0
ImperialCruiser_Windows_01,1,0,0,0,1,0,0,0,1,0,-20.967,0
ImperialLightCruiser_Turrets_01,0.992546,-0.1218692,0.00000001097801,0.1217441,0.9915262,0.04536301,-0.005528371,-0.04502498,0.9989728,28.02866,10.53603,14.97283
ImperialLightCruiser_Turrets_01,0.9925455,0.1218692,-0.000000003972355,-0.1217439,0.9915243,0.04536298,0.00552836,-0.04502488,0.9989707,-27.46987,10.53603,14.97087
ImperialLightCruiser_Turrets_01,-0.9999937,0.003467961,-0.0005165655,-0.003474316,-0.9999111,0.01285747,-0.0004719304,0.01285918,0.999917,-21.28687,-6.75337,88.69299
ImperialLightCruiser_Turrets_01,-0.9999903,-0.004277786,-0.0005165656,0.004270792,-0.9999079,0.01285747,-0.0005715197,0.01285515,0.9999172,21.78099,-6.75337,88.714
|
|
|
Post by BadHorse on Sept 16, 2022 3:15:21 GMT
BadHorse: "I think I've got it sorted."
Narrator: "But BadHorse did not have it sorted." I may have celebrated a bit too early. When I tried out that older version of the Blender Python script to assemble Frostbite SpatialPrefabBlueprints of additional models, it became clear that more work was needed. My first clue was when some of the meshes collapsed into 2D objects. The good news is that I think I really, REALLY have it figured out now. My original hunch panned out -- I needed to decompose the transform matrix so that I could individually access and swap/invert some of the components of the rotation quaternion. I've run the latest version of the script on many models now with no mistakes, and it's pretty quick too (I added a timer that's visible at the bottom of the console). The vast majority of the time spent is in importing the FBXs. Now I'm looking into a simpler, more intuitive way to extract the model/transform data from the XML and generate the CSV text file that feeds into the script. I can do it fairly quickly using an Excel PowerQuery, but that may be a steep learning curve for some, and not everyone has access to Excel. I'm thinking about switching over to Google Sheets, just because it's more freely available to everyone. We'll see if that pans out.
|
|
|
Post by rscott on Sept 16, 2022 13:08:47 GMT
BadHorse: "I think I've got it sorted."
Narrator: "But BadHorse did not have it sorted." Now I'm looking into a simpler, more intuitive way to extract the model/transform data from the XML and generate the CSV text file that feeds into the script. I can do it fairly quickly using an Excel PowerQuery, but that may be a steep learning curve for some, and not everyone has access to Excel. I'm thinking about switching over to Google Sheets, just because it's more freely available to everyone. We'll see if that pans out. Looks GREAT! As far as going to Google Sheets that would be fine, but Open Office Spreadsheets are an exact copy of Excel ( there is no difference in the inner mechanics ) if you know Excel, than you would be comfortable with Open Office Spreadsheets. Looking Forward to taking it for a spin!
|
|
|
Post by BadHorse on Sept 19, 2022 4:55:56 GMT
The Blender Python script for assembling Frostbite blueprints is coming along amazingly -- almost unbelievably well. I even managed to eliminate the XML pre-processing step. Rather than import a CSV text file with the mesh/transform data, I added XML importing/parsing directly into the script. All you have to do (almost) is export the SpatialPrefabBlueprint XML and the meshes from Frosty into a common folder, run the script, select the XML file, and voila! Old crappy wayFrosty --> XML --> Excel --> TXT --> Blender Python New awesome wayFrosty --> XML --> Blender Python The example below is the rebel MC75 briefing room from Star Wars Squadrons, which I've been putting off for ages because it was looking to be days of grueling work. Using the script and a streamlined workflow, I was able to do it in about an hour. Models without nested references can be completed in a matter of minutes. I timed myself, and starting from scratch it took me 5 minutes to complete a fully assembled Venator model, and 95% of the time was spent exporting the meshes from Frosty. A few things worth noting: • Frosty exports XML files incorrectly -- the root node is missing. You still have to manually add "<root>" and "</root>" to the beginning and ending respectively of the XML file. • The script is not recursive. In other words, If "PF_B.XML" is a nested reference from "PF_A.XML", then you have to run "PF_B.XML" through the script first, and save it off as "PF_B_mesh.fbx" before "PF_A.XML" can use it. • Everything works just a little bit better if you are using Frosty 1.0.7 (unreleased, but can be downloaded from GitHub and built manually). The ability to natively save meshes with LOD0 exclusively and with flattened hierarchies just saves a ton of work.
|
|