Friday 10 December 2010

removing initial state of particles!

yet another particle related thing I should know already...

anyway, set lifespan of particles to 0, run simulation for a frame or three so that maya is forced to update the buggers and terminate them - then set intitial state once more. Now re run simulation and it should be set to default! Whee!

Thursday 4 November 2010

more stolen particle stuff

Create a polygonal sphere and turn it to softBody ( use the option "Make Soft" - in case you want to fallow the exact steps ot this tutorial ).
Create a particle emitter, offset it on Z axis, set it to "Directional", set "Direction Z" to -1, set "Speed" to 3, "Speed Random" to 0.5 and "Spread" to 0.1.
Apply radialField to the softBody particles ( i will call it radialField_softBody ) and another one to the particles emitted by the particle emitter ( let's call it radialField_particles ). For both radialFields set the "Max Distance" value to 0.75 and turn on "Apply Per Vertex".
Now here is the important part:
Select radialField_softBody and the particleShape emitted by the particle emitter. Then use the command "Use Selected As Source of Field" inside the "Fields" drop-down menu.
Do the same with radialField_particles and the softBody particles.
By default Maya parents the forceFields under the objects used used as source for them and links their translate attributes. Dissconnect their attributes and move them outside the "action" area.

 
At this point you are ready to go - click on the left image to see the result in motion.
Keep in mind that all the attributes of the forceFields are accessible on PP level ( read the Maya Help for more information ).
The "Volume Shape" attributes of the forceFields should be set to "None".
In addition you can try and this: turn the sphere to a non-dynamic object and use it as source of the radialField_blendShape, i.e. - delete the softBody particles, and reapply the radialField to sphere's shape.
This is a some kind of bridge between this and the next tutorial below.

Tuesday 26 October 2010

More Particle Transformy Stuff I should really know..

In the unlikelihood that anyone but myself reads this "blog", all credit to Sathish Kumar from chennai, working in Nipuna Services. Tutorial found on Creative Crash, via CGTalk forums.Whew.

Step 1:

Create any Geometical object and Assign any Texture and then Convert it to File Texture.
Create a surface emitter from that object and turn on Need Parent UV.
Add rgbPP attribute to particleShape1.
Assign the Baked File Texture to the emitter1 color .
Turn on inherit color in emitter1.
Set the conserve attribute to zero in the particle.
Set the emitter rate attribute to 5000.

Step 2:

Create any Geometical object and Assign a different Texture and then Convert it to File Texture.
Create a surface emitter from that object and turn on Need Parent UV.
Add rgbPP attribute to particleShape2.
Assign the Baked File Texture to the emitter2 color .
Turn on inherit color in emitter2.
Set the conserve attribute to zero in the particle.
Set the emitter rate attribute to 5000.

Step 3:

Play the TimeSlider and after the objects getting filled with the particle's Stop the TimeSlider.

Step 4:

Set as Initial state for both the particles.Delete the emitters from the object so the particles be independent. Now open the particleShape1 attribute editor and add the runtime expression in the position attribute as follows

particleShape1.position=hermite(particleShape1.position,particleShape2.position,
<<0,0,0>>,<<0,0,0>>,smoothstep(rand(0,2),rand(3,3.5),time));

and add the runtime expression in the rgbPP attribute as follows
particleShape1.rgbPP=hermite(particleShape1.rgbPP,particleShape2.rgbPP,
<<0,0,0>>,<<0,0,0>>,smoothstep(1,rand(1.5,3),time));


Play the scene and Enjoy the Particle Morph.

Tuesday 19 October 2010

Particle magick

Particles flowing along a curve (obvious stuff I should know)

  • make particle & emitter
  • make curve
  • set curve as goal
  • select particle, in attr. editor, add the goalU and goaloffset attrs.
  • goalU+=0.1 or whatever
  • goaloffset is so the particles are around the curve, not just ON it.
  • Use something like sphrand (<<2,2,2>>) for that.
  • Profit.

Monday 11 October 2010

stretchy limbs redux

  • seems as if it's important to have a master global scale in the baseCtrl.
  • everything should be parented under the baseCtrl..
  • 1/masterGlobalScale should be applied to the bendy chain joints.
  • use of distance nodes to spread the chain joints is definitely the way to go in conjunction with translateX
  • the root of the chain joint's immediate child should sit right on top of itself, for the bending to work
  • use rotation of bendy joints to create bending
  • IKctrl should be a shape of sorts, parented under baseCtrl. It should hold a locator for distance purposes and also the IK itself.

Tuesday 14 September 2010

Stretchy Bendy Rig

For main part -
3 chains - IK, FK & Result
Use Blend Color nodes to feed rotation values of IK/FK into Result Joints
Similarly use Blend Color nodes to switch between stretching of joints (feed into scaleX usually)
Generally for IK stretching, parent the IKhandle to some sort of control object. Point constrain the distance node locators to the control object and not the IKhandle. (remember dgdirty as well)

FKstretch for bendy is -

FKstretchFactor x length
Divide by number of bendy joints.
Subtract original translationX to gain offset
Add offset to whatever original translation X was (this part could be streamlined)


IKstretch for bendy is the same.

Point constrain top and bottom joints of bendy chain to appropriate result joints. Orient constrain appropriately too, so that middle joints will follow correctly when not bending.
For bendiness, drive translation Z or Y with a custom attribute, dividing by various factors to gain curve effect.
Would be worth experimenting with rotation instead of translation.


To do - make rigs scalable

Monday 12 July 2010

modified locator -to- particle script... useful!

 Note to self - figure out why counter caps at 100?

// Nulls2Particles Script by Garry Runke

string $selection[] = `ls -sl`;                            // `ls -sl` = list selected, creates an array with all selected objectnames in it

float $counter = `particle -q -count $selection[0]`;    // Get the number of particles

for ($x=0; $x<$counter; $x++)                           // Schleife läuft sooft wie Partikelanzahl
{

    string $part = $selection[0]+".pt["+$x+"]";             // This line builds the string representing the current particle (important for the next line)
    spaceLocator;        // Creates a locator at position 0 0 0
for($i=0; $i<200; $i++)
{    currentTime $i;
    float $partPos[2] = `getParticleAttr -at worldPosition $part`;    // Get the coordinates for each particle
    move -a  $partPos[0] $partPos[1] $partPos[2];            // Moves the locators over the particles
    setKeyframe;
}
};

Wednesday 19 May 2010

Note to self. Recently resolved resolutions.

At the beginning of the year I resolved I would post on the blog more often, I'd get to work on an indie game, I'd draw more & that I would travel a bit more.
So, after nearly 6 months how am I doing?

Posting on the blog started off well, but as always laziness took over.. It still functions well as somewhere to store handy Maya tips though.
Whilst I did start collaborating on two indie games, yes two, I've decided to cease work on both...just to maintain my sanity levels. I stare at 3d software all day long at work & it's incredibly difficult for me to load it up once I'm at home.
Have I been drawing more? Short answer, no. And travelling? Thus far I've been to Berlin & in a couple of weeks I'll be off to Italy for a friend's wedding. That travel target was rather easy to achieve :) There're even a couple of other destinations planned for this year.

In short, screw you Past Dave. I don't need your stinking resolutions.

Wednesday 24 March 2010

More Maya hijinks

maya cycles eg,
parent constrain A to B, parent constrain B to A
breaks Maya.

Instead Constrain A to B, but turn off B's constrain to A
When you want A to control, turn off A's to B and turn on B's to A.

Use condition nodes and pair blends. Pair blends are generated when you set a key in such a cycle. Lock the pairblend nodes.
Its ok to delete keyframes AFTER you lock them.

Within condition node you need to use RGB to set states and values for certain nodes. In the case of A and B, you want to set the parent Constraint node to either 0 for normal, or 2 for blocked.
you also need to set the weight to 0 or 1. The final value is the pairblend  weight.

The downside/requirement of such a setup is you must keyframe every shape involved. eg you want to use A to move left to right, and B to go up and down, on keying you MUST key both shapes otherwise they override each other.

Monday 22 March 2010

Surface Rigging a la Bungie (Fake Update #2324234)

Get object
Create Nurbs Surface that encloses plane of movement
Position bones with sufficient locus(?)
Geometry constrain, Normal constrain to surface
Point constrain bone to a locator for ease of use
Skin & Paint weights...

Tuesday 9 March 2010

Michelin Man has been bulking up...



Not sure if I like this or not. Michelin Man has gone on the P90X regieme & become a proud American who fights large cockroaches. Perhaps its the horrible Sonic the Hedgehog style theme song.
IF YOU BELIEEEVE!

Friday 5 March 2010

An anime show you've probably not seen before.



This is kinda awesome. Someone from Gurren Lagann is probably involved.

Animation Innovation Tokyo rustled this gem up sometime last year in the hope of raising funds to produce a fully fledged series. Probably won't see the light of day....
If you're not convinced on clicking play from my lack of description... it has a ROLLERBLADING DINOSAUR

Wednesday 3 March 2010

I'm not slacking, I'm waiting for something to render #423423

Some guys are addicted to gambling, some to alcohol. The list of vices that plague our weak wills is probably endless. For me, its coffee. I can just about change my daily routine in any way - early starts, late lie-ins, sitting at a desk all day, walking about non stop - but I always always need a good cup of coffee. Just one! Here is the story of my relationship with the bitter stuff. Heed my words!

I like to blame my student days for my hideous coffee addiction. Notice that its not just a caffeine thing - Tea, coke (of the cola variety) and horrible energy drinks don't have the same effect on me. In my final year of studies I would arise at around 3-4pm and work straight through to 8am, before collapsing into bed and repeating the cycle. The labs were quieter then & being nocturnal suited me fine (it was handy for staying out all night).

The fuel that would keep me going for the better part of a year was this stuff:

Rather than having a standard 1 teaspoon mug, I would have 5 teaspoons of granuled goodness all at once. It would set my brain into overload for a good hour or two and quite frankly put me into the zone. There was never a "down", as with most drugs...after the 14 hours of so work in the labs, I'd just go home and sleep happily. No side effects! Rock! I could just do this for months then stop once I'd finished my projects.

Lol. How wrong was I. It's been over five years since I graduated and I am still physically dependant on coffee. Over the years I've tried to go "cold turkey" and have never lasted more than two weeks.


By day seven, I usually can't stay awake for more than eight hours - not particularly handy when you work. After that I actually feel faint and I don't bother trying to find out what happens next! Perhaps I'll get the shivers and eventually get through the tunnel and into the light of non-dependancy. Or I'll just spontaneously combust.

Working means I have some form of disposable income, so I get to drink nicer coffee. No more instant crap! A lot of people complain that Starbucks makes their coffee too strong....too abrasive. They've not tasted the stuff I brew! The best places in town to have coffee are without doubt Flat White and Milkbar. They aren't full of wifi sponges and the staff are usually Kiwis with amusing accents.

So do I like the actual taste of coffee? Or do I just drink it to keep my motor running? It's definitely the former, with the latter being a huge bonus. Ethically, caffeine is always going to be rotten. If you like tea, you're most likely to be supporting South Asian slave labour. If you like coffee it will be African or South American. Either way, some brown person suffers to make a living. I won't even mention Coca Cola! Besides, I always buy fairtrade to sooth my tortured conscience in the hope of shaving a few years off my hell sentence.

Coffee Tips -
  • Don't drink instant coffee. The exception is Malaysian Old Town 3-in-1 packet mix.
  • Buy a good cafetiere (sometimes called a French Press) - espresso machines you see in Argos are bollocks & won't provide the pressure or heat to get that coffee-shop flavour. You'll be wanting to spend in the region of £1000 if you really want a machine, instead of £10 on a press.
  • When using a cafetiere, put in more ground coffee than recommended. 1 dessert spoon per cup is for losers. I'd recommend an inch per mug.
  • Store your ground coffee in the fridge, in a sealed container.
  • Going cold turkey doesn't work. Just accept your coffee filled fate. So it goes.

Thursday 25 February 2010

MRI Scan Haiku

Click Click Click Click Click
Click Clickety Click Click
Click Click Click Click RAAAAAAA

Thursday 18 February 2010

Three door hatchback crowd.

Two Door Cinema Club are awesome. Don't let their quirky indiesque name fool you - they're a GOOD band from Ireland, making up for the sins that are Boyzone, Bewitched and Westlife. Oh and Bono.
Whilst they sometimes sound a little poppy, I think their songs actually make you listen to the lyrics and don't fall into that chasm of mediocre; currently populated by the Kings of Leon and their ilk.



Oh and I started doing some 3d modelling work for the infamous NeoGAF game project, but I'm struggling a little with the polycount requirements... I've been given 800 as a ballpark figure, but I'm currently at about 2000 :)

Friday 5 February 2010

Game Dev

In my journeys as a wannabe bandwagon indie games developer, I recently stumbled upon this free bit of 2d game engine software -

http://www.scirra.com/construct/

Supposedly there's no code involved, which suits me! Its been quite uninspiring coding in C# with XNA.. I've worked through a couple of tutorials and whilst the logic behind most of the code makes sense, it all does seem rather longwinded :(

Edit - and here's a free music sequencing program, that looks quite good!

http://www.drpetter.se/project_musagi.html

Edit 2 - and a sketching program!

http://al.chemy.org


Of course the downside is that this stuff is not particularly geared toward retail! I suppose the main thing is that I'm able to get whatever my ideas are up and running quickly...

Also F' Yeah! Friday!

Tuesday 2 February 2010

I have some spare instant mash mix...apparently this tastes good.. Gonna try it with some chicken at some point.


"Potato Crusted Baked Fish"

Mix together 1 pkg Idahoan Instant Potato with 1/4 cup Grated Parm/Romano Cheese, 1/2 tsp Garlic Powder, Salt & Pepper to taste. Cover fish with Mayo and Coat with Potato mixture. Spray pan with Pam, and heat Fish in 400degree oven 30-40 minutes depending on thickness of fish. Work best with Tilapia, Cod, Sole, Snapper or any Filet. Also works with Chicken Breast!

Saturday 30 January 2010

WTF January rickety-rewind plz!

Well I certainly wasn't ready for 2010 and the fact that one lunar cycle has passed by (lets call it a "lunacy";do you see what I have done here?) without me even realising it certifies my unreadiness. The super-effective trinity of procrastination, moping around and ever-present sleepiness has severely dampened any productivity I might have hoped for this lunacy.


So, how will I rectify these problems? Well the moping around is definitely temporary. Changes have occured in my personal life. Ties have been severed, tough decisions made and I'm all for moving onward & upwards.
The real challenge lies within the procrastination and sleeps. The internet is a horrible force of man-made nature (let's call it MaMa Nature - OMG I'm on some sort of cylindrical object here, maybe I'll call it a "roll"). It provides us with inspiration, knowledge and is a bounty of joy. On the flip side it also robs us of time and concentration. Time which we could be spending doing what we're supposed to be doing, or more importantly want to be doing.

I'm certainly not a workslave. In fact I despise the idea of "work". It is another farce of MaMa Nature, that is only present to keep the gears of our tax hungry clockwork government slick and greasy. We look forward to payday every lunacy and you'd be wise to know that they're rubbing their hands with just as much anticipation.

I've lost my train of thought. The internet has distracted me once more.. I'll finish this post one day! (This is due to part laziness, but then again it does prove my point about the internet being bad for you)

Monday 18 January 2010

I'm patient

No wait - that should read impatient.

I'm going to chronicle my old man leg woes here..
  • Early November: I notice my knee feels like shit when I walk sometimes.
  • Mid November: the problem isn't one of those things that will just go away - but the doctors say to give it a few weeks rest.
  • Mid December: its still there! So I have an X-Ray done (no super powers gained)
  • Jan 6th: X-Ray results come back with sod all, I get referred to a specialist/MRI thing.
  • Jan 18th: After many phone calls, reference numbers and daft NHS passwords I've got an appointment for something - in MID FEBRUARY.
For now, ibuprofen will have to suffice... joy joy happy joy.

Wednesday 13 January 2010

When being good isn't a good thing...

This post isn't about behaving in school, girls (heh), or your moral alignment. Nope, its about work.
For nearly 5 years I've been at the same company, doing CG. Out of those 5 years I think I have spent at least 2 years working with a certain product that will remain anonymous. Watch this! Its funny! And totally unrelated.



As is common with many products, a mascot is involved - one that is burned into my brains and fills my soul with dread. I actually had a nightmare about it once. Anyway - we inherited this project from another (i assume from mass suicide) now deceased-cg company. We were sent files for the mascot that were incomplete and were forced to build something ourselves. At the time I was busy on another commercial, so we outsourced the work. The result was quite shoddy, but the clients approved it - much to my horror. In fact they liked it so much, they kept asking us to make more and more stuff with it - and of course no one will point out to them how shitty it is...

Being me, I wanted to take a tiny bit of pride in my work and produce something that at least looked decent. At the beginning stages of any commercial related to this product I've always asked if I could rebuild the mascot from scratch, so it would look right - perhaps even good.
Such a luxury has never been granted to me and for two solid years I've had to put up with a sub standard mascot that frequently breaks and generally doesn't work.

But what's this? It's a bit quiet now, so in this downtime I've taken it upon myself to do a little R&D. In just two days I found an excellent solution for the rendering problems we'd been experiencing. The results do take a bit more time to achieve, but at least it won't break. With a bit o' tweaking, painting & re-rigging I could have a new and improved mascot ready to go!
All good RIGHT?

The powers that be, are now saying that if we do show our clients these new developments, we run the risk of getting into their bad books. I understand that when a client approves something, you generally run with it till they ask for changes - but when you're able to deliver a product that is 400% better than what they have already, why the FUCK would they be unhappy with it?
The vibe I'm getting for doing this work is pretty negative..

Is it my fault that they would never give me the go ahead to rebuild their crappy character for their past commercials? Is it my fault that nobody would put their foot down and say it looks shit? Essentially the message I'm getting from those in charge is not to do good work - Keep churning out mediocre crap and keep using shitty assets.

So the lesson today boys and girls, is not to waste your time - stay average.

Tuesday 5 January 2010

Snow place like home

Unlike the majority of England, I am still not back to work/school. I've actually still got ten days of leave leftover from last year to use up! I think I might take off every Wednesday again.. That's over 2 months of hilarious broken weeks! Well, that's if my work schedule will allow it (it won't).

Two days ago I finished up the first XNA 2d game tutorial. I've now completed a cruddy cannon-points-at-spaceships-and-destroys-them game. It should be noted that I've not touched proper programming for about 5 years, bar a few bits of MEL scripting...which doesn't really count.
Object oriented programming is sort of making sense to me now. Classes are essentially magic structs that can contain everything. I wish our lecturers just said that back at uni.... Or maybe they did and I was just too busy doodling.

Stealth fake-update : this site is useful
http://xnadevelopment.com

So how else have I been wasti- spending my time off?
I have been exploring the underground ruins, the sprawling wastelands and insignificant potholes of Washington DC. Yes...... I've been playing Fallout 3 (yes, I'm late to the party). Despite my best attempts not to loot everything and anyone that crosses my path (in the game), my borderline OCD compels me to collect everything of value. Broken assault rifle? I can fix it up & sell it.. Motorcycle engine? I can fix it up & sell it.. Hockey mask? I can - yeah there's a clear pattern here.
Within the game you're able to carry a defined weight before you become over-encumbered and are reduced to walking at a snail's pace. I often find myself in this state, so what do I do? Drop some excess junk and carry on? NO WAY! I resort to taking strength enhancing drugs OH YEAAAH!


I think if the worst comes to the worst and there was some sort of nuclear holocaust I would have a great career as a scavenger-repairman. Fallout 3 should serially be used as post apocalypse training.

Also, it's snowing! Just got back from the doctor, my knee x-ray came back all clear so they're sending me off to get an MRI scan. Maybe this time I'll gain super powers, or at the very least they'll get to the irking pain in my leg.

Friday 1 January 2010

Twenty ten (ten). God damn (damn)

A new year is upon us and as false resolutions & hopes run riot amongst us, I sit here awake at 1.04am on the 2nd January wondering how I could be better-er..

To shame future Dave into recognising how lazy/unproductive/unmotivated he is, I shall list a few things I intend on doing this year, which currently seem like good ideas.

  1. Jump onto the indie development bandwagon. Be it a cruddy game or a half assed app it's something I feel is worth doing. At the very least I'll gain some programming experience. I've signed up for a free XNA creator club account and sat through 2 hours of tutorials to get the ball-a-rolling on this 'un.
  2. Start drawing again, as well as developing series/shorts ideas. Keep an actual organised and documented sketchbook...hey..it could be on this blog?!
  3. That leads me to the subject of this blog.... I'll aim to actually keep it updated with stuff that isn't just code stolen from other sites (though there'll be plenty of that).
  4. Leave the country at least twice.
  5. ???
  6. Profit
That is it.
Paper out.