Insert phong shading normals myself...

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/07/2009 at 03:49, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R9.6 
Platform:      Mac OSX  ; 
Language(s) :     C++  ;

---------
Hi there again!

I'm using Cinema to calculate lightmaps by baking textures. NO , don't worry, this is not another question on how to bake textures! ;-)

No, this works fine so far. I'm doing this by picking every CPolygon from every PolygonObject in the polyginized Document, creating a new PolygonObject using the vertices stored in the CPolygon, adding the new object to the scene, assign a plain white material and do the bake.

As said, this works well!

But there's a small problem: I need to extract a new PolygonObject from the CPolygon because every polygon should have it's own lightmap when saving, to avoid variating quality (which would like odd at the end).

But by doing so, the polygon looses its smooth vertex normals (phong normals, that's of course because the polygon doesn't have any neighbours anymore), so every polygon looks at the end like a plain plane. And this too looks quite... well... odd...

Here's an example:
This is how it should look like (Cinema) :

And this is how it looks in my game:

Now, is there any way to insert phong normals for the new created polygon myself? As it looks like, Cinema is doing it itself using the phong tag's parameters, so I fear the answer. But maybe there is some workaround?

Thanks in advance,
Mark

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/07/2009 at 05:00, xxxxxxxx wrote:

This can be done using Normal tags. Check the SDK docu for Tnormal and VariableTag.

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 27/07/2009 at 05:30, xxxxxxxx wrote:

Oops, looks like I did not check that as I should have done...

...sorry for posting obvius questions I could have answered myself by reading the SDK thoroughly.

Thank you again!