Jump to content
3DCoat Forums

Blender Applink


haikalle
 Share

Recommended Posts

  • Advanced Member

So The main problem (what I thought) is,  blender FBX importer.And I know, current blender not support UDIM as true meaning.

Though I can tweak material group , as same as  I show of monkey FBX,, (set material group correspond with UDIM tiles and name so) in blender,

then export  maybe work well..

But as you said already, after all blender FBX imported seems corrupt UV arrange I think.. I may test with merged UV ,with different material gorup name.

(1001, 1002, 1003)  without cross over UV . and all UV located on to 1001. 

 3d coat can import it without problem as UV tiles,, (with use option,), but I do not know, when export it as FBX, blender can keep UV. (merged island is OK,

but merged UV verts  is actuall problem,,)  if it not happen with FBX improrter, I do not care to edit material group in blender.

(So I often use copy,,),, thenn,, I say again,, if use obj this problem not happen ;) (So I have often seen blender FBX exporter problem sthough it is gradually imrpoved,, but,, I do not expect mcuh,, I simply think,,  blender FBX is not same as auto desk FBX,,)

 

 

 

 

Link to comment
Share on other sites

  • Applink Developer
29 minutes ago, tokikake said:

So The main problem (what I thought) is,  blender FBX importer.And I know, current blender not support UDIM as true meaning.

Though I can tweak material group , as same as  I show of monkey FBX,, (set material group correspond with UDIM tiles and name so) in blender,

then export  maybe work well..

But as you said already, after all blender FBX imported seems corrupt UV arrange I think.. I may test with merged UV ,with different material gorup name.

(1001, 1002, 1003)  without cross over UV . and all UV located on to 1001. 

 3d coat can import it without problem as UV tiles,, (with use option,), but I do not know, when export it as FBX, blender can keep UV. (merged island is OK,

but merged UV verts  is actuall problem,,)  if it not happen with FBX improrter, I do not care to edit material group in blender.

(So I often use copy,,),, thenn,, I say again,, if use obj this problem not happen ;) (So I have often seen blender FBX exporter problem sthough it is gradually imrpoved,, but,, I do not expect mcuh,, I simply think,,  blender FBX is not same as auto desk FBX,,)

 

 

 

 

obj is just very limited. I really would not want to use it because I really think that if we want to supports future features (armature, verxtex maps, weight maps.... even shapekeys) then fbx is the right format.

But luckily blender code is all open so it's time to jump to explore blender fbx import-export code :)

Link to comment
Share on other sites

  • Advanced Member

I test with this FBX (in blender, I locate all UV island in 1001 space, like this pic) but separate as material. (so 3d coat can load it as UVset) 

If I set texture node as "repeat" it work without problem (each material only use each part island UV,, so it cause no problem)

and it can be bake , and texture paint easy. (Of course I need to generate texture node for all material for blender cycles baking,,) so most of case I prefer it.

(without I hope to separate material more and more to change only eye edge easy,,,,) as you know it is not UDIM tile just separate as Material.

mergemonkey.thumb.JPG.7a80587c2bb529012a00d26b5aba9e1d.JPG

 

Then I export it to 3d coat as FBX then use the option "Treat materials as separate textures = On"  It auto separate each material as different UV tile

(it should wrok so,  or we can not paint  correctly  any more  ^^;)

mergecoat.thumb.JPG.cc0479db87e8882b49b4919a8ba74098.JPG

The problem is If I export this monkey with FBX from 3d coat, then load it in blender,, I use this option (only export mesh for test)

I have no choice , I need not Export UV sets as tiles , at all.  But need to export texture for each material. separtely. anyway about this test, concentrate UV only.

setting.JPG.75e8a19d140f3f1b5062189f034dae26.JPG

THen open in blender,,, 

fbximport.thumb.JPG.5699c1057260eb1388d3ff66da6a7640.JPG

 

Then I think, so when import FBX, if we can choose, not overwite UV,,  or offer option import UV and import mesh separately,,

