UVW projections
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/10/2006 at 08:49, xxxxxxxx wrote:
Thanks Matthias, I'm afraid it's not working though :(, it always returns FALSE. Here's how I'm using it:
... called from VidePostData::Execute(...) when vps->VP == VP_RENDER
(simplified code)
VolumeData* pVolumeData = vps->vd;
RayObject* pObject = pVolumeData->GetObj(objID);
TexData* pTexData = vps->vd->GetTexData(pObject, 0);Vector* pPolygonPointNormals = ...
for (LONG p = 0; p < pObject->vcnt; p++)
{
RayPolygon polygon = pObject->vadr[ p ];
LONG polygonGlobalID = pVolumeData->Obj_to_ID(pObject) + p,Vector vA = pObject->padr[polygon.a];
Vector nA = !(ObjectRotationMatrix * pPolygonPointNormals[p * 4]); // normal in world spaceUVWStruct UVW;
// assuming the object has a spherical mapping for instance
Bool res = pVolumeData->ProjectPoint(pTexData , polygonGlobalID, vA, nA, &UVW.a;); // <-- returs false, UVW.a = {0,0,0}...
} -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/11/2006 at 17:44, xxxxxxxx wrote:
I found out why it's probably not working for you (actually I had trouble to get it to work too). You have to be in VP_INNER to get a result from ProjectPoint, took me some time to figure that out Anyway it's working for me, if you have still some problems don't hesitate to ask.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/11/2006 at 01:43, xxxxxxxx wrote:
Phew Matthias, its working now thank you so much, you ended up with 3 frustrating days of trial and error.
cheers!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/12/2006 at 07:53, xxxxxxxx wrote:
I all,
i'm trying to get the projected UVW from volume data and texdata.. but always i'm getting this problem with the spherical projection.
What's the correct way to get stored and prepared UVW in VP_INNER?
I've used ProjectPoint and return me some artifact.
Cheers
Renato T. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/12/2006 at 15:46, xxxxxxxx wrote:
What i mean is:
When c4d prepare the geometry accessibile in the volumedata i imagine that store in UVW all kind of projection.
But i don't understand how to get the "spherical" or "flat" transformed UVW. GetUVW fill the UVW polyvector only for the UVW mapped object. I can't trust that ProjectPoint is called when rendering.thanks in advance and merry xmas to all
Renato -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/12/2006 at 05:45, xxxxxxxx wrote:
and.. Happy New Year
Renato
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/01/2007 at 01:30, xxxxxxxx wrote:
In my case I use ProjectPoint, but I haven't noticed any problem with spherical projections (?). In order to be able to retrieve UVW mapping, the object needs to have a Texture Tag, which you cand obtain like this:
polygon is an own structure, where pParentObject is a RayObject* VolumeData* pVD ... for (LONG TextureID = 0; (!pAssignedMaterial) && (TextureID < polygon.pParentObject->texcnt); TextureID++) { TexData* pTexData = pVD->GetTexData(polygon.pParentObject, TextureID); if (TextureAppliedOnPolygon(pTexData, polygon.localPolygonID, polygon.pParentObject, pVD)) pAssignedMaterial = pTexData; }
and then
pVD->ProjectPoint(pAssignedMaterial, polygon.globalPolygonID, polygon.vA, polygon.nA, &pUVW-;>a); same with b and c
where vA and nA are vectors (position and normal) of the 1st vertex
TextureAppliedOnPolygon implementation is provided somewhere in the sdk
BOOL TextureAppliedOnPolygon(TexData* pTexture, LONG localPolygonID, RayObject* pObject, VolumeData* pVD) { if (pTexture->restrict) { if (pObject->type != O_POLYGON || pTexture->restrict >= pObject->rscnt || !pObject->rsadr[pTexture->restrict]) return FALSE; if (!(pObject->rsadr[pTexture->restrict][localPolygonID>>5]&(1<<(localPolygonID&31)))) return FALSE; } return TRUE; }
hope it helps
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/01/2007 at 09:39, xxxxxxxx wrote:
Thanks Joesfer,
but i've made exactly the same
but maybe that i'm looking in the wrong place.
Thanks
Renato -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/01/2007 at 09:45, xxxxxxxx wrote:
well you've done a little progress in some sense, at least discarding one possible fail... luck!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/01/2007 at 12:10, xxxxxxxx wrote:
Thanks!
Renato