Ramp parameter support!

   15027   32   3
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
I finally added support for ramp parameters! Both float and color ramps are now supported. It should be available in today's build (14.0.378).

While doing a bit more testing just now, I realized there was a small AE issue (bug?) in one of Maya's functions. I made a workaround, so it should be fixed in tomorrow's build (14.0.379).
Edited by - June 29, 2015 12:59:48

Attachments:
maya_ramp_float.jpg (179.3 KB)
maya_ramp_color.jpg (199.0 KB)

Andrew / アンドリュー
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
The one gotcha is probably the “interpolation” settings of the ramps, because Houdini and Maya support different types of interpolations.

Maya supports: None, Linear, Smooth, Spline
Houdini supports: Constant, Linear, Catmull-Rom, Monotone Cubic, Bezier, B-Spline, Hermite
The ones that exist in both are: None <> Constant, Linear <> Linear, Spline <> Monotone Cubic

Since the plug-in is making use of Maya's ramp UI, the interpolation shown in the UI is Maya's interpolation. This is different from the interpolation that Houdini does within the asset. So in order for the UI and the asset to have a sane behavior, the only sensible interpolations to use are the ones that exist in both world. (i.e. None, Linear, and Spline). If any other ones are used, the plug-in will default them to linear.
Andrew / アンドリュー
User Avatar
Member
45 posts
Joined: Nov. 2018
Offline
Thanks Andrew! This is wicked!
User Avatar
Member
373 posts
Joined: March 2009
Offline
You rock. I'll be testing it early next week. Thanks so much!
Ian Farnsworth
User Avatar
Member
373 posts
Joined: March 2009
Offline
Initial testing seems a little buggy. I see the ramps, which is great, but the keys from my otl aren't set up by default in maya, and any keys I add or change seem to only be appending to whatever is already in my otl, as opposed to adding new ones, or just generally not affecting it correctly. It almost feels like the range is wrong too. It's hard to tell. Any thoughts?
Ian Farnsworth
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Solitude
Initial testing seems a little buggy. I see the ramps, which is great, but the keys from my otl aren't set up by default in maya, and any keys I add or change seem to only be appending to whatever is already in my otl, as opposed to adding new ones, or just generally not affecting it correctly. It almost feels like the range is wrong too. It's hard to tell. Any thoughts?

Hm, that's strange. The default ramp values seem to work for me. Which Maya version are you using? Could you try the attached assets and see if the default values are loaded correctly? Are there any errors being printed out?

Attachments:
test_ramp_color.hda (20.1 KB)
test_ramp.hda (22.6 KB)

Andrew / アンドリュー
User Avatar
Member
373 posts
Joined: March 2009
Offline
We're on maya 2015. The attached hda's have the same issue as my own otls. The screenshot shows it as it is initially loaded.

There are no errors, and the ramps don't do anything for me, but I should mention that there are 3 keys, but all set to black and at 0 position.


Haven't been able to try it in 2016 yet.

Attachments:
rampscreenshot.png (113.6 KB)

Ian Farnsworth
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Oh, you might be using a version older than 14.0.386. I made a bug fix [sidefx.com] a few days ago. Could you try 14.0.386 or newer?
Andrew / アンドリュー
User Avatar
Member
373 posts
Joined: March 2009
Offline
Ah. Yes. We'll update and give it a go. Thanks!
Ian Farnsworth
User Avatar
Member
373 posts
Joined: March 2009
Offline
Seems to be working as expected now! I'll let you know if I run into any more issues. Thanks!!!
Ian Farnsworth
User Avatar
Member
373 posts
Joined: March 2009
Offline
Ok, new issue. The ramps work fine, but after I updated the version, I can't load an old maya file. It crashes.

//crash log file name = /tmp/ifarnsworth.20150709.1704
//cut = 201412101340 /data/builds/maya2015/build

//release name = 2.6.32-504.fc13.x86_64
//version = #1 SMP Thu Oct 30 13:23:39 PDT 2014
//machine name = x86_64
//current scene = unDisclosed

