Jump to content
3D Coat Forums
haikalle

Blender Applink

Recommended Posts

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

Share this post


Link to post
Share on other sites

Of course. It always good have other than youself who is testing. I keep you updated.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Here is the latest version but this includes couple bugs and crashes. But I put it here because this is first attempt to suport udim layers.

io_coat3D.rar

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

FBX importer bug was fixed and now blender 2.8 official build can import multiply uv-sets. 

  • Like 2

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I have not moved to 2.8 as of yet (not looking forward to the new UI changes ) but when I do I will most definitely be using this app link.  Thank you for your time on doing it.  

  • Like 1

Share this post


Link to post
Share on other sites

tenor.gif

  • Like 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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)

 

 

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

with this case with monkey it's bad welding because it's not the edge vertices that are welding. This needs to be fixed one way or the other.

Share this post


Link to post
Share on other sites

Need to do some more tests with this vertex index thing :)

Edited by haikalle

Share this post


Link to post
Share on other sites

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,,)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Yes do not worry. just reported what I saw. And your up-date was really great,,, :rofl: I suprised,, it work about all case,. and offfer one more option which I have never tried before.

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

×