[Bf-committers] Subsurf + UVmap, an alternative solution

Ton Roosendaal ton at blender.org
Fri Nov 11 13:31:33 CET 2005

Hi Brecht,

Code for getting the subsurfed vertex coordinates of the original  
vertices is not that easy. You cannot use the callback getVertexCos()  
because it won't exist for subsurfs (the vertexco array then would be a  
mix of original and new vertices anyway).

Instead Daniel coded a callback system, I use that for example for  
weightpaint and vertexpaint like this function;

static float *get_mapped_verts_nors(Object *ob, int totvert)

This can be copied for doing the LSCM as well.

Now we should also note that the API for derivedMesh is a bit unclear  
at the moment... the calls are too much low level, and not always clear  
what they do. Hopefully Daniel has some time later to clarify issues.  
A call like I mention above could be in DerivedMesh.c, so it can be  
used by all calls in Blender needing these coords (particles need it  


On 30 Oct, 2005, at 21:43, Jean-Luc Peurière wrote:

> Le 30 oct. 05 à 21:01, Frédéric van der Essen a écrit :
>>> I also think that the amount of distortion induced by the first case
>>> is much more than the second.
>> If the cage is not dense and there is a lot of tris, the distortion  
>> due to the second can be very bad, and a lscm mapping for  
>> innervertices give perfect results even if the mesh has the most  
>> crazy topology you can imagine.
> yes worst case scenario, but cannot be phased out, you are right.
> Still, the 1st problem is the most prevalent.
> Now, we need Brecht and/or zr take care of that. They both own parts  
> of the code in cause
> -- 
> lukep_______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
Ton Roosendaal  Blender Foundation ton at blender.org  

More information about the Bf-committers mailing list