MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

Xpresso - Neon Lights Combinations

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Fabio Apelbaum
Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 9:43:52 pm

Hi guys! So I have a 3d stage with 16 neon lights total. I am trying to use xpresso to set up 5 different combinations of the 16 lights, some on and some off. My idea is to have a floater in the manager user data, where I can input a number from 0 to 4 to affect a condition with 5 inputs where each input enables its assigned neon lights combination.

Seemed like an easy thing to do, but for some reason I been trying all sorts of things with no success. Have anyone attempted to do this?, or anyone could guide me in the right direction of what I might be doing wrong?

Here is a sample scene of what I been trying to attempt...
12598_lightmixtest.c4d.zip

This file contains a sample of what I am trying to achieve. Overall I want to create 5 combinations, but the sample only contains two for the sake of testing.

Thanks for the help !

Fabio


Return to posts index

Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 10:04:08 pm

Just having a first look - could it be that you are expecting the output of the switcher to be "1" or some other number? It's not. In your default setup up, the output of the switcher is "true". So in the equal node, "1"does not equal "True" (even though in many bool tests it does) and you get a false.
Will keep looking but though that might help.



Return to posts index

Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 10:08:22 pm

Hmmm, somethings up. Initially the output of the Switch was a bool, which didn't jive with the Equal. But after toggling the Switch to Bool and back to Real its now outputting numbers as you were expecting (and probably seeing).
This may be an issue with my brand new build of R19.
Let me keep looking.



Return to posts index


Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 10:31:30 pm

My second post doesn't seem to be showing up. Disregard the first and second - It was an issue with my system (the Switch node was being grumpy)
Can you simply unpack your x groups and send the output of the Equal node to each of the On and OFF texture nodes that are feeding the objects and feed it into the "On" port. Then on one of these pipes stick an Negate node in the middle so the result of the Equal node will be inverted for one of the On or Off nodes.



Return to posts index

Fabio Apelbaum
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 10:32:54 pm

Hi There! Thank you so much for the help!! Everything other than the results nodes are in Real, here is a similar test I was working on, but instead of using the enabled. I'm using the Active which from the explanation in the help, Active should be recognized by ether 1 or True. Nevertheless, the problem persists.... My knowledge of xpresso is very limited and I might be doing something wrong on how I am structuring this to get the results I want... could it be that there is a conflict between the two xgroups? Maybe there is a different approach to the same result?

Attached is my latest test:
12599_lightmixtest002.c4d.zip

Thank you once again for the help!

Fabio


Return to posts index

Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 10:58:14 pm

I noticed that your "inputs first" is not checked in the Xgroups. You will need this so that the stuff that's outside the Xgroup will be calculated first, otherwise the inner stuff gets down before looking at the input.



Return to posts index


Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 11:04:03 pm

And is it just me? I don't see any information going into the X groups. I assume you want the bool coming out of the Equals to be turning the On node on and Off node off or visa versa. Is that the intent?



Return to posts index

Fabio Apelbaum
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 11:08:18 pm

Hi there, thank you again for the help, I tried unpacking the xgroups and connecting the Equal Output to the Material On input, but nothing happens....

In the second sample I sent you, the setup is a bit different, I imported the xgroups as nodes to get access to the 'Active' preperty but that did not work as well...

Any other suggestions?


Return to posts index

Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 11:14:24 pm

Just having a look now - the Cow interface seems a bit slow today, so the posts might arrive out of order.



Return to posts index


Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 11:28:09 pm

I think I see the issue.
It looks (in rev 002) that you have selected the xgroups and then dragged them back in to use as nodes and you are sending an Active into this dragged in "iteration". Unfortunately that has no effect on the original big xgroup. Is there a reason you can't send a wire into the xgroups themselves? (the node is there on the input side but that node is not connected to anything inside)



Return to posts index

Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 11:45:54 pm

I see what you are doing now - you are trying to enable the whole group. I think you need to both enable and active each xgroup. You may also have to do the opposite to the first when you want the other xgroup to take over.
I got it working here. Let me know if that doesn't solve it for you and I'll send my file.



Return to posts index

Fabio Apelbaum
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 11:37:39 pm

sounds good, to give you a clear direction of what I am trying to attempt is similar to this couple frames:




If you look at this two images, the lights in the background will be switching into different combinations.... my idea is to create 5 different presets that I can animate with ease. Let me know if you need more info.

Thanks,,
Fabio


Return to posts index


Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Jul 31, 2018 at 11:58:08 pm

