Maya Instances using Canvas

Is there a way to create Maya Instances using Canvas? I have only found the 2 usual ways of either using DrawPolygonMeshInstances or using MergeMeshClone. The first one is very performant, but can't be rendered in Maya and the second one is very slow once you use more than just a cube.

Does anyone know of a way to create real Maya Instances from Canvas? The shape node in Maya sadly doesn't accept an array of transforms as input, but only a single transform.

I can create an instancer node, but if I have an array of transforms coming from the Canvas Node I cannot connect the whole array of transforms to the transform input of the instancer.

So I am stuck now. Anybody have any idea how to proceed? Not being able to use actual Maya Instances would be a bit of a killer, but I am sure there is a way.

Tagged:

Comments

  • seltzdesignseltzdesign Posts: 80

    The Instancer node can take an array of transforms as input, but in the node editor you can only connect one of the array items to the instancer :confused:

  • Daniele NieroDaniele Niero Posts: 233 ✭✭
    edited September 2016

    If what you asking is if you can create objects (dag nodes or any other node) in Maya, I doubt it. Actually I'm pretty sure you cannot, and why would you? You have Maya for that :)
    I'm not familiar with this instancer node, so I can't help with that.
    If for instances you really mean instances (read: showing the same object many times in different locations and maybe with some changed parameter) then you should use indeed DrawPolygonMeshInstances. It render, just be sure your Maya is rendering in OpenGL, not DirectX and that is pulling data. In Maya you must always pull data from a node to let the DG compute it. So in CAnvas you will create a non-use port, normally a Vec3 or a Scalar and callit something like "dummy". Connect that port to the translation of a locator and finally Maya will pull data from the Fabric's node.

    Now, whatever Fabric will draw is, obviously, not selectable, you are "hijacking" the Maya render but that is the fastest thing you can do and Maya knows nothing about the polygon you are drawing. This should give you the instances you want.

    As for speed, it really depends by your graph and how well you design it. Fabric has all the tools to (cache, clone, variable) to fine control the flow of your graph and what should be always computed and what only in certain circumstances. If every update you are rebuilding a complex polygon mesh, than you can't expect to go very fast.

    As final note, if you want to input a Fabric geometry to a maya's mesh, why are you trying to plug a transform? Maybe I misinterpreted your original post.

    Good luck,
    Daniele

  • Roy NieterauRoy Nieterau Posts: 258 ✭✭✭
    edited September 2016

    I think this is related to this question (and answer): http://forums.fabricengine.com/discussion/comment/600/#Comment_600

    The Instancer take special dynArray type of arrays and you'd need to perform a conversion, which is a conversion that can be done through nodes from the soup-dev plug-in. My answer there should explain most of it.

  • seltzdesignseltzdesign Posts: 80
    edited September 2016

    @Daniele Niero Thanks for your explanation. I would like them to be real instances though, which can be manipulated further (outside canvas) and can be rendered with a real rendering engine (octane in our case). For that they need to be actual meshes. I am using instances of one object, so it makes no sense to clone the mesh for each object and end up with a huge mesh. The problem with not using instances is, that a GPU renderer like Octane is limited by the graphics memory and therefore a too large mesh cant be rendered. With instances only the source geometry is in the graphics memory, regardless of the number of copies.

    I have just started using MASH in Maya and it can be switched to use the instancer node, with that special array going in, so it must be possible to output that from other nodes and most likely also from Canvas.

    @Roy Nieterau That sounds like it pretty much is exactly what I need. In the end it seems that instances and particles are basically the same thing in Maya (in terms of the data that drives them). MASH can use the instancer and can also be linked to particles. I will have a look at SouP and that node! Thank you!!

  • Roy NieterauRoy Nieterau Posts: 258 ✭✭✭

    I would like them to be real instances though, which can be manipulated further (outside canvas) and can be rendered with a real rendering engine (octane in our case). For that they need to be actual meshes. I am using instances of one object, so it makes no sense to clone the mesh for each object and end up with a huge mesh. The problem with not using instances is, that a GPU renderer like Octane is limited by the graphics memory and therefore a too large mesh cant be rendered. With instances only the source geometry is in the graphics memory, regardless of the number of copies.

    I remember having done similar things a while back to easily get things rendered through V-ray (using instances). This worked perfectly at the time and I'm assuming it should also for Octane. Good luck!

    Keep us posted about your progress; looking forward to seeing what you're working on.

  • seltzdesignseltzdesign Posts: 80
    edited September 2016

    @Roy Nieterau sounds good, I will give it a try! Now I just need to wait for Canvas and SouP to be available for Maya 2017 :disappointed: Canvas + MASH + SouP = Awesome! I am still pretty new to Maya and would love to learn more with the shiny new version, that has some great features. Sadly no Canvas support yet.

  • Roy NieterauRoy Nieterau Posts: 258 ✭✭✭

    @seltzdesign MASH is also available in Maya 2016 Extension 2. ;)

  • seltzdesignseltzdesign Posts: 80

    @Roy Nieterau That IS true. But I'd like to keep the number of Versions I have to a minimum - I hate having to set up everything and getting used to things again. 2017 is a great version with some real nice updates. I guess I have enough time to learn some more aspects of Maya and MASH (in Maya 2017) and Canvas (in Maya 2014), till I can finally link the 2. Fingers crossed Canvas for Maya 2017 is coming soon. They are keeping pretty quiet about it, but it seems like they have to update quite a bit of stuff for it.

  • seltzdesignseltzdesign Posts: 80

    @Roy Nieterau said:
    I think this is related to this question (and answer): http://forums.fabricengine.com/discussion/comment/600/#Comment_600

    The Instancer take special dynArray type of arrays and you'd need to perform a conversion, which is a conversion that can be done through nodes from the soup-dev plug-in. My answer there should explain most of it.

    @Roy Nieterau I finally got around to testing this properly and you are totally right, its working now!! Finally I can use the Maya instancer, which also works seamlessly with Octane. So I can use data from a Canvas Node to create renderable Instances. I am a happy man :smiley:

    Took me a while to figure out how to create the outputs from the canvas node, that need the flag for "native DCC array" in Maya specific settings for the port.

    Actually I am doing all this in 2016.5 after all now, but it seems to have a bug in the .dll that is used for the cache nodes in canvas, as I get crashes when it is accessing that cache (when scrubbing) - that doesn't happen in Maya 2014 :neutral:

    Anyways, thanks for your hints to use SouP and the example file!!

  • Roy NieterauRoy Nieterau Posts: 258 ✭✭✭

    I am a happy man

    Good. As it should be! ;)

    Actually I am doing all this in 2016.5 after all now, but it seems to have a bug in the .dll that is used for the cache nodes in canvas.

    I haven't seen this happen in 2016.5. Do you have a reproducible scenario for this? (maybe example file?)

Sign In or Register to comment.