Jump to content

Recommended Posts

Hello,

 

I am trying to follow this tutorial on houdini and it gets to a part I get quite lost in c4d, it is creating arrays.

So I am asking help with some basic understanding of arrays and how to build them.

The example (extracted from houdini tut) I am working on is very simple, we have 3 clones - 0, 1, 2 as shown in the image.
Now I need to find out which clones have neighbours that are closer then certain distance, for the sake of an example lets say:
clone 0 has neighbours 1 and 2,

clone 1 has neighbour clone 0
clone 2 has neighbour clone 0

So I guess the result would be array of arrays?
[1,2]

[0]

[0]

I hope I am understanding this correctly, or you can attach array to each clone in cinema like in houdini?

I got this far as to output the distances to console between them, but anything more I get lost.
Any pointers would be greatly appreciated, thanks!

clones_01.png

Array_test_01.c4d

Link to post

I don't understand what you mean by attaching array to each clone? You can build array from any data but don't use Houdini "mindset". You will also need the help of closest point and neighbor node to detect which points are closest.

 

EDIT: I presume you resolved your issue given the analytical foam post on twitter? 🙂

Please post that scene file so people can dissect and learn from it

Link to post

The part I posted is just the geometry math between 2 spheres, now I need to make it for a bunch of spheres, that's why I tackled this separately.

Can you help me guide on how to make this array just for the example I posted?

Thanks!

Will post the full asset when finished sure.

Link to post
45 minutes ago, Sandidolsak said:

I am trying to build an array of arrays to no avail, is this even possible?

 

reminds me tuple

 

(picture from TZ library, differential_line.c4d scene)

 

tuple.thumb.png.1ae4869dafaee92b1d3558633a43ab49.png

 

or you can define type of IO in attribute's values in own group, too many types.

 

 

Link to post

Yep this works, now I got to another problem, I have a condition that should trigger an Append, but there is no ON OFF for a node like in xpresso, any idea how to do that?

All I want is to append the value to array if the value is bigger then 50 (checks for it in the loop).

I feel so lost with nodes, stuff like this is so easy with few lines of code 😕

 

 

ArrayAppend_01.c4d

Link to post

There is a count value in append. If it is 0 no append will happen. By the way, use console out node instead of print and make sure your graph is connected so it outputs to scene out. Console has to be used as passthrough. Try not to think that much in programming concepts you already know which apply to textual format, rather in data flow - this helped me a lot 🙂

Link to post

Oh, thanks, that works, so obvious now 🙂

Btw I can't get array to print with console out, works fine with print, thats why I use that. Is there a special syntax for console? like @[0] or something to get array to display?

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

ABOUT US

We are dedicated Cinema 4D Community of friendly and passionate artists, hobbyists and developers. Feel free to join us and share your knowledge, your art and anything that might help Community to grow. We are providing guidance, free plugins and files, feedback, sponsorships and various discounts for our Contributors. :cowboypistol:

SUPPORT

Tickets

Purchases

×
×
  • Create New...

Copyright C4D Cafe © 2020 Powered by Invision Community