## A Nurbs Optimization Part 2

I did a second test this morning with a curve with two spans and the new method still appears to be 2x faster than the Maya API method. I'll probably do one more test involving an arbitrary number of spans, and then do some tests regarding the speed of tangent calculation. //calculate the extra points we need points.insert((points[1] + points[2]) / 2.0, 2); points.insert((points[3] + points[4]) / 2.0, 4); points[3] = (points[2] + points[4]) / 2.0; //calculate the basis functi

## A Nurbs Optimization

So over the course of doing research to understand nurbs basis functions and tangents I realized that pre-computing the basis functions for the curve could save some time. Initially I tried it just comparing a simple python api function to the MFnNurbsSurface.getPointAtParam method. In that test my function was noticeably slower than the built-in api command, but it was close enough that I figured doing it in C++ would close the gap. So I wrote up a simple test MPxNode to com

## translateUVN Deformer - Unlimited Range (Part 2)

So in order to make sure I'm scaling the tangents correctly we need to calculate the basis function for the first CV. That ends up being: W = (1-U)^3 which can expanded to W = 1 - 3U + 3U^2 - x^3 So if we want the "speed" of the point we need to take the derivative of this function. Keep in mind this isn't the derivative of Weight with respect to Parameter, this is parameter with respect to time. The derivative is: dW/dU = -3 + 6U - 3U^2 So if we evaluate that function for th

## translateUVN Deformer - Unlimited Range

The translateUVN deformer isn't perfect, one of the annoying limitations is that points can't slide beyond the edge of the surface. You can work around this by adding a span to the surface but that's more CV's to manage. It would be nice if the points just kept moving along the tangents of the surface. The challenge is how to make sure the points move at a constant speed as they cross over the edge, you don't want the points to start moving faster as soon as they pas the edge

{"items":["60b389fbd5155200162aaa1f","60b2f02154aed000151cf076","60aa44da6f992f0015aad7d6","60a19d889b2ab300152fd6a5","60a0069a058f840016d6f01c"],"styles":{"galleryType":"Columns","groupSize":1,"showArrows":true,"cubeImages":true,"cubeType":"max","cubeRatio":1.7777777777777777,"isVertical":true,"gallerySize":30,"collageAmount":0,"collageDensity":0,"groupTypes":"1","oneRow":false,"imageMargin":32,"galleryMargin":0,"scatter":0,"rotatingScatter":"","chooseBestGroup":true,"smartCrop":false,"hasThumbnails":false,"enableScroll":true,"isGrid":true,"isSlider":false,"isColumns":false,"isSlideshow":false,"cropOnlyFill":false,"fixedColumns":0,"enableInfiniteScroll":true,"isRTL":false,"minItemSize":50,"rotatingGroupTypes":"","rotatingCropRatios":"","columnWidths":"","gallerySliderImageRatio":1.7777777777777777,"numberOfImagesPerRow":3,"numberOfImagesPerCol":1,"groupsPerStrip":0,"borderRadius":0,"boxShadow":0,"gridStyle":0,"mobilePanorama":false,"placeGroupsLtr":true,"viewMode":"preview","thumbnailSpacings":4,"galleryThumbnailsAlignment":"bottom","isMasonry":false,"isAutoSlideshow":false,"slideshowLoop":false,"autoSlideshowInterval":4,"bottomInfoHeight":0,"titlePlacement":"SHOW_BELOW","galleryTextAlign":"center","scrollSnap":false,"itemClick":"nothing","fullscreen":true,"videoPlay":"hover","scrollAnimation":"NO_EFFECT","slideAnimation":"SCROLL","scrollDirection":0,"scrollDuration":400,"overlayAnimation":"FADE_IN","arrowsPosition":0,"arrowsSize":23,"watermarkOpacity":40,"watermarkSize":40,"useWatermark":true,"watermarkDock":{"top":"auto","left":"auto","right":0,"bottom":0,"transform":"translate3d(0,0,0)"},"loadMoreAmount":"all","defaultShowInfoExpand":1,"allowLinkExpand":true,"expandInfoPosition":0,"allowFullscreenExpand":true,"fullscreenLoop":false,"galleryAlignExpand":"left","addToCartBorderWidth":1,"addToCartButtonText":"","slideshowInfoSize":200,"playButtonForAutoSlideShow":false,"allowSlideshowCounter":false,"hoveringBehaviour":"NEVER_SHOW","thumbnailSize":120,"magicLayoutSeed":1,"imageHoverAnimation":"NO_EFFECT","imagePlacementAnimation":"NO_EFFECT","calculateTextBoxWidthMode":"PERCENT","textBoxHeight":184,"textBoxWidth":200,"textBoxWidthPercent":50,"textImageSpace":10,"textBoxBorderRadius":0,"textBoxBorderWidth":0,"loadMoreButtonText":"","loadMoreButtonBorderWidth":1,"loadMoreButtonBorderRadius":0,"imageInfoType":"ATTACHED_BACKGROUND","itemBorderWidth":0,"itemBorderRadius":0,"itemEnableShadow":false,"itemShadowBlur":20,"itemShadowDirection":135,"itemShadowSize":10,"imageLoadingMode":"BLUR","expandAnimation":"NO_EFFECT","imageQuality":90,"usmToggle":false,"usm_a":0,"usm_r":0,"usm_t":0,"videoSound":false,"videoSpeed":"1","videoLoop":true,"jsonStyleParams":"","gallerySizeType":"px","gallerySizePx":1000,"allowTitle":true,"allowContextMenu":true,"textsHorizontalPadding":-30,"itemBorderColor":{"themeName":"color_12","value":"rgba(153,153,153,1)"},"showVideoPlayButton":true,"galleryLayout":2,"calculateTextBoxHeightMode":"MANUAL","textsVerticalPadding":-15,"targetItemSize":1000,"selectedLayout":"2|bottom|1|max|true|0|true","layoutsVersion":2,"selectedLayoutV2":2,"isSlideshowFont":true,"externalInfoHeight":184,"externalInfoWidth":0},"container":{"width":670,"galleryWidth":702,"galleryHeight":0,"scrollBase":0,"height":null}}