DMX Export produces odd lighting characteristics

Started by StealthClobber, December 30, 2016, 01:11:31 PM

Previous topic - Next topic

StealthClobber

I've been having this problem for quite a while now, but I've never bothered to post about it till now because I've just been using SMD instead in its place. For the record, I never used to have this problem with DMX, but somewhere along the line it changed.

I'm running the latest version of WW Pro on Max 2014. 2016 produces the same result, so it's not the older version that is the problem.

This is how the model should look (body exported with SMD):



And this is how the body looks when exported with DMX:



As you can see, the rim lighting completely bugs out on DMX, and the phong screws up too.

It gets even worse in SFM when you combine ambient occlusion in the mix:



Joris Ceoen

I won't be of much help for this particular issue, since I'm not experienced with SFM, nor with the DMX format. But I have a question out of pure curiosity: What is the difference between both file extensions, and why not just use .smd if that seems to work for you (I guess there's a good reason for it, which is why I would like to know).

In the mean time I'm sure Shawn will be able to help you when he has the time  :)

wallworm

Thanks for reporting.

What is the Normal setting on the exporter? If you set it to Explicit Normals, do you get better results?

wallworm

Also, if changing to Explicit Normals doesn't help, here are a few other things to try:


  • Make sure the Exporter is not using the Local Origin or Rotate Origin option (especially for rigged models)
  • Make sure the XForm is reset before exporting

If the Explicit Normal fixes the issue, you can make this the default in the global settings (which I recommend for all WW Pro users).

StealthClobber

#4
Resetting the XForm solved the problem. Thanks Shawn!

As for the difference between SMD and DMX, DMX allows for wrinklemaps. However, from what I understand, the only way to make stereo flexes with DMX files is to open the DMX file itself and modify the flexes that way (as I've seen on tutorials for doing it Blender), but the DMX files that come out of 3ds Max are something like 6 million lines long.

wallworm

Quote from: StealthClobber on December 30, 2016, 03:27:47 PM
Resetting the XForm solved the problem. Thanks Shawn!

Excellent!

Quote from: StealthClobber on December 30, 2016, 03:27:47 PM
As for the difference between SMD and DMX, DMX allows for wrinklemaps. However, from what I understand, the only way to make stereo flexes with DMX files is to open the DMX file itself and modify the flexes that way [...] but the DMX files that come out of 3ds Max are something like 6 million lines long.

There was an update to the DMX exporter several months ago (V.2.835) that should have drastically reduced the file-size. Are you still experiencing such large file sizes?

StealthClobber

Quote from: wallworm on December 30, 2016, 04:12:37 PM
There was an update to the DMX exporter several months ago (V.2.835) that should have drastically reduced the file-size. Are you still experiencing such large file sizes?

The size for the head with flexes is 24 mb, but there is still over 1 million lines of code. It would just be drastically too inefficient to try to sort through all of it to enable stereo flexes, when I could just make separate stereo flexes in the morpher modifier. AFAIK, the process is much simpler with Blender's Source Tools, but I can't bring myself to learn Blender's weird interface.

wallworm

How many tris is this model? I would be interested to see if the Blender DMX is significantly smaller than the WW export with similar meshes.

In terms of the stereo function, what exactly do you do to set it the manual way? Seems to me it would just be better to have a checkbox in WW for a morph target that sets it as stereo and then let the exporter just handle it. I've not messed with stereo but if you explain to me exactly how you set it up then I can probably just automate it.

StealthClobber

Quote from: wallworm on December 30, 2016, 04:52:45 PM
How many tris is this model? I would be interested to see if the Blender DMX is significantly smaller than the WW export with similar meshes.

In terms of the stereo function, what exactly do you do to set it the manual way? Seems to me it would just be better to have a checkbox in WW for a morph target that sets it as stereo and then let the exporter just handle it. I've not messed with stereo but if you explain to me exactly how you set it up then I can probably just automate it.

Well the way it works with SMD/VTA is you have to set the flex you want as stereo manually in the qc file. It's similar for DMX, but you have to manually set it in the DMX file itself. Seeing as WW already creates the necessary flexcontrollers in the qc files for you when exporting to VTA, it seems like it would be possible to have said stereo checkbox, and have WW create stereo flexes in the qc by making the necessary adjustments (changing flex to flexpair etc.)

From what I understand in this guide by Pte Jack, for DMX it's as simple as setting the stereo boolean per flex from 0 > 1. However, when applying this to the DMX file outputted by WW, it separates the flex into stereo, but the stereo balance is set in such a way that the right slider controls the entire flex animation, with the left slider not doing anything. I'm not sure if it's possible to implement the stereo balance utility into WW as it is in Blender Source Tools,as shown here:


wallworm

OK, I'll give it some thought in the new year for enhancing this. Feel free to share ideas.

wallworm

Just an update on this. This isn't in the live download yet, but I have locally added support for both adding stereo and eyelid controllers and a way to control the stereo weighting. I'll test the update some more tomorrow and likely release that feature tomorrow afternoon/evening.

wallworm

You can now use stereo and paint the balance in latest update. Basic overview is here: http://www.wallworm.net/index.php/topic,1988.msg6411.html

wallworm


StealthClobber

#13
I haven't checked back on here in a few days, so no. But wow that was quick work! I'll test it out as soon as I can.

EDIT: It works! Man I've been waiting a long time for a feature like this, I should've requested it sooner! :P You're awesome Shawn.

EDIT 2: Although I seem to be having a small problem. For flex target meshes that already have flex controller info, trying to add the new DMX controller info on top of them doesn't work, and I don't know how to remove the existing info. The "Remove Selected" button seems like it would do that, but it doesn't work.

wallworm

#14
I will add a function to update an existing or remove. Thanks for pointing that out.

In the meantime, to delete one already on a morph target, select it and paste this into the MAXScript listener (F11):

custAttributes.delete $ 1

And hit enter. It will remove the current one. Note that this presumes that there are no other custom attributes on the mesh... in which case it will delete the first one.

Then you can add the newer attributes to it.

SMF spam blocked by CleanTalk