arrays of objects and kineme plugins

intellijel's picture

Whenever I make an object that comprises an array of smaller objects the 3d object loader will only load one part of the array.

e.g. if I make a 4x4x4 array of cubes and save as an .fbx file and the load it is in QC with 3D object loader then only one cube is loaded instead 64.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

dust's picture
Re: arrays of objects and kineme plugins

how are you exporting your fbx have you tried .dae ? i would think that making an array of cubes could easily be done with iteration inside qc. now your array of cubes was generated or duplicated from the same object ? did you have them all selected and export them as a selection ? im shooting in the dark, have you tried opening your model in blender or something else to verify they are all there. are you using cheetah 3d you mention arrays?

intellijel's picture
Re: arrays of objects and kineme plugins

I am using Cinema 4d R10 and it does not look like I can export to .dae. Also the arrays were created using MoGraph. Some other people recommended baking the object but that did not seem to work.

It may be possible to export in another format and then use Blender to convert it.

Totally true I can use iterations in qc, I was more curious about exporting more complex composite objects (this simple array was just a test).

intellijel's picture
Re: arrays of objects and kineme plugins

I also noticed that the Kine 3D Object loader has a "Output Object" and "Output Objects". When I hover over the plural version it lists all the other objects in the file but I do not now how I am supposed to access or use them.

gtoledo3's picture
Re: arrays of objects and kineme plugins

Here's what you do, in clear terms:

What you are looking at when you hover over that output port of the object loader node, is a structure list, of all of those elements you aren't "seeing" loaded when you connect the output "noodle" of the "object" port to the 3D renderer.

In QC, a structure can be manipulated with the structure patches. In this case, you can use an "structure index" patch so "sort" through each individual piece that comprises the object as a whole.

Tie a Kineme3D object loader->structure index->Kineme3D object render patch in that sequence.

