nhair uv texture

Forums: nhair uv texture
Autodesk Maya (Plugin developed by JimStar)

Moderator: JimStar

nhair uv texture

Postby abeoctane » Mon Jul 02, 2018 6:01 am

abeoctane Mon Jul 02, 2018 6:01 am
Hi, I have a character with nhair and Im trying to texture the hair with the same color as the base geometry, to do this I am trying to connect a uv proyection in the image texture node of the shader, but nothing happens, the hair get a random color, like a box proyection or something, also when I connect the "octaneImageTexture" node to the image texture list in the pxhair1 the hair render brown, without any texture color, your help would be much appreciated :)
abeoctane
Licensed Customer
Licensed Customer
 
Posts: 168
Joined: Thu May 01, 2014 5:44 am

Re: nhair uv texture

Postby calus » Mon Jul 02, 2018 11:02 am

calus Mon Jul 02, 2018 11:02 am
abeoctane wrote:Hi, I have a character with nhair and Im trying to texture the hair with the same color as the base geometry, to do this I am trying to connect a uv proyection in the image texture node of the shader, but nothing happens, the hair get a random color, like a box proyection or something, also when I connect the "octaneImageTexture" node to the image texture list in the pxhair1 the hair render brown, without any texture color, your help would be much appreciated :)

- Unlike other Octane plugin, the Maya plugin is not able to transfer the underlying mesh UVs to Octane hair,
indeed the Maya plugin use arbitrary UVs for hair, unusable with Octane UV projected textures...

- It's possible to bake Maya texture color to this arbitrary UVs (Maya file connected to nHair shape shading color) to an empty Octane nHair bitmap texture node, ... but the workflow is very clunky and anyway Maya mess up the color as soon as you have more than one hair per follicle.

- If you are using the new Maya beta plugin, better to workaround the terrible hair plugin implementation:
you should use Xgen interactive, then cache hair to alembic then import the ABC in an "ORBX proxy" node in Maya,
then you would have correct hair UVs to use with Octane textures.
image.png

image (1).png
Pascal ANDRE
calus
Licensed Customer
Licensed Customer
 
Posts: 1308
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: nhair uv texture

Postby abeoctane » Mon Jul 02, 2018 2:41 pm

abeoctane Mon Jul 02, 2018 2:41 pm
Hi calus, such a shame we got this bad hair implementation in maya, hope they fix it soon and give us xgen support, thank you very much for your help.
abeoctane
Licensed Customer
Licensed Customer
 
Posts: 168
Joined: Thu May 01, 2014 5:44 am

Re: nhair uv texture

Postby abeoctane » Mon Jul 02, 2018 8:52 pm

abeoctane Mon Jul 02, 2018 8:52 pm
Hi calus, if it is not too bothersome to you, could you please share some details about the baking process to get the hair color from maya?, thanks a lot.
abeoctane
Licensed Customer
Licensed Customer
 
Posts: 168
Joined: Thu May 01, 2014 5:44 am

Re: nhair uv texture

Postby calus » Thu Jul 05, 2018 6:24 pm

calus Thu Jul 05, 2018 6:24 pm
abeoctane wrote:could you please share some details about the baking process to get the hair color from maya?

Keep in mind that with this workflow, the hair color match the texture UV only if you have a very small clump base width, or if you have only 1 hair per clump :shock:


Add a Maya texture in the nHairSystem shading color.
Then you should see in viewport the texture coloring the opengl hairs,
maya_2018-07-05_19-52-21.png


In the pfxHair transform create an Octane Material.
maya_2018-07-05_19-57-27.png


In the diffuse (or other attribute color) create an octaneImageTexture.
maya_2018-07-05_19-58-04.png


Leave the file path empty (this empty node will used by the plugin to bake the Maya colors) and clic 2 times on the little arrow icon to go back to the pfxHair transform tab.
maya_2018-07-05_20-01-01.png


As the newly created ImageTexture node is still selected , clic on "add selected" button.
maya_2018-07-05_20-02-08.png


That's it.
Pascal ANDRE
calus
Licensed Customer
Licensed Customer
 
Posts: 1308
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: nhair uv texture

Postby BK » Fri Jul 06, 2018 2:31 am

BK Fri Jul 06, 2018 2:31 am
Thank you Claus for the tutorial.

Keep in mind that with this workflow, the hair color match the texture UV only if you have a very small clump base width, or if you have only 1 hair per clump :shock:


Actually, Octane for Maya support Maya's nhair Color Randomization and Diffuse Rand has some value by default. You can try changing it to '0" then it should fix the 1 hair per clump.
Regarding Xgen support, we would be looking into it as soon as this branch has a stable version.


Here is a quick video on nhair workflow:


[ Play Quicktime file ] mayanHair.mp4 [ 21.79 MiB | Viewed 4680 times ]



2018-07-06 12_40_10-Autodesk Maya 2017 - Not for Resale_ A__WS_BK_Files_My Documents_BUG_Maya_bug_20.png


MayanHair.7z
(2.15 MiB) Downloaded 235 times
Kind Regards

bk3d
BK
OctaneRender Team
OctaneRender Team
 
Posts: 1320
Joined: Mon Oct 31, 2016 7:54 pm

Re: nhair uv texture

Postby calus » Fri Jul 06, 2018 1:34 pm

calus Fri Jul 06, 2018 1:34 pm
BK wrote:Actually, Octane for Maya support Maya's nhair Color Randomization and Diffuse Rand has some value by default. You can try changing it to '0" then it should fix the 1 hair per clump.

