WIP by O'Neill

Post here to join the contest
O'Neill
Posts: 76
Joined: Thu Jun 21, 2007 2:02 pm

WIP by O'Neill

Postby O'Neill » Fri Aug 03, 2007 7:56 pm

Here is the link to the website where the spray (and foam script) or mentioned.

Spray Script overview

There are 2 scripts on the page that he talks about. The main one I wanted to try was the spray script, however I am new to scripting, so I wasnt sure how to apply it to my scene.

Thanks for the help. This scripting stuff looks to be a little complicated.


shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

WIP by O'Neill

Postby shaun_michael » Fri Aug 03, 2007 8:17 pm

By the looks of it the script is equipped for nine emitters. One main water emitter, and up to 8 spray emitters (1 main one and 7 others that are commented out of the script as it stands).

You need to load this into your Events script window. Layout-event script (or F11)

Once in there, click the "active" box at the bottom right of the script window. This makes the script, erm, active. If this box isn't ticked the script will not be considered during simulation.

Add an emitter to your scene, a circle one for instance and rename it spray (case sensitive)
If you are going with your one water emitter idea, change this one's name to water (again, case sensitive). Alternatively, change the name between the quotes in the script from water to your emitter name, and from spray to the "dummy " emitter name.

For your spray emitter, change it's speed to zero, and it's type to dumb. This emitter will act as a container for particles generated by the script during the simulation and doesn't actually need to emit anything. You can place it out of the viewport if you wish to clear things up, or just move it to one side.

OK, moving to the control variables. Here you have a number of choices to make. read the comments after the # for a description of what each variable does for you and overwrite the default numbers with those of your own.

EDIT - I think, after playing with this a little that the comment about higher pressure being related to less particles is wrong. The lower the pressure the less particles should be created. This would make sense from a logical standpoint, and carries through when testing the script

You'll note that at the bottom of tha main body of script the author has left a section of code in there to copy and paste depending on whether you choose to use more than one spray emitter, named srapb, sprayc etc.

Code: Select all

##uncomment / copy one of these for EACH spay emitter. 
            #for i in range(spray_parts):
            #   vel.setX(tx * (1 + (random() * spray_speed_rand)) + (random() * spray_rand) -h_spray_rand)
            #   vel.setY(ty * (1 + (random() * spray_speed_rand)) + (random() * spray_rand) -h_spray_rand)
            #   vel.setZ(tz * (1 + (random() * spray_speed_rand)) + (random() * spray_rand) -h_spray_rand)
            ##SET THE NAME BELOW TO sprayc, d, e, etc
            #   sprayb.addParticle(pos, vel)

Just copy and paste this commented block, then remove the # from each of the code lines, except the first and sixth. If you're only using one spray emitter just leave these lines alone, they'll do nothing as long as they have the # marks at the start of the line. Make sure you rename the "sprayb.addParticles(pos, vel) line to match the name of the emitter it should be using as the spray container.

The reason for the multiple spray emitters is related to the pipeline as the author mentions. More spray emitters with less particles mean you should get this through te pipeline more efficiently and comp them in post.

Thats about it really, you should be good to go. If you get any errors its likely the tabbing that's causing it.

Good luck,
Shaun

O'Neill
Posts: 76
Joined: Thu Jun 21, 2007 2:02 pm

WIP by O'Neill

Postby O'Neill » Fri Aug 03, 2007 8:21 pm

Thanks for explaining it. I'll give it a try and see how it works.

O'Neill
Posts: 76
Joined: Thu Jun 21, 2007 2:02 pm

WIP by O'Neill

Postby O'Neill » Tue Aug 07, 2007 8:59 pm

Heres a little shot of my thick creamy goop that will be spilling out onto the road from a large high rise tank on the side of the road.

Attached files

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

WIP by O'Neill

Postby shaun_michael » Tue Aug 07, 2007 9:00 pm

Did you have any joy with the script?

Shaun

O'Neill
Posts: 76
Joined: Thu Jun 21, 2007 2:02 pm

WIP by O'Neill

Postby O'Neill » Tue Aug 07, 2007 9:07 pm

Actually I did. I dont think ill be using it for this contest, but I was able to get it to work. I saw your correction (in red) about the pressure, and I think you were right. I had to play around with it some, but it worked. At first I couldnt tell, but then I changed the "spray" emitter's color to red, and then I could see it better.


I was going to use it, but then I thought I would make something a little different. Instead of water washing over the road, I thought something like milk would look cool.

I wanted to do water with foam and spray, but I have no clue how to produce those kind of effects in C4D. Its not really all that great when it comes to fluid effects.

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

WIP by O'Neill

Postby shaun_michael » Tue Aug 07, 2007 9:13 pm

Well, perhaps for another time then :)

Good luck with hte rest of your piece.

Shaun

O'Neill
Posts: 76
Joined: Thu Jun 21, 2007 2:02 pm

WIP by O'Neill

Postby O'Neill » Fri Aug 10, 2007 5:44 pm

Just a little update on mine. Its been simulating for 40 hours now, and has simulated 418 frames. Ive got to go up to 514, so ive got about 96 frames left to simulate. Then comes the 3D part.

I should have all this done soon.


Im assuming we can have post work in the final shot right? If I want to use After Effects for color correction, etc. Im assuming this is ok. Just want to be sure before I add something not permitted.

O'Neill
Posts: 76
Joined: Thu Jun 21, 2007 2:02 pm

WIP by O'Neill

Postby O'Neill » Sun Aug 12, 2007 2:07 pm

My simulating and mesh building is finally done. After 68 hours. I seriously need a new system. Heres whats ive got so far. Ive just started putting things together in C4D.

Attached files

User avatar
Herbert
Posts: 348
Joined: Fri Sep 08, 2006 9:19 pm
Contact:

WIP by O'Neill

Postby Herbert » Sun Aug 12, 2007 5:47 pm

Yes, for sure you can do compositing on your work.
All you would do if you would i.e. work on a commercials or something else.


Return to “Contest WIP”

Who is online

Users browsing this forum: No registered users and 1 guest