3D LED cube in maya.


#1

i’m trying to create a 3D LED cube in maya.
i wanna have lights turn on when they interact with my animated geometry.

http://www.youtube.com/watch?v=mfcpChh9HRk&feature=relmfu

i’m thinking about using SOUP node and transfer attributes to a grid of instanced objects.
has anyone made a 3D LED cube in maya before?


#2

Chck given example scene file in soup with name group_componentsShaderAttachment.ma


#3

I havent, but if you are thinking about using SOuP the attributeTransfer maybe a little problematic because the bounding object relies on point density rather than volume to affects other points, also I cant see it working with lights.

One thing that may work is the cage node, this does use volume to display a selection of points inside its bounds and with a bit of SOuP magic you could also have another cage displaying points outside bounds. That would mean you would have 2 cube setups one with standard points and the other incandescent points rather than lights.

If I have time Ill see if I can build a quick scene.


#4

You can make your animated object source of a radial field, turn on Apply Per Vertex in the Special Effects rollout of the radial field, and on your particle set Conserve to 0.0. Then add some runtime expression like so:
rgbPP = (mag(force) > 0) ? 1 : 0;
which means if the magnitude of the force is greater than 0 set rgbPP to 1, else set it to 0;
Then you have to play a little with the radial field’s max distance parameter, and you can get something like what you’re looking for. Also you can control any other parameter the same way, for example change the instanced object index or whatever.


#5

I am not sure about this. May be Aikiman can help me out with this.
What if i create a particle grid and then have a geometry inside that particle grid. and then use < Transfer point colors from geometry to particles -SOUP
will that work??


#6

Yes essentially you are doing the same thing and there are some example scenes with particles doing just that (look for the simple runtime expression in those scenes).

This is the issue though. If the AttributeTransfer bounding object is a mesh object for example (in your case it will be so lets say it is a rabbit), SOuP evaluates the transfer on point proximity and not the volume of the bunny. Sometimes this can be fixed by increasing the radius of influence of each point so that you cover the particles inside the bunny as well. The problem with this is your radius will also extend to outside the bunny in which case you wont have a clean transfer and therefore a nice clean bunny silhouette.

There is a workaround I didnt mention before and that is to use the scatter node to scatter points inside your bunny volume, then connect the scatter points into the attributeTransfer bounding object instead of the bunny mesh. Now you can increase the density of scatter points to capture all the lights in side bunny mesh. Its not perfect but its a workaround. I will work on a scene for you tonight so you can take a look at the network, see if its what you are after.


#7

yes, that’s what i did initially and it worked, but the geometry had to be one mesh, and i had no idea how to plug them into the lights.


#8

Here you go - required Maya 2013 and latest SOuP build. It might seem a bit convoluted to look at the network and to be honest some of it is but Ive tried to break it down to keep things simple. I think with a couple of pipeline enhancements from SOuP the network could be simpler, ie. get rid of the rgbaToColorAndAlpha nodes but for now they are necessary.

Personally I wouldnt run with using lights unless you need shadows because you can create glows etc in post. Plus using lights would mean you would have to set a light on every particle and query the particles ID and color to turn the light on etc this would increase simulation overhead by ten fold.

Azrail idea would be a lot faster to simulate Im guessing, but using SOuP means you could add color ramps, have different falloff values for opacity etc.
Have fun!


#9

thanks Aikiman! i don’t have maya 2013. can someone post screenshoots of outliner and hyper graph?


#10

Theres a screen grab of the node editor there, Ill see if I can give you some more details soon, sorry about that.


#11

lol…i dont know what an LED cube is…but u nay find it useful …or not… that the mash nodes work with lights allowing you to creat various arrays


#12

I dont think Mash is the way to go here, we’re not trying to animate the transforms but rather the visibility based on irregular volumes. Theres a link to an LED display on the first post if you wanna see what it is.


#13

cool effect…yeah mash not the way to go


#14

A pretty fast way to set this up would be as follows:

  1. create nParticles using the grid option
  2. on particleShape set colorInput to constant
  3. create rgbPP array and collisionGeometryIndex attr arrays (add dynamic attributes)
  4. Create the following runtime after dynamics expression:
    position = position0; // keep the collision from moving the particles
    int $i = collisionGeometryIndex;
    if( $i != -1 ){
    nParticleShape1.rgbPP = <<1.0, 1.0, 0.0>>;
    } else {
    nParticleShape1.rgbPP = <<0.0, 0.0, 0.0>>;
    }
  5. Make the geometry passive nMesh colliders. Collision width on the nRigid can be used to control how far from the mesh affects things. Also make the substeps 1 and max collide iterations 1 on the nucleus node to make things fast. If you use a very large collide width use vertex collisions for better performance.

Then just add some shader glow to the particle shader.


#15

hi duncan,

i like your method cause it’s really simple,
but how can i turn on the particles inside the geometry?
collision test is only working on the particles colliding with vertex/edge/face.
the particles completely included in the geometry are not affected.

thanks


#16

I think you should try to create one really small geo inside your main geo and increasse collision width to cover up the space inside the main geo…
hope that works.


#17

hi Aikiman,

i got to see your file at work today.
is it possible to turn on the particles that are completely iinside the geometry?
do i have to fill the geometry with particles and make them collide or something?
i’m out of idea.


#18

They should all be on, thats the reds ones inside the geo also. It might just be hard to see because of the gray particles opacity is set to something low. If you take a look at the particle expressions you can see how I control the color and opacity. The opacity is controlled with outWeightPP from the attributeTransfer so you an take a look at the bounding objects weight ramp and adjust that there if you like. If you are unsure you can increase the scatter node points density but I thought I had all of them covered.

Hope that answers your question.


#19

setting ‘Scatter Mode’ on scatterShape1 node to ‘Both’ solved the issue.
thanks Aikiman.

btw, does nParticle collision test only work for the surface of a geometry?
can they collide with the volume?


#20

Nice one. nPArticle collisions dont consider internal volume, its just based on verts/faces.