PDA

View Full Version : Fiber Mesh to Fiber FX



Paul Goodrich
11-28-2018, 07:56 PM
I hope that there's a solution for this. I have a character that was animated in Blender and then ported to Lightwave using Alembic and mdd. Now I need to add fur to him. Having some issues getting it to look good with fiber fx. Then I went to Zbrush and got a fairly nice look and exported the curves. Used Strand maker in modeler but now how do I get it to follow the mdd motion? I can't seem to even parent the curves to the object. Path to point doesn't work as there's morphs in the face that the fur needs to follow. I've been hunting in the forums and the rest of the internet trying to figure this out. I read somewhere that I needed to have the UV and other maps transferred to the curves. Greenlaw said in one his posts that there was a tool in Oliver's OD tools that might do it. But I have no idea how to change the curves to guides or if that's even possible. I have the OD tools and Weighter 2 but am not sure how to make this work. OD tools geometry to Style tool just kicks out an error and doesn't seem to work for me. I've done some low rez tests and no luck so far. My steps are: take an object into Zbrush, add fiber mesh, export curves as lwo, load into Modeler and apply Strand Maker, I can then add fiber fx on the curves but can't seem to even parent it to the original model. Much less have it follow the mdd. Is there a way to change the curves into Fiber FX guides? Any advise would be great. Thanks

Oldcode
11-29-2018, 03:47 AM
Hi,

Not sure if you've done this yet based on what you talked about, but I was having this same problem with Poser characters imported into Lightwave. Bugzilla has a video for Parenting to a point that I find very useful. When I needed to attach a hair object to the head of a character, I picked a point on the top of the head and the hair usually follows the head pretty closely.

https://www.youtube.com/watch?v=6TKCdftEM-c

There can be problems if your character's head make sudden twisting movements, but for the most part it works. Also, you can use FBX to export the bones of your character and bring them into Lightwave, then parent the hair to the character's head bone.

There is a way to convert the ZBrush fibers into Lightwave hair fibers that can be dynamically animated, I just can't find it at the moment. I'll try to look again for you later.

Also, here's a couple of very good videos on doing dynamic hair in Blender.

https://www.youtube.com/watch?v=n7Wy2aMCXP8&t=616s
https://www.youtube.com/watch?v=2YCQLZMuvkE

Good Luck

Paul Goodrich
11-29-2018, 07:44 AM
Thanks for the ideas. There's no bones in the Lightwave scene as the character is solely animated by mmd. I did the parenting to point trick on a different film and it worked great. The problem here is that this character is using fur over the entire head (it's a wolfman style character) and there's morphs on the head that the fur needs to follow. How had is it to get the hair/fur out of Blender and have it work in Lightwave? Thanks again.

Oldcode
11-29-2018, 08:54 AM
I'd like to know that myself. Blender's hair system is far superior to Lightwave's, which is really depressing since Lightwave is expensive and Blender is free.

I was able to get my poser characters into Blender via FBX, and animate the hair, but I can't find away to export the animated hair and get into Lightwave. I've tried, but the object has no fibers, it's just an invisible point. :bangwall:

I'm working on a new idea to use Bullet to animate the hairs because MarkAH over on this thread...

https://forums.newtek.com/showthread.php?158604-Cloth-simulation&p=1559307#post1559307

Just told be about a way to use the character's body as a collision object, which is something I'd been having trouble with. Its the only thing that had been stopping me from using Bullet for Fiber based hair. I have a low poly poser character that is perfect to use as a proxy collision object.

Also, if you are exporting your characters and animation from Blender to Lightwave, if you use FBX, you may be able to export the bones as well. I can do that in poser and sometimes use the bones to attach hair and proxy objects.

Good Luck,

Ztreem
11-29-2018, 11:26 AM
I wonder why you need to move to Lightwave from Blender for hair? Blenders hair styling & rendering is far better than LW. Why not stay in Blender and finish it there?

