Hair Not Updating on Viewport

 
 
 
Posted by:EdsonBo
Data created:3 May 2019

Hello Ephere Team:

I'm having an issue where whatever I modify on my Stack Operator the hair is not updating in the viewport. It does update in render but I cannot see any of my changes in the viewport. Sometimes it does, sometimes it doesn't.

It's a bit annoying to close scene and reopen it every time it happens. Any ideas of what could be causing it?

 

Thanks in advance

 

Edson Bonilla

Hello Edson,

 

What version of Ornatrix are you using? Can you please try the latest one?

Jeordanis Figuereo (Product Designer. EPHERE Inc.)

Hello Jeordanis,

Thank you so much for your quick response. I'm using ORNATRIX MAYA v2.3.5

 

Thanks,

Edson Bonilla

Do you have the same issue on new scenes or only on one particular scene?

Are you using Arnold for rendering by any chance?

Jeordanis Figuereo (Product Designer. EPHERE Inc.)

The issue is happening on new scenes. I tried to restart Maya, tried different models and still doing the same :/

Yes, I'm using Arnold.

 

Thanks for your help!

Do you get any errors or warnings in Script Editor?

Please try executing this MEL command:

   OxSetIsRendering false

and see if it will make any difference.

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev

Another thing to try is select a HairShape object, in the Attributes Editor open the Viewport Hair Display group and set Hair Display Mode to Legacy, then restart Maya.

This way we'll know if the bug is related to the new Optimized Mesh display mode.

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev

Hello Ivan,

Thank you so much for your reply. I couldn't try it yesterday but today I run the MEL command and it worked immediately. Now Im able to see the changes in the viewport.

If the problem persists I'll make sure to keep you guys updated :D

Edson Bonilla

The OxSetIsRendering command is set up as a pre-/post-render MEL script, so before rendering starts "OxSetIsRendering true" gets executed and when rendering ends "OxSetIsRendering false" gets executed.

I suppose if something breaks in the middle of rendering, the post-render command doesn't get called and Ornatrix remains in "IsRendering" state, which is wrong (I don't know yet why the viewports won't update in that state). So you should check what happens when you render, there may be some errors in the Script Editor, and if the cause of the errors isn't fixed this will happen again.

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev

Hello Ivan,

Indeed, this is happening again and I need to keep running the MEL command    

    OxSetIsRendering false          

I'm not getting any kind of errors in the script editor, the lines I'm getting are the following:

select -r HairFromCurves1 ;
select -r HairFromCurves2 ;
select -r HairFromCurves1 ;
select -r Detail1 ;
OxEnableOperator Detail1 0;
OxEnableOperator Detail1 1;
OxEnableOperator HairFromGuides1 0;
OxEnableOperator HairFromGuides1 1;
OxSetIsRendering false;

Not sure if these lines are relevant but that's what Im getting.

Any other ideas on how to fix it?

 

Please open the Render Settings window, expand Render Options in the first tab (Common), and check the Pre render MEL and Post render MEL fields.

Should be

OxSetIsRendering(true);

and

OxSetIsRendering(false);

If they're not, make them.

If you create a fresh scene and add hair to an object (and Arnold is your current renderer), these fields should be set automatically. It looks like you have just the Pre-render script but not the Post-render one. I don't know how could have that happened.

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev

Thank you Ivan, I have attached an image of exactly the thing you mentioned in the Render Options tab (Common) 

Weird thing is that the issue comes and goes, sometimes its not doing anything bad, its just random, could it be graphic card related?


Attached Files:

>Ornatrix_Issue_v003.JPG (39056 bytes),

Also, one other problem arised recently, when connecting the shader (aiStandardHair) to the hair I noticed in the viewport it looks red and black instead of pure red as I want it. Do you have any ideas what could be causing this issue?

The left image shows the hair with the attached shader in the viewport and the right image looks better but I have to activate the Use all Lights  to see the hair without the black strands.

I have attached an image for better representation.


Attached Files:

>Ornatrix_Issue_v002.JPG (630698 bytes),

The first issue doesn't seem related to the graphics card. It looks like the post-render MEL script doesn't get called for an unknown reason (I don't think it gets called and fails). I don't think we've seen this before. If there are no errors in the Script Editor, I don't know what to suggest. I suppose switching the renderer could show if this is Arnold-specific.

About the shader issue you may try the second workaround I described above, switch hair display mode to Legacy. This way we may know if it is related to the new optimized display mode.

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev