It’s a MCG feature, not supported in mxs. Embree is on github so if you need it grab it there and do your own implementation.
so with embree does it mean we can finaly have a great fast skin slide/collision deformer in Max !? will it be faster like a sdk plugin/c++ ?
-i would like to know if it can create somethink like “Weta tissue system” or “ILM muscle plugin hulk” or more simple tools like skinFx, Absolute Character Tools.
ps: thanks to all the Max dev team !
Simple answer is yes. I have that on my long list of things that I would like to try and set up with it.
thanks, can’t wait to see the next Pen Character Deformers Toolkits ! Good luck
MCG Smash ! :applause:
For me it’s simple; companies who can afford to hire programmers will use it sporadically (to begin with, we don’t know how it will be further developed – it’ll probably produce multi-threaded modifiers, geometries, etc. in later versions), whereas smaller companies who have artists with little or no scripting experience will be able to create little custom tools to speed up how they work.
There’s only one thing we can all be almost certain of: the documentation’s going to be rubbish ;).
-Harry
There’s also an example of clone modifier in maxscript in the 2016 maxscript reference: SimpleMeshMod
I might just as well compare the mxs/mcg performance as soon as I get the browser download working and max installed.
Try in chrome , that worked for me for the bigger file ( the 2GB part )
The second part i had to download using firefox though …
totally borked …
it will be very useful modifier class.
btw… from example:
on modifyMesh do
(
local inMesh = copy mesh --make a copy of the incoming mesh
for n = 2 to nCopies do --repeat N-1 times
(
local currentMesh = copy inMesh --copy the incoming mesh value
meshop.moveVert currentMesh #{1..currentMesh.numverts} ([X_Offset,Y_Offset,Z_Offset]*(n-1))
mesh = mesh + currentMesh --accummulate the moved value into the output mesh
)
)
it’s not clone! it’s the mesh boolean union (if i’m not missing anything).
Okay, I’ve tried playing with it a little bit. I’ve used the example from the help file for maxscript clone modifier and the same node setup Christopher Murray showed in his video, I just made the parameter names the same.
t0 = timeStamp()
addModifier (Teapot segs:8 radius:5 isHidden:true) (MXSCloneModifier numClones:64 XOffset:7)
format "MAXScript time: % ms
" (timeStamp() - t0)
[b]--> MAXScript time: 95219 ms[/b]
t0 = timeStamp()
addModifier (Teapot segs:8 radius:5 isHidden:true) (MCGCloneModifier numClones:64 XOffset:7)
format "MCG time: % ms
" (timeStamp() - t0)
[b]--> MCG time: 792 ms[/b]
Now, let’s cheat a little bit and say I only care about powers of two to test how the MXS speed would change if there were significantly less attach operations. So then the modifyMesh handler will be:
on modifyMesh do
(
local numIterations = int(log numClones / log 2)
local offset = [XOffset, YOffset, ZOffset]
for i = 1 to numIterations do
(
local currentMesh = copy mesh
meshOp.moveVert currentMesh #all offset
mesh += currentMesh
offset *= 2
)
)
Still, there’s a big difference, with this cheat MAXScript time for the same operation is 5604 ms.
mesh += currentMesh
this is NOT ATTACH! it’s boolean union. this operation checks intersection mesh against mesh
Oh man, with meshOp.attach it’s a whole different story:
Teapot segs:8 numClones:256
MCG time: 3380 ms
MAXScript time: 1779 ms
MAXScript cheat time: 179 ms
Teapot segs:8 numClones:256
MCG time: 7736 ms
MAXScript time: 7069 ms
MAXScript cheat time: 342 ms
Teapot segs:10 numClones:1024
MCG time: 27449 ms
MAXScript time: 43855 ms
MAXScript cheat time: 1046 ms
Now obviously the cheat time is there just for reference but still…
fn _attachMeshes meshes =
(
attach = meshop.attach
n = meshes.count
while (num = n/2) > 0 do for k=1 to num do attach meshes[k] meshes[(n -= 1) + 1]
meshes[1]
)
delete objects
t = teapot segs:8 radius:5 ishidden:on
t1 = timestamp()
m1 = heapfree
m = editable_mesh()
count = 64
radius = 600
step = 360.0/(count-1)
_t = snapshotasmesh t
tm = transmatrix [0, 0, 0]
meshes = for k = 0 to count-1 collect
(
_m = copy _t
meshop.movevert _m #all [k*7,0,0]
_m
)
free _t
m.mesh = _attachMeshes meshes
format "verts: % time: % memory: %
" m.numverts (timestamp() - t1) (m1 - heapfree)
update m
redrawviews()
time: 204
meshop.attach is not the right operation in case of cloning because it also does do face mat ID or material operations.
there is meshop.cloneFaces which does do what we want but… it fully updates mesh every time we do a clone, which is not necessary and can be done only after all faces cloned.
the same test above written on c++ SDK using my meshop takes 60ms…
in case:
teapot segs:10
count 1024
my clone modifier does do it for ~4000ms
only make a mesh ~2500ms
which produces the mesh of 3319808 verts