PDA

View Full Version : Import Curves - Modeler



Luc_Feri
11-10-2015, 07:55 AM
Is it at all possible to import curves from another package without LW polygonising them and joining them up?

I've tried in vain for ages , different geometry import formats and LW just joins the bloody curves up into a polygon. It creates an edge from the end vertex to the original start vertex and creates a polygon face, I don't want this. I want a curve and curve only.

MODO can import these curves in an alembic format but LW Modeler can't import .abc models. If I export out of Modo I get same result too. Annoyed, even Poser can import a bloody curve as it is.

gerry_g
11-10-2015, 08:46 AM
someone may answer better but I feel only solution is K to kill polygons and then reselect in order an make open curve, I can export ZBrush curves to Modo for use with fur but not to LW..............well now just checked to make sure and ZBrush curves load just fine shows how long it base been since I did this, I'm in LW 2015, think it is or was case with older versions of LW but not now

Luc_Feri
11-10-2015, 08:56 AM
Yeah I don't want to use ZBrush for creating my curves for hair as I prefer a different package for the styling tools. I couldn't kill the polygons because I have over 90,000 curves. :D
I convert these curves using strand tool because Octane can render them nicely.

Thanks for your input. If I try to load my curves into Zbrush it fails to load. I loaded the curves in .abc format into MODO and then GOZ'd them but ZBrush just polygonised the curves like LW does, AHHHHH!! :D

MODO can render the curves fine, I can even smooth them out further for a better look but MODO renderer dog slow when you have Octane. Jesus I've so many tools and still find roadblocks, one day I'll find a pipeline to put everything together.

Greenlaw
11-10-2015, 09:47 AM
FWIW, I've been able to import spline curves from ZBrush and Modo to Modeler and they maintain their curve properties.

What's the other package you're exporting from? Can it export FBX?

G.

gerry_g
11-10-2015, 01:13 PM
maybe you hit an import limit in LW but hard to see why, firstly I use the export curve prevue in ZBrush and limit what I export to something manageable but pretty certain 100K is reasonable and second I export as LWO not LXO whether I am taking them to Modo or LW as LXO puts every spline on a separate layer where as LWO puts them all on the one layer, the bottom line is I have live editable curves no matter

Luc_Feri
11-10-2015, 01:32 PM
I can export fiber mesh curves too no problem, but that is not what I am seeking in this instance.

Sometimes when using twists and curls on the fibers from ZBrush the stand tool makes a weird mess of the conversion in Modeler. I convert them to 2 point polys to render them in Octane and you can apply bullet to them as well.

It is not a limit. I get the same result on one curve as I do thousands.

I'm using Houdini which IMO has much better hair styling tools and I have a more none destructive workflow to make ammends and go back. I can resample curve segments into more/less points, add smooth modifiers, change curve type and loads of stuff to make more interesting hair styles, a better back and forth method.

This is a current WIP test inside Houdini. I have much more control over curves in Houdini and smoother results, if only LW could import curves as they are. I've tried polygonal curve export, Nurbs and subdivision curves and every combo of geometry export to no avail. Only Modo can read these curves from an alembic file as far as I can see, but MODO will choke on render time compared to Octane and the dynamics would suck. :D

Octane has no problem with this amount of curves at all, on tighter cuts you can get away with the extra edge created by import into LW but on straighter hair it gets ruined with the extra edge which looks like a bow and arrow shape at render.

130889

Greenlaw
11-10-2015, 01:44 PM
Yeah, that sounds odd to me too.

It does remind me of a job I was on at Rhythm & Hues. I was using FiberFX for several characters and needed animated hair guides, and the dynamics artists and programmers in Features was helping me out. However, when I submitted my files to them, I learned that the studio's proprietary system did not recognize LightWave's 2-point polygon chains and I had to provide them polygonal 'blades' as described by Luc_Feri.