Ok, Some of what I said before was wrong. The active attribute is being correctly controlled by the small node and being passed to the full xgroup. So you've got that right. I had to delete the enable port of the xgroups for some reason and then set them to Enabled manually. With that done and the small xgroup iteration groups set to enabled to (manually) I could get the change to cycle, but only once. Then its getting stuck and I'm not sure why.
BTW I had to use a constant node (set to 0....4) for the main input into the Switch.
Still checking.



Return to posts index

Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Aug 1, 2018 at 12:17:41 am

This is a head scratcher. Even simplifying things down so that a Constant feeds a value into the Active port on the xgroup iterations (and the inverse value into the other xgroup), it will only cycle once. It won't return to the original state when you toggle the value back to 0.



Return to posts index

Fabio Apelbaum
Re: Xpresso - Neon Lights Combinations
on Aug 1, 2018 at 12:28:25 am

Yes, I had that happening to me in one of my tests... But remember that the ideal scenario, I will like to have 5 presets... so, that is why I was using an equal node with a constant to match the switch input.

Do you think this has a solution? or do I need to think from scratch on a different way to structure this? I just cant believe it is so difficult to get the Active property to update.... Thats why I wonder if there might be a conflict between the xgroups....


Return to posts index


Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Aug 1, 2018 at 12:39:16 am

We didn't used to be able to pipe a material into an object (or at least change it) so there might be some legacy issues that are creeping in.
I also rebuilt the expresso node as I wondered if some of the User Data might be interfering.
The fact that we can make it switch once means the pipeline does work, but I can't figure out why it won't switch again or back.
Its going to be something simple that we're missing. Jim and Brian will probably set us straight and there will be forehead slapping all round.

Other options:
What about the Mograph shader?
You can also keyframe where you drag materials into each object's material tag. (but really that's what should be happening here with the expresso - when you look at this area in the material tag you can see it's got a controller on it from expresso, so it should be working.)
You could also write a coffee script in expresso as it has multiple inputs and outputs - use it like a multiplexer.



Return to posts index

Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Aug 1, 2018 at 12:50:35 am

I got it to work, but not the way you have it now. (nothing wrong with that way but i've got QWERTY dents in my forehead so I tried something else.
You can make a link list of the materials from the material manager (just drag them into the link list). Then send in an index value to the link list - that will output the material of choice and send it into the connected material tags.



Return to posts index

Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Aug 1, 2018 at 1:11:31 am

You can also use the Material node (Iterators) to output the list from the material manager. This doesn't change but you can change where that output begins from. So if you had Red, Green Red Green, and you set the First Material node to a 0, as you iterate through a list of the material tags you would get the same pattern. But make the First material node equal to 1 you will get a pattern starting with Green.
This is "Learning to fly by first inventing air", but with your method not working I thought it might help.

I stripped it down even further- two material nodes and two pairs of material tag nodes with a boole and a NOT to switch between which material gets sent to which pair of tags. Again, one change and then it's frozen. This should work. But with two of the same tag in the expresso window, they might be fighting. That's why I suggested a link list of both tags and materials - you can iterate through each and there won't be any conflicts.



Return to posts index


Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Aug 1, 2018 at 1:19:41 am

I just did a quicky to show you the Link List set up. Its not complete by any means but might help
12600_linklistsetup.c4d.zip



Return to posts index

Fabio Apelbaum
Re: Xpresso - Neon Lights Combinations
on Aug 1, 2018 at 11:09:03 pm

Thank you so much for all! I ended up using your method which gives me the same level of control!

One quick question, I still have the condition to choose which list to use... and that is connected to a slider that I placed in my HUD... what I would like to do is to put some reference in the HUD, so when I move the slider it tells me which list is using assuming I name each least... is that possible?

Here is what the xpresso turned out to be:


Once again! thank you!


Return to posts index

Steve Bentley
Re: Xpresso - Neon Lights Combinations
on Aug 6, 2018 at 6:34:11 pm

Sorry for the delay. Did you solve the hud?
You can put a Result node in the expresso that is fed by your switch for the List chooser. In the attributes for that Result node, add a User Data element that reflects the output (probably Float and Real instead of the default percentage). Say ok, then select the new User Data tab that has been generated. Now drag the little sprocket icon at the top left of the attribute panel into the Expresso window and hook up the output of the Switch (the same one that is still connected to the Result) to the User data input of the new dragged in node (it will also be a Result).
Now in the Attributes of that node, right click on the Data in the User Data tab (beside the value) and say Add to Hud.



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]