PDA

View Full Version : Holding texture frame after Birth


jussing
03-06-2009, 12:16 PM
Hey all, I just posted a question here (http://forums.cgsociety.org/showthread.php?f=183&t=738581), but I realized it's the wrong board, because the problem isn't related to Pflow Tools.

The setup is, I use Tool Box #1's "mapping object" to apply UV mapping to my particles, so they get the color from the emitter's texture.

That's all fine... except that the texture is animated, and while everthing is fine at particle birth, the movie keeps "playing" at every one of the particles.

What I need is for every particle's texture to freeze on the frame it was spawned.

Any help would be appreciated. My only option so far is to create a particle system, or at least a material operater, per frame!

- Jonas

PS, You can create a test of this, where a 2*2 checker board spawns particles. From frame 9 to 10, animate the UV's with a 0.5 offset, so the checkers switch colors. Then go to frame 20 and render the particle stream.
If you get it to work, you should see the checker switching halfway in the particle stream.

Piflik
03-06-2009, 12:33 PM
Try Bobo's Script (http://www.scriptspot.com/bobo/mxs5/pflow/pflow__inherit_UV.htm) . (I don't know if it works with animated Textures, though)

jussing
03-11-2009, 11:22 AM
Thanks, but no, it also just inherits UV, same as Pflow tools.

What I need is a script that will assign a color, based on the texture.

- jonas

OlegB
03-11-2009, 01:24 PM
If you have Box#3, you can create a custom Data Operator that does that.

Thanks,
Oleg B.

jussing
03-11-2009, 01:58 PM
Thanks Oleg.

But I don't think that's an option right now. I'm with a client, and they already bought two plugins on my request (box #1 being one of them). :) I can't have them buy a plugin every time I want to do something.

- Jonas

JohnnyRandom
03-13-2009, 05:31 PM
Thanks Oleg.

But I don't think that's an option right now. I'm with a client, and they already bought two plugins on my request (box #1 being one of them). :) I can't have them buy a plugin every time I want to do something.

- Jonas

I totally know what you mean :D, there are a few occasions I have just ate the cost of a plugin and it ended up paying for itself later, which worked out well as I had a better working knowledge of it when it came time to use it again... just me though and it depends if it fits in your general workflow :)

To your topic I haven't been able to find a vanilla solution regarding your problem either :(

How complex is it? If it isn't too crazy you could use a multiple collision tests with animated deflectors to pass your particles to new materiel events.

jussing
03-13-2009, 07:14 PM
Well, first I get it to work with a complex setup with 53 materials (one for each frame of the animation), and in the particle system I cycled through the material IDs, one per frame.

That worked out fine..... with PFLow alone, but not with Krakatoa, that we're trying out for rendering! Grr!

Then I set up the most annoying Pflow system I've ever worked with, which is one Pflow system per frame.... yea, 53 almost identical flow, each with a different material (one texture map per frame), and each spawning on one frame only. That worked out fine, and I hoped the client wouldn't ask for changes to the simulation.

Buuuuuuuut..... They did!

So, what I did was bake the camera-mapped (animated) video texture into a custom UVW map, so it sort of holds the same frame throughout. It kinda works.

Also, I've devided the particle flow into different parts of the geometry that will dissolve into particles, and they spawn on different frames, so for each of those particle systems I'll use the still frame that corresponds to the first birth frame.

So..... it works all-right (ish) for now. But it ain't pretty.

- Jonas

Glacierise
03-13-2009, 09:01 PM
Das ist madness :D

JohnnyRandom
03-13-2009, 09:12 PM
You have way more patience than I! 53 flows uff-da! Insane particle view I'm sure. Glad you found a workaround. :)


That worked out fine..... with PFLow alone, but not with Krakatoa, that we're trying out for rendering! Grr!

Bobo or one of the Frantics may be able to help with that... ask up at Frantics (http://support.franticfilms.com/) support board

charleyc
03-14-2009, 07:42 AM
Don't know for sure if it would work, but it should...

Update Bobo's script to be a birth script and get the mapping data at birth...Use that to get the bitmap pixel color (divide the mapping coords and the image size) and assign it to the Vertex Color of the particle.mesh...this should evaluate upon entry into the event and stay fixed on the color you want.

I have all the componants around to put this together, but I don't have time at the moment. I am supposing it would work, but as Oleg pointed out, this would be extremely simple with Box3. When heading into projects like this it will pay for itself many times over unless you have very good pFlow scripting knowledge...then it should still at least pay for itself :)

CGTalk Moderation
03-14-2009, 07:42 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.