{"action":"created","issue":{"url":"https://api.github.com/repos/JacquesLucke/animation_nodes/issues/604","repository_url":"https://api.github.com/repos/JacquesLucke/animation_nodes","labels_url":"https://api.github.com/repos/JacquesLucke/animation_nodes/issues/604/labels{/name}","comments_url":"https://api.github.com/repos/JacquesLucke/animation_nodes/issues/604/comments","events_url":"https://api.github.com/repos/JacquesLucke/animation_nodes/issues/604/events","html_url":"https://github.com/JacquesLucke/animation_nodes/issues/604","id":175486589,"number":604,"title":"[Question] Vectorization Thing similar to Sverchok?","user":{"login":"enzyme69","id":3952687,"avatar_url":"https://avatars.githubusercontent.com/u/3952687?v=3","gravatar_id":"","url":"https://api.github.com/users/enzyme69","html_url":"https://github.com/enzyme69","followers_url":"https://api.github.com/users/enzyme69/followers","following_url":"https://api.github.com/users/enzyme69/following{/other_user}","gists_url":"https://api.github.com/users/enzyme69/gists{/gist_id}","starred_url":"https://api.github.com/users/enzyme69/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enzyme69/subscriptions","organizations_url":"https://api.github.com/users/enzyme69/orgs","repos_url":"https://api.github.com/users/enzyme69/repos","events_url":"https://api.github.com/users/enzyme69/events{/privacy}","received_events_url":"https://api.github.com/users/enzyme69/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-07T12:11:47Z","updated_at":"2016-09-09T22:48:39Z","closed_at":null,"body":"Dear AN Devs,\r\n\r\nI was from the other room, Sverchok, we are questioning the elegant way or possibilities to \"Vectorize\" input and output. Kind of like in AN, when we turn bunch of nodes into group.\r\n\r\n[https://github.com/nortikin/sverchok/issues/863](url)\r\n\r\nSimilar to previous question I asked about Array of Array of Array (Circle, being duplicated, each circle has different points, and I would like to instance objects based on points.)\r\n\r\nI make the setup below for example:\r\n\r\nLogically it should work and I should be getting \"variations\" or \"vectorization\" of the \"Rays\" group, but I didn't. I wonder why.\r\n\r\n![prtscr capture_48](https://cloud.githubusercontent.com/assets/3952687/18311506/0b6e0b8a-7548-11e6-91ce-d1aee3270f53.png)\r\n![prtscr capture_47](https://cloud.githubusercontent.com/assets/3952687/18311507/0b70e0da-7548-11e6-9060-0fe7d42551ea.png)\r\n"},"comment":{"url":"https://api.github.com/repos/JacquesLucke/animation_nodes/issues/comments/246061969","html_url":"https://github.com/JacquesLucke/animation_nodes/issues/604#issuecomment-246061969","issue_url":"https://api.github.com/repos/JacquesLucke/animation_nodes/issues/604","id":246061969,"user":{"login":"JacquesLucke","id":5881326,"avatar_url":"https://avatars.githubusercontent.com/u/5881326?v=3","gravatar_id":"","url":"https://api.github.com/users/JacquesLucke","html_url":"https://github.com/JacquesLucke","followers_url":"https://api.github.com/users/JacquesLucke/followers","following_url":"https://api.github.com/users/JacquesLucke/following{/other_user}","gists_url":"https://api.github.com/users/JacquesLucke/gists{/gist_id}","starred_url":"https://api.github.com/users/JacquesLucke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacquesLucke/subscriptions","organizations_url":"https://api.github.com/users/JacquesLucke/orgs","repos_url":"https://api.github.com/users/JacquesLucke/repos","events_url":"https://api.github.com/users/JacquesLucke/events{/privacy}","received_events_url":"https://api.github.com/users/JacquesLucke/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T22:48:39Z","updated_at":"2016-09-09T22:48:39Z","body":"Thanks for the link.\r\nIn fact im currently facing pretty much the same problem.\r\n\r\nI think that the Loops I implemented in AN is the most generic solution to this problem. And for a long time I thought this would be enouph. I could easily \"vectorize\" some nodes but there were nearly no performance benefits over using a standart loop, it would just make the code more complex.\r\n\r\nHowever, things are changing right now due to Cython. When I vectorize a specific node manually I can get up to 100x better performance now. This is of course more than a good reason to start vectorizing some nodes, even if it means that the code will become more complex.... \r\n\r\nI'm trying to find solutions to this problem that fits into AN for a few weeks now. \r\n\r\n\"fits into AN\" means in this context that it should not require more new datatypes etc.\r\nAFAIK (and correct me if I'm wrong) in Sverchok there is only one vector socket. The data \"in\" that socket can be a single vector, a list of vectors, or even a list of a list of a list of vectors....\r\nIn AN, I don't want that. I want that the data type is clear by looking at the socket color. If you really need those complex lists you can either use complex lists but in general you should rethink what you are trying to do and find a way to do it with normal lists and Loops.\r\n\r\nOne of the main problems I'm currently have is how to implement the socket-type-change when the user wants to use the \"vectorized\" version of the node. The simple solution would be to implement checkboxes for many nodes that allows the user to change the node type for \"normal\" to \"vectorized\" or whatever. Personally I don't like this because it is possible that one node has different vectorized versions. (eg. all inputs are lists, or only a few are lists and some are not etc.) Also I don't like that the user has to switch this checkbox manually for each node.\r\n\r\nIt'd be better if the sockets automatically change. For example we could have the normal Line Mesh node with a `start` and `end` vector input. When the user connects a Vector List to `end` it should automatically create either a Mesh Data List, or only a single Mesh Data object with all generated lines in it. Performance wise this can be very very fast. Again, the main problem is not to write that code, but to write as less code as possible to give as this flexibility while still having good performance.\r\n\r\nAnother problem is this: How to communicate to the user that a socket is \"vectorizable\" (that he can plug a list into it although it is eg a normal vector input). \r\nThere are a few options: \r\n- Change the socket name (eg from `Vector` to `Vector(s)`\r\n- Change the socket transparency (eg. use 0.8 instead of 1 for a single vector input (lists always use 0.5))\r\n- Change the border color of the socket. Note: this is not possible yet, but might be worth to implement it in Blenders Python API. A problem with that is that a light border color does not work with all socket colors. \r\n\r\nIf you have more ideas, please share them!\r\n\r\nA simple automatic vectorization function as proposed in the Sverchok thread does not work for me because this is basicly the functionality we can emulate with a loop. Also it is too slow when we want to benefit from Cython. And I want to benefit is much as possible from it.\r\n\r\nI will not be able to work on AN as of monday for roughly 2 weeks because I'm not at home. I'll use that time to find solutions to as many of these problems as possible. The implementation afterwards should be much easier."}}
{"actor":{"display_login":"JacquesLucke"}}