Notifications
Clear all

[Closed] MAXScript NVPX vs PhysXPanelData?

Hello,

I assume the intended method is to use NVPX calls as they are documented in the official reference. Though, I have some questions I have about this:

  1. What is the different between using NVPX or PhysXPanelData, example:
nvpx.UseMultiThread on
PhysXPanelData.UseMultiThread = on
  1. Should I have the MassFX toolbar open when these calls are made?

  2. What happens if a user inputs some of these lines and then opens a MassFX toolbar?

Thank you for your time!

BONUS QUESTION: What about px_sdk calls? How do they differ? Example:

execute("px_sdk_contactDistance = X")
execute("px_sdk_skinwidth = X")

PhysXPanelData.contactShellContactDistance = X
PhysXPanelData.skinWidth = X

nvpx.setSDKParameter "ContactShellOffset" X
nvpx.setSDKParameter "NX_SKIN_WIDTH" X
2 Replies

Hmm. Many people have viewed my question, but no answer yet. I suppose many people don’t commonly maxscript around massfx.

Initially, I thought the calls would be identical and produce the same results, but something is definitely different about them. In some scenarios, my code will yield different results if a setting such as the number of substeps is set with nvpx vs phsyxpaneldata. Perhaps if I dig more into Max’s source files I can find some clues… Anyone mess with these before?

I messed with them a bit:

regarding the double parameters you are seeing, i’m just speculating:

PhysXPaneldata might only be the data struct holding the MassFX/Physxpanel/UI related data, while nvpx provides access to the real existing PhysX world data that gets used in the simulation. As i see the paneldata is of type referencetarget, that – at least as i interpret it – is live referencing the nvpx data

As far i know PhysXPanel does some unit conversion too, so this might be the reason why you see different outcome when using them both with the same values