Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Maya 2019 - XGen trouble at render time

12 REPLIES 12
SOLVED
Reply
Message 1 of 13
Topeich
2906 Views, 12 Replies

Maya 2019 - XGen trouble at render time

Hi,

Let me start by say that I'm pretty noob at Xgen.

I was testing it on a dog character and found a wall that seems that I can jump by myself.

 

I have already done the grooming, actually happy enough with it. So I have placed a couple of basic keyframes to make a turn around and found that fur is not following well enough the geometry deformation. It somehow does, but I get some fur areas "falling" inside the dog skin ... see example movie.

 

But, if I render the dog at the same frame (11) inside Arnold Render View it renders perfect! See attached image.

 

I have tried to export patches and redirecting Arnold to it, no change at all...

 

So, I'm sure that I'm missing something, but can't find what neither in Maya help or the internet community. Can someone enlight me, please?

 

Ah, there is no dynamics at all, only the skinned dog, a copy to use as "scalp" and the Xgen.

Many thanks in advanced.

 

Cheers,

Ignasi.

12 REPLIES 12
Message 2 of 13
sean.heasley
in reply to: Topeich

Hi @Topeich 

 

Do you have collisions enabled so the fur properly collides with the mesh? That should stop most hairs from going inside the model.

 

Also can you try switching Evaluation Mode ("Parallel" vs "DG") in Preferences and see if that changes anything?

 

 

Message 3 of 13
sean.heasley
in reply to: sean.heasley

Hi @Topeich 

 

Just wanted to check in to see how things were going. Are you still having this issue?

 

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

 

 

Message 4 of 13
Topeich
in reply to: sean.heasley

Hi Sean,

Thanks for the answer and interest in the topic.

I have done various tests and seems that the best is to use the collision modifier. It, somehow, works now but I'm investigating other glitches that appears on render time. Fur follows much better the geometry deformation but randomly got frozen so two frames have same fur while geometry don't. I attack a movie with a red mark on the glitched frames.

 

I still have to try changing evaluation mode, let's see if it makes anything.

 

Any other ideas will be more than welcome.

 

Cheers,

Ignasi.

Message 5 of 13
sean.heasley
in reply to: Topeich

Hi @Topeich 

 

This thread had a similar issue with hair not following during animations so it might help you.

 

From that thread:

 

 

Couple of things you need to do...

 

First, you need to make a copy of the scalp geo then move the geo that XGen is bound to out of the group:

 

ScalpCopy.png

 

Then make a blend shape deformer with the copy in the group as the target so that the scalp geo that XGen is bound to deforms to follow the grouped geo, Select the copy then the bound geo when making the blendshape.

 

Then you should ideally get rid of the rigid body collider for the bound geo and make a new one for the grouped geo. It's advisable not to have a hair system bound to a shape that it is also colliding with, it can cause popping at the base of the simulation curves.

 

the reason the hair was not following the mesh was that XGen could not see any transform on the mesh as it was animated in a group. Using a blend shape ensures that the animation is propagated through to XGen

 

Working.png

 

You might want to set the animation evaluation to DG rather than Parallel in settings and preferences as the Blend shape deformer and parallel eval may not work well together.

 

ArnoldRender.png

Message 6 of 13
sean.heasley
in reply to: sean.heasley

Hi @Topeich 

 

I'm just checking in again to see if you need more help with this. Did the suggestion I provided yesterday 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.

 

 

Message 7 of 13
Topeich
in reply to: sean.heasley

Hi Sean,

No luck with those solutions. Still investigating ... thx.

Message 8 of 13
sean.heasley
in reply to: Topeich

Hi @Topeich 

 

Hmm ok.

 

This thread has a lot of posts on some Xgen jittering which may be a bit similar to your issue.

 

I'd recommend looking at the whole thread but here's the solution text from that thread:

 

A few more questions.

  • Would using the rand() function, in the primitive length or width, cause it to re-generate a random seed each frame?

No, seeds are not random and they do not get regnerated per frame as they are the start state for random number generation. The rand() function uses a default seed but you can explicitly give it a seed rand(min, max, seed)

 

  • Sometimes in the XGen window under Preview/Output > Output Settings > Renderer, the option to render in mental ray disappears (despite mental ray being loaded properly in the plug-in manager). Why does this occur and is there any way to get it to load?

This is a bug that keeps cropping up. Usually you have to quit Maya and restart, make sure that Mental ray is loaded and set as the renderer before loading Xgen.

 

  • When I was troubleshooting and making changes to the hair collection, then batch rendering to test the changes, the batch render would occasionally not register the changes. Why would this be? Do I need to manually save before batch rendering?

The changes need to be saved to the XGen file for Batch rendering to be able to read them. The Batch Render does not have access to the live Maya session.

 

  • If control a value with an expression (ex. primitive 'width'), then reset it to a slider, when I reload the scene, it always gives me an error, something like this:
    • // Error: XGen: Error in expression "XGen_Man_hair4::width". [$a=0.1000;#-1.0,1.0]
      Error: Unexpected end of expression':
      $a=0.1000;#-1.0,1.0

This is becuase part of the expression is being cut off by the reset. $a is a declared variable but the variable is not being called because a secondf line was lost by resetting.

 

The full expression should be:

 

$a=0.1000;#-1.0,1.0

$a

 

  • When you first open a scene and import an existing XGen collection (the XGen file) and it asks you whether you want to overwrite or make a new collection (usually with the number '1' as a suffix), if you choose to make a NEW collection, why does XGen still look to the old folder for paintmaps? Is there a way to force it to look in the new folder?

If you want to import a collection but not use the collections folders, you'd have an empty collection. You might want to export the descriptions to presets. the preset system saves the description data to a separate location and then this info is saved to a new collection when youi save the scene.

 

  • I'm a little confused about how to use the noise expression you gave me. I see this generates noise for a given value (ex. primitive 'width'), but in my case, I'm using noise from a modifier (ex. clumping > noise). Would you still use this expression in this case? Where would I paste the expression? (under clumping > noise > magnitude?) Is the clumping noise static in relationship to the hairs by default?

You could use the expression in the Mask or magnitude ir any other parameter as it generates a float value (0-1) than be used to drive any of the clump parameters or other modifier parameters

 

Cheers

 

 

Message 9 of 13
Topeich
in reply to: sean.heasley

Hi Sean,

Again, thanks for your interest in the topic.

 

None of those posts, altough very interesting, are similar to my case but is good to read them anyway.

 

Yesterday I had an idea and seems that maybe it's the origin of all the trouble. I'm doing a rough render right now and it seems to solve it, at least with the amount of frames already finished. I'll leave a render with better samples overnight and I'll let you know tomorrow if it has worked.

 

All trouble seems to be caused by the frame rate. My scene is 25fps but seems that the "Export Patches for Batch Render" operator calculates it at the default Maya 24fps despite my Maya preferences. Right now I have changed my scene frame rate to 24fps and recalculated the Patches and seems that it is rendering fine.

 

If this is finally the problem it will be really hard to workaround it because the Patches calculation does not have any options at all except start/end frame... no way to change the internal calculation frame rate 😞

 

Let's see what I found tomorrow morning... 

 

Cheers,

Ignasi

Message 10 of 13
Topeich
in reply to: Topeich

So, Solved!

 

See attached render.

 

Finally, I simply did changed the scene frame rate to 24fps and  "Export Patches for Batch Render". NO collisions modifier, No Baked Groom Manager modifier, No anything.

 

This is the setup I had from the beginning BUT just changed to 24fps 😞

 

As I'm just testing I don't worry about the frame rate right now. But it worry me on how do I have to manage the situation if I need to work on a task at 25fps, 30fps, 60fps or whatever frame rate the project needs?

 

As addition, seems clear that there is something wrong on how the patches are read or translated to XGen Primitives because the Guides works perfect at watever frame rate. Also. if I open the alembic file alone created by "Export Patches" in a 25fps clean scene it plays fine, with no glitches.

 

Thanks for everything.

 

Cheers,

Ignasi.

Message 11 of 13
sean.heasley
in reply to: Topeich

Hi @Topeich 

 

Nice job! Thanks for explaining in detail what you did to solve it as well as attaching the video! I went ahead and marked this as the solution so hopefully it will help anyone else that may run into a similar issue!

 

 

Message 12 of 13
Anonymous
in reply to: sean.heasley

Hi Sean,

Unfortunately I have to make the thread live again.

 

My solution did only worked once, and it's a completely mistery why 😞

 

I did some more animation on the same scene that finally got working and, oh, surprise, at render time I got the same trouble again!!!  I started again recreating caches as did on the last post but with no luck at all... even working everything at 24fps.

 

So, after some more days researching with no luck at all I decided to install Maya 2018 update 6 and to try to open my scene with it. Even knowing that maybe something will not load properly. But everything loaded perfect and, surprise, IT RENDERS PERFECT!!!

 

So, seems clear to me that I have hit a 2019 XGen/Arnold BUG. We need someone to look at what's happening here and fix it, otherwise it's impossible to work with 2019 and fur at all! And better to mark off the solution as it is not working at all ... sigh.

 

Cheers,

Ignasi.

PS. I found some other small glitches and bugs using Xgen those days, I can report them if you want.

 

Message 13 of 13
JWRodegher
in reply to: Anonymous

Have you ever find another solution to this that isn´t going back to 2018.6?

I´ve found out that activating motion blur (even with shutter open and close at 0 if you don´t want mblur) will give you 100% clean renders. At least in Maya.

 

Cheers.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report