noizfactory
Hey guys,

Wanted to share a quick test that I'm doing using SOuP to detect tyre and terrain collision. Any feedback is welcome! Or if you can suggest more efficient way of doing this.

I noticed that towards the end of the frames when there is no more terrain geo left then the contact calculation doesn't output the desired result. In such cases setting the custom direction to -0.5 -1 0 instead of only Y down helps.

Cheers,
Sachin
Quote 0 0
pshipkov
Hey that's very nice.
That's how i usually do ground detection for tires when people ask me to make them car rigs and stuff.
Maybe you can prepackage this as a ready to use car wheel rig.
Don't forget to include the suspension - wheel can move only that much up-down.
Thanks for sharing man !
Quote 0 0
noizfactory
Thanks Peter. I was helping out some rigging friends and they did mention hooking it up with the suspensions. Yeah, I could prepackage this as an asset node and that should make it quite modular.
Quote 0 0
pshipkov
feel free to make it available here :)
Or maybe put it in the SOuP example scenes archive.
Only if you feel comfy with that of course.
Quote 0 0
noizfactory
Peter, I'm trying to replace the Maya expression with pyExpression for more procedural control and to package it as an asset node. I connected the ponit1.outWeightPP to pyExpression and then in the node tried this:

import maya.cmds as mc
w = sorted(mc.getAttr("point1.outWeightPP"))
OF = w[0]

And connected translateY of the locator to OF. But executing the node returns this error:
Quote:
// Error: line 1: TypeError: file F:/cg/tools/plugins/maya/SouP/repo/downloaded/pyExpression_2013_02_08\pyExpressionCmd.py line 280: 'float' object is unsubscriptable //


Probably because I'm trying to pipe single float output into the float array output OF. Is there a way to hook this up? I was looking at resizeArray node to resize outWeightPP but I need the sorted array first.

Quote 0 0
fxwriter
awesome scene file, thanks for sharing, I have to start using the pyExpression more often
Quote 0 0
pshipkov
yeah, i don't think it will work that way.
i was thinking to add array inputs but didn't have time for that.
Actually i want to redo the whole thing for better.
what "print w" returns ?
Quote 0 0
noizfactory
pshipkov wrote: what "print w" returns ?
That returns the entire sorted array. It would have been cool to do this inside pyExpression or some other node in SOuP and maintain the procedural nature. Maya expression is not bad but poor for automating a digital asset.

Here's a playblast that shows more inclination stuff. It would be cool to also control the velocity on the way up/down the slope.

Quote 0 0
pshipkov
looks cool.

with print w i wanted to check if you are getting array actually. so you do. the problem is you cannot output this as single attribute index. it has to be array element per output attribute index. just confirming it, we concluded that already.
I think what i will do is to provide inDoubleArray, inVectorArray and outDoubleArray and outVectorArray attributes at some point later.
Quote 0 0
noizfactory
pshipkov wrote: I think what i will do is to provide inDoubleArray, inVectorArray and outDoubleArray and outVectorArray attributes at some point later.
Sounds cool Peter. However, will adding that allow me to do what I'm trying right now? Because I'd essentially still need a float array output and not just a single float (which is what I want).
Quote 0 0
pshipkov
yes.
Quote 0 0

Add a Website Forum to your website.