prometheus
11-29-2018, 12:20 PM
I'd like to know that myself. Blender's hair system is far superior to Lightwave's, which is really depressing since Lightwave is expensive and Blender is free.

I was able to get my poser characters into Blender via FBX, and animate the hair, but I can't find away to export the animated hair and get into Lightwave. I've tried, but the object has no fibers, it's just an invisible point. :bangwall:


I know how to get blender static hair in to lightwave, you need to go to blenders modifier tab, and under the particle system there is a convert button, hit that and you will have converted it to a mesh, the fact that you only get points in there is most likely that the format you exported to ..isnīt containing a mesh.
so once converted as mentioned, you can save out as obj format, load obj to lightwave modeler and in edge mode copy itīs edges by hitting w for the statistics and select only the one polygons statistic and copy that...do not paste yet, go to polygon mode and delete all polygons, then paste the edges back...I have a thread about this, if you do that in the right order, fiberfx shouldnīt crash, and you can use lightwave fiberfx on any static hair object.

did some initial test to see if I could get the hair simulation with blender mdd export, but didnīt work...I think it would be a mismatch since we do have to go through that process of copy and paste edges, to much painstaking experimenting for that right now.

- - - Updated - - -


I wonder why you need to move to Lightwave from Blender for hair? Blenders hair styling & rendering is far better than LW. Why not stay in Blender and finish it there?

Agreed, cycles renders way faster, simulates nicely, and you can comb style it better as well, and on top of that there is a new kind of hair shader for blender.
It could be though that Lightwave and Daz plays along much easier than Daz and blender..if you work with that, though I havenīt checked a plugin for blender that should make it easier.

Greenlaw
11-29-2018, 01:19 PM
The way I use Fibermesh/FiberFX for head hair in LightWave is, after import, I weight the end points to stay fixed. Then I simply parent the wig to the head bone. I also create a lower-poly version of the head to use for collision. (For collision, you only need the head so chop it off, and remember to seal the holes.) This speeds up Bullet so it only takes a couple of minutes to do the calculations. You might also add proxy objects for the shoulders and back if the hair is long.

Once you have the sim done, bake the animation to MDD and add the baked hair guides to the scene with your previously MDD-baked character.

If the Fibermsh/FiberFX hair needs to follow a deforming part of the body (like fur,) you'll need to transfer the weighting of your character to the fibers. You can do this with Transfer Map from OD Tools, or Weighter 2 from Liberty. (Note: I've had trouble using Weighter 2 after upgrading to Windows 10. Kat swears it works though, so your mileage may vary.) Either one can transfer any type of vmap, like weights, UV, morphs. (UV is useful if you want the hair to pick up color from a skin texture. This is how the Fibermesh/FiberFX fur for the cats in B2 are colored.)

If you're using an older x32 LightWave, a plugin called DrainBGVmap works great too. The only drawback is that the number of fiber guides you can apply it to is a lot less because of x32 RAM limitations. You can find this plugin at Mike Green's website.

I hope this points you in the right direction. Sorry, I'd go into more detail about the process but I'm a bit busy at the moment.

Oldcode
11-29-2018, 01:27 PM
Prometheus,

I've been able to do what you described with static hair and get Blender hair objects into Lightwave and animate them using both Bullet and ClothFx. As I noted above, the problem was providing a good collision object so the hair does not pass through the character's body. With the tip that MarkAH gave me, I'm hoping to solve that problem. I'm hoping to use a low polygon version of my poser character with the same motions as an almost perfect collision object to get more accurate collisions.

Since Blender's dynamic hair system is far superior to anything in Lightwave, be it Bullet, ClothFx, or even Syflex, what I was talking about was doing the hair animation in Blender, then saving it as an MDD or exporting it as a FBX or Alembic or something of that nature, and bringing the animation data into Lightwave. I've tried several methods but so far I can't get it to work.

Any ideas?

