L = thisComp.layer("Null 1"); fromComp(L.toComp(L.anchorPoint))
Tuesday, April 17, 2012
Friday, April 13, 2012
"Hiding" Particles Based on Texture Map
After creating a texture map on my grid, I read the Texture Map color's brightness and tested if it was Less Than or Equal to .5. If it was, I "hid" the particles by scaling them to 0,0,0.
I couldn't figure out how to delete the points; if you could, I'm not sure it would work correctly with an animated texture.
Also note, I scaled the texture projection down slightly to avoid incorrect values around the edge of the image.
Hopefully this helps.
Sunday, March 25, 2012
Emitting Particles At Fixed Intervals
Emitting particles at fixed intervals is primarily achieved by using the Modulo node. By Modulo-ing our Current Time by a value of 48, we generate a looping set of numbers 0, 1....47, 48, 0, 1...47, 48, etc.
In order to emit our particles for only 3 frames, we can test the result from Modulo, and see If it is Less Than or Equal to 3. If it is we emit 1000 particles (per second), if not 0.
In order to emit our particles for only 3 frames, we can test the result from Modulo, and see If it is Less Than or Equal to 3. If it is we emit 1000 particles (per second), if not 0.
Thursday, December 22, 2011
Setting a keyframe at the current time in Softimage with Javascript
With some help, I learned how I could set a keyframe at the current time in Softimage via Javascript. Now, thanks to Myara, I can complete my synoptic page....
SaveKey(oObj.posx + "," + oObj.posy + "," + oObj.posz, getValue("PlayControl.Current"))
I couldn't get that syntax working, but I got a slightly different variation working:
function TL_MainBody(in_obj,in_mousebutton,in_keymodifier)
{
oObj = "Bkpk-Controls.NULL_MainBody";
SelectObj(oObj, null, true);
SetValue(oObj + ".kine.local.posx", -1, null);
SetValue(oObj + ".kine.local.posy", 1, null);
SetValue(oObj + ".kine.local.posz", 0, null);
SaveKey(oObj + ".kine.local.posx," + oObj + ".kine.local.posy," + oObj + ".kine.local.posz", getValue("PlayControl.Current"), null, null, null, null, null);
DeselectAll();
}
Sloppy, but it works!
SaveKey(oObj.posx + "," + oObj.posy + "," + oObj.posz, getValue("PlayControl.Current"))
I couldn't get that syntax working, but I got a slightly different variation working:
function TL_MainBody(in_obj,in_mousebutton,in_keymodifier)
{
oObj = "Bkpk-Controls.NULL_MainBody";
SelectObj(oObj, null, true);
SetValue(oObj + ".kine.local.posx", -1, null);
SetValue(oObj + ".kine.local.posy", 1, null);
SetValue(oObj + ".kine.local.posz", 0, null);
SaveKey(oObj + ".kine.local.posx," + oObj + ".kine.local.posy," + oObj + ".kine.local.posz", getValue("PlayControl.Current"), null, null, null, null, null);
DeselectAll();
}
Sloppy, but it works!
Friday, September 16, 2011
Painting textures in Photoshop CS5
I experienced a problem with several models that I've tried to texture in Photoshop CS5. The problem was that I could paint on the UV tile, but I could not paint on the model itself. In addition, in order for my texture to appear, I needed to change 3D/Render Settings to Constant. When I tried painting directly on the model, it brought up an error stating that the current Render mode didn't allow for it.
Well, it turns out that it was a problem with exporting the model from Softimage. When exporting an .obj file, if you uncheck Export Material, you can then paint away directly on the model in Photoshop and you can also set Render Setting to Unlit Texture.
Well, it turns out that it was a problem with exporting the model from Softimage. When exporting an .obj file, if you uncheck Export Material, you can then paint away directly on the model in Photoshop and you can also set Render Setting to Unlit Texture.
Monday, December 13, 2010
Incrementing (Adding) values over time
One of the challenges that I faced with developing a vehicle rig in Softimage ICE was how to add an acceleration variable and continuously translate my vehicle forward. So if I started with a value of 0, and then continuously add 1 to that each frame, I would get values of 0, 1, 2, 3. If I then changed the "acceleration" to 0, I would get 3, 3, 3, 3. Changing Acceleration to -1 would generate 2, 1, 0
We start by initializing our custom attribute in the presim stack:
Now that our custom attribute is defined, we can go about modifying it over time. To do this, we get the value of our custom attribute, add the amount we want to change it (each frame), and then set the custom attribute with the new amount:
We start by initializing our custom attribute in the presim stack:
Now that our custom attribute is defined, we can go about modifying it over time. To do this, we get the value of our custom attribute, add the amount we want to change it (each frame), and then set the custom attribute with the new amount:
Saturday, December 4, 2010
Setting And Getting Custom Attributes In Softimage ICE
Custom Attributes are very similar to variables in programming. In Javascript, you might have something like:
height = 72;
In ICE, you connect a SetData node into your ICE Tree. Open up the node and in the text box, type self.height. Now the SetData node knows what you want to call your custom attribute, but it doesn't know what type of data it is. Connecting a Scalar node of 72 into the SetData node will then change self.height into a scalar value of 72.
In the following example, I am creating a particle at position 0,0,0. I then use a SetData node to define a couple of properties of my particle, making it easier to see what's going on (self.size (1.5) and self.shape (box)). Next I create a custom attribute called self.my_custom_color and add a color value as it's input. Lastly, I access the custom attribute via a GetData node with self.my_custom_color and use that to define the particle color. To access the custom attributes, after you type self. you can hit the Explorer button, open up Point Cloud, and then see a list of all the attributes defined for the object.
Hopefully these two simple examples will help illustrate how to utilize Custom Attributes in your ICE Tree. Going even further, you can create a custom attribute in one ICE Tree, and then access that data in an entirely different ICE Tree.
height = 72;
In ICE, you connect a SetData node into your ICE Tree. Open up the node and in the text box, type self.height. Now the SetData node knows what you want to call your custom attribute, but it doesn't know what type of data it is. Connecting a Scalar node of 72 into the SetData node will then change self.height into a scalar value of 72.
In the following example, I am creating a particle at position 0,0,0. I then use a SetData node to define a couple of properties of my particle, making it easier to see what's going on (self.size (1.5) and self.shape (box)). Next I create a custom attribute called self.my_custom_color and add a color value as it's input. Lastly, I access the custom attribute via a GetData node with self.my_custom_color and use that to define the particle color. To access the custom attributes, after you type self. you can hit the Explorer button, open up Point Cloud, and then see a list of all the attributes defined for the object.
Hopefully these two simple examples will help illustrate how to utilize Custom Attributes in your ICE Tree. Going even further, you can create a custom attribute in one ICE Tree, and then access that data in an entirely different ICE Tree.
Subscribe to:
Posts (Atom)