Luckily, I found a plugin that converted my hair guide chains to 'blades' and it preserved the point order between my work and what Features was doing for us. Then, when I got back the blades with animation from Features, I used them with FX_Metalink to animate the original guides, and I baked out a new MDD for only the original 2-point polygon guides to keep my final setups clean and simple. Something like that anyways...it was several years ago so I'm not 100% certain of all the details on that process. Unfortunately, I can't remember the name of the plugin I used to generate that data from my guide chains...but I'm getting a bit OT now anyway. :)

Edit: It might have been called Hair Blades. Still not certain about that.

I seem to recall using another script that could generate curves from 'blades' though. I just ran it and entered the number of points in each guide. When the script was done, I just killed the polygons, which left the curves. That would have been many years ago and I don't remember what that tool was, but it might be worth a search. I'm not the one to do it but I imagine creating a script that does this should be fairly easy, assuming the blades were constructed with consistency.

G.

Luc_Feri
11-10-2015, 01:52 PM
Yeah Greenlaw, that is exactly it, I need to kill the blades to leave the curves. :D

These are the simple things that can kill a workflow, I have demo'd some really nice hair styling in Houdini, this is killing me right now as ZBrush just isn't as flexible when visually experimenting on the guide curves.

Luc_Feri
11-10-2015, 02:20 PM
AHHHHHHHHHHHH, JESUS.

Greenlaw. I have worked out how to convert the polygonal blade to a curve with the current Modeler toolset but it will not work on multiple curves as far as I can see. :(

Luc_Feri
11-10-2015, 02:27 PM
To convert a polygonal blade inside of Modeler.

First load up curve which look like a blade.

Then select it in polygon mode.

Then convert to a point selection.

Then convert to open curve.

Then you will have the blade polygon and the new curve. In polygon mode you will have 1 polygon and 1 curve, just select the polygon face from statistics panel and delete it leaving you with the curve.


130892130891

Greenlaw
11-10-2015, 02:33 PM
That's probably what the script did. The additional feature was that the user described how many points were in a single blade and the script made its selections based on the point order of the entire object, and then it just repeated the process until it ran out of points in that layer. Sorry I don't have more information about the script. If I have time later, I'll see if I can track it down.

G.

Luc_Feri
11-10-2015, 02:39 PM
That's probably what the script did. The additional feature was that the user described how many points were in a single blade and the script made its selections based on the point order of the entire object, and then it just repeated the process until it ran out of points in that layer. Sorry I don't have more information about the script. If I have time later, I'll see if I can track it down.

G.

Cheers Mate.

What happens currently on multiple curves is that it a) reaches a ceiling of a maximum curve segments around 1000 and b) it actually joins all the points into one giant curve!!!

Greenlaw
11-10-2015, 02:56 PM
Yes, it would need to make the initial selection based on the number of points for the first guide in the point order, run the process, and then incrementally make then next selection, and repeat until finished. Otherwise, it's just going to create one huge curve.

I'm not sure but the curve limit might be editable in the configs--I know the object limit is for Layout anyway. But that's not going to help in this situation.

Will let you know if I find that script.

G.

Luc_Feri
11-10-2015, 03:00 PM
Cool mate, I'd owe you massively if that turned up. Until then I'll continue to pull my own hair out. :D

stiff paper
11-10-2015, 03:41 PM
You can't use this in any way, can you?
http://artstorm.net/plugins/ase-spline-import/

Luc_Feri
11-11-2015, 06:31 AM
Thanks for the link but I'm reluctant to try out random scripts from the net. There are a load of plugins from lightwave3d page that sound like they might work but some are really old. I thought somebody might have a solution inside vanilla Modeler as I really don't want to start installing lots of different scripts unless I knew somebody had had 100% success with it.

Thanks again for your help though, appreciated.

Maybe I should get to grips with ZBrush more and expirement as it seems to work the best for sending them into LW Modeler.

Greenlaw
11-11-2015, 08:23 AM
IMO, it's worth a try. Some of the Art's Sphere scripts have been super useful to me over the years. Most scripts that have been around a decade are still compatible unless they're x32 only and you only have access to x64 LightWave.