Greenlaw
11-29-2018, 01:37 PM
Some more info: If you only have an mdd version of the character (for example, it was baked out of Maya and you don't have the animated rig available in LW,) you can still attach hair to it. Use SoftFX to select a point at the top of the head and bake a null form it. Then you can parent the hair and head collision object to the null and run a sim from that. This works with Bullet or ClothFX. (Many years ago, I did this all the time with ClothFX. I don't use ClothFX for hair any more though because Bullett is much faster.)

Note: the mdd should have a T pose at the beginning otherwise the result can be unpredictable. Ideally, the animation should ease from the T pose to the first frame of the action; this will allow the simulation to 'pre-roll' more naturally. If the T-pose doesn't exist and you don't have the rig to add the animation to, you'll need to create a new setup frame pose in the mdd that aligns with the hair object's position at frame zero. You can probably add that using Chronosculpt.

Greenlaw
11-29-2018, 01:49 PM
One last thing: if the head hair is short, you don't even need the collision objects. Just parent it to the head bone or the baked null. For short hair, SoftFX may be all you really need if you just want a little bounce.

prometheus
11-29-2018, 02:54 PM
Prometheus,

I've been able to do what you described with static hair and get Blender hair objects into Lightwave and animate them using both Bullet and ClothFx. As I noted above, the problem was providing a good collision object so the hair does not pass through the character's body. With the tip that MarkAH gave me, I'm hoping to solve that problem. I'm hoping to use a low polygon version of my poser character with the same motions as an almost perfect collision object to get more accurate collisions.

Since Blender's dynamic hair system is far superior to anything in Lightwave, be it Bullet, ClothFx, or even Syflex, what I was talking about was doing the hair animation in Blender, then saving it as an MDD or exporting it as a FBX or Alembic or something of that nature, and bringing the animation data into Lightwave. I've tried several methods but so far I can't get it to work.

Any ideas?

I canīt track down exactly how you exported from blender? you never mentioned it I think...and I have tried myself with obj export ..cleaning it up and then trying mdd export from blender which then is loaded on to the mesh.
I honestly donīt think it is doable with mdd, and it would be a waste of time if you can not render the hair with fiberfx anyway..and to be able to render with fiberfx, you have to go through the process I use, otherwise the fiberfx will crash...and if you do follow that process I described, you will change point amount..and thus mdd will not work.


You said you got static object in there..how? the way I do it or?
and after the simulation with clothFX....did you render any fiberfx, I think it would be proned to crash?

Oldcode
11-29-2018, 07:58 PM
I exported my character geometry and animation via FBX to bring them into Blender. That way, I could design, grow, and animate the hair as the character goes through their movements. The idea was to then export the animated hair from Blender and import it into Lightwave, then use FFx to render the hair as it moves in the Lightwave scene. But, based on what you're saying, it looks like we can't make the hairs usable by FFx if they are brought in by MDD or perhaps any other method.

Yes, I did get a static hair object out of blender and was able to animate with both Bullet and ClothFx. Again, the problem I had was trying to come up with ways to have proper collision objects so the hair can react normally and not pass through the character's body. I've got several different method, but I'm going to try a new one and I hope will work better.

Thanks for the info.

prometheus
11-30-2018, 08:00 AM
I exported my character geometry and animation via FBX to bring them into Blender. That way, I could design, grow, and animate the hair as the character goes through their movements. The idea was to then export the animated hair from Blender and import it into Lightwave, then use FFx to render the hair as it moves in the Lightwave scene. But, based on what you're saying, it looks like we can't make the hairs usable by FFx if they are brought in by MDD or perhaps any other method.

Yes, I did get a static hair object out of blender and was able to animate with both Bullet and ClothFx. Again, the problem I had was trying to come up with ways to have proper collision objects so the hair can react normally and not pass through the character's body. I've got several different method, but I'm going to try a new one and I hope will work better.

Thanks for the info.

Still unclear to me how you actually export the hair from blender, fbx for characters I understand for the character, but that doesnīt export any hair as I am aware of...so do you disconnect the hair from the particle system in blender as I do ..and then export to obj format for lightwave to read?

