View Full Version : Multiple 'Multi/Sub-Object' materials in one PFlow?
04-08-2008, 09:05 PM
Hello guys, haven't posted on here for a long time so hello to one and all...
Does anyone know if it's possible to apply a Multi/Sub material which itself has nested Multi Sub materials embedded and for the behaviour of the PFlow to respect these 'sub sub object' material channels?
Did that make any sense? I doubt it, let's use an example...
I need to make hundreds TV's with the same purple case colour but with 5 different screens. So I created a 5 slot Multi/Sub material and inside each slot put a 2 slot Multi/Sub. In each of these materials has the same purple case colour material in the top slot and a different screen material in the bottom slot.
With a simple flow set up applying multiple id's to the particles, all I get are particles with a single id applied to it's mesh rather than 2 ids.
Any help on this subject would be greatly appreciated. I understand the workaround is just have multiple Pflows with different materials but it seems like something that PFlow should be able to do for me...
Many thanks :-)
04-08-2008, 10:16 PM
There are several ways of doing this without multiple PFlow systems. The most straight forward is to break the main event off into sub events for material assignment. First use a Split Amount Test set to 1/5th and send out to Material #1. Below that set another Split Amount Test to 1/4th and send out to Material #2, repeat until you have the final 1/2 and below that place your final material. So your flow would look like this
Split Amount 1/5th ---->Material1
Split Amount 1/4th ---->Material2
Split Amount 1/3rd ---->Material3
Split Amount 1/2 ---->Material4
You will need to instance your other operators (Speed, Rotation, Spin...) throughout each event as materials do not transfer well through events.
Another way is to break your TV into two objects with common pivots. Use two events, one for the frame and one for the screen, apply materials accordingly. Again, instance any common operators between the events as needed.
And finally, you could create screen/frame mask maps and use a Blend Material for your intial material and nest that into a Multi-SubObject.
04-08-2008, 11:34 PM
I never understood why max would let you have sub-sub materials in the material editor anyway.
Maybe for storage, wiring or some other kind of behind-the-scenes manipulation it might be useful, but as far as I know, it's impossible to display or render them, in any situation.
04-09-2008, 12:10 AM
Crikey, the late owls are up and about! Many thanks guys for your responses.
Dave: Yep, it's bizarre - thought I'd give it a go... although I can understand why max would puke up. Nesting composite material id's would be useful but I ain't a programmer so the rules might be trickier to program my wishes...
Charley: Thanks for your methodolgy - I've been trying to prevent adding the dreaded Split Amount until as late as possible... My head always crumbles when the PFlow quadruples in size after adding the bugger!
The way I ended overcoming this issue has been...
Create an instance of the main guts of my PFlow and break up my TV object into 2 seperate objects: It's case and it's screen. Use the 2 seperate PFlows to represent the two TV elements. In After Effects build a 10,000 frame sequence of a solid block of colour (this will eventually be replaced with a pretty sequence of various TV channels being selected) and apply it as a MaterialDynamic to the PFlow for the screens with a big random age value.
I end up with loads of screens displaying and changing to different sequences (although really, they're displaying sections of one big long sequence).
It works for the purposes of testing the design (tune into CBBC's Newsround next month and you'll see the final thing... if the client likes it...)
Many thanks for ya inputs,
04-09-2008, 11:10 AM
Yep ye can't nest a multi sub in a multi sub - the main reason being that if for example you have a material with sub 1 and 2 and material 2 has a multi with 1,2,3 inside, you can only assign a single number to a polygon in a model so while you could assign material id 2 to a face, you'd have no way of being able to specify material 1,2 or 3 of the nested material.
04-09-2008, 07:03 PM
Yeah, seems like a straightforward limitation imposed by the method Max works, I guess. I could see the benefit of recording and accessing composite material ID's onto polygons for funkier material fun with flows. Material usage within PFlow does feel limited at the moment (this is coming from someone who couldn't maxscript a cube to save his life)...
I imagine a special PFlow material being developed which has it's own funky shaders which can do all sorts of wonderous things I haven't even thought of...
Think it's time to pop over to Scriptspot and see what I've been missing out on...
04-10-2008, 10:25 AM
This is true - thinking particles has a material that can put in random colour variations for this type of thing - no doubt we can come up with a clever solution with scripting or box #3.
04-10-2008, 10:45 AM
I don't see why you guys overcomplicate the things :)
This case is quite straight forward:
1. Assign your multi-sub materials to 5 TV set models.
2. Combine these 5 TVs into a group.
3. Use the group as a reference object for Shape Instance operator; with Separate Particles for "Group Members" On; and with Acquire Mapping and Acquire Material;
And that's it!
You don't need a separate Material operator; Shape Instance operator will combine the materials from the group members for you, and assign it properly to the particles.
So, it's just a single event - just use Shape Instance operator wisely :)
04-10-2008, 10:54 AM
Oleg, I didn't even consider this thinking that the moment I apply a Material Dynamic to the flow it'll overwrite my 5 different materials applied to the seperate TV objects in the group... Max is busy at the moment but I'll most certainly give it a go. Thanks for ya megabrains!
04-10-2008, 12:40 PM
Oleg, I love you!
Didn't realise that you can use 'Material Dynamic' to apply random particle ages to the particles but not actually apply a material to them... hurrah!
All I had to do was actually 'look' at the screen and unchek the 'Assign Material' box at the top of the Material Dynamic operator.
Hope that helps other like me...
04-10-2008, 04:38 PM
aahhh, I should have thought of that, LOL. I was just seeing if you were paying attention Oleg :D
One thing to note when doing it this way is that materials don't transfer through multiple events, so you will need to instance the Shape Operator in each event to maintain the material.
04-10-2008, 04:38 PM
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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.