Notifications
Clear all

[Closed] The MCG Thread: Post Tools, Compounds and questions here!

careful denis, talk like that you’ll get the “well if ya don’t like it, bugger off to another app”

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

honestly i did :)… i’m 90% in maya now. and working in max i’m using mostly my own max framework (my skinops, polyops, meshops, unwrap, edit normals, vertex paint, scene manager, etc.).

it’s not better or worse, it’s just a different set of tools to get the job done. as selling points I would say:

-better performance then mxs (multithreaded, c# speed)
-easier to pick up compared to sdk/mxs
-easier to adjust, even an artist can make some simple changes if needed.

In some cases a few lines of mxs can replace a lot of nodes, but I reverse is true as well. It’s definitely not dumbing down max, but yes some skills will become obsolete/less in demand. On the other hand, writing new nodes (not graphs, but nodes) is going to be booming business. looked what Empower is doing with ice nodes.

So as a hardcore TD you can write nodes that the artists can play with. (This is not documented in the SDK, but doable with a template, a node is basically a c# function)

So I’d say dive into it and use it to your advantage.

it’s based on my experience…

if a tool was made within 5 days (mxs approach)

– 1-2 day is just to design a tool

– 1 day for code development

– 1 day for debugging and optimization

– 1-2 days for good UI

how much we can safe of this time using MCG?

1 Reply
(@jonadb)
Joined: 11 months ago

Posts: 0

This doesn’t really sounds like a tool you’d use mcg for.

i forgot to say… 5 days tool is about 500-1000 lines of code (it’s about 4-5 points in my scale)

another question…
what do you prefer – good, well organized and optimized mxs code, or c# mess but working faster than mxs?
i prefer #1 because sooner or later if this code really useful i can easily rewrite it on good c# or c++ sdk (actually i do it all the time) or python for Maya. but what will i do with that mess produced by MCG?

2 Replies
(@davius)
Joined: 10 months ago

Posts: 0

I prefer #2 all the way if the tool needs further optimization I’d hire someone or learn C# and do it myself. If it needs porting I’d also hire someone or do it myself.

Again, this was the no 1 requested feature on the user voice! People voted for it and got it! How can this be a bad thing? It may not be what you want, buy the majority of users want it! And it’s not like everyone will make scripts and plugins with MCG! It’s certainly easier than writing code, but it’s not EASY, you still need to have some understanding of logics and programming.

By no means I’m saying this is the best thing ever! But you’re way past the point of skepticism judging the tool worse than current solutions, assuming the need for TD will diminish, that Max becoming a “toy”. Well, by that way of thinking, Houdini must be kinder garden stuff

(@rghost)
Joined: 11 months ago

Posts: 0

If you carefully read the uservoice threadyou will see that author writes about C++ modifiers, other part of thread can be applied to scripted modifiers. So what we have? We have scripted node based modifiers which is middle of speed between C++ and SimpleMod modifiers. So ADSK complete request by half.

//youtu.be/Rh18JqSvrHE

When I talk about speed I always remember this video Genome: 0.5sec per frame – 3ds max 18hours per frame . Interesting what FPS will be at MCG…

1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

That was because the Conform modifier in Max uses a brute force algorithm to find the intersection, which requires a full loop though all faces of the target mesh for EACH ray.

MCG uses Intel Embree libraries under the hood for ray intersections and nearest point lookups. Genome uses our own inhouse kdTree acceleration structure. I would expect MCG to perform much better than the old Conform, but I have not tested that yet.

Note that you could wire a MAXScript function with MCG that can be accessed from MAXScript to perform faster ray intersections than the built-in intersectRay / intersectRayExt function which were also brute-force.

MCG doesn’t look of much use for tool developers, other than the SimpleMeshMod addition already mentioned. Compiled and multithreaded sounds like it’ll be faster than mxs in certain cases, but lack of ability to optimize and the fact that every node gets and returns immutable data suggest that it may outright choke on many other tasks.

It seems to be primarily a tool for artists. Yay, Slate Maxscript Editor! My impression is that it might be quite useful for various procedural content creation tasks. Something reminds me of Houdini here…

But still… don’t judge a movie by the trailer.
We’ll see when we get to try it. : )

Cases like this make me think Autodesk is trying to diverge Maya and Max to cover different markets (makes sense in terms of business, they own both anyway; the alternative would be killing max, like they did with Softimage). Maya for being pipeline-friendly in large studios and projects. Max primarily being geared towards small studios comprised mostly of artists without any developers (archVis and ads?); the abundance of half-assed but easy to use tools and toys does allow for such teams to at least get things done, even if not in the most efficient manner.

I have done enough maxscripting, but making my own modifier was just out of my each.
I do not want(or can’t) learn C++ to make some modifiers?.

I made ExtractDeltas with MCG within in an hour.

It provide me a good middle ground between maxscript and sdk.
I don’t care how much the code is optimized, because something is better than nothing.

3 Replies
(@pi3c3)
Joined: 11 months ago

Posts: 0

My opinion is, that because MCG has been written in the past 4 years, I’m sure it uses the most recent instruction sets of our processors like the mentioned Intel Embree. What else you need? It’s an insanely fast and intuitive visual programming language for creating backburner compatible content creation tools.

(@denist)
Joined: 11 months ago

Posts: 0

what is extract deltas? i want to write it on pure mxs and we can compare results.
(and i honestly want to see how MCG code beats mxs)

(@gandhics)
Joined: 11 months ago

Posts: 0

My point is not about speed.
I just could not do it with maxscript regardless of speed.
Now MCG gave me a capability to do it.

also i will appreciate if someone will make ARingClone plugin using MCG and tell us how it works with 500(count) instances of default teapots.
(just a couple of numbers: time it makes the mesh, and memory used for it). thanks.

5 Replies
(@gandhics)
Joined: 11 months ago

Posts: 0

I made cloneOnVerts modifier. Basically you clone an obj for each vertex.
I think cloned default teapot on default torus and animated it.
I can not remember exact value, but it was total 152928 verts.
I got 1.2fps.

(@denist)
Joined: 11 months ago

Posts: 0

it’s ~288 default teapots…

here is pure mxs:

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]
)
fn _meshTransform mesh tm =
(
	for v=1 to mesh.numverts do 
	(
		setvert mesh v ((getvert mesh v) * tm)
	)
	mesh
)

