Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Community
Maya Dynamics
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya dynamics topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

XGen Copy/Paste Bug

27 REPLIES 27
SOLVED
Reply
Message 1 of 28
Anonymous
3983 Views, 27 Replies

XGen Copy/Paste Bug

Hey guys!

 

I've been trying to learn some basics of xGen. I know once you place guides, you can right-click to copy paste guides. However, when I go to paste, the first guide disappears and the second guide never shows up. Then I try to select other guides, and Maya consistently has a fatal error:

 

Capture.PNG

 

Specs:

specs.PNG

 

 

I updated my GeForce driver today as well too...

Thanks in advance!

 

27 REPLIES 27
Message 2 of 28
Michael_Todd
in reply to: Anonymous

What version of Maya are you using?



Michael Todd

XGen Product Owner and Designer

Message 3 of 28
Anonymous
in reply to: Michael_Todd

Hello,

I'm using Maya 2018 with the latest update. Thanks!

Message 4 of 28
Michael_Todd
in reply to: Anonymous

I can't replicate this at my end. What kind of video card do you have, out of interest..



Michael Todd

XGen Product Owner and Designer

Message 5 of 28
Anonymous
in reply to: Michael_Todd

Capture2.PNG

 

Capture.PNG

Message 6 of 28
Anonymous
in reply to: Anonymous

Bump... anyone have any suggestions? Smiley Happy Thanks!

Message 7 of 28
Michael_Todd
in reply to: Anonymous

Sorry, no, I'm not able to replicate the problem. Do you get any errors in the output window, script editor or XGen log window?



Michael Todd

XGen Product Owner and Designer

Message 8 of 28
mspeer
in reply to: Michael_Todd

Hi!

 

I can replicate this (Maya2017 upd4 and Maya 2018 on Windows):

 

1. Poly plane, size 25 25

2. Create New Descripton

3. Place 2 guides

4. Copy one guide (right mouse click or Copy Guides icon - menu)

5. Paste onto other guide

=> selected (pasted onto) guide disappears

6. Update Preview

=> Crash

 

Message 9 of 28
Michael_Todd
in reply to: mspeer

I've tried on two different machines and it works as expected:

 

GuideCopy.gif

 

which leads me to think it may be something outside of Maya. Can you try repeating this using DX11 as the VP renderer? I have no problem with this function on two machines using the default VP renderer with two different nVidia cards, an M6000 and a K6000 with the latest drivers. 

 

cheers

 

 



Michael Todd

XGen Product Owner and Designer

Message 10 of 28
mspeer
in reply to: Michael_Todd

Hi!

 

I can't get it to work, even not in "DirextX11" mode.

My system is very well designed although i  have only a consumer Nvidia card.

 

Does this copy/paste function rely on the graphic card?

For Example: "Mirror Selected Guides across..." works.

 

 

I got closer to the problem (CVs nan).

These are the guides before copy/paste:

 

Guides	Spline	2
	id			1
	loc			5.3211700916290283e-01 3.3152499794960022e-01 23
	blend			0.0000000000000000e+00
	interp			1.3601224400313741e+01:1.3601214400313742e+01:3.3204772504541240e+00
	CVs			4
	-1.4736554515987847e-24 3.3299999999999996e-01 7.3940853440035405e-17
	-2.9517362949441123e-24 6.6699999999999993e-01 1.4810375148499584e-16
	-4.4253917465428969e-24 9.9999999999999989e-01 2.2204460492503123e-16
	id			2
	loc			6.1201697587966919e-01 8.1629300117492676e-01 66
	blend			0.0000000000000000e+00
	interp			1.3601224400313741e+01:1.3601214400313742e+01:1.3204772715947974e+00
	CVs			4
	2.0118202778852025e-25 3.3300000000000002e-01 7.3940853440035430e-17
	4.0296820581063965e-25 6.6700000000000004e-01 1.4810375148499589e-16
	7.2414951686150594e-09 2.4924820690840845e+00 2.6614819367072902e+00
endObject

 

and theses are the guides after copy/paste and scene-save ( before Update Preview and Crash).

 

Guides	Spline	2
	id			1
	loc			5.3211700916290283e-01 3.3152499794960022e-01 23
	blend			0.0000000000000000e+00
	interp			1.3601224400313741e+01:1.3601214400313742e+01:3.3204772504541240e+00
	CVs			4
	-nan(ind) -nan(ind) -nan(ind)
	-nan(ind) -nan(ind) -nan(ind)
	-nan(ind) -nan(ind) -nan(ind)
	id			2
	loc			6.1201697587966919e-01 8.1629300117492676e-01 66
	blend			0.0000000000000000e+00
	interp			1.3601224400313741e+01:1.3601214400313742e+01:1.3204772715947974e+00
	CVs			4
	2.0118202778852025e-25 3.3300000000000002e-01 7.3940853440035430e-17
	4.0296820581063965e-25 6.6700000000000004e-01 1.4810375148499589e-16
	7.2414951686150594e-09 2.4924820690840845e+00 2.6614819367072902e+00
endObject

 

 

Nothing special in XGen Log.

 

Message 11 of 28
Anonymous
in reply to: mspeer

Thanks guys, glad to know it's not just me!

 

 

Just to clarify - it's not even when I'm trying render with Arnold or anything... it's just happening when working with the guides in the viewport.

Message 12 of 28
Anonymous
in reply to: Anonymous

Any more thoughts on a solution to this?

 

I'd love to use xGen on my next project! Zbrush Fibermesh to nHair in Maya was definitely more time-consuming.

Thanks, guys.

