PDA

View Full Version : hand weighting clones


Zendorf
03-17-2007, 06:33 AM
Just wondering if there is a way to hand weight the weighting value of individual clones in Mograph. I know that I can use an effector such as random, shader or step to influence weighting but I was after some more control.

For instance weighting clones 20-30 to 50% and individual clones 40 and 45 to a value of %75.
The mograph data node is great for getting info out, but afaik I can't drive specific clones via xpressso? I would ideally like to paint a weight map and use the cloner in object mode to derive these weighted values.

Have tried the vertex map shader inside the shader effector. Also have tried using the weightmap node but I can't seem to pump these values into the cloner object....any ideas?

Maybe Per-Anders can help out :)

Per-Anders
03-17-2007, 07:50 PM
For general ranges by index you can use the step effector and it's spline. But for specific numbers you can use the formula effector, it accepts test functions you just have to make sure that the test is surrounded by a bracket, but lets say you want it to affect clones from the 5th to the 10th clone, you need to remember that the clones indexes start form 0 so it would be you'd put in the formula (id >= 4) && (id < 10), that's if the id is higher or equal to 4, the double ampersand mean "and" in the formula field, so it's if the id is higher or equal to 4 and lower than 10, then the result is 100%, now lets say you wanted to add the clone with index of 15 to there you'd use the "or" function which is the double vertical line || so it would be (id >= 4) && (id < 10) || (id == 15)Ok, but you wanted to have direct control and say that the clone at 15 should only be at half the strength, what you can then do is just use the standard math functions, so instead of using the "of" you simply add it in using the plus "+", and multiply it by the right amount, so it would be something like ((id >= 4) && (id < 10))+((id==15)*0.5)This looks a bit intimidating at first, but it's not that copmlex, the test functions need to be bracketed away so they'll be calculated first, if they're true then they output a value of 1, if they're false then they output a value of 0. 1.0 is the same as 100% so all we're doing is multiplying the result of the second test the id==15 by 0.5 (which is the same as 50%, or dividing by two), and adding it's value to the result of the first test which is either 0 or 1.

Hopefully that's not all too confusing, and should get you going. If you want to do a test to see if something is not equal then you use the "not equal" test which is an exclamation mark and an equal sign "!=". The Exclamation mark is also used to invert values too, so you can use that on the test.

If you want to modify clones weights in a more visual way then you should make use of effectors falloffs to do that job.

Zendorf
03-19-2007, 04:54 AM
Thanks for the very informative post Per! It has really opened my eyes to some of the hidden power of the Formula effector, since I didn't even know that it handled conditional statements such as and/or/not.

After some experimentation it also made me realise that I can get control over weighting via xpresso by pumping concatenated strings into the formula port of the formula effector node...very handy! Although I still think it would be cool to have a reverse of the current Mograph data node...ie the ability to get weight/position/scale etc info into a cloner object.

Also, is there some technical reason why the shader effector will not work with vertex map shader? It seems odd since most of the other effects type shaders (fresnel, normal direction, even ripple and proximal) work without any problems. Would be very handy to be able to paint up vertex maps for the PSR of clones and use the vertex maps shader to drive this. I realise that I could paint up color textures in BP to do this , but VMaps would be more apt for the job....

Anyway, I will submit the suggestions to Maxon...

CGTalk Moderation
03-19-2007, 04:54 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.