delete objects 
t = teapot ishidden:on
	
t1 = timestamp()
m1 = heapfree 

m = editable_mesh()
count = 288
radius = 600
step = 360.0/(count-1)

_t = snapshotasmesh t
tm = rotateZ (transmatrix [radius, 0, 1]) -step
meshes = for k = 1 to count collect
(
	rotateZ tm step
	_meshTransform (copy _t) tm

)
free _t
m.mesh = _attachMeshes meshes
format "verts: % time: % memory: %
" m.numverts (timestamp() - t1) (m1 - heapfree)
update m
redrawviews()

it makes 288 instances of teapot, transform their verts, and attach to one mesh.
~ 2.5 fps

the c++ version of the same makes ~10 fps

(@gandhics)
Joined: 11 months ago

Posts: 0

Shouldn’t you give me a modifier?

(@denist)
Joined: 11 months ago

Posts: 0

what modifier you want to get? ring array? i can do it. but give me MCG version too…
actually it’s not a modifier, it’s a simple mesh

(@denist)
Joined: 11 months ago

Posts: 0
plugin simpleObject TeapotRingCloner
 	name:"TeapotCloner"
 	classID:#(0x193cc2db, 0x193cc2db)
 	category:"How to with denisT"
 (
 	parameters params rollout:params
 	(
 		count type:#integer default:6 animatable:off ui:ui_count
 		radius type:#float default:100  animatable:on ui:ui_radius		
 	)
 	rollout params "Parameters"
 	(
 		spinner ui_count "Count: " range:[1,1000,1] type:#integer fieldwidth:56 align:#right offset:[4,0]
 		spinner ui_radius "Radius: " range:[0.001, 1e9, 100] type:#float fieldwidth:56 align:#right offset:[4,0]
 	)
 
 	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]
 	)
 	fn _meshTransform mesh tm =
 	(
 		for v=1 to mesh.numverts do 
 		(
 			setvert mesh v ((getvert mesh v) * tm)
 		)
 		mesh
 	)	
 	on buildMesh do 
 	(
 		step = 360.0/count
 
 		_t = (createinstance teapot).mesh
 		tm = rotateZ (transmatrix [radius, 0, 1]) -step
 		
 		meshes = for k = 1 to count collect
 		(
 			rotateZ tm step
 			_meshTransform (copy _t) tm
 		)
 		free _t
 		setmesh mesh (_attachMeshes meshes) 
 		mesh
 	)
 
 	tool create
 	(
 		on mousePoint click do case click of
 		(
 			1: nodeTM.translation = [0,0,0]
 			2: #stop
 		)
 		on mouseMove click do case click of
 		(
 			2: radius = amax (abs gridDist.x) (abs gridDist.y) 
 		)
 	)
 	
 	on create do ()
 	on update do ()
 	on load do ()
 	
 )

did you make your version?

some don’t need speed, some don’t need quality and good user interface… hmm. this is not about tools development.

maybe we have to change direction of this discussion. something to “How the MCG can help to delegate a piece of tools development from a programmer to an artist.”

Page 6 / 24