Normal? Import/Export Errors?

Started by Katazuro, December 13, 2015, 07:06:46 PM

Previous topic - Next topic

Katazuro

Hi Shawn,

For the past year, the model importer has been working great (thanks for that bone display addition!). Recently, I installed the latest WWMT for the most up-to-date 3DS Max 2016 x64.

I have been experiencing an error that I cannot pinpoint as an importing or exporting error, I hope you can shed some light on what's going wrong.

I have been using Crowbar Model Decompiler to decompile this Half-Life 2 civilian to edit in Max.

This is a compile with the SMD straight from the decompiler.



This is a compile with the SMD imported and exported with WWMT in Max (no modifications!), seems to be same when exporting with Explicit Normals and Auto Normals.





Here are the raw SMDs and the WWMT exported versions.

https://dl.dropboxusercontent.com/u/15781683/wwmtpls.zip

wallworm

That does seem odd. There wasn't anything that was changed lately that should affect that. The change to the SMD exporter recently only affects UVW coordinates (now you can use real world scale and you can use texture bitmap node transforms).

I downloaded the file and will give it a test later in the week when I have some time.

Katazuro

Hi Shawn,

I think I've pinpointed key difference in the SMD files. In my compile, I am using the HL2 character's original VTA. As soon as I modify the QC to not include flexes, the issue is no longer present. After looking at the vertex information for both raw and modified SMDs, I have notice that the original SMD has vertexes rounded to six decimal places, WWMT's to five.

I'm going to make the safe assumption that, since the model that was decompiled and simply recompiled can blink in-game/in-view vs. the WWMT exported one cannot (along with the error displayed in the OP), that the decimal rounding issue is causing this.

Original:
Quotesandro_facemap
  6 2.868576 -2.491403 66.030617 0.987740 -0.105783 -0.114802 0.679386 0.442139 1 6 1.000000
  6 2.768548 -3.514405 66.008957 0.965928 -0.235591 -0.107147 0.642418 0.446527 1 6 1.000000
  6 2.550645 -3.391690 65.012589 0.950252 -0.231373 -0.208535 0.638689 0.384207 1 6 1.000000

WWMT:
Quotesandro_facemap
0 2.86858 -2.4914 66.0306 0.987779 -0.105811 -0.114442 0.679386 0.442139
0 2.76855 -3.51441 66.009 0.965973 -0.235557 -0.106811 0.642418 0.446527
0 2.55065 -3.39169 65.0126 0.950306 -0.231384 -0.208281 0.638689 0.384207

wallworm

Thanks for looking into it. I'll increase the precision in the next update.

wallworm

Question:

Are you using most of the original SMD/VTA and just updating some of them or adding some to the original when re-compiling?

I have the choice of:


  • Hard Coding the Change
  • Giving the User the ability to choose a precision

Both have pros and cons.

One issue is that adding more precision across the board could affect people who use WW to generate new content and who have existing models that line up precisely. Adding more precision across the board could cause a recompiled model to suddenly not line up with other compiled models (until they too are recompiled). This already happened since in the past the SMD exporter was exporting with either 12 or 16 digits and then I reduced it a couple years back.

So giving the user the choice of precision level is probably the best idea.

I have to decide whether this is a per SMD export setting or a global setting.

wallworm


Katazuro

Reviewing multiple SMD files exported by the tool and user-created content exported by WWMT seems to tell me that there is no "hard-coded" precision for each decimal. I believe the developer version you've posted is by far the best way to handle this dilemma.

Katazuro

#7
I also have a question now that you've implemented the change. Since the default is 8 decimals, while the imported file is 6, how is it that the now-exported file is more precise (numbers other than zero) than the imported?

I believe this might be noteworthy.

wallworm

Very likely this has to deal with rounding and precision generally. Max stores floats as single precision floats. There is a point when data gets rounded off--oddly sometimes to more precise values than what you entered. It affects more than you'd think generally. But for most cases, especially in asset/art creation, it's never noticeable. How the extra precision will affect your results from the original assets, I cannot tell. But I also cannot do anything about that. At least now you have access to set the export precision to what works best for your needs.

Katazuro

It's a perfect addition, thank you. I think it's good to go!

wallworm

This one needed more testing though. Download a newer version of DEV before saving a scene with a WWMT Helper.

SMF spam blocked by CleanTalk