javalang Posted March 29, 2017 Share Posted March 29, 2017 Hi all, I've implemented a basic-functionality of a cloner system and I'd like to hear your opinions and design/concept-suggestions for further develepment and finishing my work (if you're interested at all). I decided to use a working title "SCS" for "Simple Cloning System" and here are the core features and concepts : Cloners: given one or several meshes, either clones or instances will distributed in a specific manner. If more than one mesh is provided, the meshes are distributed alternatively. Additionally, cloners can be nested, so it is possible to clone cloners. Each cloner can have several Effectors (in particular order) to influence the Scale/Position/Rotation parameter of a clone (or cloner). A sensitivity parameter controls this influence for a cloner. Following Objects are designated: RadialCloner: radial distribution where following parameters are recognized: count, radius, offset, startangle, endangle, Effector-sensitivity for Position, Scale and Rotation, alignment-flag, orientation. LinearCloner: linear distribution where following parameters are recognized:count, offset, growth, Effector-sensitivity for Position, Scale and Rotation. An interpolation-mode-flag determines, if the clone -parameters (Scale/Position/Rotation) are interpreted as "step" or "end"-values. MatrixCloner: coming soon (clones will be distributed in 3D space) PlanarCloner: coming soon (clones will be distributed in 2D space) ObjectCloner: coming soon (clones will be distributed in relation to the internals of a given mesh (vertices, edges, triangles ...) RandomEffector: influences Scale/Position/Rotation of a clone with repeatable random values, controlled with an overall "strength" parameter. Not quite finished, but basically working. FormulaEffector: coming soon, influences Scale/Position/Rotation via text thought to control from outside (html-page). StepEffector, TimeEcffector, DelayEffector and much more ??? So, enough for the moment, you can see and play with some scenes: LinearCloner,RadialCloner,RandomEffector radial-linear-radial-cloner linear-radial-linear-cloner PS: I need some advise if I should upload the sources to github if you're interested. Should I upload it to my own github space or to BABYLONX ? If the latter, do I have to send a pull request? Sources are written in typescript GameMonetize, meteoritool, Vousk-prod. and 2 others 5 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 29, 2017 Share Posted March 29, 2017 Excellent! javalang 1 Quote Link to comment Share on other sites More sharing options...
meteoritool Posted March 30, 2017 Share Posted March 30, 2017 Haha great stuff for the lazy guyz like me ;-) In my humble opinion, those codes should be lightweight enough to be part of the framework ??? Just my thought Great addition ! javalang 1 Quote Link to comment Share on other sites More sharing options...
javalang Posted March 30, 2017 Author Share Posted March 30, 2017 @meteoritool & @Deltakosh thank you. Scene updated, now with animation flag, check "animate": Dancing Clones To achieve this effect, only one parameter per cloner is nedded (sensitivity): cc.effectors[0].sensitivity=Math.sin(frame*.005)*Math.sin(frame*.005); rr.effectors[0].sensitivity=Math.cos(frame*.005)*Math.cos(frame*.005); Quote Link to comment Share on other sites More sharing options...
jerome Posted March 31, 2017 Share Posted March 31, 2017 I think it could be one of the BJS Extensions. GameMonetize and javalang 2 Quote Link to comment Share on other sites More sharing options...
javalang Posted April 1, 2017 Author Share Posted April 1, 2017 I'm pleased to present the Matrix- and ObjectCloner, here are some playgrounds: ObjectCloner MatrixCloner RadialCloner combined with MatrixCloner if you want to play with the RandomEffector. you can do it here. Have fun Wingnut, meteoritool and jerome 3 Quote Link to comment Share on other sites More sharing options...
jellix Posted April 1, 2017 Share Posted April 1, 2017 Great work! Would love to see that as an extension so I could include it when needed. Maybe you know the module 'MoGraph' from the 3D software 'Cinema4D'? This is pretty exactly the concept of your code. And it's very useful! Also a lot of fun. An idea could be to distribute clones on vertices (or face-centers) of a mesh. javalang 1 Quote Link to comment Share on other sites More sharing options...
javalang Posted April 1, 2017 Author Share Posted April 1, 2017 @jellix thank you, haha yes MoGraph, you got it, I like it very much and you're right, I've tried to pack many of these concepts into here. The idea distributing the clones on the face-centers is exactly what the ObjectCloner does. One thing here however could be improved: a flag to align the clones on the face-normals, but this should not be a big problem. jellix 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.