I really love the particle edit for hair in blender...which I feel is superior to how you model hair guides in Lightwave layout, but blender may have some areas lacking here, you can not simulate a hair in blender to a certain rest position and style, or use the style kink and brain options in the simulation, and then go to particle edit trying to comb from that state...
It will just snap back to straight particle paths if you try that..so that is a serious lack in the tool I think.

Not only that...In blender you can not even use the standard sculpt tool on the hair..even if you have converted it to a static mesh, you need to edit that in edit mode, and as such you can not use any scultp tools on it...so there
it may be that lightwave has better deform tools in modeler, or even use 3rdpowers sculpt tools.

Oldcode
11-30-2018, 08:10 AM
...but that doesnīt export any hair as I am aware of...so do you disconnect the hair from the particle system in blender as I do ..and then export to obj format for lightwave to read?

No it does not, and that's the problem. For static hair in Blender, I followed the steps you outlined above, and that works. But what I wanted to do is animate the hair in Blender, then export that animated hair back to Lightwave, but so far, I have not found a way to do that.

The good news is, if MarkAH's idea works, there will be no need.

prometheus
11-30-2018, 08:21 AM
No it does not, and that's the problem. For static hair in Blender, I followed the steps you outlined above, and that works. But what I wanted to do is animate the hair in Blender, then export that animated hair back to Lightwave, but so far, I have not found a way to do that.

The good news is, if MarkAH's idea works, there will be no need.

Great..now itīs clear, and yes...I donīt see away of getting animated hair to work from blender to Lightwave...if anyone else works on it, that would be nice of course, the problem for me though is that Lightwave new fiberfx takes too long to render...so I will continue to work in the original software where I created the hair I think, though I need to work more on using daz figures in that environment by adding some addons.

Otherwise I have become fond of exporting daz figures to Lightwave and either animate it from daz and import animations, or use IK booster on it..I have a lot of work to do in order to catch up with rigging in blender....the fiberfx that sounded and looked so nice before the lw 2018 release, isnīt making me happy with itīs long rendertimes, the new skin system is however very nice with the new lights in Lightwave 2018...to the point I think it is a tad better than blender, and itīs easier to get good eye reflections in Lightwave 2018 than in blender for me.....but it may be a learning curve there for me.

So skin shading, daz import, and lights is to pros in Lightwave for me ( though I havent upgraded)
And..

Hair dynamics, hair shading, render speed, hair combing is the pros in blender for me....this is where they differ.

Oldcode
11-30-2018, 10:41 AM
Sorry if I was not clear before. The only reason I even looked at Blender is for its hair creation tools. I saw a really good you tube tutorial on how to make your own hair, then was able to bring it into Lightwave to animate it. ClothFx does not treat the hair well, too much jumping around and erratic movement. Bullet is much better but I was setting my proxy objects as Kinematic which was only recognized the position of the proxy mesh at the first frame.

MarkAH talked about the idea of setting my proxy objects to Defore, but setting the Shape Retention, among other settings, so the objects is not deformed at all but will interact with the hair that will deform.

I'm going to try an experiment this weekend to see if it works. When I bought Victoria 4 from DAZ, it comes with a low polygon version of the figure that is perfect to use as proxy object. My idea is to give them both the exact same movements and key frames, then use the low poly as a collision object, and the normal figure for rendering.

Wish me luck! :D

prometheus
11-30-2018, 01:13 PM
Sorry if I was not clear before. The only reason I even looked at Blender is for its hair creation tools. I saw a really good you tube tutorial on how to make your own hair, then was able to bring it into Lightwave to animate it. ClothFx does not treat the hair well, too much jumping around and erratic movement. Bullet is much better but I was setting my proxy objects as Kinematic which was only recognized the position of the proxy mesh at the first frame.

MarkAH talked about the idea of setting my proxy objects to Defore, but setting the Shape Retention, among other settings, so the objects is not deformed at all but will interact with the hair that will deform.

