User avatar
By mashium123
#382901
hi,

so i am trying to texture an hair-object while using the maxwell hair-tag but i am not succeeding.
i try and follow the instructions on this page: http://support.nextlimit.com/display/mx ... l+Hair+Tag but no luck.

what seems to be an important topic is the issue of how to generate multiple uv sets within c4d for maxwell to texture the roots and tips. the doc explains how to achieve this (http://support.nextlimit.com/display/mx ... ial+Editor) at the most bottom pf the page, but i just am not able to reacreate that with an hair object with hair tag attached.

with other objects this method seems to work. so what am i doing wrong? would you happen to have a most simple example file to demonstrate the procedure?

btw: i also tried it on the r15 using the 2.7.23 version of the plug. with the same amount of success.
By JDHill
#382903
It works as described there, so I'm not sure what might be the problem. Something to understand is that the generation of UV sets for hair is different than for normal objects (i.e. using multiple texture tags).

During export of hair, the plugin first generates a set of lengthwise UVs on channel 0; this is because it is always channel 0 that is used by MaxwellHair for mapping a texture to hairs along the hair strand. Something important to note here is that in mapping a texture to the hair length, MaxwellHair samples along the V axis of the texture (as described here), such that you could use a texture 1 x N pixels successfully, but would see no effect, if you used an N x 1 pixel texture. Also note that the texture rotation parameter does work for this, such that if you have a horizontally-oriented gradient, you can just rotate it.

Besides the length-wise UVs on channel 0, the plugin then also looks at the assigned material and writes N more UV sets, from channels 1 to N, where N is the highest channel found in the material. There is no reason to use a channel greater than 1, but I write more UV sets if you do, so that the render won't fail.

Please let me know if this helps get things sorted; otherwise I'll probably need to take a look at your model, to find out what might be the problem.
User avatar
By mashium123
#382904
this is getting me nowhere.

here's the situation:
Image
i'm not able to achieve that the surface of the hair-cylinders are being shaded with the pattern lyiing underneath on the "ebene".
openenin the scene in studio shows that i do not succeed in exporting two channels.
using this "double texture tag" - method on other objects but the hair-objects does lead to two channels in studio.

here's the scene:
http://www.mesutcapkin.com/temp/hairq.c4d
By JDHill
#382905
The first thing is to use a Maxwell material, because we need to be able to set specific texture channel values in various layer/bsdf textures. Second, it is not necessary to use the multiple-texture-tag method (which only applies to Maxwell materials, by the way) with hair. Channel 0 UVs are always generated for the hair, which is why you are seeing an alternating checker pattern along the hair lengths: MaxwellHair is reading the alternating white/black pattern from the left (or maybe right, I don't know) edge of the checker texture and mapping it along the hair strands. Then, because your material does not use more than one channel (since it's not a Maxwell material), there are no channel 1 UVs being generated at all. So the main part of the solution is to use a Maxwell material, with textures that you want mapped to the hair roots set to use channel 1.

Please take a look at this example, which is similar to the scenario described in the plugin Hair docs.
User avatar
By mashium123
#382908
JDHill wrote:The first thing is to use a Maxwell material, because we need to be able to set specific texture channel values in various layer/bsdf textures. Second, it is not necessary to use the multiple-texture-tag method (which only applies to Maxwell materials, by the way) with hair. Channel 0 UVs are always generated for the hair, which is why you are seeing an alternating checker pattern along the hair lengths: MaxwellHair is reading the alternating white/black pattern from the left (or maybe right, I don't know) edge of the checker texture and mapping it along the hair strands. Then, because your material does not use more than one channel (since it's not a Maxwell material), there are no channel 1 UVs being generated at all. So the main part of the solution is to use a Maxwell material, with textures that you want mapped to the hair roots set to use channel 1.

Please take a look at this example, which is similar to the scenario described in the plugin Hair docs.
this helped a lot. now i get it.
thank you.

while we're at it:
- is there a way to take the phong-value of the hair-object into account? right now it seems that there is no phong shading being rendered no matter, which value i use.
- there a three types from which one can choose: flat, curve and cylinder. would it be possible to add some in the future? like square, triangle...?

again: thx a lot for your help.
By JDHill
#382909
The first may be possible, I see there is an undocumented normals array on the hair extension. The second is something that would have to be added to Maxwell, before it could come to the plugin (for the flat & curve types, the plugin is actually using the corresponding MaxwellGrass extensions, instead of the MaxwellHair one).
User avatar
By mashium123
#382911
i see.
here's the next hair-question :)
some paramters of the c4d-hair material are being translated into maxwell hair, e.g. the length. but only when the values are used.
when i try to use a map that would define the length, e.g. the checkerboard, it is not being used. the same goes for the other paramaters that offer a texture slot.
is that supposed to be that way... or... is there a way for textures to be supported?
By JDHill
#382912
The hair material is not used directly by the plugin. However, it apparently affects how the Hair object generates hairs when requested, meaning that I see that it produces different results (different, but not what Cinema renders), e.g. when mapping Length in the hair material. I couldn't say, before doing some research, whether this can be improved.
By JDHill
#383223
Here's something interesting that I found out by accident: length mapping (using the Hair Material Length channel) works, until you switch textures, or alter the assigned texture. After that, it won't (seems it just wants to render all the hairs a given length instead), unless you save, close, and re-open the model, at which point the newly-assigned or altered texture will work as expected. This applies every time you switch textures, or alter the assigned texture.

More interesting yet, is that this also appears to apply to Cinema's Render View function. For example, I can assign a checker texture, Render View, see the expected result, then change the checker's U&V Frequency, Render View again, and it will still use the previous values. Here, I also need to save/close/re-open to make it work. However, this appears to affect neither Interactive Render Region, nor Render to Picture Viewer; those use the new values as expected.

Not sure if there might possibly be a cache setting somewhere, which would make it behave, but regardless, I'm curious to hear if you see the same thing there, in order to find whether this might be somehow related to the particular file I'm testing with.
User avatar
By mashium123
#383226
JDHill wrote:... For example, I can assign a checker texture, Render View, see the expected result, then change the checker's U&V Frequency, Render View again, and it will still use the previous values. ...
that's what i tried to recreate here, but failed.
render view (r16) renders every alteration (change of checker's uv-freq.) just as expected.
User avatar
By mashium123
#383227
mashium123 wrote:
JDHill wrote:... For example, I can assign a checker texture, Render View, see the expected result, then change the checker's U&V Frequency, Render View again, and it will still use the previous values. ...
that's what i tried to recreate here, but failed.
render view (r16) renders every alteration (change of checker's uv-freq.) just as expected.
ok, here's a correction of the above statement.
i can recreate your situation. but only if the maxwell scene object is being introduced into the scene AND the scene is being exported at least once. no matter, if it's being exported to fire or the renderer.
once you do that, i see the situation you are describing.

so, it's not the presence of the maxwell hair-tag nor the scene-object alone, that produces this effect [which takes place in both c4d-renderview (but NOT the picture viewer) and fire/renderer]. i need to maxwell-export the scene at least once.

in the above statement i tried the situation with c4d only, without getting maxwell involved at all.
By JDHill
#383235
Thanks, I confirm that behavior (that the problem appears only after having exported hair).
Will there be a Maxwell Render 6 ?

Although i’ve been happily rendering away in[…]

SS Pinto Bean

Hi Tommy, Great stuff - love it~! Thanks for pos[…]

Never No More Studio Lighting

Hello Mark! Very good tips about the camera setti[…]

Sadly, this lack of a response demonstrates a mori[…]