Duncan's Cornerhttp://area.autodesk.com/Wed, 04 May 2016 17:24:10 UTC3D Web FestDuncan Brinsmead<p class="MsoNormal">The first ever 3D Web Fest is happening May 13<sup>th</sup>. It looks like it should be a lot of fun!</p> <p class="MsoNormal"><span style="font-size: 10.5pt; font-family: 'Calibri','sans-serif'; mso-fareast-font-family: 'Times New Roman'; color: #003366; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><span style="color: purple;"><a href="https://youtu.be/yHB05PBldqA" target="_blank">https://youtu.be/yHB05PBldqA</a></span></span></p> <p class="MsoNormal"><span style="font-size: 10.5pt; font-family: 'Calibri','sans-serif'; mso-fareast-font-family: 'Times New Roman'; color: #003366; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"><span style="color: purple;"><img src="/userdata/blogs/duncan/3DWebFest2.jpg" width="1080" height="764" /></span></span></p> <p class="MsoNormal">The 3D Web Fest is like a Film Festival - with a focus on the best of the 3D Web.<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal">This event experience will showcase websites that are the best mixture of music, art and technology, and exhibit what's possible with the advent of 3D Web in a film festival format and club atmosphere.&nbsp; The Web has transitioned from mostly text to an increasingly rich 2D image environment, and now the shift to 3D has arrived enabled by new Web standards and open source technologies. The 3D Web Fest brings together the best of the 3D Web-presented live-amazing, delightful, surprising. By immersion in the world of 3D Web you'll experience what's possible for innovative commercial, non-commercial, experimental or game-based projects.&nbsp; <o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal">The selection committee - which includes Noah Cowan, the Executive Director of the San Francisco International Film Festival - poured over projects submitted from all over the world and selected works they feel will be truly eye-opening.&nbsp;&nbsp; The lineup of artists and producers will feature work from leading creative coders in the field including Isaac Cohen, Mate Steinforth, Weidong Yang, Goo Technologies and many others, showing their work through live screening presentations. <o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal">THE PROGRAM:&nbsp; <o:p></o:p></p> <p class="MsoNormal">7:00 - 8:00 p.m. Pre-event mixer - drinks and hors d'oeuvres will be served<o:p></o:p></p> <p class="MsoNormal">8:00 p.m.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Program begins<o:p></o:p></p> <p class="MsoNormal">9:30 p.m.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Panel discussion with audience Q&amp;A<o:p></o:p></p> <p class="MsoNormal">10:00 p.m.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; After show party - drinks will be served<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal"><b>Special Note:&nbsp; </b><span style="mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria; mso-bidi-font-family: Tahoma; color: #343434;">The Web fest is also a fund-raiser for the community based non-profit </span><a href="http://www.roxie.com/"><span style="mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria; mso-bidi-font-family: Tahoma; color: #521e87;">Roxie Theatre</span></a><span style="mso-ascii-font-family: Cambria; mso-hansi-font-family: Cambria; mso-bidi-font-family: Tahoma; color: #343434;"> &ndash; the oldest continuously operating theatre in San Francisco.&nbsp;</span><o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal">Get more information about the <a href="http://www.3dwebfest.com/">3D Web Fest</a> or get your tickets directly <a href="https://3dwebfest.eventbrite.com/">here</a>.<o:p></o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p> <p class="MsoNormal"><o:p>&nbsp;</o:p></p>Fri, 08 May 2015 22:22:55 UTChttp://area.autodesk.com/blogs/duncan/3d-web-festLight EchoesDuncan Brinsmead<p>When a star brightness changes suddenly the scattered light from the surrounding cloud does not reach us all at the same time. It is delayed based on the total distance traveled and the speed of light. The result is called a light echo.</p> <p>In 2002 the variable star V838 Monocerotis had an event that caused a sudden outburst of light. The progression of illumination of the surrounding cloud of gas was captured by the Hubble telescope. It is not an outward expansion of gasses, but rather the light travelling through the cloud illuminating more and more of it.</p> <p><img src="/userdata/blogs/duncan/V838-Monocerotis.jpg" width="1000" height="830" /></p> <p></p> <p>The idea of light taking time to illuminate a cloud is somewhat unintuitive and I found myself struggling to grasp what was happening. So I modified my local build of Maya Fluids to additionally support a time delay based on the distance of rays travelled to the eye. The cloud is simulated by a simple non-dynamic 3D fluid node with a density texture. It has a point light in the center simulating the star. At the beginning of the simulation the light color is white after which the color gets rapidly darker and redder. When shading the volume for a point I add the distance to light from the voxel to the distance to the eye. This is the total distance the light must travel. The time at the star location is then the observer time - travelDistance/speedOfLight. This time is used to look up the brightness animation on the star.</p> <p>Here is the resulting animation.</p> <p>http://www.youtube.com/watch?v=zOBF46PyHPo&amp;feature=player_detailpage</p> <p>It is interesting that it looks like exploding matter even though the density is still and the light is simply illuminating different parts of it.</p> <p>I made no attempt to accurately model the proper timing or scattering colors, just the general echo effect. The pulse is initially white then goes red. The light travels outward in a sphere, but the timing of scattered light that reaches the eye proceeds outward from the view line between the eye and the star. This outward propagation is in the form of a parabola with the star at the focus.&nbsp;</p> <p>I've rendered the fluid volume from the top to better show this. The viewpoint of the observer is to the right:</p> <p>http://www.youtube.com/watch?v=k0kPB34gtn8&amp;feature=player_detailpage</p> <p>Any light that is scattered by matter close to the viewline is only slightly delayed from the direct star light. The farther matter is from this direct light path the more delayed it is.</p>Tue, 28 Apr 2015 01:39:29 UTChttp://area.autodesk.com/blogs/duncan/light-echoesCurling Particle TrajectoriesDuncan Brinsmead<p>http://www.youtube.com/watch?v=vHI5wiZGPbk&amp;feature=player_detailpage</p> <p>Maya Scene Files for Download:</p> <p><strong><a href="/userdata/blogs/duncan/particleCurl.zip">particleCurl.zip</a></strong></p> <p>One can create spiraling motions for particles using expressions. This method propagates a local up vector for the curl so that the twist direction does not go through pole flipping as the particle changes direction.</p> <p>In the example scene shown above the particles with the curl expression emit into a second non-moving particle system so that one can better see the particle's path.</p> <p>The most foolproof method I've found, if you simply want to preserve the normal trajectory and collision behavior of the particle, is to apply the curl as a displacement from the original particle path. Thus the curl is simply a post dynamics displacment and does not affect the particle motion. For this reason you may wish to also increase the particle collision radius to match the curl radius, if you don't want to see any momentary &nbsp;interpenetrations. One could instead allow collision with the displaced particle position, but this can add energy where particles collide in some cases, so is not as reliable. &nbsp;An alternate method, that I'll discuss later, is to actually apply a curling force on the particle instead of using a displacement, which is like having a little rocket motor on the particle where it can fly around and might not settle under the pull of gravity.</p> <p>This will work with either classic particles or nParticles, but nParticles provide colliion with thickness and so may work better.</p> <p></p> <p><strong>Displacement Method</strong></p> <p><span style="line-height: 1.5em;">The scene particleCurlDisplacement.ma is an example of this technique.</span></p> <p><span style="line-height: 1.5em;">On the particle shape node one first needs to create some per particles attributes. Select the button "General" under the "Add Dynamic Attributes" block in the attribute editor. The Data Type should be set to "Vector" and the Attribute Type to "Per Particle". Create attributes named coreVelocity, corePosition, and twist. </span></p> <p><span style="line-height: 1.5em;">Next we will set these in particle expressions. Rightmouse over any of the attributes in the "Per Particle(Array) Attributes" block and select "Creation Expression".</span></p> <p><span style="line-height: 1.5em;">Enter the following into Expression Editor for the creation expression then hit "Create"</span></p> <div style="background-color: black; border: 1px solid black; padding: 10px;"> <pre class="prettyprint">corePosition = position; coreVelocity = velocity; twist = &lt;&lt;0,1,0&gt;&gt;;</pre> </div> <p><span style="line-height: 1.5em;">This intializes our attributes when the particle is emitted.</span></p> <p><span style="line-height: 1.5em;"></span>Now select "Runtime before dynamics" and create the following expression:</p> <div style="background-color: black; border: 1px solid black; padding: 10px;"> <pre class="prettyprint">velocity = coreVelocity; vector $tmp = position; position = corePosition; corePosition = $tmp;</pre> </div> <p>This swaps the current position of the particle with the core position and core velocity before the solve. We always solve on the core( non-displaced ) particles.</p> <p>Now create the following "Runtime after Dynamics" expression, which is the meat of the method:</p> <div style="background-color: black; border: 1px solid black; padding: 10px;"> <pre class="prettyprint">float $spinSpeed = 30; float $loopRadius= 0.3; vector $vel = velocity; float $m = mag($vel); float $fps = 24.0; if( $m &gt; 0 ){ float $cycle = age * $spinSpeed; $v = $vel/$m; // normalize vector $t = twist; vector $n = $t ^ $v; // perpendicular to up+vel $n /= mag($n);// normalize $t = $v ^ $n; // snap twist to perpendicular twist = $t; vector $displace = cos($cycle) * $t + sin($cycle) * $n; vector $oldPos = corePosition; corePosition = position; position = corePosition + $displace * $loopRadius; velocity = (position -$oldPos ) * $fps; coreVelocity = $vel; }</pre> </div> <p><span style="line-height: 1.5em;"><br /></span></p> <p><span style="line-height: 1.5em;">The particles should now curl as they move. You can change the values for spinSpeed and loopRadius (then hit the edit button) to have the particles spin at different rates and sizes.</span></p> <p>This expression computes the curl then sets the position and velocity of the particle for purposes of rendering(as well as emission of other particles). It caches the non-curled position and velocity in the corePosition and coreVelocity attributes, which are then restored before the next solve( in the "before dynamics" expression ).</p> <p>The twist direction is snapped each step to be orthogonal to the core velocity. The twist and the core velocity define a coordinate frame for the curl. Note that the character "^" defines a cross product. The cross product between two vectors creates an orthogonal vector. The cos and sin functions describe a circular motion, where the cos is the u coordinate and the sin is the v coordinate. The cycle defines a position along this circle and we multipy our coordinate frame ($t and $n) &nbsp;by the u,v to transform the circle into the plane orthogonal to our velocity. Then this displacement is added onto the particle position. The velocity needs to be the difference between our new displaced position and our old displaced position( cached on corePosition) so that emission and rendering work well. Velocity is defined in units/sec, so we need to also multiply this difference by the frame rate.</p> <p></p> <p><strong>Force Method</strong></p> <p><span style="line-height: 1.5em;">The scene particleCurlForce applys the curl as a force that affects the particle velocity, rather than displacing the position. This is trickier to control but may be more natural when simulating things like spinning fireworks or rockets.</span></p> <p><span style="line-height: 1.5em;">Create a twist vector array attribute as before along with a vector array attribute called "avgVel". This attribute keeps the average velocity of the particle by continually blending in just a small part of the current velocity. This provides as base direction for creating the coordinate frame for the twist.</span></p> <p><span style="line-height: 1.5em;">Initialize these attributes in a creation expression:</span></p> <div style="background-color: black; border: 1px solid black; padding: 10px;"> <pre class="prettyprint">avgVel = velocity; twist = &lt;&lt;0,1,0&gt;&gt;;</pre> </div> <p><span style="line-height: 1.5em;"><br /></span></p> <p><span style="line-height: 1.5em;">Now create the following runtime before dynamics expression:</span></p> <div style="background-color: black; border: 1px solid black; padding: 10px;"> <pre class="prettyprint">float $blendRate = 0.1;</pre> <pre class="prettyprint"><span style="line-height: 1.5em;">vector $av = velocity * $blendRate + avgVel * (1.0-$blendRate); // blend current velocity into the average</span></pre> <pre class="prettyprint">avgVel = $av; float $m = mag($av); if( $m &gt; 0 ){ float $spinSpeed = 20; float $loopTightness = .5; float $cycle = age * $spinSpeed; $v = $av/$m; // normalize vector $t = twist; vector $n = $t ^ $v; // perpendicular to up+vel $n /= mag($n);// normalize $t = $v ^ $n; // snap twist to perpendicular twist = $t; float $m2 = mag(velocity); vector $newVel = cos($cycle) * $t + sin($cycle) * $n; $newVel = velocity + ($newVel * $loopTightness) * $m ; $newVel *= $m2/mag($newVel); velocity = $newVel; }</pre> </div> <p><span style="line-height: 1.5em;"><br /></span></p> <p>The basis for the twist vector frame is the averaged or smoothed velocity, rather than the coreVelocity in the displacement example. This example keeps the particle speed constant so if you increase the loop tightness it move forward more slowly. If the tightness is set to 1.0 then particles will just loop around in circles without moving forward. The velocity here is scaled such that the addition of the loop force does not change the magnitude of the velocity, only the direction.</p> <p>http://www.youtube.com/watch?v=r30Zqi_mXBA&amp;feature=player_detailpage</p>Thu, 10 Oct 2013 17:12:11 UTChttp://area.autodesk.com/blogs/duncan/curling-particle-trajectoriesVein BrushDuncan Brinsmead<h2 class="MsoNormal">Vein Brush</h2> <p><img src="/userdata/blogs/duncan/veinsBrush.jpg" width="640" height="480" /></p> <p class="MsoNormal">Here are some Paint Effects vein brushes similar to what I used in my <a href="/blogs/duncan/scene-files-from-my-maya-2014-unfold-presentation">Unfold</a> presentation.&nbsp; Download the following folder "veins":</p> <p class="MsoNormal"><strong><a href="/userdata/blogs/duncan/veins.zip">veins</a></strong></p> <p class="MsoNormal">Put it in your Maya brushes folder, for example:<o:p></o:p></p> <p class="MsoNormal"><strong>C:\Program Files\Autodesk\Maya2014\brushes</strong><o:p></o:p></p> <p class="MsoNormal">You can then find the brushes inside Maya: <strong>&ldquo;Paint Effects: Get Brush</strong>&rdquo;.<o:p></o:p></p> <p class="MsoNormal">These are designed to be used with an object&hellip; if you simply paint on the ground they won&rsquo;t work properly.&nbsp; So first select your object and do <strong>&ldquo;Paint Effects: Make Paintable&rdquo;</strong> before painting.&nbsp; If the brush is too big or too small hold the &ldquo;b&rdquo; key down while dragging the mouse to resize. Note that the brush in these cases does not appear correct until you finish painting (mouse up).&nbsp; For the most part one can just to a short quick stroke with these brushes in the general desired direction.<o:p></o:p></p> <p class="MsoNormal">Paint effects with these brushes should be considered more as a modeling tool. If you paint on an animated deforming character, for example, you do not want the brush to compute during the animation because the structure of the branching will change and pop (not a bug, but rather the way the branching attempts to fill available space), as well as slow down the playback speed. Instead convert pfx to poly and delete the original stroke. Then attach the veins to the object depending on the requirements, for example with parenting, wrap deformer, or bind skin.<o:p></o:p></p> <p>The critical brush attributes used for these presets are:<o:p></o:p></p> <p>1.&nbsp;<!--[endif]-->All the <strong>Occupation Surface</strong> attributes. Higher occupyAttraction attributes allows tubes to bend more when attempting to fill the surface.<o:p></o:p></p> <p>2.&nbsp;<!--[endif]--><strong>Surface Attract</strong><o:p></o:p></p> <p>3.&nbsp;<!--[endif]--><strong>Surface Collide</strong> and <strong>Collide Method</strong><o:p></o:p></p> <p>4.&nbsp;<!--[endif]-->Branch attributes. &nbsp;Note that with <strong>Occupy Branch Termination</strong> enabled one can set the <strong>Split Max Depth</strong> high without resulting in too many branches. Care needs to be taken, however, because with a high max depth anything that keeps the branches from terminating could result in a large number of branches( it shouldn&rsquo;t kill Maya, but could lock it up for a few minutes). For example increasing the <strong>Attract Radius Offse</strong>t could greatly reduce the number of terminated branches.<o:p></o:p></p> <p>5.&nbsp;<!--[endif]--><strong>Hue Rand</strong>. This is set to get a range of colors between blue and red, with the base color being the middle, or purple.</p> <p class="MsoNormal">These brushes are quite sensitive to the size of your object relative to the veins. If the object is much bigger than the veins then you may need to increase the<strong> Surface Sample Density</strong> on the brush (this can make the brush slower to compute, however).&nbsp;<o:p></o:p></p>Mon, 03 Jun 2013 21:14:59 UTChttp://area.autodesk.com/blogs/duncan/vein-brushScene Files from my Maya 2014 Unfold PresentationDuncan Brinsmead<p></p> <p><img src="/userdata/blogs/duncan/headVeins.jpg" width="1365" height="776" /></p> <p><span style="line-height: 1.5em;">As promised here are the scene files along with a few source images I us</span>ed in my presentation on Maya 2014 at the unfold event:</p> <p><a href="/userdata/blogs/duncan/maya2014UnfoldDemo.zip">maya2014UnfoldDemo.zip</a></p> <p>Here is a link to the presentation.</p> <p><a href="http://www.youtube.com/watch?v=v0Gz54a6GTg" title="Exploring Maya 2014 with Duncan">http://www.youtube.com/watch?v=v0Gz54a6GTg</a></p> <p>Also note that the surface vein brush I used in the presentation is available <a href="/blogs/duncan/vein-brush">here</a>.</p> <p>These scenes demonstrate some new features in Maya 2014. You can load these scenes into earlier versions of Maya but for the most part they will not work properly as they rely on new features. I've provided just brief descriptions below, but you can get more info in the video. The listing below is in the order of presentation in the video. If you have any brief questions feel free to ask them here. For more involved questions I would recommend posting them in the Maya forum of CGTalk, which I regularily check. The comments section here is not really designed to handle complex questions.</p> <p>In many cases the paint effects elements are converted to meshes and displayed in viewport 2.0 with shadowing in and screenspace ambient occlusion. Note that the native paint effects draw and pfx line modifiers are not yet implemented in viewport 2.0. In a couple of examples I created stand-in geometry grouped with the line modifier nodes to manipulate them more easily inside viewport 2.0.</p> <p>Note that with some of the brushes using the occupy feature a very high branch depth is used( for example occupyLeafPattern.ma) When combined with occupyBranchTermination this can work well, but if one turns off the termination or modifies the occupation radius then a very large number of branches may result.</p> <p>I'll later provide the full scene for the wall smash examples complete with particles and dust in a following blog post, complete with a tutorial on how it was set up.</p> <p></p> <h2>Paint Effects Scenes</h2> <p><strong>footGrassCollide.ma<span class="Apple-tab-span" style="white-space: pre;"> </span></strong>-drag object to see collisions with grass (paintEffects: make collide)</p> <p><strong>chiaHead.ma<span class="Apple-tab-span" style="white-space: pre;"> </span></strong>-a tree that is attracted to a head using the following brush attributes:surfaceAttract, surfaceCollide, occupyAttraction</p> <p></p> <p><strong><img src="/userdata/blogs/duncan/roseOnWall.jpg" width="1432" height="920" /></strong></p> <p><strong>roseOnWall.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-select strokeRosesClimbing and pCube1 then do "Paint Effects: Make Collide" to attract the rose to the wall. The brush uses using surfaceAttract, surfaceCollide, and occupyAttraction.</p> <p><strong>lightningRing4.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-Move the objects to see sparks update. OccuyAttraction with a large attractRadiusOffset and branch termination cause the sparks to only occur when objects are close. All objects are collision objects for the lightning stroke. Surface attract and collide are also used.</p> <p><strong>flowerSpaceCompetition.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-Delphiniums grow into unoccupied regions of space and terminate in crowded areas by using a line modifier node with occupyAttraction</p> <p><img src="/userdata/blogs/duncan/occupyBranches.jpg" /></p> <p><strong>occupyVeinNetwork.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-Drag the line modifier (select and move group1) over the stroke to see the effect of occupy attract. (Note that this has proxy object to allow display of the line modifier in viewport2.0)</p> <p></p> <p><img src="/userdata/blogs/duncan/occupyLeafPattern.jpg" width="1440" height="922" /></p> <p><strong>occupyLeafPattern.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-A vascular branching pattern created by high occupy attraction on a volume line that is scaled flat. The brush has a splitMaxDepth of 20 which allows for a complex pattern. Branch termination on the modifier keeps the number of branches from becoming too high. One can make the branching 3D by increasing the y scale of the line modifier.</p> <p></p> <p><strong>occupyDNA3.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-uses a line modifier with occupy attract to do a rudimentary self collision avoidance on a DNA brush. Scale the modifier translateY to fill 3D space.</p> <p></p> <p><strong>occupyCoral.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-a line modifier with occupy attract creates more natural branching of a coral brush.</p> <p></p> <p><strong>lungTest.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-a line modifier with a fill object assigned(prism mesh) The occupy attract on the modifier then provides a region for a stroke to grow into.</p> <p></p> <p><strong>fillObject.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-a plant grows to fill a cone shaped object using a line modifier with a fill object.</p> <p></p> <p><strong>headVeinsVolume.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-veins grow to fill the inside of a head using a line modifier with occupy attract.</p> <p></p> <p><strong>flowerVaseCollideDemo.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-Select stokeTulipStreaked1 and nurbsToPoly1(the vase) and do "Paint Effects: Make Collide" to collide the flowers with the vase. The vase can then be scaled. The line modifier (group1) can be dragged over the flowers to keep them from clumping.</p> <p></p> <p><img src="/userdata/blogs/duncan/treehouse.jpg" width="1560" height="923" /></p> <p><strong>treeHouseDemo.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-A tree collides with a wall and a tree house. A line modifier with occupy attract is additionally used to grow the tree around the tree house. The tree house can be moved and the branches will update for the new position.</p> <p></p> <p></p> <h2>Hair Scenes</h2> <p><strong>hairHead2.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-A hair simulation with self colliding clumps. One can drag the scalp or the cube in interactive playback mode to interact with the hair.</p> <p><strong>coatDemo.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-A demo of hair on a cloth coat. One can drag the colliding cube during interactive playback to interact with the simulation.</p> <p></p> <p><img src="/userdata/blogs/duncan/koosh.jpg" width="1417" height="852" /></p> <p><strong>kooshSticky.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-A kooshball simulation using hair with stickiness on an nCloth sphere. Drag the cube during interactive playback to interact.</p> <p>snakePlayground.ma<span class="Apple-tab-span" style="white-space: pre;"> </span>-This scene has a bunch of snakes that are animated with nHair. You can drag the various objects around in interactive playback and interact with the snakes. The basic technique was to create a curve then animate it undulating by applying a Sine deformer and animating the offset on the deformer. These animated curves were made into hair using nHair:makeSelectedCurvesDynamic. Stretch/Compression/Bend/Twist resistance then has the dynamic curve attempt to follow the input curve( in previous versions nHair rest shape did not update per frame). &nbsp;A pfx brush was assigned to the hairSystem to control the tessellation and profile of the snakes and the result was converted to poly mesh.</p> <p></p> <h2>FLUIDS</h2> <p><strong>fluidObjectFillTest.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-This shows the object based fluid fill as well as emission on the start frame. You can edit the shape or position of the fill object then hit rewind to update the fluid. To do this effect do fluid: emitFromObject and on the emitter enable fillObject as well as startFrameOnly emission.</p> <p></p> <p></p> <h2>Nucleus Scenes</h2> <p><strong>componentConstraintStretchDemo.ma</strong> This is a simple nCloth sleeve with no stretch resistance. In the demo I add two component constraints one with singleEdge = 1 and one with it set to 2. Then one can play with things like restlength scale on the constraints.</p> <p><strong>pearlsMBlur.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-This is a pearl necklass done using the technique I describe in this CGTalk thread:&nbsp;<a href="http://forums.cgsociety.org/showthread.php?f=7&amp;t=1097583&amp;highlight=pearl">string of pearls</a>.</p> <p><strong>rigidEmitDemo.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-An emission of a particle instanced torus with a cluster of particles standing in for collisions and determining rotations</p> <p><strong>shellCasings.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-Bullet casing emitted using 2 particles for collision and rotations. The technique I describe in posts on this thread: <a href="http://forums.cgsociety.org/showthread.php?f=86&amp;t=1095414&amp;highlight=casings">Shell Casings</a></p> <p><strong>lotsOCasings.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-Same as the above but with more casings.</p> <p><strong>fourParticleRigid.ma</strong><span class="Apple-tab-span" style="white-space: pre;"> </span>-Same as the casings techinque but with 4 particles and the full instancer rotation determined by 3 of the particles.</p> <p></p> <p><img src="/userdata/blogs/duncan/wallSmash.jpg" width="1681" height="905" /></p> <p><strong>wallSmashDemo.ma<span class="Apple-tab-span" style="white-space: pre;"> </span></strong>-Run nSolver:interactivePlayback and drag the object (behind wall) through the wall to smash it. There is also a volumeAxis field you can drag onto the wall to "release" the bricks. This uses a single nCloth mesh with faces that are locked with an inputAttract map. The map values are dynamically set to release the bricks. I will have a more complete tutorial of the technique to follow, along with secondary debris.</p>Tue, 30 Apr 2013 17:49:11 UTChttp://area.autodesk.com/blogs/duncan/scene-files-from-my-maya-2014-unfold-presentationRevised Roman Candle scene with lightingDuncan Brinsmead<p>http://www.youtube.com/watch?v=-Eh-RnICXEw&amp;feature=plcp</p> <h4><strong><a href="/userdata/blogs/duncan/romanCandle_Lights.zip">Download Scenefile: romanCandle_Lights.ma</a></strong></h4> <p></p> <p>This scene is a version of the one in my <a href="/blogs/duncan/roman-candle-with-smoke">previous post</a>, but is modified so that the light emission from the particles is no longer faked using heat emission and diffusion on the fluid, but instead uses point lights positioned at the particle locations. &nbsp;This helps make the lighting of the smoke by the fireworks more natural. As well the scene has be refined somewhat and motionblur added. Mental ray was used, as the Maya sw render does not support motion blur on particles. Also an additional fluid was created for the flames and smoke coming out of the tube and ground geometry was added.</p> <p>One interesting observation I had while doing this is that the brightness of illumination of the balls on the smoke is so great that the smoke might look as if it is white, even though the actual color is a very dark grey. The smoke is so close to the light source that even though it is near black it will look white... in part because of it being night a longer exposure being simulated. As well the brightness is such that even very transparent fog will show up, but will disappear completely when not illuminated. If the smoke were white like steam then the transparency would need to be very high to avoid completely washing out. (this is assuming it is already thin enough that there is no significant self-shadowing)</p> <p>Ten point lights were created and an expression written that positions them at the locations of the first 10 particles in the simulation. The color of the lights is set to the color of the particles, and the decay set to quadratic, which is the natural decay for a point light source. &nbsp;If there were less than 10 particles at any given time, the expression sets the intensity on the unused lights to zero. The expression initially was written using a for loop and set the lights using a setAttr call, building the name string from the for loop increment variable. This keeps the expression relatively compact. Unfortunately in Mental Ray this evaluation did not trigger updates of the values on the lights, so I rewrote it to set the values of the lights explicitly, which makes the expression longer. Inside an expression the following syntax will create an actual node connection from the expression node to the attribute:</p> <p><em>lightShape1.colorR = 10</em></p> <p>while a setAttr call will not:</p> <p><em>setAttr lightShape1.colorR 10</em></p> <p>Unfortunately one cannot use a variable in the former syntax, thus one must explicitly do all the calls which makes this method somewhat impractical for a large number of particles. However it wasn't an issue for this simulation. Instead another workflow might be to use the original expression (see commented out section of expression2 in romanCandle_Lights.ma) that uses setAttr then bake out the expression to keyframes before rendering.</p> <p>I enabled raytrace shadows on the lights so that the box at the bottom would cast shadows on the ground, but other than that the shadows are not required. The smoke is thin enough it does not self-shadow. &nbsp;One can turn off shadows on the lights to speed up the rendering significantly. The rendering would only differ on the first few frames, where one can see the ground. The problem with all the lights having cast shadows on is that the fluid nodes fire shadow feelers for every sample in depth and this can be inefficient, especially if one has no need to see shadowing in the fluid volume. In particular there is a problem where in Mental Ray that both fluids and particles will self-shadow and cast shadows when raytraced shadows on a light are enabled, regardless of the cast/receive shadow settings on the shapes. As a result this scene renders much faster with the MayaSw renderer, but then there will be no motion blur on the particles.</p> <p><img src="/userdata/blogs/duncan/romanCandleLights5.31.jpg" width="640" height="480" /></p> <p>I wanted the flame and smoke fluid to be affected by the emitting particles, so I created a speed only emitter into the fluid from the particles. &nbsp;To prevent it from auto resizing to the full height of the particles resizeToEmitter was turned off on the fluid.</p> <p>Note that in order to properly render this scene with motion blur all the dynamic entities should be first cached. (motion blur computation does extra time evaluations &nbsp;that can create problems for non-cached dynamic simulations)</p>Mon, 12 Nov 2012 22:34:33 UTChttp://area.autodesk.com/blogs/duncan/revised-roman-candle-scene-with-lightingRoman Candle with SmokeDuncan Brinsmead<p>http://www.youtube.com/watch?v=ppC6NbZVT2Q&amp;feature=plcp</p> <h4><strong><a href="/userdata/blogs/duncan/romanCandle.zip">Download Scenefile: romanCandle.ma</a></strong></h4> <p><strong><br /></strong></p> <p>This example scene shows how one can do a realistic simulation of a roman candle including smoke. The roman candle has balls that are shot out of a tube, and as the balls burn up they shoot out glowing embers and smoke.</p> <h3>Burning Balls</h3> <p>First create a particle system for the main balls. One can start with "nParticle:create emitter" using the cloud preset. Make the emitter type a volume, the rate around 6, and along axis to around 15. (this speed assumes that units are roughly defining meters) &nbsp;AwayFromAxis and random direction can be used to keep all the particles from emitting straight up, but actually we probably want them mostly emitted up. The emitter can be scaled down to limit the region the particles are emitted from. On the particle system turn off "ignore solver gravity" (it defaults to on for the cloud preset). Set the lifespan mode ot constant and the lifespan to about 1.5. The particles should just start falling before they die. The drag can be zero or near zero as the balls are relatively dense.&nbsp;</p> <p>To simulate the random propulsive force acting on the balls resulting from non-uniform burning we can apply a volume axis field and use the turbulence settings. Make awayFromCenter zero and turbulence 1.0 and make turbulence speed 1.0, scaling up the field to cover the region the particles emit into. Turbulence frequency can be set to about 5,5,5 to make it more noisy. The particles should now diverge a bit from straight up but not too much. This effect is different from simply launching the particles in different directions.</p> <p>Set the particle radius to a good value, perhaps 0.05. &nbsp;The balls get smaller as they burn so we can set radius scale input to "normalized age" and edit the ramp to go smaller on the right. Opacity and Incandescence Input can also be set to "Normalized Age" and the ramps set to make the particle bright when burning then fading out before it dies. In this example I set the incandescence value high around 26 with a moderately saturated orangish hue (hsv = 22,0.8, 25.0). This roughly fakes the coloration that result from black body radiation of the hot particles. Because the color is not 100 saturated very high value levels become white, even though the hue is reddish orange. The color interpolates naturally to black going from white to yellow, orange then red.&nbsp;</p> <h3>Glow</h3> <p>We can then add glow. The glow is important because the particles are much brighter than the camera or display device can show. If it could then the glow would happen in our eyes and we would not need to add it. &nbsp;On the particle's shader "npCloudVolume" we can set the glowIntensity to something like 0.1. Then on the glow shader (shaderGlow1) set the quality to a high value (say, 100), as this is good for small point glow sources. Also turn off auto exposure as it will cause flickering. &nbsp;I found a glow spread of about 0.01 and a halo spread of 0.05 worked well with glow intensity around 1.3 and halo intensity of 2.0, but you will likely need to tweak these values. &nbsp;Note also that the glowThreshold can be raised such that one can have fully white particles that do not glow, while particles that are brighter than white will glow.</p> <h3>Embers</h3> <p>Now we can create the embers. Select the first particle system and do "nParticle:emit from object" and setup the particle system as for the balls, but with smaller particles and less intensity on the incandescence. A rate on the emitter of about 300 works OK with the emission speed at 0.4 and the particle lifespan set to about 1.3. &nbsp;These embers are smaller and have more drag to the end of their life, so make the drag something like &nbsp;0.1 and and the mass about 0.5. One can adjust the mass scale on the particle system so that the particles become lighter with age and thus fall more slowly due to the drag. Under emission attributes on the particle shape make the inherit factor about 0.3. This allows the embers &nbsp;to get some upward motion from the main balls before falling down under gravity.&nbsp;</p> <h3>Wind on Embers</h3> <p>To simulate a wind, select the embers particle system and create a wind field. On the wind field select the wind predefined setting, then make the magnitude about 100, speed 0.2 and attenuation 0.0.&nbsp;</p> <h3>Smoke</h3> <p>To create the smoke select the particle system for the balls and do "fluid: emit from object". Set the emitterType to Omni and the maxDistance to about 0.1 (or about the size of your particles). The rate will need to be high, about 1500, and motionStreak should be enabled. Also lower fluidDropoff to about 0.5. The fluid resolution should be high enough to capture the required detail, in my example I made size = 2,2,2 and baseResolution = 50. Set all boundaries to none so the fluid can more freely expand and set the autoResizeMargin to about 2. Make the transparency low but not zero. &nbsp;For more detailed smoke set highDetailSolve to allGrids and make velocity noise about 0.03.&nbsp;</p> <p>To create an illusion of illumination of the smoke by the particles I used a dynamic temperature grid on the fluid, combined with a very high diffusion of 2.0 along with a dissipation of about 1.0. With such a fast diffusion one needs very high temperature emission. I used a heat/Voxel/sec of 50.0. &nbsp;Then the brightness of the cloud can be set using the incandescence ramp. &nbsp;The temperature diffuses out from the emitting particles a bit like light emitting, although there is some lag. Better might be &nbsp;to use &nbsp;several point lights with fast decay and no shadowing. A mel script could be used to position this pool of lights(10 might be enough) to match living particles and match the light color to the particle incandescence.</p> <p>As well the temperature buoyancy and turbulence can add detail to the flow.&nbsp;</p> <h3>Wind on Smoke</h3> <p>One could use the dynamic relationship editor one to apply the previously created airfield to the fluid to push it with the wind. However it is hard to independently control the magnitude of this for the fluid. As well it will tend to accelerate the fluid velocity over time.&nbsp;</p> <p>&nbsp;Instead I applied a separate drag field to the fluid. The drag field works well with the fluid and we can use the inherit motion on the drag to create the wind. First we can animate the position of the drag field. In the attribute editor for the drag click in the translate X edit box and type "= time * 1.3". &nbsp;This trick creates and expression for that attribute. &nbsp;You can edit the expression( rightmouse over the edit box) and change the 1.3 to any desired speed for the wind. Make the attenuation zero so the drag affects everywhere equally and make InheritVelocity = 1.0, so the drag uses the animated position. The magnitude needs to be carefully set. Full drag occurs when the magnitude = framerate, for example 24.0. A value around 2 will nudge the fluid to move with the wind while allowing the fluid to flow with sub eddies. One can also add a very small amount of turbulence( on the fluid shape ) to make the flow more interesting.</p> <p></p> <p>Here is a render with the camera a bit closer</p> <p>http://www.youtube.com/watch?v=dS4ugWK9Uqk&amp;feature=plcp</p> <p></p> <p>Refinements of this scene with smoke ground and self illumination can be found <a href="/blogs/duncan/revised-roman-candle-scene-with-lighting">here</a>.</p>Tue, 06 Nov 2012 21:08:25 UTChttp://area.autodesk.com/blogs/duncan/roman-candle-with-smokeDynamic Jello SimulationDuncan Brinsmead<p>One can use nParticles to create a jiggling Jello substance that can be sliced using an nConstraint with breakable bonds. The workflow is relatively quick and easy.</p> <p></p> <p>http://www.youtube.com/watch?v=FmMYQgjhMo0&amp;feature=plcp</p> <h4><strong><a href="/userdata/blogs/duncan/jelloSlicer.zip">Download Scenefile: jelloSlicer.ma</a></strong></h4> <pre></pre> <p><strong><br /></strong></p> <p><strong>Step 1:</strong> Model a "mold" in the shape you want the Jello to be in and select it.</p> <p><img src="/userdata/blogs/duncan/jelloStep1.jpg" width="669" height="444" /></p> <p></p> <p><strong>Step 2:</strong> Fill the mold. Use the create nParticle fill method with close packing OFF and resolution high enough to be able to represent your shape well... somewhere around 60. Use the balls preset option on the create nParticle menu. Hide the mold when done.</p> <p><img src="/userdata/blogs/duncan/jelloStep2b.jpg" width="667" height="488" /></p> <p></p> <p><strong>Step 3:</strong> Select the particle system and create a Component to Component nConstraint.</p> <p><img src="/userdata/blogs/duncan/jelloStep3.jpg" width="666" height="490" /></p> <p></p> <p><strong>Step 4:</strong> Edit the constraint. Set the connectionMethod to "Within Max Distance" and make the max distance as low as possible while still producing connections. Be carefull because if it is high you will get an enormous number of connections and it will be slow. If it is set right you should see a cube lattice with no diagonal connections. Set the constraint strength to around 2.0 (lower if you want it to be more floppy). Note that this simulation relies in part on self collisions between particles. The links by themselves can make the jello pretty stiff without self collisions if the strength is high, however the collisions allow the jello to be incompressible(as fluids are). In the example file the self collisions are turned off and instead liquid simulation(enableLiquidSimulation) is used for this incompressibility. This can be faster than self collisions and also can behave more naturally. One needs to carefully set the liquidRadiusScale when doing this.</p> <p><img src="/userdata/blogs/duncan/jelloStep4.jpg" width="668" height="506" /></p> <p></p> <p><strong>Step 5:</strong> Enable "Use Plane" on the nucleus node and adjust the attribute "Space Scale" to match the proportions of your object.&nbsp;&nbsp;If you modelled in meters then leave it at 1.0 but if you modelled in cm. then the space scale needs to be set to 0.01 to match real world gravity. Note that for real world gravity at the scale of small objects the motion is very fast and thus one needs a high setting for substeps. The constraint strength may also need to be higher than 2 for a real world gravity setting. In the example scene file and video the space scale was left at 1.0 and the resulting gravity was weaker than in real life (for the scale of my mold) resulting in a slow motion simulation that only require substeps around 10. You can now play the simulation and see how it behaves. Note that rewind will be slow as the simulation recreates the constraint connections at the start frame, and this can be slow for max distance constraints when the number of particles is high.</p> <p><img src="/userdata/blogs/duncan/jelloStep5.jpg" width="665" height="482" /></p> <p></p> <p><strong>Step 6:</strong> Set Glue Strength on the nConstraint to allow the constraint bonds to break under stress. The exact setting is a bit finicky and depends on things like constraint strength, gravity and substeps. At any rate you want the glue strength to be just barely high enough that the jello does not fall apart under gravity.</p> <p></p> <p><strong>Step 7:</strong> Create a knife and cut the jello. The knife object could be a simple wedge shape. Select it and do nMesh: Create Passive Collide so that it will collide with the particles. You can then keyframe its position so it cuts the "jello". If the bonds don't break when cut then lower the glueStrength to the point that they do.</p> <p><img src="/userdata/blogs/duncan/jelloStep7.jpg" width="670" height="438" /></p> <p></p> <p><strong>Step 8:</strong> Cache the simulation. Once you have a simulation you like then select the particle system and do nCache:create new cache.</p> <p></p> <p><strong>Step 9:</strong> Create the jello mesh. Select the particle system and do "Modify: Convert: nParticle to Polygons". (note this enables intermediateObject on the particle shape, which hides the particles) A crude mesh will initially appear. This is because the triangle size default may be too large. Adjust the triangle size to get a good but not too detailed mesh. The quad mesh method with the meshSmoothing set to 3 can create nice clean meshes. Then adjust the blobby radius scale and the threshold to get a smooth mesh. &nbsp;It is easier to get a smooth mesh if the triangle size is as large as possible. For smaller triangle sizes one can still get a smooth mesh but the blobby radius scale and threshold values both need to be larger: one might need a threshold significantly greater than 1.0.</p> <p><img src="/userdata/blogs/duncan/jelloStep9.jpg" width="640" height="431" /></p> <p></p> <p><strong>Step 10:</strong> Assign your favorite jello shader and render. In this example scene I used caustics, &nbsp;final gather and full deformation motion blur. The raytrace refraction limits need to be fairly high. I used a red blinn shader with red transparency, raytrace refractions and a refractive index of 1.3. An miRefractionBlur setting of 0.8 helps make the internal refractions slighly blurry.</p> <p><img src="/userdata/blogs/duncan/jelloSlice.29.jpg" width="640" height="480" /></p>Wed, 31 Oct 2012 22:21:06 UTChttp://area.autodesk.com/blogs/duncan/dynamic-jello-simulationBoiling WaterDuncan Brinsmead<p><iframe height="385" src="http://www.youtube.com/embed/gz-mTQqesrU" frameborder="0" width="640" allowfullscreen=""></iframe></p> <p><a href="/userdata/fckdata/200/fluidBoil.zip">&nbsp;Download scene file fluidBoil.ma</a></p> <p>This scene file shows an easy set up for a relatively fast to simulate boiling water effect using Maya Fluids. Creating a convincing boiling transparent liquid can be problematic, because of the internal bubbles and the way they affect the surface. When each bubble comes to the top it needs to displace the liquid at the top of the surface then burst... not simply open up a hole. Also the larger bubbles are not simple spheres but can deform somewhat.</p> <p>The basic workflow show here is to create a 3D fluid, select the fishTank preset in the attribute editor, then flood fill the fluid to a density of 1 using the paint fluids tool. Create a bunch of poly spheres of random size and positions(I think it is generally better if the spheres are slightly squashed in y). Do poly combine to make it one mesh, then collide the fluid with them and animate the mesh to move upwards and press through the fluid. Finally hide this collision mesh as we only want to see the effect of the collision. Also increase the transparency on the fluid to see the internal bubbles.</p> <p>However simple linear motion of bubbles looks a bit unnatural, so this example scene I created two objects... one with bigger spheres and one with smaller. The smaller one is more slowly, as small bubbles do not rise as fast as big ones. The animation curve starts slowly then speeds up as the boil gets going. As well to make it look a bit less uniform I created a lattice deformer for the two bubble meshes. The lattice cvs were pulled such that the bubbles rise slowly at the bottom then speed up as they get towards the top of the fluid. The cvs were also slightly randomized to make the bubbles deform as they move through the lattice. Note that when testing the motion of the meshes one can disable the fluid evaluation temporarily to speedup playback.</p> <p><iframe height="385" src="http://www.youtube.com/embed/eNzn4pR2mgk" frameborder="0" width="640" allowfullscreen=""></iframe></p> <p>To make the water surface a bit more lively I lowered gravity on the fluid to 3.0. This makes this essentially a slow motion boiling, although it depends largely on the intended real world size of the fluid. The smaller the real world object the higher the gravity setting needed (one may also need more substeps for higher gravity settings or if the bubbles move faster).</p> <p>To better handle small bubbles I increased the fluid base resolution to 130, and also increased the substeps and solver quality a bit. I also increased the surfaceThreshold to 0.38, which better shows the small bubbles. However a problem I noticed in the final render is that this is now causing some parts of the fluid that the solver thinks is liquid to be rendered as air (this creates a wiggly look along the boundaries and some strange persistent bubbles in the fluid towards the end) I think one should be able to fix this by increasing the liquicMinDensity attribute a bit, but I've not yet tried it.</p> <p>To render the fluid I converted fluid to poly an assigned a blinn shader with transparency and refractions/reflection. A key to good water is the fresnel dropoff of reflectively with ray/surface angle. One can get this with the blinn shader using the specular rolloff attribute (this affects both specularity AND raytraced reflectivity). To keep specular highlights strong I make the specular Color value 4.0 then set the reflectivity to 0.25. (reflectivity is scaled by the specular color so in this case one needs to make it 0.25 or lower to keep it from effectively being greater than 1.0) On the fluid I used the Quad mesh method with smoothing iterations of 3. The quad mesh works well with poly smoothing. On the fluid output mesh I enabled smoothMeshPreview and set the previewDivisionLevels to 1 (2 would result in an excessive poly count).</p> <p>Note that in this scene I did not set an initial state on the fluid, but rather used an animated emitter so that I did not need to include a large initial state file with this tutorial. Thus there is no fluid until frame 2. To have fluid on the first frame one can simply play one frame, set initial state, then delete the emitter or set its rate to zero.</p> <p>A little motion blur might help this simulation, but will make it somewhat slower to render. To render with motionblur first cache the fluid (make sure to cache velocity on the fluid as this is required for the output velocity vectors used for motion blur on the mesh), then enable full deformation motion blur in the render settings.</p> <p>Instead of creating the bubble meshes by duplicating poly spheres and doing mesh combine iteratively(creating larger and larger groups) another technque might be to create an nParticle system, emit into it using a volume emitter, adjust radius and radius randomize, convert to poly, then duplicate the resulting mesh and delete the particle system. One could use emission overlap pruning to avoid overlap of the bubbles if desired. One might be tempted dynamically animate the particles and collide the fluid with the particle output mesh. However I think this will have problems because the output mesh continually changes topology, which will likely create a problem for the fluid nodes computation of the collision boundary velocity. Perhaps some day we will add a particle fluid collision that displaces bubbles.</p> <p>There is another trick one can use where particles emit heat into the fluid and the fluid has temperature pressure. This will create bubbles in the fluid where it is hot, but does not provide great results. However an advantage would be that the particles could also be pushed with the fluid flow. Yet another variation would be to make the bubble grids nCloth, in which case one can also push the cloth bubbles with the fluid flow by applying the fluid as a field on the nCloth. Self collision thickness and pressure can be used to keep the cloth bubbles from collapsing.</p>Mon, 12 Mar 2012 12:00:00 UTChttp://area.autodesk.com/blogs/duncan/boiling_waterTorpedo bubble trail with Maya FluidsDuncan Brinsmead<p><iframe height="385" src="http://www.youtube.com/embed/LIs9d0gVs5k" frameborder="0" width="640" allowfullscreen=""></iframe></p> <p><a href="/userdata/fckdata/200/torpedoLaunch.zip">torpedoLaunch.ma</a></p> <p>&nbsp;The trail of a torpedo is tricky to do because it combines fluid dynamics, surface and volume rendering as well as fog and light scattering. The technique used in the above Maya scene is to have one fluid that renders both as a volume and a surface mesh. The overall underwater fog was done with a second non-dynamic fluid.</p> <h3>Fluid Simulation</h3> <p>The first step was to create a 3d fluid with an emitter. The emitter was then modified to be a cylindrical volume that emits both density and speed( see &quot;fluidEmitter1&quot; in the scene). The speed emission simulates the thrust of the propeller using &quot;Along Axis&quot;, while a little bit of &quot;Around Axis&quot; simulates the rotational effect. Turbulence on the emitter is also used with a relatively fast speed setting. Fluid dropoff is disabled so emission is uniform within the volume. Motion streak is enabled so that as the torpedo moves the emission does not &nbsp;strobe or form bands. The translation of the emitter was then animated ( the torpedo was parented to the emitter, but one could easily have done it the other way round). To better handle high speed thrust the substeps on the fluid node was increased. (although in this case it probably would be OK with lower substeps than were used)</p> <p>Auto resize is enabled on the fluid to make things more efficient. All boundaries are set to &quot;None&quot; and the resize margin set to 2 to help keep boundaries from affecting the solve. High detail solve combined with density noise helps to provide detail in the flow without needing too high a fluid resolution. One then needs to do trial and error to determine good emission rate, density dissipation, density noise, and density buoyancy. I also added a little velocity noise.</p> <h3>Fluid Mesh</h3> <p>In order to get specular highlights I created a mesh from the fluid using &quot;Modify: Convert: Fluid To Polyons&quot;. This initially enables &quot;intermediateObject&quot; on the fluid shape node, which keeps it from rendering. However in this case the effect of the volume combined with the surface is desired so navigate to you fluid shape and turn off intermediate object to make it visible again. On the fluid you may wish to lower the mesh resolution to make things faster and keep the poly count low. &nbsp;Also the surface threshold on the fluid should be adjusted carefully for the best effect (which will depend on the transparency of your fluid). One needs to assign a shader with specular highlights that is totally or very transparent(&quot;blinn1&quot; in this scene). On the fluid shape you should &nbsp;enable visible in reflections/refractions in &nbsp;the render options(this is on by default for most other nodes, but is off on fluids for render speed). In order to add detail a volumeNoise bump map was applied .I would avoid enabling refractions on the shader as it is hard to integrate this well with the volume fluid render.&nbsp;</p> <h3>Bubble Shading</h3> <p>On the fluid selfShadow was enabled and realLights was turned off( is simpler and a bit faster to render ), using the internal direction light. The direction was set to ( 0,1,0 ) to model the overhead lighting. Ambient brightness was set quite high. One needs to carefully adjust the transparency along with shadow opacity, light and ambient brightness and color.</p> <h3>Underwater &quot;Fog&quot;</h3> <p>For the underwater fog effect I used a second, non-dynamic fluid (i.e. one with everything in contents methods set to OFF). I tried to get some of the scattered light effect off of the bubbles by creating a large fluid for the fog parented to the main bubble emitter. (see fluidShape2, under fluid1:fluidEmitter1) &nbsp; If you want to see this fluid you can set &quot;Shaded Display&quot; to &quot;As Render&quot; on fluidShape2. The color ramp input is set to center gradient and the color at the very center is light blue quickly falling off to dark blue. The transparency of this fluid is slightly tinted blue which is important for the colors of objects in the fog( in addition to the color ramp value). Opacity input is simply set to constant, with the right hand opacity ramp indice lowered to a desired opacity. Again real lights is turned off, and with shadows off there is no shadowing of this fluid. One might try using a stationary fog fluid illuminated by a moving light that has fast decay instead of moving it with the torpedo as was done in this scene. You could use the built in point light on the fluid or perhaps a linked linear light. Note that because this fluid was so large I needed to increase the shading quality on it to properly capture the color gradient. Otherwise the transparent outmesh of the fluid used for specular highlights became visible. This is because the integration of volume spans through the fluid is different &nbsp;for a single span than two spans( a transparent surface splits a span) when the shading quality is not high enough to fully resolve the shading inside the fluid. As with the bubble fluid, enable &quot;visible in refractions&quot;.</p> <p>To further fake the scattering of light from the bubbles into the water I added a tiny amount of shader glow on the bubble fluid. In general always turn off auto-exposure on the shaderGlow node(in hypershade) then hand adjust the glow and halo intensity... usually you need to lower them a lot. This avoid flicker during animation. As well set the shaderGlow quality to a high value( like 20).</p> <h3>Fire One!</h3> <p>&nbsp;Finally I added the sub and collided it with the bubble fluid (select sub and fluid then do &quot;fluid: make collide&quot;). In order to create a little blast in the tube at launch I animated the density pressure up for the first few frames. I also animated higher substeps to allow fast motion.</p> <h3>Possible Improvements</h3> <p>I just rendered this sequence without first caching the fluid, but it is safer generally to cache first then render and usually important if you are rendering on a farm.</p> <p>Something that might be nice to add might be a bit of depth of field, slightly blurring things in the distance. Motion blur would also help, but might not be needed if there was depth blurring.&nbsp;</p> <p>One might also add some floating particles for debris or fine bubbles and perhaps use the fluid as a field on the particles, setting conserve near zero on the particle shape. Use cloud type particles for better render integration with the fluids. Note that in some cases to get good render integration of the particles with the fluids you may need to enable &quot;Volume Samples Override&quot; and set volume samples on the fluid shapes.&nbsp;</p> <p>Perhaps using real lights and incorporating a directional light with raytraced shadows could also help: At launch it is noticable that the fluid is bright inside the launch tube, where it should be shadowed by the sub. If you need to use many lights it is a good idea to link lights to your fluid, as many lights will wash out the shading if they don't have raytraced shadows, or be slow to render if they do.</p>Tue, 21 Feb 2012 12:00:00 UTChttp://area.autodesk.com/blogs/duncan/torpedo_bubble_trail_with_maya_fluidsFractal Fantasy (1987)Duncan Brinsmead<p><iframe height="315" src="http://www.youtube.com/embed/mFTeDcJxuXs" frameborder="0" width="420" iframe="" allowfullscreen=""></p> </body></html></iframe></p> <p>I just noticed that someone uploaded to YouTube an old animation I did for Siggraph way back in 1987. It is nice for me to see, as my own copy (on tape) had degraded to the point it was virtually unviewable.</p> <p>At the time my wife was getting her Phd at Princeton and this gave me access to a brand new lab filled with the first generation SGI Iris computers. No classes were yet using the lab so I had it pretty much to myself. There was no animation software, however, so I had to write my own, as well as write drivers for the expensive frame at a time video recorder (which broke as a result of recording this animation). The animation was all hardware drawn with an early version of GL. Rather than saving images to files, which would have been a lot of memory for a full animation in those days, each frame was hardware drawn then captured on video. The video recorder had to pause a minute or so while the frame was rendered then do a preroll to capture it, something that is rather hard on the machine when doing it for days at a time.There was no hardware texturing back then (I'm not even sure if specular shading was available). In the simple animation system I wrote everything was generated by a script that would invoke procedures to draw objects. There&nbsp;was no UI and&nbsp;no animation curves but rather sequences of ease-in, ease out statements written to a script.</p> <p>I was really into programming recursive procedures and was very excited about the new ability to explore 3D mathematical patterns using computer animation. The video shows a Menger sponge, which has zero volume at the limit( it is nothing but holes&nbsp;) and infinite surface area, along with related structures.&nbsp; As well there are some animated&nbsp;spirograph shapes inspired by the pioneering work of John Whitney Sr. who developed the field of visual music.</p> <p>As I was leaving the lab had just gotten copies of the very first Alias system, and I was quite impressed with the quality of the software rendering, texturing and the nurbs surfacing, although I could not have done this animation with that system. Little did I know at the time that I would go on to work at Alias a few years later.</p> <p>&nbsp;</p>Fri, 20 Jan 2012 12:00:00 UTChttp://area.autodesk.com/blogs/duncan/fractal_fantasy_1987nCloth ChainDuncan Brinsmead<p>The following file shows a method for an nCloth chain that is relatively efficient and captures the correct behavior of chain links.<br /> <a href="http://area.autodesk.com/userdata/fckdata/200/file/nClothChain.zip">area.autodesk.com/userdata/fckdata/200/file/nClothChain.zip</a></p> <p><img alt="" width="1097" height="704" src="/userdata/fckdata/nclothchain_01.jpg" /></p> <p>Basically the technique is to create links as simple cube shapes with two missing faces( each link has only 4 faces ). The links are combined into two meshes... one for odd links the other for even, and the result made into two nCloth meshes. Note that it is important before making nCloth to select the faces and to createUV: automatic projection so each vertex has a unique UV... the last step requires this even though one will not render the cloth mesh. The cloth needs high stretch and bend resistance values as well as higher substeps. The collision thickness should be set to about the thickness of the chain. The last step is to attach your chain links, which may have as high a poly count as is desired, to the simple nCloth links. First get the parentToSurface script I wrote and put in your scripts diretory:</p> <p><a href="http://area.autodesk.com/blogs/duncan/parent_to_surface_script">area.autodesk.com/blogs/duncan/parent_to_surface_script</a><br /> &nbsp;</p> <p>Position these links in the correct position, select them followed by the nCloth and type:<br /> parentToSurface</p> <p>Do this for each of the 2 cloth nodes. They should now follow the motion of the nCloth, which may then be hidden.</p> <p>The same technique could be used for the central plate object, which could be a single nCloth face that has component to component constraints with the chain nCloths. Use bend/stretch/compression resistance for everything and avoid the nCloth rigidity.</p> <p><img alt="" width="434" height="640" src="/userdata/fckdata/nclothchain_02(1).jpg" />&nbsp;</p> <p><object type="application/x-shockwave-flash" height="580" width="760" data="/player/loader.swf?p=/player/main.swf&amp;f=/userdata/fckdata/200/flash/chains.flv"> <param value="true" name="allowFullScreen" /> <param value="transparent" name="wmode" /> <param value="/player/loader.swf?p=/player/main.swf&amp;f=/userdata/fckdata/200/flash/chains.flv" name="movie" /></object></p> <p>For a faster chain&nbsp; with an easier workflow: Create a long&nbsp;and skinny plane with about the same number of polys as the number of chain links then make it nCloth and use parentToSurface to attach your chain link objects to the cloth strip. The cloth settings should have high stretch resistance, little or zero bend resistance, a thick collision width and low compression resistance. If the initial position of the cloth has the links not fully taught then one can increase the rest length scale on the cloth a little. Increase mass for minimal drag effect and make stretchDamp zero so the chain is bouncy. I turned off crosslinks on the cloth as well so that the cloth could shear. (making the cloth skinnier would have done much the same thing, but then it could twist more easily as well, which might not be desired)&nbsp; There is currently a problem with the&nbsp;normal direction for&nbsp;the follicles that can be solved by doing a poly subdivide on the output cloth mesh.</p> <p><a href="http://area.autodesk.com/userdata/fckdata/200/file/nClothChainFast.zip">area.autodesk.com/userdata/fckdata/200/file/nClothChainFast.zip</a></p> <p>This is not as accurate as the first method but does not require as high substeps and collide iterations. One can do a lot of chains with this method and still keep things interactive. <br /> &nbsp;<img alt="" src="/userdata/fckdata/nclothchain_03.jpg" /></p> <p><object type="application/x-shockwave-flash" height="580" width="760" data="/player/loader.swf?p=/player/main.swf&amp;f=/userdata/fckdata/200/flash/chainsfast.flv"> <param value="true" name="allowFullScreen" /> <param value="transparent" name="wmode" /> <param value="/player/loader.swf?p=/player/main.swf&amp;f=/userdata/fckdata/200/flash/chainsfast.flv" name="movie" /></object>&nbsp;</p>Fri, 26 Aug 2011 12:00:00 UTChttp://area.autodesk.com/blogs/duncan/ncloth_chainSimplicity to ComplexityDuncan Brinsmead<p><img alt="" align="middle" style="width: 828px; height: 512px" src="/userdata/fckdata/200/image/simplicity/dodecaFlat.jpeg" /></p> <h1 style="text-align: center">Simplicity to&nbsp;Complexity</h1> <p>I have put together a talk on emergent phenomena in Maya for Siggraph that one can currently view on the area:</p> <p><a href="http://area.autodesk.com/siggraph2011/demos/simplicity1?KeepThis=true&amp;TB_iframe=true&amp;height=525&amp;width=650">Simplicity&nbsp;to Complexity (part 1)</a></p> <p><a href="http://area.autodesk.com/siggraph2011/demos/simplicity2">Simplicity to Complexity (part 2)</a></p> <p>I've included some of the scenefiles and scripts used below.</p> <p>&nbsp;</p> <h2>Reflection Fractals</h2> <p>One can create complex renders from very simple scenes using raytraced reflections. Here are some examples from my presentation. The scenefiles for these are included below. Much of the work is to get good specular color values. In some cases values greater than 1 are useful where one can increase brightness each bounce rather than simply always getting darker.</p> <p>&nbsp;</p> <p>&nbsp;<a href="/userdata/fckdata/200/image/simplicity/reflectionSphereTetra7Large.jpeg"><img alt="" align="middle" width="640" height="480" src="/userdata/fckdata/200/image/simplicity/reflectionSphereTetra7.jpeg" /></a></p> <p style="text-align: center">Sphere inside tetrahedron (click to enlarge)<br /> &nbsp;</p> <p style="text-align: center">&nbsp;</p> <p style="text-align: center">&nbsp;</p> <p><a href="/userdata/fckdata/200/image/simplicity/reflection2Sphere3.jpeg"><img alt="" width="640" height="370" src="/userdata/fckdata/200/image/simplicity/reflection2Sphere3Small.jpeg" /></a></p> <p style="text-align: center">Sphere inside sphere (click to enlarge)<br /> &nbsp;</p> <p style="text-align: center">&nbsp;</p> <p><img alt="" width="640" height="410" src="/userdata/fckdata/200/image/simplicity/tetraSphereSetup.jpeg" /></p> <p style="text-align: center">Setup used for tetraSphere (below)<br /> &nbsp;</p> <p style="text-align: center">&nbsp;</p> <p><a href="/userdata/fckdata/200/image/simplicity/tetraSphere.jpeg"><img alt="" width="640" height="410" src="/userdata/fckdata/200/image/simplicity/tetraSphereSmall.jpeg" /></a></p> <p style="text-align: center">tetraSphere (click to enlarge)</p> <p>&nbsp;</p> <p>&nbsp;</p> <p><a href="/userdata/fckdata/200/image/simplicity/quadSphere17.jpg"><img alt="" width="640" height="410" src="/userdata/fckdata/200/image/simplicity/quadSphere17Small.jpeg" /></a></p> <p style="text-align: center">Four spheres at cube vertices inside cube with 3 cylinders</p> <p>&nbsp;</p> <h3>Dynamic&nbsp;Soap Bubble&nbsp;Film</h3> <p><img alt="" width="640" height="480" src="/userdata/fckdata/200/image/simplicity/soapBubbleFilm.jpg" /></p> <p>One can easily simulate the effect of swirling colors on a soap bubble film with a 2d fluid texture. By controlling specular color with texture density one can also simulate the way variation in film thickness results in rainbow colors due to constructive and destructive interference of light from reflections from the inner and outer membrane. (scene file included below)</p> <h3> <p>&nbsp;</p> </h3> <h3>Obital Debris Chain Reaction</h3> <p>&nbsp;<img alt="" width="602" height="442" src="/userdata/fckdata/200/image/obitalDebris.jpg" /></p> <p>The Kessler Syndrome is an effect where collisions between orbiting debris can cause a runaway chain reaction where in the end all bodies are broken into fine debris and it becomes impossible for man to launch into space. This is simulated here with colliding nParticle systems.&nbsp;(scene included below)</p> <p>&nbsp;</p> <h3>MakeLoopy MEL Script</h3> <p><img alt="" width="777" height="537" src="/userdata/fckdata/200/image/simplicity/makeLoopy.jpg" /></p> <p style="text-align: center">MakeLoopy applied to a poly torus with smoothing applied.</p> <p>MakeLoopy is a fun little script that can generate random tubes using the bridge tool. Put makeLoopy.mel in your scripts folder. Then select an object(s) and type makeLoopy with a desired number of iterations, for example &quot;makeLoopy 20&quot;. It will then run the bridge tool on random pairs of faces. The result looks best when smoothing the mesh&nbsp;(3 key).</p> <p>&nbsp;</p> <p>&nbsp;</p> <h3><a class=" FCK__AnchorC FCK__AnchorC FCK__AnchorC FCK__AnchorC FCK__AnchorC FCK__AnchorC FCK__AnchorC FCK__AnchorC FCK__AnchorC" name="downloads">DOWNLOADS</a></h3> <p>Many of the scenefiles from my talk are included here. The mandelbrot ones are all available in the previous Mandelbrot Madness post.</p> <h4>Scenefiles</h4> <p><a href="/userdata/fckdata/200/complexityScenes.zip">complexity.zip</a></p> <p><a href="/userdata/fckdata/200/file/complexityScenes2.zip">complexity2.zip</a></p> <h5>Scripts</h5> <p><a href="/userdata/fckdata/200/file/makeLoopy.zip">makeLoopy.zip</a></p> <p>&nbsp;</p>Sun, 14 Aug 2011 12:00:00 UTChttp://area.autodesk.com/blogs/duncan/simplicity_to_complexityMandel-Maya Madness!Duncan Brinsmead<p><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaBoolSphere.jpeg"><img alt="" width="770" height="770" src="/userdata/fckdata/200/image/mandelmaya/juliaBoolSphere.jpg" /></a>&nbsp;</p> <p style="text-align: center;"><span style="font-size: small;"><span style="font-family: Arial;">3D Julia set with pickover stalks rendered with a custom Maya fluid render</span></span></p> <p><strong>***Note that everything shown here is now in Maya(as of 2013). For the 3D effects create a 3d fluid container, then on the fluid shape set the texture type to Mandelbrot to see all the available attributes. A good starting point would be to use a preset (in the attribute editor for the fluid) such as "mandelboxColor". Also there are now 2d and 3d mandelbrot textures in Maya that also have mandelbox attributes and controls for things like stalks.</strong></p> <p><strong><span style="font-size: x-large;"><span style="font-family: Arial;"><br /></span></span></strong></p> <p><strong><span style="font-size: x-large;"><span style="font-family: Arial;">Emergence</span></span></strong><span style="font-size: medium;"><span style="font-family: Arial;"> is a fascinating phenomenon where complexity can emerge through iteration of simple rules or processes. One of the most dramatic illustrations of emergence is the Mandelbrot set where seemingly endless structure and detail arise when iterating on a very simple equation:</span></span></p> <p><span style="font-size: x-large;"><strong>z<sub>n+1</sub> = z<sub>n</sub><sup>2</sup> + c</strong></span></p> <p><span style="font-size: medium;">I had a little fun and implemented a Mandelbrot texture totally inside a MEL expression. This allows one to easily play with it and potentially render it in a variety of fashions. The speed is much slower than if it were instead a plugin texture written in C, but for my purposes it was fast enough.</span></p> <p><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelCircleSmooth.jpeg"><span style="font-size: x-small;"><img alt="" width="770" height="770" src="/userdata/fckdata/200/image/mandelmaya/mandelCircleSmooth.jpg" /></span></a></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: medium;">&nbsp;I also implemented a 3d form of the Mandebrot set called a <strong>mandelbulb</strong>.<br /> </span><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelBulb.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/mandelBulb.jpg" /></span></a></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: medium;">As well I implemented a very different form dubbed the <strong>mandelbox</strong>.</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelBox.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/mandelBox.jpg" /></span></a></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: medium;">These could not be done as simple MEL scripts, however. I created an alternate internal texture on the fluid node for these, as they are best done as volume renders. Unfortunately this code is in my own build of Maya so for the mandelbulb and box I can only share pictures. However the following software is great for exploring the mandelbox:&nbsp;</span><a target="_blank" href="http://www.ms.mff.cuni.cz/~kadlj3am/big/boxplorer/"><span style="font-size: medium;">www.ms.mff.cuni.cz/~kadlj3am/big/boxplorer/</span></a></p> <p><span style="font-size: medium;">Also check out </span><a href="http://www.fractalforums.com"><span style="font-size: medium;">www.fractalforums.com</span></a><span style="font-size: medium;"> which is full of great info on generating these structures.</span></p> <p>&nbsp;</p> <p><span style="font-size: x-large;"><strong>2D</strong> Mandelbrot sets&nbsp;using a Mel&nbsp;expression</span></p> <p><span style="font-size: medium;">To see the basic Mandelbrot script in action load the scene <strong>mandelbrotDemo.ma</strong></span><span style="color: #ffff00;"><span style="font-size: medium;"><strong> </strong></span><span style="font-size: x-small;"><em>(download scenes at bottom of this post).<br /> <br /> </em></span></span><span style="font-size: x-small;"><img alt="" width="770" height="461" src="/userdata/fckdata/200/image/mandel/mandeldemo(1).jpg" /></span></p> <p><span style="font-size: medium;">One can track and zoom the camera to look at different parts of the fractal and do a full render when you have a view you like. To edit the colors look at the texture ramp1. The Mandelbrot expression is used to set the vCoordinate on the ramp texture( more accurately&hellip; on its placement node, which lets one repeat the ramp by increasing the vRepeat). To see the script first open the expression editor:<br /> <br /> &ldquo;<strong>Window: Animation Editors: Expression Editor</strong>&rdquo;<br /> <br /> And do &ldquo;<strong>Select Filter: By Expression Name</strong>&rdquo;.<br /> <br /> <strong>Expression1</strong> implements the Mandelbrot texture and expression2 resizes and moves the plane to fit the camera view. The Mandelbrot expression uses u and vCoord from a sampler info node to get the uv of the current point being rendered. It then scales this based on the current zoom and offset. The expression then sets the<strong> vCoord</strong> of the ramp&rsquo;s <strong>place2dtexture</strong> node.<br /> <br /> Note that texturing with a MEL expression will only work with the Maya sw renderer (and hardware ), but not Mental Ray, as Mental Ray does not evaluate MEL expressions( per frame expressions are evaluated before data is passed to mental ray, which can&rsquo;t be done in the case of per pixel ones). If needed one could bake the texture to a high resolution file texture, which could then be rendered in any renderer.<br /> <br /> To have a little fun try uncommenting the commented out lines in expression1 (remove all the &ldquo;//&rdquo;) then remove the line:<br /> <br /> <strong>float $val = $i/10.0;<br /> </strong><br /> Then hit the &ldquo;edit&rdquo; button. The fractal will now show in a different form that is based on the minimum radius with the iterations. Unlike the standard form which colors based on the total number of iterations and is stepped, this method is continuous and yields nice gradations, as well as interesting almost 3d looking shapes. This technique uses the minimum radius or minZ to shade with.</span></p> <p><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelMinZ5.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelMinZ5_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelMinZ2.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelMinZ2_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelMinZ4.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelMinZ4_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelMinZ7.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelMinZ7_thmb.jpg" /></span></a><span style="font-size: x-small;"><br /> </span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelMinZMix4.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelMinZMix4_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelMinZMix6.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelMinZMix6_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelMinZMix8.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelMinZMix8_thmb.jpg" /><br /> </span></a></p> <p><span style="font-size: medium;">I&rsquo;ve included scene files for each of the images generated here (outside of the 3D ones). You can load them and check out expression1 to see the math used for each case.<br /> <br /> An interesting variation I stumbled upon creates a leaf-like effect. Instead of using the standard escape radius:<br /> <br /> <strong>R= zu2+zv2<br /> </strong><br /> I use:<br /> <br /> <strong>R = abs( zu2-zv2 )</strong></span></p> <p><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelLeaves3.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelLeaves3_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelLeaves2.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelLeaves2_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelLeavesVar1.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelLeavesVar1_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelLeavesVar3d.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelLeavesVar3d_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelLeavesVar3e.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelLeavesVar3e_thmb.jpg" /></span></a></p> <p><span style="font-size: medium;">A Mandelbrot set consists of all possible Julia sets. The Julia set has 2 variables that control its shape. With the Mandelbrot set one is basically setting these variables to the uv position in the plane. If one instead sets constant values for these two variables then one can render the Julia sets. The minimum radius technique creates interesting effects with Julia sets.<br /> <br /> <strong>Pickover stalks</strong> is another interesting technique where one uses the closest distance of the escape path to the x and y axis:<br /> </span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelLines.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/mandelLines.jpg" /><br /> <br /> </span></a><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelLines2.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/mandelLines2.jpg" /><br /> <br /> </span></a><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelLineSmooth.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/mandelLineSmooth.jpg" /></span></a><span style="font-size: x-small;"><br type="_moz" /> <br /> &nbsp;</span></p> <p><span style="font-size: medium;">&nbsp;I found that a modified Pickover stalks method could create interesting effects with Julia sets, creating twisty, almost 3D rope effects.<br /> </span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaStalks.jpeg"><span style="font-size: x-small;"><img alt="" width="770" height="770" src="/userdata/fckdata/200/image/mandelmaya/juliaStalks.jpg" /><br /> <br /> </span></a><span style="font-size: x-small;"><br /> </span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaStalks3.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/juliaStalks3.jpg" /><br /> <br /> </span></a><span style="font-size: x-small;"><br /> </span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaStalks4.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/juliaStalks4.jpg" /></span></a><span style="font-size: x-small;"><br /> <br /> <br /> &nbsp;</span></p> <p><span style="font-size: medium;">Instead of looking at the distance to the xy axis we can look at the distance to a circle which yields the following effect:</span></p> <p><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelCircles2.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelCircleSmooth5_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelCircleSmooth.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelCircles2_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelCircleSmooth3.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelCircleSmooth_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelCircleSmooth4.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelCircleSmooth3_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelCircleSmooth5.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelCircleSmooth4_thmb.jpg" /><br /> </span></a><span style="font-size: x-small;"><br /> &nbsp;</span></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: large;"><strong>Particle system Buddhabrot</strong><br /> </span><span style="font-size: medium;">A different method of visualizing this set is the so called buddhabrot. <br /> <br /> </span><a target="_blank" href="http://en.wikipedia.org/wiki/Buddhabrot"><span style="font-size: medium;">http://en.wikipedia.org/wiki/Buddhabrot</span></a><span style="font-size: medium;"><br /> <br /> Open the scene buddhaBrot.ma and do a playback. The expression now generates particles instead of being used as a texture.<br /> &nbsp;</span></p> <p><span style="font-size: medium;"><br /> <span style="font-size: large;"><strong>Escape Paths as Maya Curves</strong><br /> </span>The Mandelbrot function starts with a point in the complex plane and iterates on it until it either goes beyond a certain radius( where it then goes off to infinity ), or it exceeds a max iteration count. One can track the trajectory of these points and turn them into lines. To see these load the scene <strong>MandelbrotEscapePaths.ma</strong>. Expression1 was used to generate the curves shown in this scene and is commented out to avoid regenerating curves on top of curves. (<em>It would make more sense for this to be a script that one calls rather than an expression</em>) You can select the individual curves to see the shape of particular escape paths. This is like the buddhabrot, but the points are connected into lines rather than being drawn as dots&hellip; I&rsquo;m sure someone else has done this but I&rsquo;ve not seen the escape paths represented this way before. It is reminiscent of particles trapped in a magnetic field (like particle accelerator collisions).</span></p> <p><span style="font-size: x-small;"><img alt="" width="770" height="461" src="/userdata/fckdata/200/image/mandelmaya/curveselect.jpg" /><br /> <br /> &nbsp;</span></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: large;"><strong>Mandelbulb rendered with Maya Fluids</strong><br /> </span><span style="font-size: medium;">The mandelbulb use a technique for creating the set in a polar coordinate form. This allows one to easily vary the power of the Mandelbrot function. Higher powers create more lobes and in 3D the higher power versions of the set tend to look more interesting.<br type="_moz" /> </span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelBulb3.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/mandelBulb2.jpg" /><br /> </span></a><span style="font-size: x-small;"><br /> </span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelBulb3.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/mandelBulb3.jpg" /></span></a><span style="font-size: x-small;"><br /> <br /> &nbsp;</span><span style="font-size: x-small;"><em>Note once again that these mandelbulb renders are with my own custom maya cut(currently not available to users). </em></span></p> <p><span style="font-size: medium;"><em><br /> </em>One can also do a Julia set version of the mandelbulb, which is somewhat simpler and less cluttered.</span></p> <p><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaBulb1.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/juliaBulb1_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaBulb2.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/juliaBulb2_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaBulb3.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/juliaBulb3_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaBulb3g.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/juliaBulb3g_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;<br /> </span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaBulb3h.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/juliaBulb3h_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaBulb4b.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/juliaBulb4b_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaGlass.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/juliaGlass_thmb.jpg" /></span></a></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: medium;">The Pickover stalks method also creates interesting, hairy effects with 3d Julia sets.</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/juliaMinMax.jpeg"><span style="font-size: x-small;"><img alt="" width="770" height="770" src="/userdata/fckdata/200/image/mandelmaya/juliaMinMax.jpg" /></span></a></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: medium;">I used the same polar form to create higher power 2d versions of the set which I find are quite interesting. <br /> Here are some images in a 3 lobed form (the standard power 2 set has 1 lobe):</span></p> <p><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandel3Lobe.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandel3Lobe_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandel3Lobe4.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandel3Lobe4_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandel3Lobe7.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandel3Lobe7_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandel3Lobe8.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandel3Lobe8_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandel3Lobe9.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandel3Lobe9_thmb.jpg" /></span></a></p> <p><span style="font-size: medium;">And the following has <strong>5</strong> lobes:<br /> </span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandel5Lobe1.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/mandel5Lobe1.jpg" /></span></a></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: large;"><strong>The MandelBox</strong><br /> </span><span style="font-size: medium;">The mandelbox uses a system of folding space that results in a complex 3D shape with very interesting structure that looks manmade, as opposed to the more organic looking mandelbulb.<br /> </span><span style="font-size: x-small;"><br /> </span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelBox15.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/mandelBox15.jpg" /></span></a><span style="font-size: x-small;"><br /> </span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelBox3.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelBox3_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelBox6.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelBox6_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelBox8.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelBox8_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelBox9.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelBox9_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelBox10.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelBox10_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelBox14.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelBox14_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: large;"><strong>Mixing the Mandelbox with the Mandelbrot set</strong><br /> </span><span style="font-size: medium;">For fun I tried combining it with the Mandelbrot set. The result in 3d was not that interesting but I noticed an intriguing 2d pattern in the cross-section.<br /> </span><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelMandelBox3.jpeg"><span style="font-size: x-small;"><img alt="" src="/userdata/fckdata/200/image/mandelmaya/mandelMandelBox3.jpg" /></span></a></p> <p><span style="font-size: medium;">So I isolated this part into a separate 2d Mandelbrot which I call it the mandelfold. It has symmetry with 9 main sets where 5 are 1 lobed and 4 are 3 lobed.&nbsp;<br /> </span><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelFold14.jpeg"><span style="font-size: x-small;"><img alt="" width="770" height="770" src="/userdata/fckdata/200/image/mandelmaya/mandelFold14.jpg" /></span></a></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: medium;">One can vary a couple of parameters that basically affect the interaction of these different sets, which can be used to create a wide range of images</span><span style="font-size: x-small;">.</span></p> <p><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelFold5.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelFold5_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelFold12.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelFold12_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelFold24.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelFold24_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelFold25.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelFold25_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelFold25b.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelFold25b_thmb.jpg" /></span></a><span style="font-size: x-small;">&nbsp;</span><a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,status'); return false" href="/userdata/fckdata/200/image/mandel/mandelFold25d.jpeg"><span style="font-size: x-small;"><img alt="" width="110" height="110" src="/userdata/fckdata/200/image/mandelmaya/mandelFold25d_thmb.jpg" /></span></a></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="font-size: medium;">Here is an animation created by varying the parameters.</span></p> <p><span style="font-size: x-small;"><object type="application/x-shockwave-flash" data="/player/loader.swf?p=/player/main.swf&amp;f=/userdata/fckdata/200/flash/mandelFoldAnim.flv" width="760" height="580"><param value="true" name="allowFullScreen" /><param value="transparent" name="wmode" /><param value="/player/loader.swf?p=/player/main.swf&amp;f=/userdata/fckdata/200/flash/mandelFoldAnim.flv" name="movie" /></object></span></p> <p><span style="font-size: x-small;">&nbsp;</span></p> <p><span style="color: #fec500;"><span style="font-size: large;"><strong><a class=" FCK__AnchorC" name="downloads"></a><span style="font-size: x-small;">DOWNLOADS</span></strong></span></span><span style="font-size: x-small;"><br /> You can find additional images at full resolution, along with all images in this entry (also in full resolution), in the zipped files below. These zips are not part of a giant zipped file, you can unpack them individually. Scene files are also available for download.</span></p> <p><a href="/userdata/fckdata/200/file/mandel1.zip"><span style="font-size: x-small;">userdata/fckdata/200/file/mandel1.zip</span></a><span style="font-size: x-small;">&nbsp;<br /> </span><a href="/userdata/fckdata/200/file/mandel2.zip"><span style="font-size: x-small;">userdata/fckdata/200/file/mandel2.zip<br /> </span></a><a href="/userdata/fckdata/200/file/mandel3.zip"><span style="font-size: x-small;">userdata/fckdata/200/file/mandel3.zip<br /> </span></a><a href="/userdata/fckdata/200/file/mandel4.zip"><span style="font-size: x-small;">userdata/fckdata/200/file/mandel4.zip<br /> </span></a><a href="/userdata/fckdata/200/file/mandel5.zip"><span style="font-size: x-small;">userdata/fckdata/200/file/mandel5.zip<br /> </span></a><a href="/userdata/fckdata/200/file/mandel6.zip"><span style="font-size: x-small;">userdata/fckdata/200/file/mandel6.zip<br /> </span></a><a href="/userdata/fckdata/200/file/mandel7.zip"><span style="font-size: x-small;">userdata/fckdata/200/file/mandel7.zip</span></a><span style="font-size: x-small;"><br /> &nbsp;</span></p> <p><span style="font-size: x-small;"><strong>Download Scenes</strong><br /> </span><a href="/userdata/fckdata/200/file/scenes.zip"><span style="font-size: x-small;">userdata/fckdata/200/file/scenes.zip</span></a></p> <p><span style="font-size: x-small;">Scenefiles are included for all the 2D renders. One can look at the expressions in each scene to play with the&nbsp;math used&nbsp;or further explore those examples<em>. (The&nbsp;3D versions are not currently available because those used a custom build of Maya where the mandelbox and mandelbulb were&nbsp;implemented as internal fluid shader textures)<br /> </em>&nbsp;</span></p>Sat, 06 Aug 2011 12:00:00 UTChttp://area.autodesk.com/blogs/duncan/mandel_maya_madnessWaterfall using fluids and nParticlesDuncan Brinsmead<p><img height="905" alt="" width="668" src="/userdata/fckdata/200/image/falls.jpg" /></p> <p>Here is an example scene file showing how one can use particle emission into a fluid for a natural looking waterfall effect.</p> <p><a href="/userdata/fckdata/200/file/fluidParticleFalls.zip">fluidParticleFalls.zip</a></p> <p>In this case the particles simply fall under gravity and collide and bounce with objects. They emit into a fluid which has high density dissipation. The self shadowing of the fluid is important for the look of the render, and this scene also uses ambient diffusion to help provide detail in the shadowed regions. For efficiency auto resize was also enabled for the fluid. The particle system rendering was disabled by turn on &quot;intermediate object&quot; on the particle shape.&nbsp;This way the fluid handles all the water shading, and as a result it also needs to be fairly high resolution to get good detail in the flow.</p> <p>Here are some general rough steps to set this up:</p> <p>1. Create an nParticle emitter. Use the <strong>&quot;balls&quot;</strong> preset and make the emitter a volume cube shape.&nbsp; Scale the emitter to fit the top of the water fall and edit the emitter speed to push the particles over the edge.</p> <p>2. Select any geometry you wish to collide with the particles and do <strong>&quot;nMesh: create passive collider&quot;</strong>.</p> <p>3. Create a 3d fluid container. Turn on <strong>auto resize</strong> on the fluid, as well as self shadowing. Because this is an auto resize fluid the resolution is a result of the scale of the fluid relative to the particle system, so one can get higher resolution by simply scaling down the fluid.</p> <p>4. Select the fluid and the particle system and do <strong>fluid:emitFromObject</strong>. Make the fluid emitter type <strong>&quot;omni&quot;</strong>&nbsp;(this does not affect emission with particle emitters, but it ungreys the maxDistance attribute) then set the <strong>maxDistance </strong>attribute to your desired particle size. (this will be better if it is larger than the size of a voxel in your fluid)&nbsp;</p> <p>5. On the emitter enable motion streak and make the <strong>speed method</strong> <strong>&quot;replace&quot;</strong>&nbsp;. Make <strong>&quot;inherit velocity&quot;</strong> around 1 or 2. This causes the particles to also push on the fluid as they fall through it.</p> <p>6. On the fluid make <strong>density dissipation around 1.0</strong>. The dissipation is pretty critical to the overall effect. You may also wish to have the density buoyancy negative. Turning on high detail solve will help to preserve detail in the flow.</p> <p>7.&nbsp;&nbsp;Make the fluid&nbsp;<strong>auto resize threshold 0.0</strong>. You can later experiment with raising it slightly to keep the fluid bounds tighter, but be careful because if it is higher than the particle density emission per step it can cause artifacts in the flow.</p> <p>8. For good shading make the transparency of the fluid very low and adjust ambient brightness to taste (note that ambient diffusion requires mental ray, it is not supported in the maya software renderer) Also ambient diffusion did not render properly with auto resize in the 2011 gold release( check for future hot fixes that may fix this issue&nbsp;).</p> <p>Note that care should be taken to limit the range of the particles to avoid making the fluid grow too large. One can either kill stray particles, limit their lifespan or bound them with collisions.</p> <p>&nbsp;</p> <p>&nbsp;<object width="760" type="application/x-shockwave-flash" data="/player/loader.swf?p=/player/main.swf&amp;f=/userdata/fckdata/200/flash/fluidParticleFalls.flv" height="580"> <param name="allowFullScreen" value="true" /> <param name="wmode" value="transparent" /> <param name="movie" value="/player/loader.swf?p=/player/main.swf&amp;f=/userdata/fckdata/200/flash/fluidParticleFalls.flv" /></object></p>Mon, 21 Jun 2010 20:00:00 UTChttp://area.autodesk.com/blogs/duncan/waterfall_using_fluids_and_nparticlesMaya Advanced Techniques TutorialsDuncan Brinsmead<p>The following link has a detailed step by step tutorial for the slagPourFoundry scene I included in my last post:</p> <p><a href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;id=13710022&amp;linkID=9242256">http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;id=13710022&amp;linkID=9242256</a></p> <p>The 2011 nParticle tutorial uses the slag pour scene, although there are also several other fine tutorials there put together by our documentation team. Feel free to post any questions on the slagPourFoundry scene here. <em>Note there are some differences with the scene in my last post and the tutorial one, which is simplified a bit to make it run faster&nbsp;(mainly lowering the fluid resolution)</em></p> <p><a href="/userdata/fckdata/200/flash/slagPourFoundry.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/slagPourFoundry.JPG" /></a></p> <p>&nbsp;</p> <p>&nbsp;</p>Tue, 15 Jun 2010 20:00:00 UTChttp://area.autodesk.com/blogs/duncan/maya_advanced_techniques_tutorialsScene Files for &quot;fun Stuff in Maya2011&quot;Duncan Brinsmead<p>Here are the scene files I used for the animations in my previous post:</p> <p><a href="/userdata/blogs/duncan/Maya2011scenes.zip">Maya2011scenes.zip</a></p> <p><a href="/userdata/blogs/duncan/fluidHead.ma_fluidShape1.zip">fluidHead.ma_fluidShape1.zip</a></p> <p>Some of the files were created during product development and I needed to modify them a bit to work in the final release version, thus they may not match the animations exactly in all cases. They are provided as is with no tutorials on the techniques used, but feel free to post questions here. In some cases I only took&nbsp;the scenes as far as doing a playblast, so some of the fluids may need more work for good batch rendering and shading. One can refer to <a href="/blogs/duncan/some_fun_stuff_in_maya2011">some_fun_stuff_in_maya2011</a>&nbsp;for slightly more detailed descriptions of these scenes. The names of the&nbsp;movies generally matches the names of the .ma files.</p> <p><strong>flamingLava2.ma</strong>&nbsp;&nbsp;&nbsp;&nbsp; This scene shows an auto resize fluid with flames and smoke emitting from a particle mesh that derives uv info from the particles.</p> <p><strong>autoResizeTorch.ma</strong>&nbsp;&nbsp;&nbsp; A simple torch demoing the use of auto resize. Move the torch around during interactive playback to see the effect.</p> <p><strong>wispyCigaretteSmokePush.ma&nbsp;</strong>&nbsp; A particle system being pushed by an auto resize fluid. The fluid is also pushed by a torus using speed fluid emission.</p> <p><strong>smokeStackMR2.ma</strong>&nbsp;&nbsp; This shows how the particle rotation can drive the rotation of the fluid shader's texture. The particle rotationPP is connected to a new vector attribute "userVector1PP". This attribute on the particleSamplerInfo is connected to the texture rotation attribute on the fluid node. The particles get their initial rotation from collisions with the walls of the smokestack, although for smoke one could also potentially use self collision with a very low collide strength to derive particle rotations from collisions with neighbors.</p> <p><strong>fireballs5.ma</strong>&nbsp;&nbsp;&nbsp; This scene shows emitting from particles into an auto resize fluid.</p> <p><strong>particleVortexFanHR5.ma&nbsp;</strong>&nbsp; Fluid is both driving particle motion&nbsp;and at the same time the particles are emitting into the fluid. The fluid has dissipation set just high enough that the motion looks fluid yet does not diffuse over time the way a normal fluid would.</p> <p><strong>goalSmokeLong4.ma</strong>&nbsp;&nbsp;&nbsp;&nbsp; This shows the use of particle goals to act as goals for a fluid simulation. The particles emit into the fluid with just enough dissipation that the motion looks more fluid than particle like.&nbsp; The motion of the particles are affected by a volume axis field with turbulence(hidden) in addition to the goals.</p> <p><strong>particleBomberNew5.ma</strong>&nbsp;&nbsp;&nbsp; This combines many techniques to create a bomber that emits bomb particles that automatically emit into&nbsp;auto resize fluids for explosion, ejecta and a 2d displacement crater. The crater effect is done using a 2d fluid for displacement and displacement to poly with history is used to allow this to collide with the particle simulations. To match the look of the render raise the subdivisions on polyPlane1 to 200,200. (this will also make playback slower due to the displacement to poly)</p> <p><strong>lickingFlame2.ma</strong>&nbsp;&nbsp;&nbsp; This shows a 2D fluid flame that uses auto resize and motion streaked emission.&nbsp; Move, resize and rotate the fluid emitter in interactive playback to see how it works.&nbsp; There is also inherit velocity so transforming the emitter pushes the fluid.&nbsp; The streaks will normally be weak for a fast motion because emission is distributed across the streak. However this use the replace method for density, and if one makes the emission rate high emission can be remain constant over long motion streaks. This scene also uses forward advection combined with high swirl and a lower solver quality for a streaky look.</p> <p><strong>particleRotateTest3.ma</strong>&nbsp;&nbsp; This shows particle rotations based on collisions. The instancer rotation is driven by rotatePP and the scale by the particle radius, which is randomized.</p> <p><strong>paperRollWave.ma</strong>&nbsp; This has liquid simulation particles instanced with per particle rotations to create a wave of toilet paper rolls. Cache the particles before rendering, as the scene uses motion blur.</p> <p><strong>zeroGravWater6.ma</strong>&nbsp; The new surface tension on particles is used to simulate a water droplet in zero gravity.&nbsp;A second gas particle system blows a bubble into the liquid one. Note that&nbsp;large restDensity was required to allow the fluid to flow smoothly despite the tension caused by the surface tension( lower restDensity is more like self collision of hard particles and can lock under surface tension when there are no strong forces like gravity or collisions)</p> <p><strong>butterExtruderSlice2.ma&nbsp;</strong> This creates glop with a visco-elastic tension by using a max distance contraint on emitted particles. Making the glue strength lower than one allows the connections to break, such that the substance can be sliced.</p> <p><strong>strangeCreatureSmoke2.ma&nbsp;</strong>&nbsp; NCloth rigidity now works with a deforming input mesh. An animating paint effects to poly mesh is made into nCloth with rigidity. The mesh also is used as a fluid emitter.</p> <p><strong>gradientAttractionInjection.ma</strong>&nbsp; This fluid&nbsp;uses a strong gradient force combined with forward advection and high solver quality(incompressibility) to create a detailed, fractal fluid motion.</p> <p><strong>fluidHead.ma</strong>&nbsp;&nbsp; An image of yours truely being turned into a strange fluid. You must download the cache file fluidHead_ma_fluidShape1 into your data directory. You could&nbsp;instead&nbsp;initialize the density to any desired image using import on the paint fluids tool. This uses both gradient attract and self attract combined with forward advection and low solver quality to pull the fluid into line shapes.&nbsp;Some things were changed since making this so the animation doesn't quite match the original movie.</p> <p>There are also a couple of bonus scenes not in my last post:</p> <p><strong>stringyFluid.ma</strong>&nbsp; A simple 2d fluid with a stringy effect created by low solver quality and forward advection. The substeps is also set to 2 due to the fast motion of the fluid.</p> <p><strong>slagPourFoundry.ma&nbsp;</strong> A scene with a hot slag pour simulated with particle meshes emitting into an auto resize fluid, along with spark particles.</p> <p><strong><span style="font-size: larger;"><em>&nbsp;NOTE: A detailed tutorial of this scene is now available </em></span></strong><strong><a href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&amp;id=13710022&amp;linkID=9242256"><span style="font-size: larger;"><em>here</em></span></a><span style="font-size: larger;"><em>&nbsp;(it is the nParticles tutorial).</em></span></strong></p> <p>&nbsp;<object type="application/x-shockwave-flash" height="580" width="760" data="/player/loader.swf?p=/player/main.swf&amp;f=/userdata/fckdata/200/flash/slagPourFoundry.flv"><param value="true" name="allowFullScreen" /><param value="transparent" name="wmode" /><param value="/player/loader.swf?p=/player/main.swf&amp;f=/userdata/fckdata/200/flash/slagPourFoundry.flv" name="movie" /></object></p>Thu, 10 Jun 2010 20:00:00 UTChttp://area.autodesk.com/blogs/duncan/scene_files_for_fun_stuff_in_maya2011Some fun stuff in Maya2011Duncan Brinsmead<h1>Maya 2011&nbsp;</h1> <p>For scene files look <a href="http://area.autodesk.com/blogs/duncan/scene_files_for_fun_stuff_in_maya2011">here</a></p> <div><a href="/userdata/fckdata/200/flash/flamingLava2.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/flamingLava2.JPG" /></a></div> <div>&nbsp;</div> <div>&nbsp;</div> <div>Maya2011 has now been announced. You can find the &ldquo;what&rsquo;s new&rdquo; list here:<br /> <a href="http://area.autodesk.com/blogs/cory/what_s_new_in_2011">what's_new_in_2011</a></div> <p>While the focus of this release was the transition to the QT based user interface, there are lots of other nice features and enhancements. Here are some of my favorites of the ones I worked on.</p> <h3><br /> Fluid Auto Resize</h3> <p>I have found that this really changes the way I work with Maya Fluids, especially for flame and explosion simulations. This automatically contracts and expands fluid boundaries to track the contained density. It also takes emitters into account, so one can simply position the emitter anywhere desired and at the start frame the fluid will fit to the emitter location even if the emitter is outside the fluid. For effects like torches it feels like the fluid is no longer confined to a box. As well the simulations tend to run much faster because there are fewer voxels to compute, cache and display. One can also lock down specific boundaries, set the threshold for resizing, set limit bounds, and set overall total voxel limits. Note that autoResize also works with 2d fluids as well as fluid wakes on the ocean. Thus one can have boat wakes that will follow the boat anywhere, instead of being confined to a fixed square area.</p> <p><a href="/userdata/fckdata/200/flash/autoResizeTorch2.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/autoResizeTorch2.JPG" /></a></p> <p>Here is a simple playblast of a torch that uses auto resize. Notice how the fluid(green box)&nbsp;jumps and expands/contracts to fit the emitter and smoke. Also the emitter pushes the fluid when it moves as well.</p> <p>&nbsp;</p> <h3>Keep Voxels Square</h3> <p>This new attribute is on by default and makes it much easier to edit fluid bounds and resolution. To increase the resolution one simply drags a single slider. Also when one edits the fluid sizeX,Y,Z the resolution automatically adjusts to maintain square voxels. This is a very simple thing but I find it makes fluids much easier to use.</p> <h3><br /> Fluid as Field</h3> <p>We now use interpolated fluid voxels when applied as a field, so particles driven by fluids have much better detail and fidelity of motion. (When applying a fluid as a field make particle conserve zero to best follow the fluid flow)</p> <p><a href="/userdata/fckdata/200/flash/wispyCigaretteSmokePush2.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/wispyCigaretteSmokePush2.JPG" /></a></p> <div>This playblast shows a simple cloud particle system pushed by a fluid. The fluid display is disabled so&nbsp;only the&nbsp;particles are visible, but the fluid has a density emission that roughly matches the particles. This scene also uses a bit of the new fluid self attraction force which helps to keep the flow together in tendrils. The fluid has auto resize on so at any frame the fluid is not much larger than the particle bounding box.&nbsp; The collisions with the spiral mesh are accomplished by making it a surface emitter into the fluid. It only emits speed, using the replace method, and has inherit velocity on. Thus where&nbsp; the mesh intersects the fluid it sets voxel velocities to zero when the mesh is not moving, which mimics the effect of collision, and when it rotates it then pushes on the fluid.</div> <h3><br /> Fluid Texture Rotation</h3> <p><br /> Now that particles compute rotation we can take advantage of that when rendering with the &ldquo;thick clouds&rdquo; method, which uses a fluid shader. The rotatePP can drive the rotation of the internal fluid texture on each particle, which can create much more realistic smoke, especially when using fewer, larger particles. One can also potentially use this in effects like tornados.</p> <p><a href="/userdata/fckdata/200/flash/smokeStackMR.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/smokeStackMR.JPG" /></a></p> <div>This animation shows a few very large particles with rotations computed automatically by the particle simulation. The rotatePP is used to drive the texture rotation on the fluid shader.&nbsp; Without this each particle would look the same. Note that this is just to show the technique and that one can get a more natural effect with more particles and by driving texture time by particle age. In this example each particle is identical except for scale and rotation.</div> <h3><br /> Fluid Emission Improvements</h3> <p><br /> There are numerous improvements to fluid emission this release. <br /> <strong>Emit From Particles</strong>: One can now emit fluid from particles. This is a very powerful technique and really extends the kinds of effects possible with fluids. With very high dissipation on the fluid one can even think of the fluid as a method of rendering particles. The particle streaks into a fluid are great for blast effects and mixtures of solid chunks and dust. Waterfalls are also easy to do with this method. One can use particle goals to create simulations where it looks like the fluid organizes naturally into shapes. This emission can be from a fix or a per particle radius value and also can motion streak fast moving particles into the fluid. The velocity of the particles can be used to affect the fluid velocity as well. Auto resize will automatically expand the fluid to fit any emitting particles.</p> <p><a href="/userdata/fckdata/200/flash/flameBalls5.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/flameBalls5.JPG" /></a></p> <p>This playblast has&nbsp;some&nbsp;particles&nbsp;emitting into a single fluid node( the fluid also uses auto resize). The particles are hidden and only the fluid is displayed. The particles simply die after a few frames, although one could fade out the emission rate or scale down the radius before death for a more gradual effect. However it is nice the way the dissipation on the fluid provides a natural fadeout when the particles die.</p> <p>&nbsp;</p> <p>&nbsp;</p> <p><a href="/userdata/fckdata/200/flash/particleVortexFanHR5.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/particleVortexFanHR5.JPG" /></a></p> <p>This playblast shows particles both emitting into a fluid and as well having their motions driven by the fluid(fluid as a field). There is also&nbsp;a small bounded&nbsp;field&nbsp;creating&nbsp;an upward push&nbsp;to sustain the spinning of the fluid. Normally density on a fluid will tend to diffuse after rotating around a vortex, however by using particles to carry the density it keeps the simulation from becoming blurry. The higher the dissipation on the fluid the more one just sees particle &quot;balls&quot; moving around so it is a bit of a balance&nbsp;to use just enough dissipation for a natural fluid look while not getting too diffuse.</p> <p>&nbsp;</p> <p><a href="/userdata/fckdata/200/flash/goalMayaSmokeLong4.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/goalMayaSmokeLong4.JPG" /></a></p> <p>This playblast shows how one can use particle goals to provide a fluid animation that moves to a target shape, in this case the word &quot;Maya&quot;. As with the previous example the higher the dissipation on the fluid the more one sees the underlying particle motion. Too high dissipation&nbsp;and it looks simply&nbsp;like the particle simulation, too low and it looks more like one simply uses the Maya text as a fluid emitter. With the right balance it can look like a targeted flow of smoke, which&nbsp;looks quite different from techniques&nbsp;such as&nbsp;emitting from text then reversing the cache. This might also work well for a character made out of smoke.</p> <p>&nbsp;</p> <p><a href="/userdata/fckdata/200/flash/particleBomberNew5.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/particleBomberNew5.JPG" /></a></p> <p>This animation combines several new&nbsp;techniques but relies heavily on particle emission into fluids. The main fluid in this scene uses auto resize, so the &quot;bomber&quot; is not limited where it can go. The particles emit into the fluid just before dying, and this emission creates the primary puff that travels upward(due to temperature buoyancy). Also when they die the particles emit into a second particle system, which is used for the streaming chunks of dirt kicked up by the blast. This second particle system emits into a second auto resize fluid that is used for the dust and dirt from the blast. Note that no particles are rendered except for the bombs.&nbsp;The ground is cratered by using a fluid texture with static grids as a displacement and color map.&nbsp;The bomb particles emit into this fluid texture when they die, forming the craters. In order to get the particles to correctly collide with the displaced craters the new feature displacement to poly with construction history was used.</p> <p>&nbsp;<br /> <strong>Textured Emission</strong>: One can now texture all emission attributes (using 2d textures). The UVs are determined as appropriate for volume, curve and surface fluid emission. Also conversely one can now&nbsp;use 2d fluid texture to texture particle and fluid emission, so one can do things like a dynamic 2d burn propagation across a surface and have it emit particles and fluid smoke.</p> <p><br /> <strong>Emission Speed</strong>: Fluid emitters can now affect the velocity of the fluid similar to emission velocity on a particle emitter. This also supports inheriting the motion of the emitter, where this motion includes rotation of volume emitters as well as deformation of surface emitters. One can use a surface as a fluid emitter such that it both blocks fluid motion when stationary and pushes it when deforming.</p> <p><br /> <strong>Motion Strea</strong>k: Fast moving emitters will smoothly emit across the motion of the emitter rather than creating discreet puffs. This method also provides smoother jitter free emission of the fluid even when not moving.</p> <p><br /> <strong>Emission Method</strong>: the &ldquo;replace&rdquo; emission method allows one to directly set the fluid to a target value, rather than continually adding into the fluid each step. In the past one had to resort to scripting to accomplish this. For example the wind tunnel examples use an expression to set fluid inflow/outflow values. This sort of thing can now be done directly with an emitter.</p> <p><a href="/userdata/fckdata/200/flash/lickingFlameAnim.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/lickingFlameAnim.JPG" /></a></p> <div>In this playblast note how the motion of the emitter is smooth over fast motion, even when scaled and rotated quickly. As well the scaling and rotation affects the velocity of the fluid because inherit velocity is set on the emitter. Note how spinning the emitter acts like a propeller. This simulation also uses the new forward advection method which allows density to compress together forming tendrils. A low solver setting allows the fluid to compress and stretch which allows the 2D fluid simulation to look more like a 3D one. Without forward advection the fluid diffuses heavily with low solver quality settings.</div> <div>&nbsp;</div> <h2>&nbsp;&nbsp;<br /> nParticles</h2> <p><strong>Output Mesh Improvements</strong>: UVs, color per vertex, motion blur. With the ability to have particles drive mesh uvs one can then apply maps and displacement to particle surface that track the particle motion. This is great for effects like lava.</p> <p><a href="/userdata/fckdata/200/flash/flamingLava2.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/flamingLava2.JPG" /></a></p> <p>In this animation the particles were emitted from a plane with inheritUV. A 2d fractal displacement with matching incandescence&nbsp;and&nbsp;bump maps was applied to the particle to poly mesh. As long as the blobby threshold is not too low the interpolation of uvs from the particles for the mesh works quite well. The flames and smoke are a single 3D fluid with auto resize used, where the&nbsp;partice out mesh is used a surface fluid emitter.</p> <p><br /> <strong>Rotations</strong>: nParticles compute a rotation per particle based on collisions(including self collisions). This makes it much easier to use particle instancer for pseudo rigid body effects. The rotation calculation does not any notable extra overhead to the normal particle collisions.</p> <p><a href="/userdata/fckdata/200/flash/particleRotateTest.flv"><img alt="" src="/userdata/fckdata/200/image/particleRotateTest.JPG" /></a></p> <p>In this playblast some self colliding&nbsp;nParticles with randomized radius are dropped onto some geometry. A simple gem shaped object is instanced to the particle system and its scale and rotate values are driven from the particle system radiusPP and rotatePP. Note that the rotation computations do not affect the translational motion of the particles( unlike rigid bodies&nbsp;). The slowing down when rolling is due to friction, not the non-spherical shape as would be the case with a rigid body system. There is a separate rotational friction to control the degree to which contact influences the particle rotation.</p> <p><a href="/userdata/fckdata/200/flash/paperRollWaveMR.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/paperRollWaveMR.JPG" /></a></p> <p>This is instanced particles with rotation as in the previous example, but the liquid solve method was used, which provides a type of soft collision that is faster than the normal self collisions. With this many particles one can still interact with the simulation while it runs(about 15 fps on my machine).</p> <p>&nbsp;</p> <div><strong>Surface Tension:</strong> The particle liquid solve now supports surface tension</div> <p><a href="/userdata/fckdata/200/flash/zeroGravWater6.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/zeroGravWater6.JPG" /></a></p> <p>In this animation there is no gravity and a sphere was filled with water particles with some surface tension. An addition emitter in the middle is emitting gas particles that collide with the water ones and also self collide, causing a bubble of smoke in the water that then pops.</p> <p>&nbsp;</p> <p><strong>nConstraints now work on emitted particles: </strong>This allows one to do things like emitting stringy stuff and glop, among other effects.</p> <p><a href="/userdata/fckdata/200/flash/butterExtruderSlice2.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/butterExtruderSlice2.JPG" /></a><br /> This simulation has some emitted particles held together with a max distance nConstraint. The glue strength on the constraint is less than 1 which allows the goop to be cut.</p> <p>Something else that I&rsquo;ve not played with much is the new ability to set viscosity per particle. This could allow interesting effects where goop melts and hardens locally&hellip; like wax in a lava lamp as it starts to heat up.</p> <p>&nbsp;</p> <p><strong>nCloth Deformable Rigidity</strong>: Rigidity now works with deforming input meshes.</p> <p><a href="/userdata/fckdata/200/flash/strangeCreatureSmoke2.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/strangeCreatureSmoke2.JPG" /></a></p> <p>In this rather odd test I create a complex paint effects stroke where I animated branch angles and then converted it to poly and made it nCloth. This pfx cloth has rigidity along with a constraint to a simple cloth strip. I then used the cloth output mesh as a surface emitter for an auto resize fluid.</p> <p>&nbsp;</p> <p><strong>Fluid Self Attract and Gradient forces</strong>: Fluids now have a variety of new force effects that can create interesting effects</p> <p><a href="/userdata/fckdata/200/flash/gradientAttractionInject.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/gradientAttractionInject.JPG" /></a></p> <p>With self attraction effects combined with forward propagation the fluid can develop and maintain detail over the course of the simulation, resulting in interesting effects that are like fluid dynamic fractals.&nbsp;The above animation just emits with some dropoff at the start frame then injects some more density and velocity part way through. The gradient attraction effect was used.</p> <p><a href="/userdata/fckdata/200/flash/fluidHead.flv"><img height="480" alt="" width="640" src="/userdata/fckdata/200/image/fluidHead.JPG" /></a></p> <p>The density on this 2D fluid animation was initialized from a photo and then self attract with forward prop and low solver quality was used for this interesting effect.</p> <p><em>One other point worth mentioning because it was not in the what's new document... Some of the nCloth collision routines have been threaded, which can result&nbsp;a performance gain for some scenes.&nbsp;There is still much that is not threaded in the cloth solve, so the performance does not scale with procs very well yet,&nbsp;but this still results in signficant improvements over Maya2010. Collision heavy scenes can run around 50% faster.</em></p> <p>Phew! That's it for now. That's the most animations I've ever uploaded for a blog post!</p>Thu, 11 Mar 2010 19:00:00 UTChttp://area.autodesk.com/blogs/duncan/some_fun_stuff_in_maya2011Dust StormDuncan Brinsmead<p>&nbsp;</p> <h3 style="text-align: center">A Simple Dust&nbsp;Storm</h3> <h3> <p style="text-align: center"><a href="/userdata/fckdata/200/flash/dustStorm.flv"><img alt="" align="absMiddle" style="width: 705px; margin-right: 10px; height: 750px" src="/userdata/fckdata/200/image/dustStorm.jpg" /></a></p> </h3> <p style="text-align: center"><a href="/userdata/fckdata/200/flash/dustStorm.flv">dustStorm.flv</a>&nbsp;</p> <p>A quick and easy way to do a dust storm is to use only the textural aspects of a fluid. This scene uses a fluid with no grids, just textures and gradients. The animation was done by animating the position of the fluid along with texture time and offset.<br /> I started with a plain 3D fluid then in the attribute editor set it to the preset &quot;cloudbank&quot;, which is a purely textural preset with no grids. Instead of a y gradient I used a center gradient and made the fluid somewhat oblong. Once can scale the fluid with the scale tool but when changing its aspect one should use the size XYZ attributes, setting the resolution XYZ in matching proportion so that the voxels remain square. When one has a fluid with no grids the resolution is still used for two functions: shaded hardware display and in the rendering determines the number of steps marching through the grid. Thus if you make the resolution very low you may need to increase the shading quality attribute to compensate.</p> <p>From there it was a lot of tweaking of texture frequency and ratio as well as getting the shadowing right. A single spotlight with raytrace shadows was used(one needs to use raytrace shadows for cast shadows from a fluid). Cast shadows was enabled on for the fluid shape to get shadows on the ground. The opacity required to get sharp boundaries on the dust resulted in strong self shadows, due to the lack of secondary light scattering on the fluid. Lowering the shadow transparency helps this but also makes the ground shadows too soft. So I set incandescence high on the fluid and the color dark so that the self shadowing was not too strong. Both color and incandescence have y gradient ramps that make the dust light at the top and darker at the bottom.<br /> The animation&nbsp;is&nbsp;a translation of&nbsp;the fluid combined with a slow animation of texture time and offset.</p> <p><small><em>TIP: &nbsp;A convenient way to animation an attribute like textureTime is to type into the numeric edit box to the right of the attribute in the attribute editor:</em></small></p> <p><small><em><strong>= time * x</strong></em></small></p> <p><small><em>where <strong>x</strong> is a number determining how fast you want the animation. For example if x was 10 then after 1 second the attribute value would be 10.</em></small></p> <p>For the sky I kept the background black and created a 3d fluid and set its preset to &quot;sky fog&quot; then played with the color and incandescence. The volumeSamplesOverride helps to integrate the two fluids, which does not work as well in this case for Mental Ray so the Maya renderer was used.<br /> If one wishes the dust to collide or have dynamics then make the density+velocity grids dynamic, set opacity input to density and use an oval shaped emitter with dropoff to match the centergradient effect (other emitter setups may also work well). One would also generally need to do an extend on the fluid to have it cover a larger area, to allow room for the emitted density to move into. To push the fluid one could apply a volume axis field with a directional motion blowing inward along the right hand boundary. Generally avoid applying unbounded forces across the entire fluid as these tend to build up over time as well as fight the dynamic incompressible flow of the fluid. Also with such a setup it will help to make the fluid boundaries open at the right and left to create a wind tunnel effect. The animation on texture offset should then also be either disabled or reversed in direction, moving with the wind flow but not quite as fast.</p> <p>Here is the Maya scene file:<br /> &nbsp;<a href="/userdata/fckdata/200/dustStorm.zip" name="dustStorm.ma">dustStorm.ma</a></p>Fri, 26 Feb 2010 00:00:00 UTChttp://area.autodesk.com/blogs/duncan/dust_stormScene Files from Tech TalkDuncan Brinsmead<p><span style="font-size: large">Scene Files from Tech Talk</span></p> <p><span style="font-size: large"><img height="480" alt="" width="640" src="/userdata/fckdata/200/waveRider2.jpg" /></span></p> <p>This Siggraph I gave a tech talk that you can also check out online:</p> <p><a href="http://area.autodesk.com/inhouse/videos?word=tech+talk&amp;where=1&amp;software=8&amp;industry=">area.autodesk.com/inhouse/videos</a></p> <p>I promised to post scene files from this talk and here they are. ( sorry for the delay in posting these! )</p> <p><a href="/userdata/fckdata/200/file/techTalk/techTalkScenes.zip">TechTalkScenes.zip</a></p> <p><br /> The above file contains all the scene files along with a few textures. Some of these I may eventually turn into tutorials on this blog, but for now they are provided without any explanation other than that provided by watching the tech talk. All the files are for Maya2009 or later, but some may work O.K. with earlier versions. The files included in the zip are (in order of presentation in the talk ):</p> <p><span style="font-size: medium">NCloth Techniques</span><br /> <strong>arrowAttack.ma<br /> arrowAttackFlagTear.ma<br /> sidewinder3.ma<br /> basicWormCloth.ma<br /> wormsInMud.ma<br /> newLathe.ma<br /> spinConfetti3.ma<br /> lungsNcloth.ma<br /> ribbonPath.ma<br /> paperAndGlue.ma<br /> paperAndGlueSnap.ma<br /> paperGlueCyl.ma<br /> paperGlueCyl2.ma<br /> paperGlueGrid.ma</strong></p> <p><span style="font-size: medium">Paint Effects</span><br /> <strong>electricArc.ma<br /> plasmaBall.ma<br /> pfxScroll.ma<br /> sunsetPines2.ma</strong></p> <p><br /> <span style="font-size: medium">nParticles</span><br /> <strong>reactionDiffusion.ma<br /> coloredSteam2.ma<br /> twisterControl.ma<br /> particleStreaks.ma<br /> cellSplit2.ma<br /> lavaLamp.ma<br /> cloudTank2.ma<br /> nParticleBlast.ma</strong></p> <p><span style="font-size: medium">Fluids<br /> </span><strong>candleWaxDrip.ma<br /> ooz.ma&quot;<br /> fluidFeedback.ma</strong></p> <p><br /> <span style="font-size: medium">Reflection Fractals</span><br /> <strong>reflectSphereInCube.ma</strong></p> <p><span style="font-size: medium">Fun Simulations<br /> </span><strong>waveSwinger5.ma<br /> orbits2.ma<br /> phobosCapture.ma<br /> orbitalDebrisNatureCascade.ma</strong></p> <p>&nbsp;</p>Fri, 04 Dec 2009 01:20:56 UTChttp://area.autodesk.com/blogs/duncan/scene_files_from_tech_talk