AWS Thinkbox Discussion Forums

HOUDINI Splines in Krakatoa

Hello
I have a bunch of curves imported from Houdini, in 3dsMax it opens as a NURBS Surface, then I assigned PRT Hair to curves and when trying to render, Krakatoa says me: Ha Ha! Are you forgot to use ConvertToSplineModifier?
Holy!..No such modifier!
Is there some method to render Houdini splines as a Hair?

Actually, there are such modifiers in some Hair plugins (e.g. Hair Farm, probably in Ornatrix, too). Since the PRT Hair was originally designed to be used with Hair systems (as opposed to regular splines), the error message makes some sense in that context. But I will log a bug against it, since in the general case it makes less sense, and we should make no assumption about what the user is trying to do.

That being said, Welcome to the awful world of 3ds Max NURBS! They were introduced in 3ds Max R2 in 1997 and have been barely touched ever since. 3ds Max cannot convert them directly to splines. None of the exporters can export a NURBS curve and load it back as a spline. There are some manual hacks to turn a single NURBS curve to a spline you can find by googling the issue, but they are also not very automated.

There are some scripts to turn a NURBS curve to spline (e.g. scriptspot.com/3ds-max/scrip … s-2-spline )
I took the code someone posted in that script’s thread, created a NURBS Surface containing several NURBS Curves, and when I run the script, I got a valid Spline that worked with PRT Hair:

OBJ = selection[1]
NS = getnurbsset OBJ #relational
sp = splineshape()
for i = 1 to NS.numobjects do(
minv = NS[i].parameterrangemin
maxv = NS[i].parameterrangemax
addnewSpline sp
for j = 0.0 to 1.0 by 0.1 do(
addknot sp i #smooth #curve (evalpos NS[i] (((maxv - minv) * j) + minv))
)
if NS[i].isclosed then close sp i
)
sp.rotation = OBJ.rotation
sp.scale = OBJ.scale
sp.pos = OBJ.pos
Updateshape sp

Give it a try and see if it works with the imported Houdini data…

Big thanks, Bobo, it’s working

Awesome!

We have fixed the error message for the next release - it will not mention the modifier anymore.

Privacy | Site terms | Cookie preferences