//====================================================
//command history (most recent last):
//====================================================
//last tool: renderWindowSelectContextItem
//====================================================
//panel with focus: outlinerPanel1
//visible panels:
// modelPanel4 outlinerPanel1
//====================================================
/lib64/libpthread.so.0()
SetAttrOperation::leaf(HAPI_ParmInfo const&)
walkParmOne(HAPI_ParmInfo const*, Util::WalkParmOperation&)
walkParmMultiple(HAPI_ParmInfo const*, Util::WalkParmOperation&, unsigned int)
walkParmOne(HAPI_ParmInfo const*, Util::WalkParmOperation&)
Util::walkParm(std::vector<HAPI_ParmInfo, std::allocator<HAPI_ParmInfo> > const&, Util::WalkParmOperation&)
Asset::setParmValues(MDataBlock&, MFnDependencyNode const&, std::vector<MObject, std::allocator<MObject> > const*)
AssetNode::compute(MPlug const&, MDataBlock&)
THcustomTransform::computePlug(Tplug const&, TdataBlock&)
TdependNode::dbEvaluate(TmsgEval&)
TdagObject::dbEvaluate(TmsgEval&)
TdependNode::mpSafeDbEvaluate(TmsgEval&)
TdependNode::processEval(TmsgEval&)
TmsgEval::send()
TconnectionSingle::evaluate(TmsgEval&, Tconnection*)
Tplug::evalConnectionValue(bool, TdgContext const&, TdataHandle&) const
Tplug::evaluateValue(TdataHandle&, TdataBlock const&, bool) const
TdataBlockDG::value(Tattribute const&)
TdnGroupParts::computePlug(Tplug const&, TdataBlock&)
TdependNode::dbEvaluate(TmsgEval&)
TdependNode::mpSafeDbEvaluate(TmsgEval&)
TdependNode::processEval(TmsgEval&)
TmsgEval::send()
TconnectionSingle::evaluate(TmsgEval&, Tconnection*)
Tplug::evalConnectionValue(bool, TdgContext const&, TdataHandle&) const
Tplug::evaluateValue(TdataHandle&, TdataBlock const&, bool) const
TdataBlockDG::value(Tattribute const&)
TdnGroupParts::computePlug(Tplug const&, TdataBlock&)
TdependNode::dbEvaluate(TmsgEval&)
TdependNode::mpSafeDbEvaluate(TmsgEval&)
TdependNode::processEval(TmsgEval&)
TmsgEval::send()
TconnectionSingle::evaluate(TmsgEval&, Tconnection*)
Tplug::evalConnectionValue(bool, TdgContext const&, TdataHandle&) const
Tplug::evaluateValue(TdataHandle&, TdataBlock const&, bool) const
TdataBlockDG::value(Tattribute const&)
TmeshShape::computeObject(Tplug const&, TdataBlock&)
TdependNode::dbEvaluate(TmsgEval&)
TdagObject::dbEvaluate(TmsgEval&)
TdependNode::mpSafeDbEvaluateWithSet(TmsgEval&)


//====================================================
//Memory usage:
// 40506.499 Mb Free Memory
// 212490.650 Mb Free Swap
// 229.517 Mb Heap
// 84.219 Mb MEL
// 0.135 Mb arguments
// 12.691 Mb Arrays
// 0.332 Mb Data Blocks
// 0.125 Mb Transforms
// 0.281 Mb Pixel Map
//====================================================
Ian Farnsworth
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
If you create a new scene with that asset, does it crash? Was the asset parameters changed after the scene file was saved? Does that asset have any ramp parameter or multiparm?
Andrew / アンドリュー
User Avatar
Member
373 posts
Joined: March 2009
Offline
New scene was fine when I create a new instance of the otl. We rolled back the plugin and the old scene (and newly created scene) opens fine.

The parameters that had been saved in the maya file were not at default settings.

There are a handful of ramps, one integer parm with a menu, some folders, but no multiparms.