If you're concerned about a plugin or script messing up your configs, back up your current config files before installing. If the tool isn't what you need, quit LightWave (including the Hub if it's running) and copy back your 'good' configs. LightWave should be returned to your preferred state the next time you launch it. (This is good practice anyway.)

My general Rules of Thumb: Avoid plugins older than version 8 if there is a more recent equivalent. Avoid plugins that are x32 only unless you really REALLY need it. (For me, that would be DrainBGVmap for example--it's about the only reason I still have x32 Lightwave installed installed.)

I think most power users, especially generalists working in film and TV production with increasingly tight deadlines, rely heavily on third party scripts and plugins. I know I could not have gotten through some crazy productions I've been attached to without third party assistance.

G.

Luc_Feri
11-11-2015, 08:48 AM
To be honest mate, this is for my home computer and home software, so I am cagey with installing stuff from the net!!

I agree you need scripts for work all the time. If this was job related or I was using a workstation at the office I wouldn't have hesitated to install/use script after script, and I have done before when using maxscripts for 3DS Max :D

I trust your feedback so the reputation of the plugin author has made me more likely to give it a shot maybe.

Cheers. :D

prometheus
11-11-2015, 09:59 AM
To be honest mate, this is for my home computer and home software, so I am cagey with installing stuff from the net!!

I agree you need scripts for work all the time. If this was job related or I was using a workstation at the office I wouldn't have hesitated to install/use script after script, and I have done before when using maxscripts for 3DS Max :D

I trust your feedback so the reputation of the plugin author has made me more likely to give it a shot maybe.

Cheers. :D

That sounds like its okay to try on company computers:D give it a go..and if it screws it up, **** happens...:D

As far as I know..probably a very little virus risk with the lightwave plugins, at least if yout think someone would have created it as a virus, there´s of course a risk that someones free plugins has been infected anyway.

Then there is a large community using these plugins, and it probably serves like a stumping bunny..if somethings not right.

Luc_Feri
11-11-2015, 12:44 PM
Yeah for sure, I wouldn't hesitate on the company computers to try any script out. :D

I know virus would be very low risk for things like this, it's a shame I have to be hyper paranoid really.

spherical
11-11-2015, 02:31 PM
Glad I don't work at your company. Further, you can always scan any file/installer before executing it... if you have a competent antivirus, that is. With all of the hundreds of plugins and scripts I have, never has there ever been even a false positive. It's good to be careful but, sometimes, overkill is unnecessary. And, one should really be considerate and consistent across the board... but that's me.

Luc_Feri
11-12-2015, 06:20 AM
Glad I don't work at your company.

????? Care to elaborate.

I of course scan everything whether at home or work, I'm not a mindless idiot, like some I have worked alongside.

If I'm at home I'm super careful and at work careful, but still considerate to anybodies property, it is not in my nature not to be. My comment was purely flippant and in jest, I wouldn't hesitate to virus scan and use a script or maxscript is all I meant. At home everything is on lockdown until I'm 100% sure.

ernpchan
11-13-2015, 12:09 PM
This is possible via scripting. Greenlaw clued me in on this thread and I was able to make it.


Thanks for the link but I'm reluctant to try out random scripts from the net.

But if you're uncomfortable d/ling 3rd party scripts then you should look into learning scripting.

Greenlaw
11-13-2015, 12:25 PM
I'll take that as a hint that *I* need to learn scripting. (Workin' on it.) :D

G.

Luc_Feri
11-13-2015, 12:34 PM
I'll take that as a hint that *I* need to learn scripting. (Workin' on it.) :D

G.

Ha ha for sure Greenlaw.

I have the O'Reilly slab that is 'Javascript' Definitive Guide and some Python books here at home. If only there was 72 hours in a day or I could speed read like Neo. :D

I would guess it's a Python script. Ernest has set the challenge. :D