without it,, after all, when import mesh, I think we see this issue, with simple mesh, (though I do not test more simple mesh, which only have one material group, and All UV island are clean arranged on to 1001 tile.

 

Link to comment
Share on other sites

  • Advanced Member

I understand ^^ and with my procedure,, I seldom use export mesh option,, (import and generate texture at current)

then wait you make FBX importer better !   I hope to test your plug in with each up-date ,^_^  if you forgive me. (I already use your plug in much with 2.8 )

  • Like 1
Link to comment
Share on other sites

  • Applink Developer

New update:

1. Node tree nodes are now color coded. Node three has become quite large so this will help to find right nodes. Also hue node removed from metalness and roughness textures and replaced with Math multiply node.

 nodecolor.thumb.png.ad24d9df8796d68f69ccbb338fabdf43.png

2. Now you can use multi-uv to texture you paint. Look the quick small video below how to use it. Also to remember this feature needs updated fbx importer that dosen't yet come with official blender build. 
You can download it here. 

3. Vertex colors are easier to bring from 3D-Coat into blender.

addons.rar @tokikake :)

Edited by haikalle
  • Like 1
Link to comment
Share on other sites

  • Advanced Member

OK I can understand new procedure.

I am now thinking to change my workflow or not.:)

Because Your new up-date use different UVmap nodes for each material slot (aka surface group )

There seems pros and cons

Pros = it may fit well for future blender UDIM, because I suspect Blender  may use different UVmap for each UDIM tile. I sometimes see future report and I already know some add on which offer UDIM paint by use different UVmaps (assgin for each material).   I do not know other app which use UDIM as true meaning, and how they manage UDIM tiles, but I suspect most of them may set different UVtiles as different UVmaps.  so there are 5 UVtile (1001 to 1005), it may use 5 different UVmap. then assgin for each material slots.

Cons = In blender, usually even though I use one  merged UVmap, it can show correct material. paint, and bake.  if we unwrap each material separately.  Them most of case, blender user have used same one UVmap per mesh. (,non overwrap, or  merged but separated by material, or arrange UDIM tile way) It is same as most of usuall app I think. (Untill we know UDIM,, we simply separate UV for each material, then when we see the UVmap, there are many overwrapped part, but about each material, there is no overwrapping, then it work as we expected)

So I hope to know, other user how think it.  UDIM tiling (locate UVisland to each UV space) is not so popular, I thnk. I have used it to keep original mesh  UVarrange, or to export another app, with keep UV arrange. but about both case, it have only one UVmap in blender . then each aprciaton, may choose how treat this type UVmap, I think.

If I use new  procedure, ( set different UVmap for different UVset (UDIM tile) and material),  I may keep the rule untill export to 3d coat. because after all once I import mesh to blender again with plug in , it means, now I must have some  UVmaps for each material(UVset in 3d coat). (before there is only one UVmap,,)

 

 

 

Edited by tokikake
Link to comment
Share on other sites

  • Advanced Member

Then,, if we follow true UDIM manner,  I think, we need to arrange UMmap as UVtiles (locate on 1001 to 10XX).  (but keep as one UVmap)  So that  I have followed the rule in blender (because I do not hope to change UVmap, when I export to another  aprication which support UDIM) even though blender do not support UDIM bake and texture, at current.

https://support.allegorithmic.com/documentation/spdoc/udim-144310352.html

you may find almost same guide in Mari official . to arrange UVtile for UDIM. (there is rule,  never overwrapped ,and tile U direction max number is 10)

Then only when I need to  bake in blender, I merged all tiles on 1001 .  and make texture nodes for each material (follow as UDIM number).  So,, If Plug in may need to change UVmap, I hope to remain original UVmap  (which tilied as UDIM, then only one UVmap) , can it do?  (not  remove originall UVmaps but just set nodes for new UVmaps?)

===========

I now send mail to Andrew, If 3d coat (future beta) clear separate "UVset" (per UVtiles) to paint texture, bake, and "Material surface"(group for select, hide, or lock) .I think if it can, maybe plug in need not care much,,, though I do not know how future blender work with UDIM.  (if it use separate UV maps for each tile, or just keep as one UV maps, but can bake and texture for each  UDIM tiles )

Edited by tokikake
Link to comment
Share on other sites

  • Applink Developer

@tokikake I agree with you and have to say that you give very informative feedback. Thanks a lot. 

Yes I agree that it's not maybe good thing if applink creates extra uv-sets into blender. I have already updated applink's udim workflow that it combines the separate uv-sets from 3d-coat into orginal uv-set in blender.
I upload the applink here soon. 

  • Like 1
Link to comment
Share on other sites

  • Advanced Member

