How to freeze Xgen (freeze attribute does nothing).

How to freeze Xgen (freeze attribute does nothing).

johnkeates2865
Advocate Advocate
3,704 Views
20 Replies
Message 1 of 21

How to freeze Xgen (freeze attribute does nothing).

johnkeates2865
Advocate
Advocate

Xgen hair makes my model very slow to move so I would like to fix this before rigging. I tried the 'Frozen' attribute but that does nothing. Hiding seems to speed things up until I press play, when xgen continues to evaluate.

 

How to fix this (short of having a render mesh that gets swapped in after animation)?

0 Likes
Accepted solutions (1)
3,705 Views
20 Replies
Replies (20)
Message 2 of 21

sean.heasley
Alumni
Alumni

Hi @johnkeates2865

 

What are the hardware specs of your machine?

Steps to find your pc specs can be found here!

 

It's possible if you're on a slightly weaker machine that Xgen could be taxing on your hardware.

 

That said, you could also try caching all of the Xgen hair and you should see a performance boost.

 

Please let me know if this helps or if you need any more assistance!

 

 

If one or more of these posts helped answer your question, please click Accept as Solution on the posts that helped you so others in the community can find them easily.

 

 

 

Kudos are greatly appreciated. Everyone likes a thumbs up!

 

 

0 Likes
Message 3 of 21

johnkeates2865
Advocate
Advocate

It's an overclocked i7 8core (clocked to 4.1ghz) so it should be fine. There are a lot of hair guides on it so I don't expect it to be real-time with all that. Caching it is no good as I need real-time feedback to animate. Surely there is a way to disable it? 

 

Otherwise I will have to resort to having an animation model and swap it out for a render model later.

0 Likes
Message 4 of 21

mspeer
Consultant
Consultant

Hi!

1. "How to freeze Xgen"

2. "Caching it is no good as I need real-time feedback to animate"

Sorry i don't understand this, do you want feedback or not?

Edit:

Or do you mean caching is not enough to get real-time fps cause of mass hair?

 

And what XGen are you talking about XGen "Classic" or "Interactive", any dynamics?

 

There are mainly 2 options to enhance performance:

A) Disable display/ CPU computations

B) Reduce display/ CPU computations (control detail)

 

 

 

0 Likes
Message 5 of 21

johnkeates2865
Advocate
Advocate

I need real time feedback as I animate. Caching, by definition, is not real-time.

 

The x-gen uses a hair per guid, so lots of guides generated from nerbs from zbrush. The only good solution would be to disable xgen evaluation, either per node, or overall, as can be done with n-dynamics etc.

0 Likes
Message 6 of 21

mspeer
Consultant
Consultant

Hi!

 

Again:

What XGen are you talking about XGen "Classic" or "Interactive", any dynamics?

0 Likes
Message 7 of 21

johnkeates2865
Advocate
Advocate

Classic with no dynamics.

0 Likes
Message 8 of 21

mspeer
Consultant
Consultant

Hi!

With many Guides you will get a huge slow down.

The best way to skip evaluation is to disconnect the mesh.

 

In Node Editor disconnect the connection between

ObjectShape ( World Mesh [0] ) <-----> Object_descriptionShape ( Geometry)

then the Guides freeze at current position.

 

Re-connect and it will be evaluated again.

Message 9 of 21

mspeer
Consultant
Consultant

Hi!

 

You also need to disable Modify -> Evaluate Nodes -> Expression.

0 Likes
Message 10 of 21

sean.heasley
Alumni
Alumni

Hi @johnkeates2865

 

I'm just checking in to see if you need more help with this. Did the suggestion that @mspeer provided work for you?

If so, please click Accept as Solution on the posts that helped you so others in the community can find them easily.

 

 

0 Likes
Message 11 of 21

johnkeates2865
Advocate
Advocate

I haven't been able to find the connection in the node editor that I need to disconnect.

 

Also, I'm not sure if I want to disable expressions as that might break my rig (the rig isn't made yet).

 

In this case, I plan to make an animation model and a render model and swap one for the other for rendering (a work-flow that I would like to learn anyway).

 

But I think this really needs a proper solution as, though I am grateful for the work-around suggestion, it is pretty clunky. Surely freezing the xgen should do just that? For guide hairs as well as the other hairs?

0 Likes
Message 12 of 21

sean.heasley
Alumni
Alumni

Hi @johnkeates2865

 

I believe @mspeer's solution is the best bet.

 

That said, when you get a chance can you please zip and attach the scene file here or via dropbox/google drive or another file sharing program so I can take a look at it?

 

I'd like to see how the scene runs on my machine and test a bit to see if there is another possible solution to this.

 

 

0 Likes
Message 13 of 21

johnkeates2865
Advocate
Advocate

I PM'd you a link to the file btw.

0 Likes
Message 14 of 21

sean.heasley
Alumni
Alumni

Hi @johnkeates2865

 

Thanks for sending me the scene file!

 

For some reason, having the model disabled for selection in the viewport makes it impossible to put guides on the model.

 

Also I noticed that when I scaled up the HairMesh Maya would crash out of no where.

 

That aside, once I fixed the selection so I was able to properly make the guides I had no slowdowns with the model.

 

While your CPU is powerful enough, what are the rest of the specs of your machine?

Steps to find your pc specs can be found here!

 

Also, when you get a chance could you possibly post a video of your slowdowns in Maya?

If you need a video capturing program, Screencast is a great option that we use here at Autodesk

 

 

0 Likes
Message 15 of 21

johnkeates2865
Advocate
Advocate

You tried animating the model and playing the animation? That is when the slowdown happens.  I'm not adding control guides, I need fast playback for animating. 

0 Likes
Message 16 of 21

mspeer
Consultant
Consultant
Accepted solution

Hi!

 

1. Select one of your guides and show IN/Out connections in Node Editor.

The node (left) besides the MakeGuide nodes has a Geometry Input, you need to disconnect the incoming connection from the World Mesh Attribute (Out) of the shape node.

 

2. You can leave Evaluation of Expression enabled, but then you need to disable Update for XGen Preview.

 

It would be nice if there would be an easier way, but i can't see one. You could try to create a custom hotkey for easy on/off toggling.

 

Edit: @sean.heasley in my test-scene i have about 3000 guides which of course leads to a huge slowdown, cause their positions are calculated for every frame (with a deforming input mesh) even if the display of the result is hidden. I'm not sure if there is an easier way to stop this calculation.

Message 17 of 21

johnkeates2865
Advocate
Advocate

Oh... you mean, per guide? Well that would have to be scripted as there are thousands of them, and I would also need to script the connection to be made again for rendering. 

 

It is better to swap the rigged mesh for this one in some way (a wrap deformer would be one choice), then bake and render or whatnot. 

 

So, I think it still stands that there should be a way to easily disable evaluation of the guides.

0 Likes
Message 18 of 21

mspeer
Consultant
Consultant

Hi!

"Oh... you mean, per guide?"

No,

please upload a screenshot of you Node Editor, based on my instruction.

 

 

0 Likes
Message 19 of 21

johnkeates2865
Advocate
Advocate

Ah yes, I got it now. I can get it to disconnect and be up to speed, then reconnect. I can probably scrip this too. Sorry I have been a bit slow... battling through a bout of food poisoning.

0 Likes
Message 20 of 21

mspeer
Consultant
Consultant

Hi!

I am glad this works for you, and get well soon.

 

Please mark every answer that solves your problem (or gives the correct answer) as solution, so others interested in this thread will get a better overview.

0 Likes