If I have time later I'll try to recreate it with an otl I can upload.
Ian Farnsworth
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Solitude
New scene was fine when I create a new instance of the otl. We rolled back the plugin and the old scene (and newly created scene) opens fine.

The parameters that had been saved in the maya file were not at default settings.

There are a handful of ramps, one integer parm with a menu, some folders, but no multiparms.

If I have time later I'll try to recreate it with an otl I can upload.

I fixed a crash on Friday. The stack trace was slightly different, but I wonder if it's the same problem. The fix should be in 14.0.390 (or later). Could you give it a try?

Did the parameters change since the old Maya scene was saved? For example, were the ramp parameters newly added to the asset? Or were they already there in the old scene?
Andrew / アンドリュー
User Avatar
Member
45 posts
Joined: Nov. 2018
Offline
Hey Andrew,

Here is my crash when trying to load a scene file with existing Asset.
Worked fine before upgrading to version 386
No new parameters.

Thanks!




maya encountered a fatal error

Signal: 11 (Unknown Signal)
Stack trace:
/lib64/libpthread.so.0(+0xf500)
THcustomTransform::lazyEvalDirtyAttribute(Tattribute const&, TdgContext const&) const
THcustomTransform::evalDirtyAttributes(TdgContext const&)
THcustomTransform::matrix(TdgContext const&) const
TfrustumCullTraversal::cull(TdagObject*)
TfrustumCullTraversal::traverseDag()
TdrawTraversal::traverseView(T3dView*, bool)
TdrawProcess::mpRefresh(T3dView*, TdrawTraversalPtrArray&)
TdrawProcess::refresh(T3dView*, TdrawTraversal&)
TidleRefreshCmd::refreshRecursive(T3dView*, Tmodel*, TdagPath const&, TdrawArgs&, TdisplayAppearance, bool, bool)
TidleRefreshCmd::refreshBaseRender(T3dView*, bool, bool, TdisplayAppearance, bool, bool, bool)
TidleRefreshCmd::refresh(T3dView*, TdisplayAppearance, bool, bool, bool, bool, TrefreshType, bool, bool)
TidleRefreshCmd::doIt(Tevent const&)
TeventHandler::doIdles()
QObject::event(QEvent*)
QidleTimer::event(QEvent*)
QApplicationPrivate::notify_helper(QObject*, QEvent*)
QApplication::notify(QObject*, QEvent*)
QmayaApplication::notify(QObject*, QEvent*)
QCoreApplication::notifyInternal(QObject*, QEvent*)
/mnt/software/maya/linux/maya2014ext1sp2/lib/libQtCore.so.4(+0x1d30d0)
/mnt/software/maya/linux/maya2014ext1sp2/lib/libQtCore.so.4(+0x1d07ad)
/mnt/software/maya/linux/maya2014ext1sp2/lib/libQtCore.so.4(+0x1d07d1)
g_main_context_dispatch
/lib64/libglib-2.0.so.0(+0x44c98)
g_main_context_iteration
QEventDispatcherGlib::processEvents(QFlags<QEventLoop:rocessEventsFlag>)
/mnt/software/maya/linux/maya2014ext1sp2/lib/libQtGui.so.4(+0x2a3c6f)
QEventLoop::processEvents(QFlags<QEventLoop:rocessEventsFlag>)
QEventLoop::exec(QFlags<QEventLoop:rocessEventsFlag>)
QCoreApplication::exec()
Tapplication::start()
/mnt/software/maya/linux/maya2014ext1sp2/bin/maya.bin()
main
__libc_start_main
/mnt/software/maya/linux/maya2014ext1sp2/bin/maya.bin()

Fatal Error. Attempting to save in /usr/tmp/a.feigin.20150713.1030.ma
Writing crash report in /usr/tmp/a.feigin.20150713.1030.crash
User Avatar
Member
373 posts
Joined: March 2009
Offline
There were no parm changes. I'll try the new version today anyway
Ian Farnsworth
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Afeigin
Here is my crash when trying to load a scene file with existing Asset.
Worked fine before upgrading to version 386
No new parameters.