Thanks^_^ I am sorry to make many request, and thanks you understand what I asked. (actually  we may need to discussi about blneder UDIM ,after blender 2.8 support it,, but at current, I hope to keep current way (keep UV tiles with one UVmap) Then  I do not stick to how you arrange this plug in, then change as you like if other user prefer it.  (I could never edit FBX importer etc ^^; then I can just say thanks all your effort of this plug in,, when I have time enough, I may challenge to edit your plug in , for 2.7 compatible,, because I still rely 2.7 much  ^^; )

 

Link to comment
Share on other sites

  • Applink Developer

Your point about uv-maps was very valid and I think how applink works now is much much better.  I have recoding this applink into 2.8 so hard that there is no turning point anymore...for me at least :)

If someone wants to take 2.79 chalenge, I'm ready to help and guide into beginning.

Edited by haikalle
Link to comment
Share on other sites

  • Applink Developer

With big scenes you need tool for easily remove nodes/images that applink created for you. These buttons were created for that purpose. I also uploaded newest version into blender 2.8 

node.png.a578c704b7c9138ae71d96f2e1715538.png

Also first tests with udim workflow. Here is a quick video how it works. 

io_coat3D.rar

  • Like 1
Link to comment
Share on other sites

  • Applink Developer

Able to push one more commit for this day. Now There is new panel in material tab. There you can specify what textures you want to bring into material. For example in this picture, you have wall material and you want
to bring only diffuse texture for that material. And to Door material you want to bring all textures. Now you can simply export all textures from 3d-coat and then Applink will  filter what textures are linked with the material. 
Applink will delete those textures automaticly that 3d-coat created but not used in blender.

Remember that this feature is only for users who wants that extra control for their applink materials.  Most simple workflow for applink is still pressing transfer and update button, nothing else :)

io_coat3D.rar

texture.png.8df0a1ad65efee01d39d1e7a02e57bde.png

Edited by haikalle
Link to comment
Share on other sites

  • Advanced Member

