Ghosts.py a port of bhGhosts

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 11 November 2013   #1
Ghosts.py a port of bhGhosts

Hello folks,

Something that has come up when we've been getting Maya Animators to join our Ottoman project(www.the-ottoman.com) and I was asking them what sort of helper scripts and such they wanted that they had used previously. The majority of them brought up Brian's ghost script for Maya(http://vimeo.com/50029607), so I set out trying to port it to CINEMA. Now it's here and I thought I'd share it with everyone.



How it works:

1. Select some polygonal meshes, and run the script. It will create a ghost for each mesh.

It will create duplicate copy of your mesh stripped down to just polys, and put it in a group and a layer, hide it's visibility, and add it to Sketch and Toon's editor display. If you wish to change the color or thickness, you can do so in the sketch settings.

Some gotchas:

1. There is no UI for this like the Maya version. I was planning on one, but I hit a couple of limitations/bugs, so I put that off since the bulk of it works just fine in this script. Some time in the future there may be a UI, but it may only work on R15 so we will see.

2. For this script, it utilizes Sketch and Toon, which means if you do not have Sketch and Toon, this script won't do anything for you. So you need to be a Studio owner, or a Visualize owner of CINEMA 4D. Don't blame me, that's a limitation I can't change.

3. This script creates a new Render Data and sets it to be the active render data. This is done to prevent overwriting any of your existing sketch and toon settings(something that was causing a bit of a problem for The Ottoman short). So if you are wanting to render, you will want to make sure you switch back.

The script is free for everyone, and open for people to look at and pick apart.

Thanks to Brian for making the original idea, and to Niklas R for coming up with the nifty CSTO function.


EDIT: UPDATE-1:Better Undo support, Overwriting existing frames, and Matching Render Settings to prevent viewport jump
Attached Files
File Type: zip ghost.zip (13.7 KB, 76 views)
__________________
www.bretbays.com
"We do not - not wag our genitals at one another to make a point!"

Last edited by xfon5168 : 11 November 2013 at 02:51 AM.
 
Old 11 November 2013   #2
Cool, thanks Bret, proud to have inspired this. I miss it myself when animating in C4D too so great to have this version.

[Edit - trying it now and one suggestion would be to add a check for an existing ghost on the current frame and deleting it before creating a new one (my Maya version replaces them whereas this one just keeps creating new ones which might be confusing for the animator if they have adjusted a pose and ghosted it again as then they get two different ghosts on the same frame).

Cheers,
Brian

Last edited by Horganovski : 11 November 2013 at 04:38 PM.
 
Old 11 November 2013   #3
Wow we would have definitely loved this on our last big C4D character piece. Our team was mostly comprised of Maya animators that trained at Animation Mentor. The Ghost script was one of the biggest things they complained about missing from Maya.

Now if only someone could figure out a way to keep tangents from overshooting.
__________________
-willRyan
 
Old 11 November 2013   #4
Cool stuff, just out of curiosity, what's the advantage over the inbuilt ghosting in CInema?
__________________
The Third Party | Homepage | My Reel
"You need to know what you're doing before you start, and to start because you need what you're doing."
 
Old 11 November 2013   #5
Originally Posted by Per-Anders: Cool stuff, just out of curiosity, what's the advantage over the inbuilt ghosting in CInema?


If Memory serves, You have to like Cache it for the in built ghosting show show the geo. Then there's like the ability to specify exact frames vs a range and junk. Looks cooler too.
__________________
www.bretbays.com
"We do not - not wag our genitals at one another to make a point!"
 
Old 11 November 2013   #6
Originally Posted by xfon5168: If Memory serves, You have to like Cache it for the in built ghosting show show the geo. Then there's like the ability to specify exact frames vs a range and junk. Looks cooler too.


Ah, so this will update it's caches constantly on the fly as you adjust the poses? That's a nice addition. You can specify exact frames with the inbuilt ghosting though.
__________________
The Third Party | Homepage | My Reel
"You need to know what you're doing before you start, and to start because you need what you're doing."
 
Old 11 November 2013   #7
No in fact it doesn't update automatically, the Maya version though will overwrite ghosts as you create new ones (I have a newer version I've not released yet that has a 'replace' mode but that's off topic).

The description I posted on my original video demoing it might help clarify, it's really an attempt to work with more of a 2D traditional animation mindset when working in CG.

This is an animation tool I wrote for Maya that provides a different approach to ghosting/onion-skinning in 3D.

I was watching a recording of a live lecture with Jason Ryan (Dreamworks/iAnimate) when a student asked him if he used ghosting when animating in 3D. He mentioned a couple of reasons why he usually doesn't, even though he uses the lightbox feature all the time when animating in 2D.

I realised I feel the same way about any 3D ghosting solutions I've tried. One problem is that they slow the scene down usually, and another is that they are not that easy to see in the viewport, usually being a faded version of the mesh or a wireframe of it which doesn't read very clearly.

Then the penny dropped for me - 2D animators don't see the fully shaded character in the lightbox when animating, they see only the lines they've drawn, so the spacing is a lot easier to see. So I set about writing a tool that will give an outline of the character rather than a fully shaded one when ghosted. It's also a little different in that the animator just ghosts specific frames rather than having something heavy that's constantly updating in the scene, for my workflow at least this is preferable.



heh.. quoting myself.. I'm sure the white coats are on their way for me..

This shows my original version in use (it's had a few improvements since) in 30 seconds.




Cheers,

Brian
 
Old 11 November 2013   #8
Originally Posted by Per-Anders: Ah, so this will update it's caches constantly on the fly as you adjust the poses? That's a nice addition. You can specify exact frames with the inbuilt ghosting though.


As Brian said, it does not update. This is just like a snapshot of this pose at this point. It doesn't update(though it's a good idea I can add it to replace if it exists, I'll add it tonight).

Another problem, if I recall correctly, is that the mesh display of the ghost tag, is the entire wireframe, which is heavy visually. This way allows me to keep it to just like borders and outlines and such so its more silhouette visualizing which is nice.
__________________
www.bretbays.com
"We do not - not wag our genitals at one another to make a point!"
 
Old 11 November 2013   #9
I've just updated the script in the original post so please re-download it if you downloaded it earlier today.

The changes include proper undo support(DOH!), overwriting existing frames instead of making more and more, and then making the ghosts renderData's Height, Width, and Film/Pixel Aspect ratios match. So it should prevent your viewport from shifting/adjusting to differring ratios when you first make it.
__________________
www.bretbays.com
"We do not - not wag our genitals at one another to make a point!"
 
Old 11 November 2013   #10
Nice improvement Bret.

Thinking about ideas here for the issue where you have to select the meshes each time you want to make a ghost (the Maya version stores the meshes in a text scroll list that's part of the UI).

One idea would be that the first time you run the script it takes the selection, makes a Selection Object and adds those meshes to it. Then each time you run it after that it looks for the Selection Object in the scene and ghosts those meshes if it exists.

Alternatively, the script could create a null and add Userdata Link Fields to it and then add each mesh to one of those links. Then the same thing really, the script checks for that null and works with those meshes accordingly (I've used this in C4D for IK/FK scripts, it's similar to using Message attributes in Maya).

The whole point of those steps is that the animator has to only set up the object(s) for ghosting once, then after that they can have the control objects selected but still ghost the meshes.
Not sure how hard they are to implement but thought I'd put the ideas out there in any case.

Cheers,
Brian
 
Old 11 November 2013   #11
Originally Posted by Horganovski: Nice improvement Bret.

Thinking about ideas here for the issue where you have to select the meshes each time you want to make a ghost (the Maya version stores the meshes in a text scroll list that's part of the UI).


This was my original plan, where you could just make groups as needed in the UI, and these groups would be InExcludeData, but there's no way to actually get the data FROM those groups and do stuff to them. So I just abandoned the UI.

Originally Posted by Horganovski: One idea would be that the first time you run the script it takes the selection, makes a Selection Object and adds those meshes to it. Then each time you run it after that it looks for the Selection Object in the scene and ghosts those meshes if it exists.


Eh, it could be done. The problem is then that means you will ALWAYS be making a ghost of those things each time when it may not be wanted. So then you're stuck maintaining the selection set. Personally, I like the flexibility of only what I select goes, but I can see the mundane-ness of having to select them. I'd rather just leave it to the animator to make that selection set and when they want to make a ghost they just double click and then run the script.

Originally Posted by Horganovski: Alternatively, the script could create a null and add Userdata Link Fields to it and then add each mesh to one of those links. Then the same thing really, the script checks for that null and works with those meshes accordingly (I've used this in C4D for IK/FK scripts, it's similar to using Message attributes in Maya).


yeah, I've done the same, my isolate selected script makes use of that, and so do some of my earlier IK/FK snapping stuff. But in a case like this, it still runs into some of the same issues as above, but actually being a bit more of a pain in the ass to maintain(ie add and remove new things).

Originally Posted by Horganovski: The whole point of those steps is that the animator has to only set up the object(s) for ghosting once, then after that they can have the control objects selected but still ghost the meshes.
Not sure how hard they are to implement but thought I'd put the ideas out there in any case.
Cheers,
Brian


Yeah, and I completely get that, and in a UI it's much simpler to manage. That's why I was aiming for that originally. Had that crap almost all sorted out before I ran into the limitation. However, without the UI, I find those options to be more trouble than help in this case, which is why I stayed away from them. It's not asking too much of an animator to just make the set themselves as needed. That way they can make as many as they want for various things, and not be restricted by adding and removing pieces each time before they click ghost.

But Eventually, I'm going to get the UI working and then it'll all be moot.
__________________
www.bretbays.com
"We do not - not wag our genitals at one another to make a point!"
 
Old 11 November 2013   #12
Originally Posted by xfon5168: The problem is then that means you will ALWAYS be making a ghost of those things each time when it may not be wanted. So then you're stuck maintaining the selection set. Personally, I like the flexibility of only what I select goes, but I can see the mundane-ness of having to select them. I'd rather just leave it to the animator to make that selection set and when they want to make a ghost they just double click and then run the script
...... It's not asking too much of an animator to just make the set themselves as needed. That way they can make as many as they want for various things, and not be restricted by adding and removing pieces each time before they click ghost.


Yeah, the way I currently handle that with the Maya version is that I added a 'to shelf' command to it which allows the animator to create a shelf button that launches the tool with a preset selection of meshes loaded in it, so that it's faster to switch between characters while animating.


It's not always convenient to add more to the shelf though so I'm still thinking about other options, maybe a way to save different selections into the scene file (I did something along those lines with my Timeline Markers tool for Maya, which I wrote because I missed C4Ds markers )

Cheers,
Brian
 
Old 11 November 2013   #13
Originally Posted by Horganovski: Yeah, the way I currently handle that with the Maya version is that I added a 'to shelf' command to it which allows the animator to create a shelf button that launches the tool with a preset selection of meshes loaded in it, so that it's faster to switch between characters while animating.


It's not always convenient to add more to the shelf though so I'm still thinking about other options, maybe a way to save different selections into the scene file (I did something along those lines with my Timeline Markers tool for Maya, which I wrote because I missed C4Ds markers )

Cheers,
Brian


Yeah what my UI was originally doing, was you could create a group in the UI. When you create a groupt, it would have buttons per group to ghost, hide, remove, etc. similarly to how yours is now. But Then you can add a second group and do the same, so it would just maintain the groups within the UI, so you could have as many or as few as you want, and then there are the Ghost All, Remove All, Hide all, kind of thing that would basically go through each group and do that to all groups.

It utilizes stuff I've done for my MarkerManager plugin and such. But it's all up in the air until I can gather info from customUI types.
__________________
www.bretbays.com
"We do not - not wag our genitals at one another to make a point!"
 
Old 11 November 2013   #14
Cool, the groups idea sounds interesting.

Cheers,
Brian
 
Old 11 November 2013   #15
Thread automatically closed

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.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:45 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.