Thanks for this tutorial! Really helps me a lot! For example, I always wondering why my objects cannot be rendered, after watching this video, I know I have to tweak the "frame" value first to get objects rendered. Thanks!
I like the Xgen work flow. The MASH ecosystem is fantastic as well but I like the expression workflow offered by Xgen. However the export of the mel file and having to search and replace for -ft flag is kinda a pain. I'm trying to see if thats been fixed in 2018.2 but initial tests are showing it's not. Stephen, do you know of which file the Xgen output to mel file is using and how to possibly modify that so that that flag is not output? Thanks Stephen for another clear and excellent tutorial.
Would be possible with the trick at 11:30 key the condition of 0 scale and then key the full scale value? And make a growing plants animation? I know there's an other way to do that,but this would be easier if it's possible for some quick and dirt grow effect...
Thanks Steven for this video. Unfortunately, 'Export as Archives' is still very much broken on certain OSX (and Windows) configurations (it hangs the Python process and corrupts Maya in the process). It very much ruins this potentially very powerful workflow. (And yes, I have reported this to AD).
Great tutorial! :D It has given loots of help!! Do you know if there's a way to customize the variables of the different archives? For example, If I had Archive1: cubes, Archive2: pyramids. I would like to make the cubes to grow (so, increase the scale), pyramids to reduce (so scale
xGen is quite nice! I just wish it is not so dependent on user knowledge of expressions if you want to make something just a little bit more complex. Any plans to make it more user friendly for those who are not masters in expressions?
If you can articulate what it is you want to accomplish, someone with the knowledge can write the expression, right? That's what forums are for.... ;-)
Hi Steven, love the tutorial. I do have a question though. I have a couple of high Poly trees I want to use in a scene. However due to their polycount my computer isn't able to populate it through xgen. I am now wondering if it is possible to use the proxies? Idea is I load up the proxies as the archive files. Add adjusted scale, rotation etcetera towards the proxies. The only thing I'm not sure of is will my high poly tree when I replace the proxy be rotated and scaled like the proxy or not?
Hey Steve great tutorial, I have one question when bringing the mel back into maya I run into no errors however the abc loads fine but doesn't clone or take the transform so I basically just load the abc to the center of the screen. any input would be awesome!
I am having an issue with Instances, the POINT particle is on the surface but the Instance that is supposed to follow them is slightly above the surface.... How can i fix that so my Instance object stay in the mesh like the particle points???
ptex maps takes too long to create whatever res i use. both initiating painting and saving map. painting itself is dont have problem itself. what should i do?
Steven please help! I'm using the Mel export and script editor and following your steps exactly but I'm getting an array of errors like this: // Error: line 8: No object matches name: Cube1:initialShadingGroup I want the geometry from the instances so I can eventually 3d print the geometry. I'm using Maya 2015 SP3 on windows 8.1 HELP!
Helo! so i have instanced geo and i do not want them to intersect. Do you know how make that dont intersect with xgen? Like a bounding box or something like that.
Man.. in Maya 2016 the same bugs are still there. This tutorial cannot be followed without a lot of workarounds (the mask painting can't be replicated), and if you try to do it with trees that actually have leaves hopefully mapped using opacity in Arnold, you will find Instances from XGEN can't be made to be anything but opaque, so goodby opacity mapping. it's gonna be frustrating. I've been fighting it for days now, wondering why oh why at every step. Update: my trees were solved using other tools. BTW... If creating archives crashes, it is because Mental Ray has to be loaded even if you are not using it.
is there a way to adjust the rotation of the primitives so that they are always pointing in the y direction? ex, trees on a hill are angled instead of pointing upwards. It seems like they are using surface normal direction.
Yes. There is a set of expression functions called alignU, alignV, and alignN. You pass it the direction you want the primitive to align to. For example, if you wanted the trees to always grow "upward" you can use alignU([0,1,0]). When we use that we usually make a custom expression, like his myScale, that holds the vector. This might be called myUpVector = [0,1,0]. You then feed that into the align expressions such as alignU(myUpVector()). This keeps them all in sync with one another. Like everything else, that vector can be an expression. An example could be norm([rand(0,0.2),rand(0.8,1.0),rand(0,0.2)]) where this gives you a normalized vector pointing "mostly up". Oh, you plug alignU into TiltU, alignV into TiltV, and alignN into TiltN. Hope that helps.
I got it to work my first try, but then I added an extra archive to my description, and now when I import the mel file it throws errors and fails... I removed the archive I added to try to get it to work again and now I can't get it to work at all!! The error I get is "No object matches name: grass_bent:grassSG". My materials are fine... why can't it find my shading group, and more importantly, why does that stop the entire process from completing?
Hello, Idk if you have it figured out yet. If not I might have some idea about why you have the error. If you have No object matches name :**** SG, that has something to do with the archive shading group. I ran a test on a clean file. If you export your archive with the default material (lambert1) on it. It seems that it will not create its own SG in the material file in Xgen Archive. In this case when you export the mel and run it. It will stuck at that line and ended up with only one obj created. Hope it helps
Hi I am trying to create a terrain using Xgen in Maya 2015 and when I attempt to export as a file the bar does not move to export. And when I review the Xgen folder I do not see the file .xarc Any ideas of what it can be? My plant is a sunflower that is combined and is in high resolution.
Hi! I'm using Maya 2016. When I try to generate the MEL file, I chose a valid location with no unicode characters, but Maya does not create any files. Can someone help me out?
+Ágoston Romhányi I´m having a similar problem. Maya creates just some file with the size of 0kb. And I haven´t found a solution yet too. I really hope they fix that soon
+Chris Sovis I have not used xgen since, I turned my attention to Blender, where you use a particle system for the exact same purpose and it works just fine :D you might check it out, if you wish.
+Ágoston Romhányi I couldn't agree more, Blender's object instancing with the particle system is very powerful. Sure, XGen appears to add more controls but I would argue the result is the same - the result is what we all want, and I'd rather not have to jump through hoops to do get there, that's how XGen feels to me. From my limited knowledge of XGen as a tool, it looks to me that it's trying too hard, when a simpler solution can be implemented. For example, the simple process of converting the scene into a static one is way too laborious and unnecessary. I'm sure this and other features will be streamlined over time, I hope. BTW to do the same in Blender is way easier and you have so much control too, and as for making it "static", well, how does just one click sound? Sounds great to me :)
Thank you for this :D The export isn't working for me unfortunately. After I delete the -ft namespace and hit enter to run the mel script, I get an error "// Error: line 7: No object matches name: |xgPrim1_0_chocoshavings //"
Hello im not too experienced in coding. what if I want a specific tree (so i get its index number) and just change the scale on that. Does anybody have an idea how to code that? lets say i want to control the scale of each tree not an overall shape. can anybody help? thanks.
You can scale your length using a map. For example, let's say you are using his myScale() expression. You can change that to be: $a = 1.0; #0.1,10.0 $a * rand(0.7,1.3) * (map("${DESC}/myTreeScale")*2.0) Two changes there. First, notice the "# 0.1,10.0". This is a comment to the expression, but it also lets you set the range for the slider. He erases the comment pretty quickly, but it is nice to have if you don't want the slider to always be between zero and one. The second addition is the map call. I put in the "*2.0" in there so that a map value of 0.0 results in no change, values below 0.5 scale the length down and values above 0.5 scale the length up. This means you can paint a map that has a white value where you want to scale a tree, or trees, up twice in length and paint values below 0.5 in areas where you want tree smaller. Hope that helps!
This is the most frustrating tutorial I have ever tried, and I've done a lot.. Prepare for a foreign workflow in maya, and half ass tools that feel incomplete. Maybe maya 2016 has fixed the bugs? maybe 16gigs of ram wasn't enough? who knows. Xgen is amaze balls, just wished it worked ha. 2 out of 10 until proven wrong.
don`t render in vray don`t export (save) as mel file sometimes don`t see archives don`t import archives as object with clusters Bugs, bugs bugs bugs. One of the most stupid develop of autodesk team.
Late to the party, but this was the best thing ever! Explained everything I've just spent eight hours looking for in under half an hour XD
Thanks for this tutorial! Really helps me a lot!
For example, I always wondering why my objects cannot be rendered, after watching this video, I know I have to tweak the "frame" value first to get objects rendered.
Thanks!
I like the Xgen work flow. The MASH ecosystem is fantastic as well but I like the expression workflow offered by Xgen. However the export of the mel file and having to search and replace for -ft flag is kinda a pain. I'm trying to see if thats been fixed in 2018.2 but initial tests are showing it's not. Stephen, do you know of which file the Xgen output to mel file is using and how to possibly modify that so that that flag is not output? Thanks Stephen for another clear and excellent tutorial.
great tutorial - still converting xgen to geo should be a one click thing within maya
Best Xgen tutorial for Beginners.. Thank you
That's amazing and thank you Steven for the tute.
MAYA features are unbeatable.
Wow Thank you so much, that was very informative and I liked the way that you took us from start to finish. Many thanks
Would be possible with the trick at 11:30 key the condition of 0 scale and then key the full scale value? And make a growing plants animation?
I know there's an other way to do that,but this would be easier if it's possible for some quick and dirt grow effect...
Thanks Steven for this video.
Unfortunately, 'Export as Archives' is still very much broken on certain OSX (and Windows) configurations (it hangs the Python process and corrupts Maya in the process). It very much ruins this potentially very powerful workflow.
(And yes, I have reported this to AD).
Very useful, thank you Steven.
Great tutorial! :D It has given loots of help!!
Do you know if there's a way to customize the variables of the different archives? For example, If I had Archive1: cubes, Archive2: pyramids. I would like to make the cubes to grow (so, increase the scale), pyramids to reduce (so scale
you save a lot of time i have read it on cg society in 26:29 thanks alot
great tut! Thanks!
xGen is quite nice! I just wish it is not so dependent on user knowledge of expressions if you want to make something just a little bit more complex.
Any plans to make it more user friendly for those who are not masters in expressions?
If you can articulate what it is you want to accomplish, someone with the knowledge can write the expression, right? That's what forums are for.... ;-)
Hi,
Many thanks for the tutorial!
Just quick question, is there any easy way to animate the trees with wind?
Many thanks
Dose XGen support objects on top of each other with collision? For example rocks over each other.
..and again, everytime something is new in Maya, it's like Beta with bunch of bugs -_-
Awesome tutorial!! Thank you
Hi Steven, love the tutorial. I do have a question though.
I have a couple of high Poly trees I want to use in a scene. However due to their polycount my computer isn't able to populate it through xgen. I am now wondering if it is possible to use the proxies? Idea is I load up the proxies as the archive files. Add adjusted scale, rotation etcetera towards the proxies. The only thing I'm not sure of is will my high poly tree when I replace the proxy be rotated and scaled like the proxy or not?
Hey Steve great tutorial, I have one question when bringing the mel back into maya I run into no errors however the abc loads fine but doesn't clone or take the transform so I basically just load the abc to the center of the screen. any input would be awesome!
+Ronald White same problem. did u ever figure it out?
I am having an issue with Instances, the POINT particle is on the surface but the Instance that is supposed to follow them is slightly above the surface....
How can i fix that so my Instance object stay in the mesh like the particle points???
What tool are you using to display Clouds and Snow (seems to be on the right side of your interface) ?
I have a problem, I get the error called "Part of path doesn't exist". no texture showing up.
ptex maps takes too long to create whatever res i use. both initiating painting and saving map. painting itself is dont have problem itself. what should i do?
Can i just export the " Guides - the small boxes " and re-import them in another maya file with the same mesh ?
Steven please help!
I'm using the Mel export and script editor and following your steps exactly but I'm getting an array of errors like this:
// Error: line 8: No object matches name: Cube1:initialShadingGroup
I want the geometry from the instances so I can eventually 3d print the geometry. I'm using Maya 2015 SP3 on windows 8.1 HELP!
You save me!! thanks 😍
Helo! so i have instanced geo and i do not want them to intersect. Do you know how make that dont intersect with xgen? Like a bounding box or something like that.
Is there a way to set the percentages of the pick function (8:46) with B&W ptex maps ?
hi, i am stuck with the export part, i did it step by step,deleted the flag but it fails to load a thumbnail and doesnt execute the script properly
Man.. in Maya 2016 the same bugs are still there. This tutorial cannot be followed without a lot of workarounds (the mask painting can't be replicated), and if you try to do it with trees that actually have leaves hopefully mapped using opacity in Arnold, you will find Instances from XGEN can't be made to be anything but opaque, so goodby opacity mapping. it's gonna be frustrating. I've been fighting it for days now, wondering why oh why at every step. Update: my trees were solved using other tools. BTW... If creating archives crashes, it is because Mental Ray has to be loaded even if you are not using it.
thanks for the tip on the mental ray plug in to be loaded even if not in use.
awesome,thanks
is there a way to adjust the rotation of the primitives so that they are always pointing in the y direction? ex, trees on a hill are angled instead of pointing upwards. It seems like they are using surface normal direction.
Yes. There is a set of expression functions called alignU, alignV, and alignN. You pass it the direction you want the primitive to align to. For example, if you wanted the trees to always grow "upward" you can use alignU([0,1,0]). When we use that we usually make a custom expression, like his myScale, that holds the vector. This might be called myUpVector = [0,1,0]. You then feed that into the align expressions such as alignU(myUpVector()). This keeps them all in sync with one another. Like everything else, that vector can be an expression. An example could be norm([rand(0,0.2),rand(0.8,1.0),rand(0,0.2)]) where this gives you a normalized vector pointing "mostly up".
Oh, you plug alignU into TiltU, alignV into TiltV, and alignN into TiltN. Hope that helps.
really great tut bro.... Thank you vary much. :)
Nice Tutorial !
I got it to work my first try, but then I added an extra archive to my description, and now when I import the mel file it throws errors and fails... I removed the archive I added to try to get it to work again and now I can't get it to work at all!! The error I get is "No object matches name: grass_bent:grassSG".
My materials are fine... why can't it find my shading group, and more importantly, why does that stop the entire process from completing?
Hello, Idk if you have it figured out yet. If not I might have some idea about why you have the error.
If you have No object matches name :**** SG, that has something to do with the archive shading group. I ran a test on a clean file. If you export your archive with the default material (lambert1) on it. It seems that it will not create its own SG in the material file in Xgen Archive. In this case when you export the mel and run it. It will stuck at that line and ended up with only one obj created.
Hope it helps
Hi I am trying to create a terrain using Xgen in Maya 2015 and when I attempt to export as a file the bar does not move to export. And when I review the Xgen folder I do not see the file .xarc Any ideas of what it can be? My plant is a sunflower that is combined and is in high resolution.
It must be a single mesh! Booleans combine it.
Hi!
I'm using Maya 2016. When I try to generate the MEL file, I chose a valid location with no unicode characters, but Maya does not create any files.
Can someone help me out?
+Ágoston Romhányi I´m having a similar problem. Maya creates just some file with the size of 0kb. And I haven´t found a solution yet too.
I really hope they fix that soon
+Chris Sovis I have not used xgen since, I turned my attention to Blender, where you use a particle system for the exact same purpose and it works just fine :D you might check it out, if you wish.
+Ágoston Romhányi I couldn't agree more, Blender's object instancing with the particle system is very powerful. Sure, XGen appears to add more controls but I would argue the result is the same - the result is what we all want, and I'd rather not have to jump through hoops to do get there, that's how XGen feels to me. From my limited knowledge of XGen as a tool, it looks to me that it's trying too hard, when a simpler solution can be implemented. For example, the simple process of converting the scene into a static one is way too laborious and unnecessary. I'm sure this and other features will be streamlined over time, I hope. BTW to do the same in Blender is way easier and you have so much control too, and as for making it "static", well, how does just one click sound? Sounds great to me :)
Thanks
Thank you for this :D The export isn't working for me unfortunately. After I delete the -ft namespace and hit enter to run the mel script, I get an error "// Error: line 7: No object matches name: |xgPrim1_0_chocoshavings //"
+koager same, did u ever get it sorted?
Got the same problem... did u fixed it?, nevermind, fixed it!
Hello im not too experienced in coding. what if I want a specific tree (so i get its index number) and just change the scale on that. Does anybody have an idea how to code that? lets say i want to control the scale of each tree not an overall shape. can anybody help? thanks.
You can scale your length using a map. For example, let's say you are using his myScale() expression. You can change that to be:
$a = 1.0; #0.1,10.0
$a * rand(0.7,1.3) * (map("${DESC}/myTreeScale")*2.0)
Two changes there. First, notice the "# 0.1,10.0". This is a comment to the expression, but it also lets you set the range for the slider. He erases the comment pretty quickly, but it is nice to have if you don't want the slider to always be between zero and one.
The second addition is the map call. I put in the "*2.0" in there so that a map value of 0.0 results in no change, values below 0.5 scale the length down and values above 0.5 scale the length up.
This means you can paint a map that has a white value where you want to scale a tree, or trees, up twice in length and paint values below 0.5 in areas where you want tree smaller.
Hope that helps!
Thanks for the tip Tom!
Can you make XGEN load .OBJs?
Archive requirement completely kills any experimentation or inspirational in the moment changes...
You can modify the original object and re-export the archive. All of the xgen instances will reload with the updated archive. No OBJs needed.
How can I export my XGen hair groom to 3ds max? - Thanks
You can either convert to geo to export or you can just export the curves themselves via fbx.
My Oh Maya thanks :D
This is the most frustrating tutorial I have ever tried, and I've done a lot.. Prepare for a foreign workflow in maya, and half ass tools that feel incomplete. Maybe maya 2016 has fixed the bugs? maybe 16gigs of ram wasn't enough? who knows. Xgen is amaze balls, just wished it worked ha. 2 out of 10 until proven wrong.
don`t render in vray
don`t export (save) as mel file
sometimes don`t see archives
don`t import archives as object with clusters
Bugs, bugs bugs bugs. One of the most stupid develop of autodesk team.