DrawPolygonObject() w/Transparency
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/11/2008 at 10:41, xxxxxxxx wrote:
Hey Robert,
Sorry to be so brief in my e-mail... Riptide Pro should be creating Normals with just a Phong Tag present (assuming you have "Export Normals" enabled). Is it not?
Keith -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/11/2008 at 11:48, xxxxxxxx wrote:
Neither is creating normals (vn) in the exported .obj file. I am using a pre-release version of Riptide Pro though (haven't gotten around to getting the update and serial number). Maybe I'll get that updated and try again.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/11/2008 at 12:08, xxxxxxxx wrote:
Ahh (odd). Anyway, I just double-checked and the release version of Riptide Pro does indeed create Normal records ('vn') with just a Phong Tag - just send me your latest digits and I'll get you a license.
Riptide (Classic) would also create Normal records, IF the mesh has a Normal Tag, which can be created using my Add Normals plugin (there never was a way to create a Normal Tag using the C4D interface - that's why I wrote Add Normals). -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/11/2008 at 12:21, xxxxxxxx wrote:
BTW, instead of the above, maybe try setting xray mode:
ObjectColorProperties objColor; objColor.usecolor = ID_BASEOBJECT_USECOLOR_ALWAYS; objColor.xray = TRUE; m_MagZone->SetColorProperties(&objColor);
...I was using that on a separate object, but maybe your plugin can set it on itself?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/11/2008 at 12:37, xxxxxxxx wrote:
Got the export working (as you already know).
Plugin objects don't support X-Ray mode - it is not included in the Basic Properties. So, I'd be right back where I started - how to set transparency with BaseDraw.
Unfortunately, how even X-Ray is done isn't explained anywhere.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2008 at 08:36, xxxxxxxx wrote:
Quote: Originally posted by kuroyume0161 on 11 November 2008
>
> * * *
>
> Got the export working (as you already know).
>
> Plugin objects don't support X-Ray mode - it is not included in the Basic Properties. So, I'd be right back where I started - how to set transparency with BaseDraw.
>
> Unfortunately, how even X-Ray is done isn't explained anywhere.
>
> * * *
Hmm... add a "C++ SDK - Rounded Tube" to your scene... it has an X-Ray option in it's Basic properties. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2008 at 08:44, xxxxxxxx wrote:
Actually, I just tried this in the Rounded Tube example...
Bool RoundedTube::Message(GeListNode *node, LONG type, void *t_data) { if (type==MSG_DESCRIPTION_VALIDATE) { BaseContainer *data = ((BaseObject* )node)->GetDataInstance(); CutReal(*data,TUBEOBJECT_IRADX,0.0,data->GetReal(TUBEOBJECT_RAD)); CutReal(*data,TUBEOBJECT_ROUNDRAD,0.0,data->GetReal(TUBEOBJECT_IRADX)); } else if (type==MSG_MENUPREPARE) { ((BaseObject* )node)->SetPhong(TRUE,FALSE,0.0); //**** insert this code, below ***** ObjectColorProperties objColor; objColor.usecolor = ID_BASEOBJECT_USECOLOR_ALWAYS; objColor.xray = TRUE; ((BaseObject* )node)->SetColorProperties(&objColor); } return TRUE; }
..worked like a champ.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2008 at 08:48, xxxxxxxx wrote:
Hmm.. that was a generator object though... deformer objects don't have the X-Ray option - as you mentioned.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/11/2008 at 05:39, xxxxxxxx wrote:
You could also calculate the vertex normals from the mesh yourself.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/11/2008 at 17:09, xxxxxxxx wrote:
Or, I could use PolygonObject::CreatePhongNormals().
Except that changing the values on the added/required Phong tag doesn't seem to change the display results of BaseDraw::DrawPoly() - always as if Angle Limit is off or Phong Angle is 180d even though I'm setting the values. It would sort of suck if I have to load the real object from file, get this Vector array, and write it out to file to use those values instead.
Luckily, DrawPoly() is responding to BaseDraw::SetTransparency().
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/11/2008 at 00:10, xxxxxxxx wrote:
What I'm doing is just using the polygon normal for the vertex normals - about all I need as this is a display representation and not a 'real' object. The results are facetted but at least not overly smoothed on the other end of the spectrum. Now onto more important parts of the code.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/11/2008 at 06:23, xxxxxxxx wrote:
Just for future reference - and something I only recently discovered - calling ie.
op->SetPhong(true, true, Rad(80.0));
... will create/add a Phong Tag on your mesh. I used to always manually MakeTag() (or Alloc and Add) and then call SetPhong(), but that was apparently redundant.
Also, op->CreatePhongNormals() should give you Normals once a Phong Tag is on your mesh.
That may or may not help you out in this case - I want to see the more important parts working, myself :).