I'm going to try an experiment this weekend to see if it works. When I bought Victoria 4 from DAZ, it comes with a low polygon version of the figure that is perfect to use as proxy object. My idea is to give them both the exact same movements and key frames, then use the low poly as a collision object, and the normal figure for rendering.

Wish me luck! :D

Thereīs two major fights you have in the ring for this... believeable hair collision, and render times of the hair, so yeah....good luck. :D

Oldcode
11-30-2018, 01:51 PM
Thanks, I'm going to need it. :hey:

By the way, while I've got your ear, is there a Wind force for Bullet, so you can have the hair waving in the wind while the character just sits there? :stumped:

prometheus
12-01-2018, 01:26 PM
Thanks, I'm going to need it. :hey:

By the way, while I've got your ear, is there a Wind force for Bullet, so you can have the hair waving in the wind while the character just sits there? :stumped:

Yes there are sort of, they are not called wind though...itīs under the forces tab, unlike the old legacy forces...they do not have their own vector parameters for any advanced motion..you have to use textures, and they do not work with particles.

Add a null and make it a bullet forcefield, start off with acceleration and add a texture to the vector channels, hit play and watch it move.
I would suggest while you are trying this, skip any character and dense meshes, start with a cap or a sphere, make that static or kinematic and make sure your hair strands roots are a bit inside that cap or sphere, so it holds the strands fixed..otherwise they will fly away.

Strands set to deforming body ofcourse.

Oldcode
12-01-2018, 08:06 PM
Thanks Prometheus,

I'll look into that. :)

MarkAH
12-02-2018, 03:05 AM
I played with this some, because Bullet has been so much fun.
In order for a wind effect to have some realism you also need to animate it.
Adding a texture to the force changes it over space, but not over time.
Making the force 'velocity' seemed to work best in my experiments, and setting the dimensions of the texture to be just slightly greater than the area of the hair, perpendicular to the direction of force creates the most interesting effects.
I used the turbulance procedural texture since that sounds like the right kind of thing.
The texture is placed on the vectors which are set to x = 5cm, y = 5cm, z = 30cm, and the texture displacement axis is set to z
But nothing very windy like happens without animating the force.
It kind of ballances out with gravity over a few frames and then just stays there.
So if your force null is named say 'forcenull' setting the reference of the texture to that causes the texture to center it's pattern on the null.
Next, with dynamics off, I stepped through four parts of the frame length (120 for a test) 0 - 60 - 90 - 120 and moved the null in quadrants around the hair.
The velocity strength is set to 0.75 and density set to 1.
Also, gravity is set to y = -1 because this seems to give the mass and stiffness factors a more meaningful scale.
I gave the hair a mass of 1 gram, 40% shape retention, linear and angular stiffness.
Turn on dynamics and start the simulation.
Works real nice.
The effect is quite sensitive to velocity strength.
Setting it to 1 makes it wild, 0.5 is pretty mild.

prometheus
12-02-2018, 08:18 AM
I played with this some, because Bullet has been so much fun.
In order for a wind effect to have some realism you also need to animate it.
Adding a texture to the force changes it over space, but not over time.
Making the force 'velocity' seemed to work best in my experiments, and setting the dimensions of the texture to be just slightly greater than the area of the hair, perpendicular to the direction of force creates the most interesting effects.
I used the turbulance procedural texture since that sounds like the right kind of thing.
The texture is placed on the vectors which are set to x = 5cm, y = 5cm, z = 30cm, and the texture displacement axis is set to z
But nothing very windy like happens without animating the force.
It kind of ballances out with gravity over a few frames and then just stays there.
So if your force null is named say 'forcenull' setting the reference of the texture to that causes the texture to center it's pattern on the null.
Next, with dynamics off, I stepped through four parts of the frame length (120 for a test) 0 - 60 - 90 - 120 and moved the null in quadrants around the hair.
The velocity strength is set to 0.75 and density set to 1.
Also, gravity is set to y = -1 because this seems to give the mass and stiffness factors a more meaningful scale.
I gave the hair a mass of 1 gram, 40% shape retention, linear and angular stiffness.
Turn on dynamics and start the simulation.
Works real nice.
The effect is quite sensitive to velocity strength.
Setting it to 1 makes it wild, 0.5 is pretty mild.

