DragonFF icon indicating copy to clipboard operation
DragonFF copied to clipboard

Scaling issues on import of DFF files exported from 3DS MAX

Open ThePortuguesePlayer opened this issue 5 years ago • 5 comments

Hi again. I want to talk about an issue that plagues all DFF addons for Blender I've tried. I work for this MTA server that is mostly focused on car tuning. The way that works is by hiding and unhiding models within the vehicle's DFF file. The only DFF addon that exports a DFF correctly for use on this server is KAM's Script for 3DS MAX, and it's what my whole team uses, however, some of us model using Blender as we're not used to 3DS's workflow (and because not all of us have a license), thus we wanting to find an alternative for Blender that works in our server. All our modded vehicles were exported from 3DS, but when I import one of these cars into Blender to continue work on them some of the parts are in a different scale, as shown here: blender 2019-07-16 15-25-21-75 That scale can be either bigger or smaller than original and always affects the same models for each DFF. This happens not only with this one but all DFF importers for 2.79 as well. This one might be a complicated one to solve and arguably also the fault of some issue with 3DS MAX, however, the fact of the matter is that everything shows up correctly in the game and only screws up when importing to Blender, which tells me that if the game can read the file correctly, so does the importer. Just gotta figure out what triggers this to happen. Exact same DFF in the game: proxy_sa 2019-07-16 16-12-37-45

There is something else that happens with this addon that does not happen with any other, however! Using DragonFF on 2.80 causes the materials on the model to get... Scrambled? The materials seem to be all there, but the whole model is assigned to the first material and the rest are unused: blender 2019-07-16 15-28-27-34 (Also, all edges are marked hard, I don't know why? They shouldn't be.)

How it should look, here using GTA Tools for 2.79: blender 2019-07-16 15-27-59-29 Disabling the "Group Materials" option at import changes the names of the materials but does not solve this problem, as everything else happens the same. This issue happens with all the models in the DFF, not just the chassis.

ThePortuguesePlayer avatar Jul 16 '19 15:07 ThePortuguesePlayer

"Sensitive" subject

Calvin-rgb avatar Jul 17 '19 06:07 Calvin-rgb

For the previous issue about the scale, you'll have to share with me a model with which it happens so that I can further investigate it if possible.

For the second, it's a bug with Kams Scripts. It does not set the material indices properly in the Materials block. Nothing I can do about it :man_shrugging:. You can select "Read Material Split" before importing in the settings to fix that issue.

Parik27 avatar Jul 17 '19 07:07 Parik27

I can share the model with you but only by a more private mean. It was the result of a collective effort of everyone in my team and it's not ready to go into the open. Email or Discord, if you have one. I'd really love to have this issue solved and I'm curious to know why this one in particular plagues all importers. I will help in any way I can.

Material Split did the job for me and solved the materials issue on import, thanks, but the edges are still all marked sharp... blender 2019-07-17 17-27-28-00 I suppose it's also a bug with Kam's? Then again, these surfaces show up smooth in the game like normal.

ThePortuguesePlayer avatar Jul 17 '19 16:07 ThePortuguesePlayer

You can contact me on Discord (Parik#6176)

Yeah it is. Game ignores the Material Indices in RpMaterial if the Material Split is present, so it's more of a "something that just work" thing.

About the Mark Sharp thing, I guess all the edges were duplicate, so to preserve the normals it marked all of them sharp.

Parik27 avatar Jul 17 '19 17:07 Parik27

I just found out the scaling issues are originated from unapplied transformations 3DS MAX makes silently on import of outside models. Upon reseting those transformations before exporting using Kam's, Blender will import the models correctly. (Where to reset:) image (Importing that model back into Blender, now revealing the model at correct scale:) blender 2019-07-17 20-33-53-72 What is now left to answer is why do the importers see this as a problem and not the game. (And as a side note, I didn't even know DFFs were able to store unapplied transformations in the first place!... Shouldn't everything be applied automatically on export? I'd think something like that would mess up in the game as well.)

ThePortuguesePlayer avatar Jul 17 '19 20:07 ThePortuguesePlayer