Message 13 of 28
Michael_Todd
in reply to: Anonymous

I've not been able to replicate this on two different machines with two different video cards and several versions of Maya. Other than cleaning out the prefs and reinstalling maya, I don't know what to recommend.  The guides can be shaped using the sculpt brush or direct manipulation of the guide cv's so you could try to not use the copy/paste feature till we can replicate this issue as it seems to be limited to certain set ups.

 

there is also the newer Interactive grooming system, which is GPU based and users with the same cards as you are using have been getting great results without issues like this as the systems are fundamentally different.

 

Sorry I don't have a better answer...

 

Cheers



Michael Todd

XGen Product Owner and Designer

Message 14 of 28
mspeer
in reply to: Michael_Todd

Hi!

 

@Michael_Todd and @Anonymous

 

I nailed it down to where this error happens inside xgmCopyGuides.

In the end this happens, when copying 1 guide to an other:

 

vector $source_normal = <<0,1,0>>;
vector $destination_normal = <<0,1,0>>;
vector $test_axis = cross($source_normal, $destination_normal);

float $test_ang = angle ($source_normal, $destination_normal);

vector $t=<<1,1,1>>;
vector $test_tmp = rot ($t, $test_axis , $test_ang);

which results in NaN here.

 

Please test the script above.

 

 

The problem is $test_axis ( or axis in original script) becoming "0 0 0" and then rot will lead to NaN.

Can this be reproduced, should there be an other result, or should source and destination normal be different?

 

 

I could send a scene-file with the manipulated script (just to print values) alongside with the output i get, but maybe the forum is not the right place for this.

Output looks like this:

 

selectMode -object; xgmCopyGuides("paste");

cvs_0: 0.373428911 7.847722537e-17 -0.3534300029 cvs_1: 0.xxx-xxxxxxxx 0.333 0.xxx-xxxxxxxx cvs_2: -0.1115397051 0.667 -0.1331127027 cvs_3: 0.xxx-xxxxxxxx 1 0.1159008552
srcN: 0 1 0
dstN: 0 1 0
axis: 0 0 0
axis unit: 0 0 0
base: -0.3578279912 -4.022870817e-17 0.1811739951
vector tmp: 0.078359 0.333 0.093514

rot
tmp: 0.xxx-xxxxxxxx 0.333 0.xxx-xxxxxxxx
axis: 0 0 0
ang: 0
tmp result = -nan(ind) -nan(ind) -nan(ind)
vec -nan(ind) -nan(ind) -nan(ind)
vector tmp: -0.11154 0.667 -0.133113
...

 

 Edit: Those xxx-xxxxxxxx should be numbers, maybe website tries to hide personal information!?

 

Message 15 of 28
mspeer
in reply to: mspeer

Hi!

 

@Michael_Todd and @Anonymous

 

If i modify $axis and set it manual to "<<0,1,0>>", copying guides works (and no more crashes).

Message 16 of 28
mspeer
in reply to: Anonymous

Hi!

 

@Anonymous

Simply put, if the copied guide and one of the pasted guides have the exact same orientation, like on a flat plane, it will not work for you.

On a curved surface it should work.

 

The question is, why does it work for @Michael_Todd.

Message 17 of 28
Anonymous
in reply to: mspeer

Thanks for testing!

 

I've tried copy-pasting on both a flat plane and a sphere or any other non-flat surface. Both seem to do the same thing. What's especially odd is that the original guide just disappears all together in addition to the pasted guide not showing up at all. 

 

I'm not sure how to manually edit what's happening via the script editor... but I'm wondering what I need to do to fix this problem. I'm wondering if I'll just have to wait until the next update of Maya or something....

Message 18 of 28
mspeer
in reply to: Anonymous

Hi!

 

Did you make sure that the guide where you copied from is not selected when you do paste?

When you paste only one guide is selected?

 

If yes, what happens when you select a guide and hit Guides -> Bake Guide Vertices?

 

There is no reason why the original guide should disappear.

The paste action only has influence on currently selected guides, so none of the other guides should be affected by this action.

 

If you are willing to invest some time i could send you a script you have to execute once before doing copy/paste and then you will get some debug info (for one Maya session, effect is gone after closing Maya).

 

Message 19 of 28
Michael_Todd
in reply to: mspeer

you have to have a guide selected to paste the copied guide shape to. That's how it knows which guide or guides it knows to apply the copied guide shape to. 



Michael Todd

XGen Product Owner and Designer

Message 20 of 28
mspeer
in reply to: Michael_Todd

Hi!

 

@Michael_Todd , now i know why it worked for you.

 

When you paste a guide onto a guide with the exact same orientation it will fail (you can't calculate a rotation about an axis with value <<0,0,0>>, this will result in invalid values).

This does not happen it the guide orientations differ, even if this is only a minor difference caused by unprecise calculation, like rounding errors. (For example if the plane is not exact at scene center).

 

I can reproduce 2 cases where this exception happens.

1. If you paste a guide copied from an other guide on a simple plane placed at scene-origin [0 0 0].

2. If you copy and paste a guide onto itself (not useful, but can happen). // This should be reproducible in any case

 

This bug can easily be fixed with an if...else statement that just skips calculation of "rot" if both guides have the exact same orientation (axis is <<0,0,0>>) and there is no need to calculate new "local" positions for the CV's.

 

I have done this for me and now it works fine in every case.

 

 

@Anonymous You say that for you all guides disappear if you do one of the following?

 

Example 1:

xgen_cp_plane.gif

 

 

Example2:

xgen_cp_sphere.gif

 

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

Post to forums  

Autodesk Design & Make Report