Donnerstag, 22. Januar 2015

Working with CAD files

Working with CAD files in 3ds Max is the single most annoying thing I had to deal with in the past 2 years.

You´re reading this, so you probably know the issues:
You get some obscure file formats (.stl, .stp. .jt) and try to import it.
And then you either have already tesselated meshes, or "body objects". If you have body objects, you are tryin to convert to editable poly or editable mesh and that is were it starts to get real messy:

Messed up smoothing groups, thousands of unweld vertices, a mesh way too dense to do any unwrapping etc.
So you are wondering, if there are simply some import options you missed, because there has got to be an easy solution for that problem.

At least, thats what I thought.
So I did some research...

The most common tips for a one-click solution I found were:

1. Use Rhino to export CAD Objects to poly objects. You can get a demo license that will let you export a couple of times, which might be enough for your project.
I tried it and in some cases the meshes looked better, but still far away from what I was used to from modelling my own stuff.

2. Use MoI for export.
I tried this aswell and again: Sometimes the results were better, but most of the times they were still too messy for my taste.

So I did some experimenting on my own and here is what I got so far:

1. If you don´t need to use the files in animation...

A) Get a file format from the client, that exports to body objects if possible. If you import the file and you already have a tesselated mesh, then you are short a couple of options you would have had, if you had body objects. I had good experiences with .jt files for example.

B) If you have large files, get he client to split it for you. I spent numerous hours trying to export files that were just too bug to handle. I have a fairly capable workstation and I found anything above 50 MB too big to handle.

C) Either leave the files as body objects, or (if the scene is too heavy), change to "coarse" in Body Object options, add Edit Mesh modifier on top and collapse. Edit mesh for some reasons gives a way cleaner look than edit poly modifier. You can use the incredibly useful scrip "modifier modifier zorb" to change settings on multiple objects at once, add modifiers, collapse etc.

D) For UVs I usually try to get away with simple box/planar/cylindrical mapping. and avoid unwrapping. Cou can get pretty complex stuff done using just that or only unwrapping small parts of the model and composite maps (Decals, for example).

2. If you have to deal with animations/ complex UV layouts...

Retopo!!
But, and this is the most important tip of all:

Only for objects you actually need to!!

Use any tools you are comfortable with (I mostly use the graphite modeling tools for retopo), in some cases you can use the base geometry (body objects set to coarse and collapsed to mesh) as a starting point. Use "quadrify" from graphite modelling tools or the "quadify mesh modifier" and clean up the rest, but with more complex shapes it´s often faster to just retopo or even remodel from scratch.

It´s annoying as hell (especially since Autodesk owns most of those products and should be able to use their expertise to get better results for exporting/importing...), but there just is no "one-click" solution, get over it...
I spent way to much time looking for one.
Just remember that you only need really clean meshes for some reasons (deformations, complex unwrapping) and can get away with "ugly" meshes for a lot of purposes!

Sonntag, 13. Juli 2014

From intern to professional

....so...I seem to have lost two years since I last posted here...

The reason for this is of course the transition from intern to full time employee at Acolori in Hamburg.

I always knew, that working in CG most certainly would not mean a standard 9.am to 5 p.m schedule, its just not easy to lay down the virtual shovel (so to speak) while looking for that perfect procedural shader setup or doing R&D with fluid sims...all while an actual deadline is approaching.

But that kind of was one of the main reasons I got into 3D in the first place -  I quickly realized, that there would always be new challenges, new things to explore and keep me interested.

Unfortunately, that also means, that I just didn´t find the time to share what I learned and explored recently (and by recently I mean: the last two years just flew by...).
But I´ll try and get back into the process of "giving back" to this great community and I´ll try to post more regularily...;)

Mittwoch, 24. Oktober 2012

Internship

So...
I´ve managed to get an internship at a local post-production shop here in hamburg, that is focussing on 3D with 3ds Max!

It´s called Acolori and I´m really looking forward to it!
I´ll be working on different stuff, but I´ll also have the chance to work on character design,, rigging and animation.

Which obvisouly means I won´t be able to update my blog as irregularily as I did in the past, since I´ll be working on stuff that I can´t immediately share and also because I´ll have less time to work on my personal projects.

But I´ll try to finish my series of tutorials on facial rigging for lipsync whenever I get time to do that and I´ll also keep posting quicktips and other non-work-related stuff from time to time.


Mittwoch, 3. Oktober 2012

Tutorial - Facial Animation and Lip Syncing 02

Once again, it took me longer than expected to get my stuff done until I could post the next step, but anyway, here we go...

Facial Animation and Lip Syncing 02

In the first part of this tutorial I was talking about the 3 different ways of rigging for facial animation:

1. Absolute morphs
2. Bone based
3. Blended morphs

Like I also explained, I went for the blended morph setup.
After my experience with it, I wouldn´t recommend it. The blended morph setup works by setting up asymetrical morph targets for all the animateable parts of the face: The eyebrows, the eylids, cheeks and mouthshapes.
The only bone driven part in this scenario is the jawbone, controlling the opening and closing of the jaw.

These are the two problems I encountered that are the reason why I wouldn´t recommend it:

1. The crease in the middle of the blended morphs, especially for the mouth shapes.
I created the following morph targets for both left and right side of the mouth:

  • Narrow
  • Wide
  • Happy
  • Sad
First I simply created the symetrical morph targets in Zbrush, exported them as obj and imported them back into 3ds Max.
To create asymetrical shapes for the left and right side, I used this workflow:

A) Clone the basemesh.
B) Add a morpher modifier to the cloned mesh.
C) Choose the morph target.
D) Select the vertices on one side of the morph target.
E) In the morpher modifier of the cloned mesh tick the checkbox of the morpher modifier that says "Use vertex selection". Set the morph target to 100%
F) Collapse the cloned mesh and rename it to the morph targets name and side (p.E. "Left Smile").
G) In the original mesh add that morph target to the morpher modifier.
H) Repeat for the other side.

Here´s a video of the process:


There is one annoying problem in this workflow though: Since you chose half of the vertices for the morph target in step D), and you select the other half of them when you repeat the process for the other side, the vertices in the middle are adding up, if you animate both morph targets to create a symmetrical pose ( a smile for example).
You can just select all of the vertices except for the ones in the middle (at the symmetry line), but then those vertices are missing in the morph.
I tried to select the vertices with a soft selection to circumvent this problem, but that didn´t work.

The second problem I encountered was, while blending several mouth shapes together and also animating the jaw: Some of the combinations just gave me weird results.
While the narrow mouth shape looked good when the jaw was in an idle position, it looked really bad if I opened the jaw. To solve this problem I could only think of two solutions:

1. Leave the jaw bone out and instead create morph targets for all of the jaw positions (open, closed, left and right).
But then I would probably still get weird results, because the different morph targets for jaw positions and mouth shapes would also add up.
2. Create corrective morph targets for the problematic combinations. I haven´t actually tried this solution because I already had to do some corrective morph targets for the jaw positions and they are a real pain in the ass to create: Basically you just clone the base mesh, pick the clone as a morph target, set the jaw bone in the position where the problems occur (p.E.: teeth poking through the cheek when opening the jaw), set the morpher modifier to "automatically reload targets" and then work on the cloned mesh until the problems disappear. But since you´re not working on a cloned mesh of the problematic position, but you´re working on a clone of the mesh in an idle position, it´s really hard to see wich vertices to manually push around and where to push them to...So if anybody knows a better workflow to deal with those problems, I would be gald to hear them...;)

I recently stumbled upon a script from Clovis Gay called "Morph UI creator":


In the demovideo it looks like he got around those problems and from what I could extrapolate, it looks more like he is using absolute morph targets for all the different shapes, but I´ll have to take a closer look and maybe ask him about it directly, because it seems to be working pretty well.
Apart from that... the script looks really great and is taking out a couple of steps I wanted to cover in the next part of the tutorial...

There are also other arguments for using a bone based setup.
The setup time might be more time consuming if you´re not already really comfortable with rigging and skinning, but in the end its just more flexible and you don´t have to deal with morph targets at all.
Another argument to forget about morphs completely and go for a bone based set up: Some game engines can only deal with bone based rigs.

I also created shapes for the different visemes, but I also wouldn´t recommend that for a couple of reasons:

1. I set up a PEN attribute holder to hold sliders for the different visemes:

The problem with this is, that if you start keying with these sliders, you can´t really filter the keys by visemes, so if you´re only trying to work with the timeline, correcting the timing becomes pretty tedious.
Of course you can just work with the dope sheet or curve editor, where you can select the keys easier.
2. You have more control if you just use the mouth shapes you rigged before: Visemes can look quite different depending on how the character talks - is he smiling while talking? Talking quietly or loud? Talking very pronounced or kind of mumbling into his (or her) beard?
3. I thought using predefined shapes for visemes would make the process of lip syncing faster, but in the end I still had to spend quite some time fiddling around with the other controls for the jaw and mouth shapes to get it to look right, so I could have just completely dismissed the visemes.

You can see a pretty good setup for lip syncing in the video mentioned above.
And you can still put a PEN attribute holder on your GUI to add presets for visemes you use regularily if you need to.

Like I said in the overview for this tutorial: This is by no means meant as astep by step guide, but I hope I can shed some light on questions and answers I found while researching and experimenting with facial rigging for Lip Sync.

In the next part I´ll try to cover some more steps like setting up a proper UI for animation.

Montag, 24. September 2012

Zbrush to Max Problems

Since I decided to focus on character work, I started using zbrush more regularily.
I love the tool, but I keep bumping into the same problems with my workflow.
Which is, basically, having an idea and then just jumping in and trying to achieve it.
I know, not a very good workflow.
One problem I keep repeating in my workflow:

1. Start basic sculpting in Zbrush.
2. Retopologize the model in Max.
3. Use GoZ to jump back and sculpt some finer details (because details are FUN).
4. Maybe use GoZ to jump back and start rigging in Max to pose the character.
5. Jump back to Zbrush and start to create morph targets.
6. ... at some point I´m finally realizing that my topology is flawed and GoZ-ing doesn´t work any more.
At which point I start taking a closer look at my retopologized model from step 2...
And at which point I may have to rework everything up from step 2.

Some of the problems seem to regularly be introduced by the symmetry modifier I used while retopologizing.
Sometimes it leaves some Vertices unwelded or gives you isolated vertices.
Which you don´t realize while using GoZ to jump back and forth up to a certain point, but at some point the vertex order gets messed up and there you go.
So don´t be like me.
Always check your model very very carefully after retopologizing it.
There are several ways to do that:

1. Export it as an OBJ. If it tells you that you have a rats nest in your model after exporting, you know something is wrong.
2. Use the STL-Check modifier.
3. Use the Xview-tool in the viewport.

Happy topology-checking to everyone!

Donnerstag, 20. September 2012

WIP - Gnome 006

And yet another lipsyncing test. This time the gnome is doing gollum.
I´m starting to run out of gnomes and goblins, so if you know of more famous ones my gnome could do, pleas let me know in the comment section...;)

Dienstag, 18. September 2012

WIP - Gnome 005

Another lipsyncing test. This time featuring "Dobby" from Harry Potter. Its still tedious to correct things with this method though.

Gnome WIP Lipsync Dobby from Samuel Enslin on Vimeo.