I've worked out the manual steps involved took me around 15/20mins in Modeler the other day, one needs to just replicate this process. This for 90,000+ curves.

ernpchan
11-13-2015, 12:54 PM
I've worked out the manual steps involved took me around 15/20mins in Modeler the other day, one needs to just replicate this process. This for 90,000+ curves.

This sounds painful...

Luc_Feri
11-13-2015, 01:01 PM
Ha for sure. The process of manually converting a polygon blade is about 10secs. I meant 15/20 mins from not knowing how to do it, to figuring out it could be done after Greenlaw said it was possible. But yes very painful for 90,000 curves that would equate to around 250 hours. hehe :D

Greenlaw
11-13-2015, 01:51 PM
All this said, I'm surprised that Modeler is converting the spline data as polygons and not curves. You might want to submit this as a bug report in your user account.

G.

stiff paper
11-13-2015, 02:07 PM
Thanks for the link but I'm reluctant to try out random scripts from the net.
Hmm.

If you follow the "Browse the Repository" link (to Github) on Johan Steen's page, and then over on the right hit the "Download ZIP" button, you'll find the zip contains an uncompiled lscript. Johan has kindly made public the code for all his scripts in this way.

You can open an uncompiled Lscript in Wordpad (or any text editor) and simply read it before you add it to LW and run it.

I still have no idea if you can even export ASE format files from Houdini, so it may be completely useless to you anyway.

ernpchan
11-15-2015, 10:43 PM
My script to make curves from polygons is on my site under CurveFromPoly:
http://www.ernestpchan.com/newtek-lightwave-scripts

It's uncompiled and fully commented up for those that want to learn from it. It's commented more than I usually do with my scripts to give others insight as to what's happening and why.

Luc_Feri
11-16-2015, 04:43 AM
Ernest, You are a legend my friend, that script worked a treat!!!

I will do a few more tests to see it's results at my end for the robustness but I can't see why it can't handle anything I throw at it. The speed was grease lightning too on my first couple of tests!!

Luc_Feri
11-16-2015, 04:46 AM
Here are some quick tests. From Houdini, script converted curves, to 2 point-poly chains (Strand Maker) and finally Octane Render.

131036131037131038131039

Luc_Feri
11-16-2015, 05:41 AM
Here are some more.

This time, exported as Nurbs Curves from Houdini. This means after using script and then strand maker I get even smoother results. The conversion is quick, quick with Strand Maker also for 2 point-polys.

131040131041131042

If the imported curves are polygonal or subdivision curves I can also resample the script converted curves with LWCAD tools to place more points for smoother results from Strand Maker. If I don't resample then Strand Maker will make more jaggy hair strands as expected. So there is option to create low poly hair styles and high poly hair styles now. :D

So grateful Ernest, you have enabled me to unleash the beast. I will run more tests to check but things seem very robust as it stands. I owe it to you to contribute either by a donation or maybe I could do some free work for you. :D

Now to work on hair refinement in Octane with polyhair and proper shaders as this was a quick IPR test. Also styling techniques and workflow within Houdini. I'm very happy chappy right now. :D

ernpchan
11-16-2015, 11:49 AM
So grateful Ernest, you have enabled me to unleash the beast. I will run more tests to check but things seem very robust as it stands. I owe it to you to contribute either by a donation or maybe I could do some free work for you. :D

Glad to help. You're welcome to send me a donation or you can pay it forward by buying a homeless guy a sandwich or donate to your local animal shelter.

Greenlaw
11-16-2015, 12:17 PM
It's uncompiled and fully commented up for those that want to learn from it. It's commented more than I usually do with my scripts to give others insight as to what's happening and why.

Thanks Ernest! This is very much appreciated. :)

G.

Luc_Feri
11-17-2015, 06:04 AM
Glad to help. You're welcome to send me a donation or you can pay it forward by buying a homeless guy a sandwich or donate to your local animal shelter.

Thanks. I'll certainly think of something. I'd certainly do any favours or free jobs, any help/assistance if the opportunity arose. :D