Now, hover over the node and see what the total count of objects is. Start going from 0, to whatever the maximum amount is, in the index input of the structure index. You will note that you can see each individual part of the structure being loaded as you go change index values (some models are odd, and there can be exceptions where you don't see anything for a given index of the structure).

Technically, the best way to work with something like this, is to simply not make a model with sub-objects like this...

...so the endorsed method is to go ahead and take index 0, and connect it to a 3D render, and then adjust as needed. Then, connect another structure index, adjust the index to 1, and tie it to another renderer.... so on, and so forth, using as many renderers as it takes. THAT, is a way that is sure to avoid any possible weirdness.

In QC however, it is also possible to make a structure, and then load it by using an iterator loading setup to account for however many pieces of the structure there are.

This is a technique that can be used in many scenarios, and probably, one of the least suitable is Kineme3D. The iterator patch is a hog (and the jury is still out on the SL iterator... there are plusses and minuses from Leopard - it IS seemingly quicker).

One can make a structure of images, for example, and load with an iterator setup... that's actually the first scenario I saw a setup like this used with- I think it was a Futurismo thing. However, the iterator setup that is referred to was tossed around with early Kineme3D stuff, but isn't really the "best way" at all.

Check this out for an example (I'm not sure of any earlier ones on site, though the seminal one was from Chris)...

http://kineme.net/Applications/Compositions/georgetoledosamplethread#com...

I'm interpolating the amount of iterations.... To load a whole model, what you want to do, is use a structure count, coming off of the "objects" port on the loader, and then connect that to the iteration count.... or simply make sure that the iteration count is the same as the total structure count.

The link qtz may have deformers and interpolate rotations ... it's been so long I can't really remember. The thing to key in on is the loader/iterator setup, and the way that the iterator variables ad structure hooks to the render patch inside the iterator.

With this, I totally apologize, because Chris or Steve honestly don't need the time wasted on glitches that can occasionally result with certain combos with this kind of setup; that isn't really the best way to use Kineme3D, and it's not endorsed, so please keep that in mind. It's a quick and dirty way of previewing stuff like this, and can be kind of cool, if it's really well considered, and the model is designed to work with it. Do not complain to them if an iterator setup isn't working in some context where the envelope is being pushed, because it's not an example for a reason. Various model types can be really quirky, and the iterator is quirky anyway, so you are getting quirky┬▓.

If you want to simple load a "whole" model, it's better to just export your model so that it doesn't have a structure/multi-object setup. Fps will be better, deformers will tend to run better, GLSL will likely be better, and you won't find weird rotation/centering stuff that can happen when loading certain types of 3D models with an iterator.

dust's picture
Re: arrays of objects and kineme plugins

cool i have never used c4d but i know people that swear by it. actually an old friend dj friend of mine uses it. he does some sick motion graphics he actually got me into motion graphics in 1995. i was a static graphic guy but he was just on this other level graphically very inspirational to me. he used to make the sickest rave flyers. im not sure what he is up to now havent spoken to him in over a decade but he has a reel on his site. don't laugh at his site he hasn't changed his home page since 1995. he has this sick minimal clean look going on. thats the only guy i know to ask for c4d stuff. george's suggestion is right on. i think your models are there they are just actually inside an array (structure) you got to index out. i would use the interpolator instead cause the iterator actually makes a copy of the model so if you got 64 cubes and you iterate 64 times that 64 x 64 and you might crash.

http://stimuli.com/reel/

gtoledo3's picture
Re: arrays of objects and kineme plugins

Dust, what do you mean by using "the interpolator instead"?

On iteration - when you use an iterator/structure render setup, you aren't getting the hit of loading say, a whole object 64 times, because you are only loading a piece of structure each iteration. The total complexity of the model has the most to do with whatever hit you are going to see (along with whatever lighting is happening on it), than the the much less substantial hit from the iterator being a little bit inefficient.

yanomano's picture
Re: arrays of objects and kineme plugins

Hi intellijel, Here is a simple setup to render fbx files that contain multiple objects with a "Kineme3D Object renderer" patch inside an iterator.

There is also a Zip with the C4D project and the result fbx export. ( C4D11)

Basically in C4D you have to transform all your objects as meshes (Make editable function). Don't use hierarchies or group.

PreviewAttachmentSize
C4D.png
C4D.png151.97 KB
K3D_Output_Objects.qtz5.44 KB
C4D-project.zip76.74 KB

gtoledo3's picture
Re: arrays of objects and kineme plugins

I used to do a similar thing with GLSL and Lighting in the Iterator, but abandoned it. It seems to not be as efficient as putting the iterator inside of the Lighting or GLSL environment. You're basically making that whole environment however many times you iterate it, in this scenario, I believe.

I'm wondering if there's another take on that I'm missing ( a visual upside?). I find that stuff "look right" when I think of "whole scenes" going in the lighting, and then as GLSL as my spot lighting (not to say I don't do make exceptions either!)

That normalize setup you did is also a curious thing, very interesting. Do you find that tames models that are sometimes "weird"?

This is the most basic setup iterator loading based on the K3D Alpha9 I save around as a starting point....the whole thing can be placed in a GLSL, or lighting environment. I think it's even simpler than the "o.g".

PreviewAttachmentSize
k3d-iterator-basic.qtz3.57 KB

dust's picture
Re: arrays of objects and kineme plugins

im thinking that his cubes are the individual piece so if he has to iterates each piece by the index the index 0 will copied 4 times. or at least that my understanding if you iterate a sprite 4 times you have four sprites, you will not see them unless you offset the current index with an expression. so if its a model a single model then yes but if he iterates through an an existing array of models he will be making extra copies. thats why i think if he where to iterate just a single cube 4 x 4 he will be all set if he offsets them otherwise he will be getting 4 copies at 0, 1, 2, 3, 4 plus its 3d so thats even more iterations. i might be wrong never tried iterating a existing structure. i get confused iterating arrarys of arrays more than 2d.

gtoledo3's picture
Re: arrays of objects and kineme plugins

The renderer does get "x copies" when it's in the iterator, but since you are just loading a structure index at a time, it's not the same as if you are loading the whole object for "x copies".

I don't understand all of what you wrote.

yanomano's picture
Re: arrays of objects and kineme plugins

George, You can also put the iterator inside the lighting patch, i agree it's probably more efficient : see atached qtz (anybody can confirm if the lighting patch will be iterated ?)

Regarding normalization : It seems that fbx with multiple objects inside just output the first object from the kineme 3D object loader "output Object" port. Of course you can access all objects from the "Output Objects" one.

However in this case all differents objects are centered at (0,0) in other words it don't keep the original position of the objects.(This is not due to the C4D to Fbx export but the 3D object loader force them to be centered.) But it's a feature form me ;)

PreviewAttachmentSize
K3D_Output_Objects_2ndWay.qtz5.45 KB

gtoledo3's picture
Re: arrays of objects and kineme plugins

The lighting is an environment, so you can just plop the whole thing inside, loader and all, for that matter.

Also... I may have double smoothing going on with the one I posted above (sorry), and I can't edit it now that it's locked in by the reply. It's better not to do that. Turn it off on the loader if anyone uses that qtz setup.

intellijel's picture
Re: arrays of objects and kineme plugins

I tried this patch and it loaded each of the indivdual objects in a line. None of the original structure was retained.

I think I need to figure out what to do in C4D to merge all the objects into one.

cwright's picture
Re: arrays of objects and kineme plugins

There might be some positioning bugs with Kineme3D when loading objects -- the FBX library is sorta tricky when handling that.

also, if you have Normalize or Center enabled on the loader, your objects won't be in the correct position - Normalize (scales each object so it fits in a -1-+1 cube) requires objects to be centered, and center obviously centers the object about the origin, so those will both remove all position information.

If you'd like, please send the multi-object file to info@kineme.net, and we'll take a look to see if we can fix any bugs on our end before the next release.

intellijel's picture
Re: arrays of objects and kineme plugins

I sent the files to Kineme but I figure it is worth loading here is as well.

I am sure there is something simple I am probably supposed to do within C4D. You will need to have MoGraph installed to use this C$D project.

PreviewAttachmentSize
c4d multi object project.zip329.26 KB

intellijel's picture
Re: arrays of objects and kineme plugins

Ok it looks like I solved it.

I just had to select all the objects and then execute the function-->"make editable" followed by function--> "connect" to combine them all into one object.

Now they load into QC with a single object loader.

I am sure this is way more efficient than using an iterator.