I'd like to announce that Sweep Splines v 0.2 is available for immediate download. It's a tool that allows you to quickly and easily sweep all selected splines with a square spline.
You can watch a video introduction here:
I initially wrote in response to a post on C4D Cafe. I'm releasing it to the world so that aspiring C4D python developers can take a look at how to create a simple plugin.
Disclaimer:
At this point, I have no plans to update this plugin, so please use at your own risk.
Wednesday, April 11, 2012
Give up on being perfect.
On my fourth rewrite of this post, I realized that the title says it all.
Ira Glass on Persistence
This quotation has more than made the rounds by now, but I find it encouraging and a regular point of reflection, so I'm sharing it:
“Nobody tells this to people who are beginners, I wish someone told me. All of us who do creative work, we get into it because we have good taste. But there is this gap. For the first couple years you make stuff, it’s just not that good. It’s trying to be good, it has potential, but it’s not. But your taste, the thing that got you into the game, is still killer. And your taste is why your work disappoints you. A lot of people never get past this phase, they quit. Most people I know who do interesting, creative work went through years of this. We know our work doesn’t have this special thing that we want it to have. We all go through this. And if you are just starting out or you are still in this phase, you gotta know its normal and the most important thing you can do is do a lot of work. Put yourself on a deadline so that every week you will finish one story. It is only by going through a volume of work that you will close that gap, and your work will be as good as your ambitions. And I took longer to figure out how to do this than anyone I’ve ever met. It’s gonna take awhile. It’s normal to take awhile. You’ve just gotta fight your way through.” --Ira Glass of This American LifeKeep fighting, even if you're a pacifist.
Friday, April 6, 2012
Plugin Development Guidelines for a Seamless User Experience
I've been evaluating a lot of utility plugins for Cinema 4D, based on my experiences, here are a few suggestions on creating a better user-experience. In no particular order:
- As much as possible, make your tool fit seamlessly into your user's existing workflow.
- Follow the visual conventions of the application:
- Make your icons looks as much like native icons as possible. No-one likes the bolt-on appearance of most plugin icons.
- Gray out your icon if your tool isn't appropriate to a given mode.
- Ensure that your plugin is undo friendly.
- Choose a simple descriptive name, it should feel like just another command.
- Write a mouse-over help string, include any useful key-commands
- It's better to make simpler discreet tools that don't require user-interaction than one giant tool with a million options.
- Fully document your tool: written docs, video tutorials, and multiple example files.
Friday, March 23, 2012
Real World Lighting Tips from Nick Campbell
Nick Campbell gave a great talk on lighting.
Here are my takeaways:
Here are my takeaways:
- Fuzzy shadows indicate small scale
- Sharp shadows indicate large scale
- Mimic the real-world as much as possible in terms of light placement and size
- Play with different color temperatures for your lights - pure-white light rarely happens in the real world.
- GI leads to more realistic lighting behavior
Friday, February 17, 2012
C4D Python Matrix Basics & Helper Functions
I seem to forget the basics of working with matrices in C4D immediately after I use them. Here are some resources and helper functions:
Maxon's How to Use Matrices
C4D Python SDK Matrix Reference
Some PSR helper functions written by Maxon with additions for point manipulation by me
Maxon's How to Use Matrices
C4D Python SDK Matrix Reference
Some PSR helper functions written by Maxon with additions for point manipulation by me
############## HIERARCHY HELPERS ######################
def GetGlobalPosition(obj):
"""
Returns the global position of obj
"""
return obj.GetMg().off
def GetGlobalRotation(obj):
"""
Returns the global rotation of obj
"""
return utils.MatrixToHPB(obj.GetMg())
def GetGlobalScale(obj):
"""
Returns the global scale of obj
"""
m = obj.GetMg()
return c4d.Vector( m.v1.GetLength(),
m.v2.GetLength(),
m.v3.GetLength())
def SetGlobalPosition(obj, pos):
"""
Sets the global position of obj to pos
"""
m = obj.GetMg()
m.off = pos
obj.SetMg(m)
def SetGlobalRotation(obj, rot):
"""
Sets the global rotation of obj to rot
Please remember, CINEMA 4D handles rotation in radians.
Example for H=10, P=20, B=30:
import c4d
from c4d import utils
#...
hpb = c4d.Vector(utils.Rad(10), utils.Rad(20), utils.Rad(30))
SetGlobalRotation(obj, hpb) #object's rotation is 10, 20, 30
"""
m = obj.GetMg()
pos = m.off
scale = c4d.Vector( m.v1.GetLength(),
m.v2.GetLength(),
m.v3.GetLength())
m = utils.HPBToMatrix(rot)
m.off = pos
m.v1 = m.v1.GetNormalized() * scale.x
m.v2 = m.v2.GetNormalized() * scale.y
m.v3 = m.v3.GetNormalized() * scale.z
obj.SetMg(m)
def SetGlobalScale(obj, scale):
"""
Sets the global scale of obj to scale
"""
m = obj.GetMg()
m.v1 = m.v1.GetNormalized() * scale.x
m.v2 = m.v2.GetNormalized() * scale.y
m.v3 = m.v3.GetNormalized() * scale.z
obj.SetMg(m)
def LocalToGlobal(obj, local_pos):
"""
Returns a point in local coordinate in global space.
"""
obj_mg = obj.GetMg()
return obj_mg * local_pos
def GlobalToLocal(obj, global_pos):
"""
Returns a point in global coordinate in local space.
"""
obj_mg = obj.GetMg()
return ~obj_mg * global_pos
def SetPointGlobal(point_object, point_index, global_pos):
"""
Sets the global position of point_object's point to global_pos
"""
p_local_pos = GlobalToLocal(point_object, global_pos)
#Set Point
point_object.SetPoint(point_index, p_local_pos)
#Tell C4D the spline has changed.
point_object.Message(c4d.MSG_UPDATE)
#Move this line to the end of your loop if you're call this command a lot.
def SetPointGlobalVirtual(point_object, parent, point_index, global_pos):
"""
Sets the global position of a virtual point_object's point to global_pos
Most useful when setting the points of a spline created in a Python Generator""" p_local_pos = GlobalToLocal(parent, global_pos) #Set Point point_object.SetPoint(point_index, p_local_pos)
#Tell C4D the spline has changed.point_object.Message(c4d.MSG_UPDATE) #Move this line to the end of your loop if you're call this command a lot.
def GetPointGlobal(point_object, point_index):
"""
Return the position of a point in Global Space
"""
ppos = point_object.GetPoint(point_index) #Get the point in local coords
return LocalToGlobal(point_object, ppos) #Return the point in global space
#######################################################
Thursday, December 15, 2011
Guiding Thoughts for Subdivision Surface Modeling
- Volume, form, detail. Always in that order.
- Before adding another point/edge/poly, ensure that those that are already there are correctly placed.
- The vast majority of your time will be spent tweaking points.
- Don't get stuck working on your model from one angle, use your 4-way view and rotate around.
- Edge flows should follow the contours of your object.
- Trace edge flows onto real objects to get a sense of how to approach them.
- Use the bare minimum level of detail you can get away with to accomplish your task.
- Add detail by cutting in loops; localized detail tends to get messy.
- Quads, quads, quads.
- All previous thoughts should be discarded if they do not serve your aim.
Subscribe to:
Posts (Atom)