Hi haikalle Thanks all your effort:rofl:

 I hope your plug in can fit for most of blender user.  So, I  made one simple blender scene to test UDIM thing easy. (for current status, and for future (3d coat , and blender up-date)

The main purpose is,  to check easy with each UV and Material (slot) arrangement.  I think, we may only  have these 4type mesh.  then I make 4 monkey, correspond to these setting. you may easy see, each monkey UV and material how assgined.

A.  1UVtile 1mat (most simple case, and it is best for game assets, and paint in 3d coat, directly. most of case UV locate on 1001 tile only. and no overwrap. though there is case, user intend to locate UV out of 1001 range, to adjust texture as they like, but it is not fit 3d-paint .)

B  1UVtile 3mat  (it is common way.  assign mesh for each material as we like.  and un-wrap for each section.    all UV are locate on UV1001.  each material UV not overwrap. but as full UV we often see overwrap , 

C  3UVtile 3mat   (it is standard way for UDIM. separate material slot as UDIM tile. (material name is not problem, I think.but when use plug in may need to change mateerial name , to keep same as 3d coat)

D 3UVtile 5mat.  (it is new way. which used some complex products I mesh.  mix with type B and type C.  we can separate material from each UV tile. but we need to set,  each material not closs over UVtile.   (eg,, if one material assigned faces, locate UV1002 and UV1003,  it is bad arrange, if user make so, I do not think plug in need to manage it)

Then  I hope to know, If you import these 4 type mesh to 3d coat, for each case, how you may plan to set import-export options. or may change UVarrange or material if it need.    about A is almost no problem.  C seems OK for recent up-date . I still not clear, CaseB work or not. (may need to gather all mat as one?)

udimtest.thumb.JPG.4cd65ac8c9857c9ae554ffd635a29b50.JPG

To  test correctly,  I recommend duplicate this scene, and work with plug in, then compare original, after import and export with 3d coat.  because if just duplicate mesh, and use plug in, bledner easy overwrite original mesh material too. (it depend on user setting, then it often happen, when we change duplicated mesh material, original material change too)

And I understand,, these test really take time , and I do not hope you are tired of,,,  so only when you hope to check , please do it.   Of course I will do it too. why I plan to make this scene,  to report detail,,  use same  blender scene make  easy to understand, what I did, and where I wrong. 

(addtionary I think,, there is case 1 mat 3 UV tiles. 3d coat can manage it too .  but I do not think blender can render it correctly. At least,  blender need to separate as material.  to render separate UV tile.  at least about current version, then  at current I ignore it)

 thanks   ^^

and I have another request to use alpha for generate transparent node , mix node connect with alpha (of color), (so we can easy make net or half translparent material with use 3d coat layer zero)   (it is simple node setting , we often use it to use opacity (transparent map),  I remember, 3d coat have option to generate opacity map, as use alpha, but I think, about 3d coat, directly export as color with alpha, may make it easy. 

TestUDIMscene.zip

Link to comment
Share on other sites

  • Advanced Member

I could test with new version, (git blender 2.8 and plug in).

Then I suprised:rofl:, because you seems already offer way for my exception case ^^; 

 now even though I do not separate material (keep material as one), , but just arrange UVtiles UDIM way,   Now your plug in auto set (mix) generated texture for each UVtile, in blender , by mix  color node, then show it correctly.   I did not think it before.  and I do not clear understand still why  your way work correctly, without overwrap texture, ,( maybe related to texture  cordinate option ?) anyway it seems work..  (though I am careful  to set material like that,, it may only work, when I assign each texture, with  your plug in generated nodes )

Then About my test scene,  

If  my mesh is CaseB  (3 materials, on one UV island.. (overwrapped)) , I need to set 3d coat import option, 

 import materials as separate texture" = ON,  import tiles as UVset =OFF.

then 3d coat can generate textures for each material. if use import tiles as UVset, I can not paint correctly (because material are gathered, then overwrapped)

and your add on generate textures and nodes correctly.    And about all case, I  need not change export option.  

anyway, I really surprised,  and thanks you.  your plug in have worked  for all case already. (and about  exceptional case which I do not expect, and supposed too)

 

 

 

Link to comment
Share on other sites

  • Advanced Member

I found something change when I import mesh with your plug in.  I do not care about morph things, but just try to export as obj, and try to generate morphs. it not work.

(so it is not related with 3d coat FBX things),  I clear remember before it worked about all mesh, without I happed to merge vertex. 

Then I just import default monkey, with your plug in, and move it in retopo room, to  check vertex count..

Retopo> by use "use visible paint  object as retopo"  then count vertis .   it now change verts as 505

505.thumb.JPG.c343f0c6d3be7a67823fd417e4f5db71.JPG

but default Szanne vertex count is  507 in blender. 

507_bl.thumb.JPG.4e92a5bcae92f53bc1044bd5d6f82040.JPG

So it means, 2 verts are disappeared when I import mesh with your plug in.  I use new git blender (I update and build) . 2.8 and 3d coat 4.8.34.

your plug in is packaged with blender. (I think it is newest one)

I can suspect, why it happen,, but it may cause wrong try, then just report it.  (test with default szanne please).  

And about me, I can not use new up-dated 3d coat,, (so I do not know, it work about Andrew offer new test version )  This problem seems new thing for me.

because I actually have used your plug in to import mesh. (then if I need to use as morph, I use export as obj from 3d coat,, then it have worked)

Edited by tokikake
add pic to check easy
Link to comment
Share on other sites

  • Applink Developer

Yes I noticed that too. I have updated 3d-coat but it still seems to have some issues. But I will wait for next 3d-coat beta before solving this issue. 

The reason why 507 / 505 difference happens is that if blender has vertices that are in same location 3d-coat will weld them together. Monkey mesh
has that situation.  I will solve this after next 3d-coat beta build. There has been also some importer - exporter change in blender so...

If you try with sphere or cube mesh. Are they ok?

Edited by haikalle
Link to comment
Share on other sites

  • Advanced Member

And even though I did not use your plugin, just export as FBX from blender, (I test with some option),

then import the FBX to 3d coat, it seems already change vertex count as 505 ^^;

but if I import the same FBX file (blender generate) to blender , it show vertex count as 507^^; ,,

So it means, 3d coat can not keep vertex count about blender export FBX file. , at least about default monkey .

though it may not cause issue most of work flow.   I may test with other shape .  (I hope to know clear case, when it happen. eg  when vertex are too close , auto-merge when import)

=======

Yes I see...  I think the welg thing may cause issue. (most of case it is good, but need option I feel)

 

Edited by tokikake
Link to comment
Share on other sites

  • Advanced Member

Yes and I confirm, I never use weld option  = everytime  set unactive, when import mesh to 3d coat.

(3d coat import option to paint UV mesh) . so the option seems not work as It need. (or 3d coat must  weld if vertex are on same position, with some case,,)

Link to comment
Share on other sites

  • Applink Developer

It's just funny that Andrew send me special version of 3d-coat and it already worked very well with keeping vertex index. But now this morning I tested and odd things are happening :)

But like I said. There has been some changes in blender too so  I hope it's going to be a small fix this time.

Edited by haikalle
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...