I've been trying to reproduce this crash, but still no luck. I've been trying to save out a Maya scene with an old version of Engine plugin. Then, load the Maya scene with the new version of Engine plugin. Maybe I didn't use an old enough version of the Engine? Do you know which version of the Engine plugin was used to save that old Maya scene file?

Since the stack trace seems to be related to the viewport, I wonder if you can workaround the crash by:
1. Hide the viewport before loading the file
2. Load the file (without restoring viewport)
3. Save the scene file again
4. Then try loading normally
Andrew / アンドリュー
User Avatar
Member
45 posts
Joined: Nov. 2018
Offline
I'm on version 386 now. Still waiting for my guys to install version 394 to see if the issue is resolved.

The version used to create the OTLs was 335 I believe.

I'm having another ramp issue with the current version 386. When creating a new scene and loading the otl, everything works fine. But if I don't touch the ramp parameters, save the file and reopen it, some of the ramps get broken, and come with a single point pos 1 value 1. Again, maybe the issue will go away on 394. Will let you know once I have it installed.


Thanks a lot Andrew
User Avatar
Member
373 posts
Joined: March 2009
Offline
On 395 right now, and it crashes when loading any otl that includes ramps so far. I tried both otls from this thread, they both crash.

//last tool: renderWindowSelectContextItem
//====================================================
//panel with focus: modelPanel4
//visible panels:
// modelPanel4
//====================================================
/lib64/libpthread.so.0()
SetAttrOperation::leaf(HAPI_ParmInfo const&)
walkParmOne(HAPI_ParmInfo const*, Util::WalkParmOperation&)
walkParmMultiple(HAPI_ParmInfo const*, Util::WalkParmOperation&, unsigned int)
walkParmOne(HAPI_ParmInfo const*, Util::WalkParmOperation&)
Util::walkParm(std::vector<HAPI_ParmInfo, std::allocator<HAPI_ParmInfo> > const&, Util::WalkParmOperation&)
Asset::setParmValues(MDataBlock&, MFnDependencyNode const&, std::vector<MObject, std::allocator<MObject> > const*)
AssetNode::compute(MPlug const&, MDataBlock&)
THcustomTransform::computePlug(Tplug const&, TdataBlock&)
TdependNode::dbEvaluate(TmsgEval&)
TdagObject::dbEvaluate(TmsgEval&)
TdependNode::mpSafeDbEvaluateWithSet(TmsgEval&)
Tplug::getValue(TdataHandle&, TdataBlock const&, bool, bool, bool) const
TdependNode::getPlugValue(Tplug const&, TdataHandle&, TdgContext const&)
TdependNode::processMessage(Tmsg&)
TdagObject::processMessage(Tmsg&)
Tmsg::send()
TmsgPlugValue::send()
MPlug::evaluateNumElements(MStatus*)
AssetSubCommandSync::doIt()
AssetSubCommandLoadAsset::doIt()
AssetCommand::doIt(MArgList const&)
THcommandObject::doIt(TargList&)
TmetaCommand::doCommand(TargList&)
Mel_Command_Dispatch(SphNode*)
f_function_entry_node
node_exec
f_function_entry_node
node_exec
fc_if
node_exec
f_function_entry_node
node_exec
f_function_entry_node
node_exec
sophia_call_executable
SophiaExecutable::evaluate(void*)
TcommandEngine::executeCommand(Tstring const&, bool, bool, TmelCmdResult*, unsigned int)
TscriptAction::execute(Tevent const&, TinterpreterResult**)
TscriptAction::doIt(Tevent const&)
Ian Farnsworth
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Solitude
On 395 right now, and it crashes when loading any otl that includes ramps so far. I tried both otls from this thread, they both crash.

Argh, this was caused by a change that I made yesterday to fix something else. I just made a change to fix this crash. Try again with tomorrow's build (14.0.396). Sorry about that.
Andrew / アンドリュー
  • Quick Links