I think you are a bit wrong on that part, increase texture strength to 10 and the animated effect seem to be sustained through the time, using acceleration and a force strenght of 2.
However..it is correct that the procedural isnīt animated and in most cases need to be referenced to scaled or moving null, or animated with envelopes, but in this case I can see the movement having effect across the whole timeline.
You can also change to animated ones, like ripple or some other animated procedural.

Do not use Normalize.

jwiede
12-02-2018, 12:50 PM
You can also change to animated ones, like ripple or some other animated procedural.

Sounds like what's needed is a collection of animated and/or 3D noise texture procedurals for Blender, beyond just simple white noise -- seems to be a recurring need with Blender.

prometheus
12-02-2018, 01:45 PM
Sounds like what's needed is a collection of animated and/or 3D noise texture procedurals for Blender, beyond just simple white noise -- seems to be a recurring need with Blender.

Not only animated, the amount of procedurals in Lightwave VS blender, that is where I hold Lightwave as a king, I also prefer to layer stack procedurals when deforming landscape with the help of gradients and the layer system in Lightwave, which is easier and nicer to work with than stacking displacement layers in blender..some things like that where I prefer Lightwave, while sculpting is the thing in blender..but I have to still myself so I do not go off topic to much here.

With lightwave though, all procedurals seem to work everywhere, from volumetrics, to displacement, forces etc...while apart from having very few procedurals in blender, you can not even acess the same ones for texturing as you have in displacements, so that is a major let down in blender of today for me.

Theres always proīs and cons in these software, blender hair rendering and combing, sculpting and cycles render speed, just great, along with curve tools and skin modifier and nodes
While lightwaveīs procedurals, organization and navigation in viewports with cams, lights, objects and deformation speed for subdivisions is what I fancy about Lightwave.

prometheus
12-02-2018, 01:54 PM
Still learning blender rendering and I was throwing out a question (in blenderartistorg) wether or not you in blender can apply hair rendering in the same way as when you control it with particles and itīs hair rendering settings`?
but doing that on simple polychains, imported from lightwave simulation etc.
No answer so far on the blender forums..maybe itīs not doable on simple polychains? so if I for some reason find it easier or need to simulate hair guides in lightwave, then just port it over to blender and render with cycles.

Wind forces for affecting hair in blender, well you got the winds basic noise, but you can change force to textured there as well, in a similar way to how you do it with lightwave.

prometheus
01-04-2019, 04:02 PM
Bumping this thread as well..I have it also covered in the daz character hair thread...since I had the above question in this thread, and it was unanswered in blender artist forums,
I found out this..

And for creating spline curves in Lightwave modeler, you just use strandmaker to convert to polychains, save out lwo, and once imported to blender.. run the hairnet plugin, and choose fiber mode ..and you got your lighwave Polychain made in to cycles particle hair, fully dynamicly and particle editable...with options to use child hair, set a display step setting of 6 for smoother strands, and if you enter
particle edit, you have to make sure you set the draw path steps equally to 6.
use deflect emitter so your guides donīt intrude into the scalp mesh.

https://en.blender.org/index.php/Ext...bjects/HairNet

I downloaded the zipfile from the green button (clone or download)
and installed in blender directly from zipfile...I think you need to check the testing category in blender addons, otherwise the plugin wonīt show up..make sure to check it as active and save preferences.
the hair net will show up in the particle tab.

for me ..even though I think blenders parametric curves with full 3d meshing is a bit superior and also can use the svg format, I still think itīs easier to draw Lighwave splines and edit, with cloning and arraying for things like creating hair guides.

So rather than drawing curves in blender, I prefer Lightwave curves..though I still havenīt utilized the grease pencil, in fact that may be the superior approach since you can draw on a head surface and body, then convert that to particle hair with hairnet.