extract hair texture "rendered as polygons"[SOVED]

On 02/02/2015 at 05:31, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   13+ 
Platform:   Windows  ;   
Language(s) :     C++  ;

I'm creating my own render engine, it can read RayObject fine, so it can render hairs which are converted to polygons

now what I want is one of the 2 things:
1- know which point represents the root and tip
or: 2- extract the required data from the hair shader, like colors. "in this case each single hair can get a different color depending on its root position (uv) to the texture chosen in the color channel"

so in other words, does hair object contain UVs? "and how to identify roots from tips in the RayObject, how does Cinema4D render engines get this data with polygon RayObject"

any idea?

On 02/02/2015 at 09:18, xxxxxxxx wrote:


Cinema 4D renderers do not know how to render (polygon) hair. "Hair" is a special post effect as you can see in the Render Settings. Also, the "Hair Material" is not a real material. It is just a set of data to be used with the Hair post effect.

The most information on guides etc. you can receive accessing the Hair object itself. The information you can get from the Hair object can be used to feed your own Hair render engine.

Best wishes,

On 02/02/2015 at 12:19, xxxxxxxx wrote:

well, to be more precise, how the "Polygon Hair" shader works, this is the only thing that I want.
create a new material, in the color channel add shader from the arrow->Polygon Hair from the bottom of the list

it works with the generated hair polygons "hair object->Generate tab"

On 03/02/2015 at 03:03, xxxxxxxx wrote:


the Polygon Hair shader is part of the Hair module and relies heavily on internal procedures of that module. Because of this, the shader cannot be easily copied. Also the functionality of this shader is very limited compared to the settings of the "Hair Material" (please consult the C4D documentation on this).

When you make your polygon hair generating "Hair" object editable you see that a UVW Tag was created. That UVW tag stores the UVW data of the poly object. This UVW coordinates are used to apply the shader to the polygon object. So you can actually apply a simple material with just a Gradient shader.

Best wishes,

On 03/02/2015 at 03:22, xxxxxxxx wrote:

thanks Sebastian, I think I figured out now how the hair UVs look!!, will be handy, consider this solved