Jump to content
3D Coat Forums
haikalle

Blender Applink

Recommended Posts

Thanks a lot and happy new year you too....It's 2019.. Craaazyy :)

"\\" Should not make update button not to work. Most common mistake is that users forget to check "treat materials as separate textures" checkbox. I 
hope that in the future this should be turned on by default. There might be something odd what I haven't noticed yet. If you have an extra time to make 
small video about the situation where the applink dosen't work that would be really helpful for me.

I did quick tests where I set manual folder and for me all was ok, but I continue do some more tests.

Edited by haikalle

Share this post


Link to post
Share on other sites
7 hours ago, tokikake said:

happy new year all.^_^

Then I do not know, why I can not "up-date" with custom Object/Texture folda.

the interesting thing is,, actually 3d coat send texture and mesh to the directory which I set in blender.

So I think, plug in work corectly about custom directory, (though I see some duplicated "\\"  for path in log. 

(I think, it seems try to add  un-need "\" to set path for export from 3d coat?)

but when I use "up-date" command (button) of plug in UI, it not generate nodes for material in blender,,,

Just additional reference,, 

I use default setting to export (from 3d coat) textures, and meshes, (color, metalness rouoghness normal only) and set them as png.

can others work without problem when you use custom "Object/Texture" folda?  

(though I do not feel many trouble to manually set nodes, (because textures are already exported correctly)

 

Also make sure that you are using settings in the picture. 

settings.png

Share this post


Link to post
Share on other sites

Hi, haikalle thanks to show your setting.

I think, if I use Import or export UVsets as tiles option seems cause issue.

and At current I can see, alberto, metalness, roughness texture node are generated correctly,

but Normal map only generated but not plug in to principled bsdf normal map correctly.

I seems not use good option in blender plug in UI for update (re-import texture),,, Do I need to check OFF some options?

eg generate nodes etc

Share this post


Link to post
Share on other sites

I tried to make  screen shot movie (I hope to find best aprication for the purpose as free ^^; many free scrreen capture apps often tried to add some strange applications in my PC,,

and it is difficult to clean un-install,,, )  anyway made it,,and link with dropbox.

 hope it can help to tell what I reported,,

https://www.dropbox.com/s/gwhu67f9usvhspp/test.mp4?dl=0

Share this post


Link to post
Share on other sites
3 hours ago, tokikake said:

Hi, haikalle thanks to show your setting.

I think, if I use Import or export UVsets as tiles option seems cause issue.

and At current I can see, alberto, metalness, roughness texture node are generated correctly,

but Normal map only generated but not plug in to principled bsdf normal map correctly.

I seems not use good option in blender plug in UI for update (re-import texture),,, Do I need to check OFF some options?

eg generate nodes etc

Thanks for the video. These always help me to see that not everyone is having the same workflow with you :)  And yes "UVset as tiles" is the main problem here. It's not fully supported
in applink. I have never used this option with blender. I will do my best to make applink to work with this setting but first I need some basic examples how this setting should work between 
blender and 3d-coat.

I have used this program to screen capture https://obsproject.com/ and have been very happy with it.

Edited by haikalle

Share this post


Link to post
Share on other sites

The 3D coat option import  "UVset as tiles" is mainly for UDIM UV I think.  then I can offer some actuall case which I use this option.

In this pic, as you can see there are 8 UVtiles  1001 to 1008 of UDIM,  but there is only one  UVset  in blender.

but  the mesh have "17" material group (aka material slots in blender which assgined to surface as group)

bkebderUDIM.thumb.JPG.4fbaa5d8128355dbab4c940b154a3466.JPG

ans As you already dsicribed, when we use your plug in to transfer,  we need to use option" Treat material as separte texture. (I think it is reasonable)

then if I use "Treat material as separate texture" without "UVset as tiles"(OFF)   3d coat generate 17 UVsets as same as material slots counts.

it means 3d coat will export color texture as 17 UVsets,, (I miss count as 12 in pic, but it actually 17 material group and 17 UVsets in 3d coat)

12uvset.thumb.JPG.4ca619b449db80e6b298beb0ea90262f.JPG17uvset.thumb.JPG.5b806fb9b15c2a77f2f589d3df8c079d.JPG

If I use import "UVset as tiles" 3d coat will generate only  8 UVsets as same as UVunits counts. 

importtiles.thumb.JPG.1a12a271687e2fb3a64c39974c9442a7.JPG

But I found if I use both option at same time , it cuase shut down of 3d coat (about newest beta).

So practically I can only use one option (import uv set as tiles or Treat materials as separate texture) about this mesh. (though I do not know why it not work)

then If I only  use "import UV set as tiles" it generate matrial group as same name as UVtiles number. 1001 to 1008.

importtiles2.JPG.560529e8bc012121070bd7a95c735ef1.JPG8uvsets.thumb.JPG.0f2fb65346feb52d3eb3dfd2dab5625e.JPG

as ideally I hope 3d coat plug in will  accept it (use 8UV sets only then export 8 textures for each UVtiles)

though  I think we can not use this option for current 3d coat and plug in ,, because plug in need to use "Treat materials as separate textures" 

 

importtiles.JPG

Edited by tokikake

Share this post


Link to post
Share on other sites

So if I understood correctly. One of the benefits of using "Import tiles as uv" is that 3d-coat creates only textures that is needed. Right now applink can create "unwanted textures".
I looked and I'm able modify the applink that it takes only the materials that has uv map linked into them. If there is none it will not take that material into 3d-coat. That's not maybe 
perfect solution but step into right direction. :)

Edited by haikalle

Share this post


Link to post
Share on other sites

i dont understand.

Blender does not have udim support. Maybe for version 4.8.1 but nobody knows certainly.

Share this post


Link to post
Share on other sites

Hi Carlosan,  Yes blender not support UDIM as perfect meaning. but as you can see, if you export mesh with  UDIM type UV to blender (2.7 is almost same I think)

(I export daz figure which use UDIM UV without collapse UV set (merge all UVtiles as one)

it can show same UVmap with keep  UDIM tilese (as separate UVtiles) 

 and  keep each material group which assgined for each UVtiles. or you can assgin 2 or 3 material groups for each UVsets too.

eg UDIM 1001 tiles include head and eyesocket and ear material.   UDIM 1002 include hand and hand nails etc. 

UDIMuvset.thumb.JPG.b9c51fd6e04dbc59acd6a27df5b4e762.JPG

then if you set texture map node option as Repeat, it show material correctly when you render (so there is no problem about UDIM UV render)

But blender not support UDIM tilling UVset for baking so I need to merge all UV tiles as one, and need to bake all material group with set texture nodes.

and may cause issue, when you paint texture in blender.  (maybe htere is plug in but I do not know free one which can paint texture with UDIM UV,

maybe they use 6UVsets for 6UVtiles as same as 3d coat.. I believe, and blender 2.8 may support the way. not keep UVset as one.)

Though I have never used  other aprication (MARI or 3dsMax etc)  which support UDIM as true meaning, and how they work with UDIM. but at least about UDIM and blender

my workflow is what we need to use UDIM UV.   

Then why I can not up-load scene, my mesh is from daz products. but I can do samething with cube etc, just need to locate UVtiles as UDIM manner.

and set materials for each UVtiles.  though cube may only need 6 material and 6 UVtiles (if I separate so),, 

and it may help how we can set UDIM UV in blender.

 

Edited by tokikake
  • Like 2

Share this post


Link to post
Share on other sites

I will try to code this to applink. One fear that comes to my mind, do I have enough information to attach textures into right material groups. But I will do some tests and come back to you.

Share this post


Link to post
Share on other sites

>haikalle

Thanks all your efforts,, then just to confirm, most of users, may not use separate UVtiles (as UDIM) in blender , so do not mind if you really need it. I am afraid it break something  only for my  purpose. and I do not care, if your plug in not work for this purpose.. (even though I can not up-date for such mesh,,(separate UVtiles and many mat groups) it can export texture already)

(I often use daz character to play animation etc in blender, then exported mesh  generate  UDIM UV like the way with keep all material group)

But  To manage UDIM maybe there are other way (eg use  different UVset for each UVtiles or make original node gorups etc) ,

though  I usually use  material groups  to separate UVtiles for render . 

And  I made simple mesh 2.8 blender scene,  which use 6 material groups with 3 UV tiles (UDIM way), so hope if you plan to code,, test it please and how it work.  with each options.

you may see 3d coat how generate UVsets for UVtiles and material groups with each import options.  

uvsets.thumb.JPG.e32c7a99092418329df39fdf068498a0.JPG

UVsettest.blend

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for helping. Your blend file really helped me to understand what's going on. And I think this is possible to code into applink. Need some time but I'm quite sure this can be done.

EDIT: Spoke too soon :) Let's take your example. When I have painted textures in 3d-coat. I get textures: 1001,1002,1003.jpg. I don't know how I can link each texture into right material. 

Blender python only gives me what polygons are linked into what materials. But it dosen't give access to info which uvtile the polygons are.There seams that there is no python command
like that I can use when it comes with UVtiles. But I keep my eyes open if I could find a way to make this work, because I can see benefits of this workflow. It's quite cool way :)

Edited by haikalle

Share this post


Link to post
Share on other sites

One way is to assign Layers (groups?) by Surface material, not globally as 3DCoat currently does. 

Assigning materials by surface paint is a refinement that we need, I hope it will be possible soon.

Share this post


Link to post
Share on other sites
On 12/27/2018 at 1:29 PM, haikalle said:

Hi! Andrew fixed auto-retopology crash in the latest 3d-coat version. I just updated the applink code also to support fully this feature. Next blender beta that is released will include updated applink.

Thanks! It works now. But it seems like there is still something broken. It takes a lot more time to calculate the mesh. If i cancel the autopowizard that starts with the transfer buttom in Blender and do it manually with pressing on the fbx and click on autopo it is a lot faster. 

Also somehow he ignores the curves with the blender mesh to autopology if i do it manually again it works. 

Blender 2.8 (4.January Build) 

3Dcoat 2.80.31

Share this post


Link to post
Share on other sites

Yes I see. ^_^  and as Carlosan said, I understand  3d coat do not support such way. I think 3d coat use surface group (material group) as texture set. then can separate as UVsets.  so if I hope to keep all material  group, I need to use "Treat materials as separate textures".

And it is common 3d workflow I think.  If I really hope to generate textures correspond to UVtiles, I need to edit  material group correspond to UVtiles in blender, (eg set material name as UDIM tile name)  and it is not so difficult work.

And as haikalle said,, blender do not separate "material group = material slots"  and "material" as true meaning.  

we can not set name for "material slots". we can just assign material with material name for each slots  (and python API do not offer way, to set custom property for material slots too)

So at current  I just wait how blender  officially support about UDIM things,  and maybe I need to change my way to use UDIM UV mesh. 

Then I only hope,  3d coat app-link will support blender UDIM way. (I do not know, how it will be^^;)

 

Share this post


Link to post
Share on other sites

Using uvtiles is really nice way to work so I must say that you  have changed my way to work. I have an idea how to make this work evev if ether apps dosen't fully support it. And when Andrew is done with the brush engine improments I will write feature request for this. This could be real powerfull if applink could support this.

Edited by haikalle

Share this post


Link to post
Share on other sites
6 hours ago, tokikake said:

Yes I see. ^_^  and as Carlosan said, I understand  3d coat do not support such way. I think 3d coat use surface group (material group) as texture set. then can separate as UVsets.  so if I hope to keep all material  group, I need to use "Treat materials as separate textures".

And it is common 3d workflow I think.  If I really hope to generate textures correspond to UVtiles, I need to edit  material group correspond to UVtiles in blender, (eg set material name as UDIM tile name)  and it is not so difficult work.

And as haikalle said,, blender do not separate "material group = material slots"  and "material" as true meaning.  

we can not set name for "material slots". we can just assign material with material name for each slots  (and python API do not offer way, to set custom property for material slots too)

So at current  I just wait how blender  officially support about UDIM things,  and maybe I need to change my way to use UDIM UV mesh. 

Then I only hope,  3d coat app-link will support blender UDIM way. (I do not know, how it will be^^;)

 

Thanks for reporting this. It seams to be issue in 3d-coat so I will send mantis report for Andrew. 

Share this post


Link to post
Share on other sites

@tokikake If there is no too much to ask. Would you modify the blend file you send me, that it could show me how it works with image textures.

Share this post


Link to post
Share on other sites

@tokikake Hi! I might have found a way how to support your workflow. Here is a small video about it. If you have time could you please and test this workflow with your file. 
I attached rar file for you. 

io_coat3D.rar

Share this post


Link to post
Share on other sites

Haikalle thanks! ^_^ Can you wait to up-date your plugi in  as official (in git)  untill I test it fully then confirm it causse no issue?

I really afraid if your plug in not work for other user, (I know daz figure is not usuall for most of blender user, and many game asset artist

keep material group for each tiles, or keep one material group for game engine,, then there seems not many user who need this procedure,

though it is really useful for me, if plug in work with keep my material group and UDIM tiles,,) 

anyway I test and report again thanks much!  

 

Share this post


Link to post
Share on other sites

I feel there seems some problem when I tried to "Open in original app" in 3d coat, then use "upadate" ..about my blend scene. (I uploaded)

 your plug in try to generate new materials,  and  lost material name which imported. then cause error message,

Traceback (most recent call last):
  File "C:\myprograms\blender-git\build_windows_Release_x64_vc15_Release\bin\Release\2.80\scripts\addons\io_coat3D\__init__.py", line 765, in invoke
    tex.matlab(objekti,mat_list,texturelist,is_new)
  File "C:\myprograms\blender-git\build_windows_Release_x64_vc15_Release\bin\Release\2.80\scripts\addons\io_coat3D\tex.py", line 432, in matlab
    readtexturefolder(objekti,mat_list,texturelist,is_new)
  File "C:\myprograms\blender-git\build_windows_Release_x64_vc15_Release\bin\Release\2.80\scripts\addons\io_coat3D\tex.py", line 79, in readtexturefolder
    texturelist = UVTiling(objekti, texturelist)
  File "C:\myprograms\blender-git\build_windows_Release_x64_vc15_Release\bin\Release\2.80\scripts\addons\io_coat3D\tex.py", line 67, in UVTiling
    texture_info[0] = objekti.material_slots[list_tiles[0]].material.name
AttributeError: 'NoneType' object has no attribute 'name'

location: <unknown location>:-1

I test 2 options when " Open in original app"  , check export UV sets as tiles or check off export UV sets as tiles, but about bothcase, it seems show same erroer with my blend.scene.in 3d coat it seems keep UVtiles and show material as new material group.  but when return textures , it cause issue.  I felt if  I need to set material name as UVtile name in blender first? 

(it is no problem, if it work so)

And if I do not use "Import tiles as UVset" it work without problem :D  I think, for a while I may use this option, as you suggested.

because it keep original material in blender as same as before,, maybe most of my purpose it fit well,

Only one thing, I still hope to you check, normal map not generate correctly. I think I need to change export option from 3d coat,

so what preset, or setting is best to correctly generate normal map node?   I suceed before, but recently I lost way.

F

Edited by tokikake

Share this post


Link to post
Share on other sites

There is no need to rename your materials. About normals. Make sure that you have Edit -> Preferences -> Normal Map export -> "Maya, Blender" 

Share this post


Link to post
Share on other sites
On 1/5/2019 at 8:48 PM, haikalle said:

@tokikake If there is no too much to ask. Would you modify the blend file you send me, that it could show me how it works with image textures.

Then sorry I miss your reply.

I may modify like this pic, so now all material group (slots) set same name as 3d coat UV tiles,

materialUVset.thumb.JPG.67dc320a208bc30f8e5bee75704615f5.JPG

and I assgin each poligons to  material( same as UV tiles)

As you can see, this procedure, may change may material group arrangement, so once I change material group, I can not use different node about joined matterial groups.

(before there ware 6 groups now there are only 3 groups as same as UV tiles,,so I can not edit those merged group material as individually,,it is only demerit of this procedure)

but If I work in 3d coat and generate textures,  it seems most standard manner ,with keep UV tiles arrangements. (for another aprications)

and 3d coat generate only about each UVtiles.

Then   If I edit so, I may need not use "import tiles as UVset" but only need to use "Treat material as UVset".  now it work same way I think. 

arrangeUVsettest.blend

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×