No sadly this issue have nothing to do with color randomization :
Maya doesn't sample the color texture per hair but per follicle, so only the hair at the center of a clump are sure to get the correct color...
Also in your movie this only works because you use a particular case : a 1x1 plane,
but this won't work with any other mesh (just try with a torus for example).

Let me make the issue more obvious in this sample scene with a 20x20 plane :
nHairPerClumpColor.zip
(73.14 KiB) Downloaded 234 times

Color randomization is zero but as you can see hair colors doesn't match the underlying mesh texture UV ....
maya_2018-07-06_10-16-22.png


Now if I scale the clump base to zero (so all hairs have there origin at the center of the clump) I get a perfect match, but obviously this is not a solution.
maya_2018-07-06_10-18-37.png



To be clear, this workflow never works for real life use-case,
the arbitrary Hair UVs make nHair/pfx useless with Octane4maya, when correct texturing is needed.


BK wrote:Regarding Xgen support, we would be looking into it as soon as this branch has a stable version.

Direct XGEN support would be nice, but please don't forget also that many implemented features in the development branch are just not finished :
just good for quick demo testing, but not usable in real life production.

Also as I explained in a previous post, Xgen-interactiv is already supported in the new Maya plugin trough the ORBXproxy node.
Workflow is : Xgen-interactiv > export builtin cache to alembic >create ORBXproxy node > import the ABC cache file and setup material in the ORBXproxy UI > render (much simpler workflow !)
The Maya caching feature for Xgen-interactiv ( alembic curves with correct UV and widths ) makes a way better job than the Octane4Maya plugin with pfx/nHair.
Pascal ANDRE
calus
Licensed Customer
Licensed Customer
 
Posts: 1308
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: nhair uv texture

Postby abeoctane » Fri Jul 06, 2018 4:42 pm

abeoctane Fri Jul 06, 2018 4:42 pm
calus wrote:
BK wrote:Actually, Octane for Maya support Maya's nhair Color Randomization and Diffuse Rand has some value by default. You can try changing it to '0" then it should fix the 1 hair per clump.

No sadly this issue have nothing to do with color randomization :
Maya doesn't sample the color texture per hair but per follicle, so only the hair at the center of a clump are sure to get the correct color...
Also in your movie this only works because you use a particular case : a 1x1 plane,
but this won't work with any other mesh (just try with a torus for example).

Let me make the issue more obvious in this sample scene with a 20x20 plane :
nHairPerClumpColor.zip

Color randomization is zero but as you can see hair colors doesn't match the underlying mesh texture UV ....
maya_2018-07-06_10-16-22.png


Now if I scale the clump base to zero (so all hairs have there origin at the center of the clump) I get a perfect match, but obviously this is not a solution.
maya_2018-07-06_10-18-37.png



To be clear, this workflow never works for real life use-case,
the arbitrary Hair UVs make nHair/pfx useless with Octane4maya, when correct texturing is needed.


BK wrote:Regarding Xgen support, we would be looking into it as soon as this branch has a stable version.

Direct XGEN support would be nice, but please don't forget also that many implemented features in the development branch are just not finished :
just good for quick demo testing, but not usable in real life production.

Also as I explained in a previous post, Xgen-interactiv is already supported in the new Maya plugin trough the ORBXproxy node.
Workflow is : Xgen-interactiv > export builtin cache to alembic >create ORBXproxy node > import the ABC cache file and setup material in the ORBXproxy UI > render (much simpler workflow !)
The Maya caching feature for Xgen-interactiv ( alembic curves with correct UV and widths ) makes a way better job than the Octane4Maya plugin with pfx/nHair.


Thanks alot calus and BK, I tried with the new beta plugin and the alembic method, unfortunately the orbx proxy dont save any of the modifications I did to the imported alembic hair, every time I opened the scene the hair rendered white, I agree xgen support can be good :)
abeoctane
Licensed Customer
Licensed Customer
 
Posts: 168
Joined: Thu May 01, 2014 5:44 am

Re: nhair uv texture

Postby calus » Fri Jul 06, 2018 6:39 pm

calus Fri Jul 06, 2018 6:39 pm
abeoctane wrote: I tried with the new beta plugin and the alembic method, unfortunately the orbx proxy dont save any of the modifications I did to the imported alembic hair, every time I opened the scene the hair rendered white, I agree xgen support can be good :)

To validate the changes in the proxy UI (ORBXproxy nodegraph) , you need to close this window BEFORE saving the scene. Be carefull this window can still be open but invisible : hidden behind the Maya window. :shock:
Pascal ANDRE
calus
Licensed Customer
Licensed Customer
 
Posts: 1308
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: nhair uv texture

Postby abeoctane » Sat Jul 07, 2018 9:35 pm

abeoctane Sat Jul 07, 2018 9:35 pm
calus wrote:
abeoctane wrote: I tried with the new beta plugin and the alembic method, unfortunately the orbx proxy dont save any of the modifications I did to the imported alembic hair, every time I opened the scene the hair rendered white, I agree xgen support can be good :)

To validate the changes in the proxy UI (ORBXproxy nodegraph) , you need to close this window BEFORE saving the scene. Be carefull this window can still be open but invisible : hidden behind the Maya window. :shock:


Oh I see, yes the Ui is not very intuitive and I think it needs to autosave when I save my maya scene, thank you calus for clarify this. :D
abeoctane
Licensed Customer
Licensed Customer
 
Posts: 168
Joined: Thu May 01, 2014 5:44 am

Return to Autodesk Maya


Who is online

Users browsing this forum: No registered users and 5 guests

Thu Apr 18, 2024 4:15 am [ UTC ]