PDA

View Full Version : Fiber Width



Chris Jones
08-25-2015, 01:05 AM
Here are some squiggly lines:

129473

I made these with the Sketch tool in Modeler, to which I then applied Strand Maker, which created the geometry as shown in the top image. In Layout I applied FFX and added a gradient to Fiber Width, with Fiber V as the input parameter. As you can see from the gradient, the fibers should be thick for much of their length, with a short pointy end.

There are two things wrong with my results:

1. Only one of the fibers resembles what I would have expected from this gradient. All the rest drop off to a point far too early and stay that way for the rest of their length, regardless of how much I compress the end of the gradient.

2. The fiber width changes in steps at a normal scale (ie approximately the thickness of a human hair), as shown in the middle image. However if I scale everything up by 10x (bottom image), it renders properly. I remember reading something about FFX working better scaled up (unintuitive as that would seem)... is the stepping a reason for this recommendation?

Any tips appreciated.

(c:

Dodgy
08-25-2015, 08:28 AM
129474

I think it only samples the scale at vertices, so you need more vertices for smoother gradients. The guide on the left has 2 segment, the one on the right, 5.

Chris Jones
08-25-2015, 10:41 PM
Hi Dodgy, thanks for the reply.

The number of vertices does indeed seem to have an influence. Here's a more controlled test ranging from a 3 vertex strand on the left to 9 on the right. I made the object smaller than before to accentuate the stepping effect.

129486

Clearly this won't do, as even adding a lot of vertices won't eliminate the stepping effect or push the point all the way to the top of the fiber, and it negates my whole reason for using FFX in the first place, which is to keep the vertex count to an absolute minimum (ie 3). What's more, when scaled up I still can't get a smooth result, even with Fiber Smooth set to 4 and gradient smoothing set to Spline.

Incidentally, I initially made the object with the Sketch tool then converted it with Strand Maker, but that version crashes layout (I've sent a report). It works with the original sketched object, but that's invisible in Layout. What's the proper procedure here? On my main project I seem to be having a lot of trouble making strands that stay intact after using Strand Maker, or that don't crash Layout.

(c:

Dodgy
08-26-2015, 02:29 AM
Are you copying and pasting particular strands? As Select connected doesn't select 1 point polys connected to 2 point polys you may have selected. Thus copying and pasting them into a new layer will leave the 1 point polys behind and this will crash FFX in layout. I've put in a feature request/bug report a long time ago, but this hasn't been fixed.

Chris Jones
08-26-2015, 03:15 AM
Any copying/cutting I've done has been for the entire layer without selecting anything. I can't reproduce it now of course, even repeating the exact same steps from scratch (typical!), so I have no idea what's infecting my strands. I do know that if the vertices are out of order that can cause crashes, but I've only been adding points before running Strand Maker, not after.

mlogan
08-26-2015, 05:48 AM
Hi Chris,
Why not use real hair?
You could simply stick it to the screen, and animate it over the top of the image underneath.
Mike

jwiede
08-26-2015, 10:05 AM
Are you copying and pasting particular strands? As Select connected doesn't select 1 point polys connected to 2 point polys you may have selected. Thus copying and pasting them into a new layer will leave the 1 point polys behind and this will crash FFX in layout. I've put in a feature request/bug report a long time ago, but this hasn't been fixed.Actually, sounds like two distinct bugs are present:

"Select connected" is leaving 1pt polys "behind". FFX crashes Layout if 1pt polys are absent.
Did you report both or just one? If just one, which one?

Greenlaw
08-26-2015, 12:56 PM
Number 1 isn't a bug. If the item is a single-point polygon then it wouldn't be connected. When I'm selecting single strands, I usually swipe at the base point to select both items. From there you may extend the selection up the strand. This is also a useful way to adjust weights, especially if you have guides that come in without any weights (like Zbrush FiberMesh guides.)

As for number 2, I agree...it should catch the error and report it before trying to render. But I wonder if that would slow down the render initialization, which can already be slow if there are a lot of guides.

TBH, once I realized for myself what caused this particular crash, I just adapted my work habits to avoid problem altogether. I know that's not a fix and the problem certainly should be reported. It's just something to be aware of when creating and editing guides.

(The same issue was true for Sasquatch when using guides, although Sas probably just errored instead of crashing...I don't really remember as that was a long time ago.)

G.

Dodgy
08-26-2015, 06:59 PM
Greenlaw, it is a bug. The 1 point poly shares a vertex with the rest of the 2 point poly strand. Every other n-polygon would be selected if sharing a vertex, so 1-point polys should too. Also, if you select the 1 point poly and hit Select connected, it selects the rest of the strand. So why does it work one way and not the other?

Chris Jones
08-26-2015, 08:18 PM
Hi Chris,
Why not use real hair?
You could simply stick it to the screen, and animate it over the top of the image underneath.
Mike

Brilliant! :D

Anyhow, the crashes and nonsense have mysteriously gone away for the time being, despite me not having done anything differently as far as I'm aware. The stepping and gradient issues persist though, and it looks like the only way around this is to add more verts.

bobakabob
08-27-2015, 03:23 AM
Chris, have you considered ZBrush? The Fibermesh tools are very powerful and accessible. The grooming brushes feel so much like styling hair in creative ways they almost made me consider dumping 3d to become a professional barber. A big advantage is you can export the Fiber mesh hair to LW as an obj mesh and get very realistic results fast which are easy to render and animateable with either morphs or bones. LW and ZB work really well in this way.

Sorry if this isn't as helpful as the suggestion sellotaping real hair to your screen but it's a good plan B :D

Chris Jones
08-27-2015, 04:14 AM
No access to ZBrush unfortunately, but I'll make a note of that since I'm just about at my wits' end with FFX (which is failing me once again). It wouldn't help with the fiber width rendering issues though would it?

Thanks for the suggestion, I might put "professional barber" on my list of backup plans as well. ;)

(c:

bobakabob
08-27-2015, 06:08 AM
If you eventually decide to go the ZBrush route it's very flexible. You can either export curves for FiberFX, or a much better solution imho is to export the Fibermesh, converting it in ZB into a polygonal hairpiece as an obj for LW. It might be a little heavy in terms of polys but it's not a big deal even for animation and you can further edit in Modeler if necessary. It looks great and you have the advantage of LW's nodal surfacing and conventional ray traced shadows.

I spent a couple of weeks recently faffing about in FFX but there still seem to be too many gotchas like the copy and paste issue and correct way to create 2 point poly chains. I really wish there was a good updated LW video tutorial because FFX does have the potential to create nice results. In ZB it took just a couple of sessions to discover a fun creative workflow with brushes that uncannily simulate actual combing of hair strands. Hence the desire to set up a barbershop :) I'll post some examples in time or more info if you'd find it helpful. Hope the r&d you're doing pays off, your recent work has been mind blowing. Greenlaw would be a good contact, he's frequently posted about using FFX in production.

Greenlaw
08-27-2015, 08:13 AM
Oh. I must have misunderstood how that worked all this time. Thanks for correcting me guys. :p

Although, just sharing the root position doesn't necessarily mean it's connected does it? When you swipe the root position, you select all vertices in that position...however, if you select an edge or point away from that poistion, and select, it will select all but the stray point that shares the position. Or am I still misinterpreting what's being discussed here?

G.

Greenlaw
08-27-2015, 08:27 AM
FiberMesh is pretty nice for styling but it comes with it's own caveats. For example, FiberMesh guides do not come into Layout with weights or UVs, unlike FiberFX Strand Modeler or Edit Guides. This makes it less useful if you want to shade the fibers using a texture map or need to use dynamics. It even makes it difficult to displace accurately if you use sub-patching.

You can work around some of these issues using DrainBGVmap though. This tools lets you transfer the vmap data that exists in your character to the FiberMesh Guides. The catch is that it only works in x32 Modeler, which may limit the number of guides you can work with. (I hit the limit very quickly with full body fur on the cats in B2, but it should be able to handle enough guides for a human head.)

Another possible option is Weighter 2 which does run in x64 Modeler. Unfortunately for me, it seems to crash with Lightwave 2015 to 2015.3. Chilton is looking into the problem so hopefully there will be a fix soon.

I used an earlier version of Weighter 2 a couple of years ago but the results were quite different from what I was getting with DrainBGVmap, so you may need to try both and see which one gives you exactly the result you need.

One big advantage with FiberFX Edit Guides is that the guides are bound to the original mesh, so they automatically come with UVs at the roots. This make it very easy to shade the fibers with textures. This also allows the fibers to deform accurately to a subpatched surface. (FiberMesh guides cannot because the fibers cannot adapt to the additional normal surfaces from the subdivisions.) And if you polygonize the guides, they also get a weight map ready for Bullet and other effects.

It's always something isn't it? Depending on what you need, it's all doable though. :)

G,

Chris Jones
08-27-2015, 07:42 PM
Thanks for the pointers, it looks like Blender might be a viable option for styling as well. Not to shift too far off topic, but I'm also weighing up FFX shaded fibers vs geometry, but can't work out how to convert the hairs into solid mesh. I remember doing this ages ago with Polygonize, but now it only gives me 2 point poly chains regardless of how many sides I tell it to generate. Any clues?

Greenlaw
08-27-2015, 08:02 PM
I think you're right...it seems to be broken. I think the last time I tried generating meshes with it was back n 11.5.x. I'm going to check 11.6 right now.

Edit: It doesn't work in 11.6 either. I'd check 11.5.1 except I don't have it installed on this computer. Downloading it now.

G.

Greenlaw
08-27-2015, 08:36 PM
Hmm...doesn't work in 11.5.1 either. I know I had gotten it to work at sometime...must have been an even earlier version. I thinks this tells me it's not a feature I really use. :p

Downloading and installing 11.5 and 11.0.3 now. If it doesn't work with these, I'm going to stop. Sending a report either way.

G.

Dodgy
08-27-2015, 08:45 PM
Change the fibre type to one of the thick types, thin fibres only ever result in 2 point polys. Thick fibres will create the right number of sides.

Chris Jones
08-27-2015, 08:46 PM
Hmm...doesn't work in 11.5.1 either. I know I had gotten it to work at sometime...must have been an even earlier version. I thinks this tells me it's not a feature I really use. :p

Downloading and installing 11.5 and 11.0.3 now. If it doesn't work with these, I'm going to stop. Sending a report either way.

G.
Just sent one myself. ;) Thanks for confirming, looks like I'll need to figure out some other way to make the strands solid. Rail extrusion perhaps...

Chris Jones
08-27-2015, 08:49 PM
Change the fibre type to one of the thick types, thin fibres only ever result in 2 point polys. Thick fibres will create the right number of sides.
Ah that's it, I've been trying to get it to work with Volume Only/Solid. I'll revise my report. Thanks!

jwiede
08-27-2015, 08:56 PM
Depending on what you need, it's all doable though.

Is it really, though? It seems more like anyone needing a "full set" of realistic hair capabilities will find it actually isn't doable. For example, users want nicely style-able long hair that can also be realistically shaded, have dynamics applied, and so forth -- they can't use ZB->LW-FFX because of UV/weight issues, nor can use LW-FFX-only guide-based hair because of the limited/problematic styling options. With FFX involved it seriously feels like all roads lead to either partial or complete roadblocks.

There are clearly scenarios where FFX can work, Greenlaw's described more than a few. Reading those descriptions, though, reaching the solution with FFX never seems to come across as particularly easy or direct, compared to what it would take to achieve the same results in other packages. There just don't seem to be many usage scenarios where FFX blows most competitors' hair systems out of the water in quality of results, performance or efficiency, and there are too many scenarios where most competitors blow FFX out of the water. Spending extensive time and effort improving FFX hasn't seemed to change the overall situation that much.

So now what?

Greenlaw
08-27-2015, 09:34 PM
That did it! Thanks Dodgy.

bobakabob
08-28-2015, 01:48 PM
Yes thanks for that I spent hours thinking it was broken... A good LW3dg FFX video tutorial would be greatly appreciated.

Dodgy
08-28-2015, 09:41 PM
No probs :)