TITLE: Tangent space of the stack $\overline{\mathcal{M}}_{g,n}(X,\beta)$. 
QUESTION [9 upvotes]: Let $\overline{\mathcal{M}}_{g,n}(X,\beta)$ be the moduli stack of stable maps $f$ from genus $g$, $n$-marked curve $C$ to a variety $X$ i nth curve class $\beta \in H^2(X,\mathbb{Z})$. I would like to know why the hyperext group
$$
Ext^1_C(f^*\Omega_X\rightarrow \Omega_C(\sum_{i=1}^n),\mathcal{O}_C)
$$
represents tangent space of the moduli and the obstruction lies in
$$
Ext^2_C(f^*\Omega_X\rightarrow \Omega_C(\sum_{i=1}^n),\mathcal{O}_C)?
$$
I am aware that the deformation-obstrcution of a map $f:C\rightarrow X$ with a fixed curve $C$ is governed by $H^i(C,f^*T_X)$ for $i=1,2$ and the automorphism-deformation of a $n$-marked points $(C;p_1,\dots,p_n)$ is governed by $Ext^i_C(\Omega_C(\sum_{i=1}^n),\mathcal{O}_C)$ for $i=0,1$. However, I don't know how to combine them into one package in the hyperext groups above. 
I would appreciate it if someone could kindly explain how to obtain and understand the hyperext groups above.

REPLY [5 votes]: Let $L$ be the complex $[ f^\ast \Omega_X \rightarrow \Omega_C(D) ]$, concentrated in degrees $[-1,0]$ on $C$.
One way to understand the obstructions is to understand the deformations for affine curves first.  Observe first that there is a canonical equivalence of categories between the category of deformations of a pointed map $f : C \rightarrow X$, with $C$ not-necessarily proper, and the category of extensions
$G(C) = \mathrm{Ext}(L, \mathcal{O}_C)$.
The meaning of the category on the right is the category of extensions $E$ of $\Omega_C(D)$ by $\mathcal{O}_C$ together with a trivialization of the induced extension of $f^\ast \Omega_X$ by $\mathcal{O}_C$.  One checks explicitly that the category of extensions of $\Omega_C(D)$ by $\mathcal{O}_C$ is canonically equivalent to the category of deformations of the pointed curve $C$ and that splitting the induced extension of $f^\ast \Omega_X$ is the same as extending the map $f : C \rightarrow X$ to a map from the deformed curve to $X$.
Note that $G$ is a commutative group stack (what is sometimes called a "Picard stack").  It is easy to check that $G$ is non-empty when $C$ is an affine curve (use the fact that deformations of nodal curves are unobstructed and the formal criterion of smoothness for $X$), which means that any obstructions to deforming a proper curve come from the failure of local deformations to glue.  There is a standard way to compute these local obstructions---e.g., by Cech cohomology, noting that mutatis mutandis, Cech cohomology still works for group stacks---and this yield a class in $H^1(C, G)$.  Cohomology of a commutative group stack is the same as cohomology of the associated complex, so we get an obstruction in
$H^1(C, L^\vee[1]) = H^2(C, L^\vee) = \mathrm{Ext}^2(L, \mathcal{O}_C)$.