Jump to content
3DCoat Forums

Blender Applink


haikalle
 Share

Recommended Posts

  • Advanced Member

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
Link to comment
Share on other sites

  • Applink Developer

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
Link to comment
Share on other sites

  • Advanced Member

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
Link to comment
Share on other sites

  • Advanced Member

>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
Link to comment
Share on other sites

  • Applink Developer

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
Link to comment
Share on other sites

  • New Member
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

Link to comment
Share on other sites

  • Advanced Member

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^^;)

 

Link to comment
Share on other sites

  • Applink Developer

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
Link to comment
Share on other sites

  • Applink Developer
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. 

Link to comment
Share on other sites

  • Advanced Member

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!  

 

Link to comment
Share on other sites

  • Advanced Member

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
Link to comment
Share on other sites

  • Advanced Member
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

 

Link to comment
Share on other sites

  • Applink Developer

I tried your arrangeUVsettest.blend and I don't get any errors when bringing textures.

You don't need to rename your materials as 1001, 1002. Right now how applink works it looks if there is polygons assinged into material. If yes, then applink will calculate 
which Uvtile area the polygons uvs are. And then link that info into material group. 

Link to comment
Share on other sites

  • Advanced Member

And I tried your scene file, then as for me it still show same erroer, when I use import tiles as UV sets option.

then once I deleted new added material group in blender,  update again, it seems generate textures. 

But  I found  now UV changed as packed. (merged).  and could not generate texture for "puna" (second uvtiles)

merged.thumb.JPG.b6cd9b94e9aa7835cedd193496a04348.JPG

about "puna" there is no poligons were assgined so it is not matter.   I download your uploaded 3d coat plug in, io_coat.rar , then  overwrite plug in,  and  test with it. 

 

 
Link to comment
Share on other sites

  • Advanced Member

mm, OK I try again, with keep same as your youtube video. then check how it work for me. it seems only happen for me, so I think, I make some mistake about setting. I ask again, if I can not sucess.. thanks all effort ^_^

===========

I seems find why my setting generate erroe, I use option "Update UVset and mesh". then if I check OFF this option in blender UI, it seems work correctly.

(so 3d coat not overwrite my UV arrange). but I think if I do not use this option, I can not edit mesh in Edit geometry,, (though I just test it how it work

may not edit mesh, for texure paint, most of case)

 

Edited by tokikake
Link to comment
Share on other sites

  • Advanced Member

And,, I suspect If I need to change my export option nomral map texture name,

because at current I just use "normal" but your pic seems use "normal_map"?  

yes,, it worked ^^;  So I hope to keep my preset as myway, then I made custom one,, so it cause naming matter I think,,

now this setting work for me to generate normal_map. If I use  "normal" for texture name, it not work :p:

settingmiss.thumb.JPG.4a6fb70da051e2c9532fd4d297a6a276.JPG

 

Edited by tokikake
Link to comment
Share on other sites

  • 2 weeks later...
  • New Member

Does your plugin only work with EEVEE? I need to bake textures but EEVEE does not know how to do this, but I can not get it to work in Cycles, when switching to Cycles mode, the materials stop working and everything is baked in one pink color that says that the textures stopped working. Show if your plugin works in Cycles, if it can bake textures.

Link to comment
Share on other sites

  • Member

Does your plugin only work with EEVEE? I need to bake textures but EEVEE does not know how to do this, but I can not get it to work in Cycles, when switching to Cycles mode, the materials stop working and everything is baked in one pink color that says that the textures stopped working. Show if your plugin works in Cycles, if it can bake textures.

image.thumb.png.641fd697ca5022dfb150ac6b0647f4f7.png

Edited by Alex_Velger
Link to comment
Share on other sites

  • Applink Developer
3 hours ago, Alex_Velger said:

Does your plugin only work with EEVEE? I need to bake textures but EEVEE does not know how to do this, but I can not get it to work in Cycles, when switching to Cycles mode, the materials stop working and everything is baked in one pink color that says that the textures stopped working. Show if your plugin works in Cycles, if it can bake textures.

image.thumb.png.641fd697ca5022dfb150ac6b0647f4f7.png

Hi!

Applink dosen't support baking yet. But if help me a little bit, I can try to code this feature. Do you want that bake textures will replace the ones that you brought from 3d-coat. I'm not quite how you
you want me to support baking.

Link to comment
Share on other sites

  • Carlosan changed the title to Blender 2.83 Applink

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...