Jump to content
3DCoat Forums

Blender Applink


haikalle
 Share

Recommended Posts

  • Advanced Member

As practical case, I use corrective shape key add on with Haikare 3d coat applnk,,

1 . generate posed static mesh (with other shape key applied) by using "Create duplicate for editing" (shape key menu added by corrective shape key add on)eg we may hope to mouse open or need set pose for character to sculpt easy.

2  export the posed mesh by 3d coat app-link. to 3d coat (paint room or retopo-room , I prefer export mesh to paint room )

3.  edit mesh in re-topo room or edit geometry room

4  export (return) mesh by 3d coat app-link.  

5 if there is already other many shape keys applied,  make new mix shape  then keep it (as" mixall")

5  transfer the imported mesh to character by "Add as corrective-pose shape" then generate new shape key.

6  with case, you may need to blend the generate shape key  with "mixall (value = -1.00)   , or just use pin new generated shape keys. to show shape correctly.

(to exclude other shape key effect which already applied, these delta can be double applied, when you set the generate shape key as 1.00)

Link to comment
Share on other sites

  • Applink Developer

@tokikake @Carlosan Confirm if I understood you request correctly. You would like to take Blendshaped mesh into 3d-coat? That's the most import part for you. 

When bringing the mesh from 3d-coat into blender. It dosen't need to create new blendshape? Is it okey that it just updates the blendshape  vertices that you used when you exported your mesh into 3d-coat?

I haven't used Blendshapes myself so it takes a little bit time to understand the workflow with the applink :) I understand part that user wants to take blendshape mesh into 3d-coat. But creating new blendshape inside
of 3d-coat that would be needed to import into blender, is that so needed feature?

Edited by haikalle
Link to comment
Share on other sites

  • Advanced Member

@haikalle

I think, what I requested seems different from Carlosan. :)

I do not know z-brush blend shape, but know blender shape keys, and blender mesh option named as "blend shape"  which can mix 2 shape keys with limit by vertex selection

Then I just hope to import posed mesh to 3d coat (which use armature and many driven shape keys to change expressions)  with your plug in without these steps.

Though I do not know clear how FBX export work with each setting,   only did some test with blender FBX export options, and your plug in. I think, at current your plug in can not import armature posed mesh shape.  (it return zero pose shape)

To export current posed (and shape keys deformed) shape,

1. I need to delete all shape keys from current mesh. (bake current shape key defomation as default base shape, using blender shape key options )

2  Then apply armature modifier for mesh. (bake posing).

now I can export baked posing and shape keys applied mesh with your plug in.

 I hope as future request,  if your plug in can  offer option, which can export mesh with keep posing and shape keys.   But as I mentioned,  I can make it easy with another  plug in (which offered as official add on (community), and I up-dated for 2.8 just for my purpose)

And I have another request,  to  import (reflesh) mesh in blender as new shape keys, (without remove  armature ,and other shape keys)

the add on which I menitoned above can offer way , to import modified mesh in 3d coat  as new shape key, without remove armature (keep mesh with armature, and all shape keys)  

As you menitoned, I expect Andrew offer new FBX exporter which can keep vertex order, then as future request, I hope if your plug in can offer way  import defromed mesh (in 3d coat) as new shape key in blender . At current after all I need to epxort as obj from 3d coat, then use the add on, to transfer shape to blender posing character. it is not so heavy work, but  I really like one click process about these import-export process:p:

All things is just future request, and I do not hurry up at all, there maybe many things, which other user want to concentrate. 

(eg ,, export alpha as opacity map ,, then auto generate cycles transparent nodes to use  with pinciples shader)

  • Like 1
Link to comment
Share on other sites

  • Applink Developer

I just commited new update of applink into blender2.8 trunk. Andrew has made a great job to improve fbx support and now 3d-coat/blender should keep vertex index the same. 

Before applink worked that when it updated the mesh data, it deleted the old mesh and imported new one. All vertices weight map, shapekeys where lost. But now with this new update
applink only update vertices location and uv-set and leave the rest alone. There should not be any data lost anymore when using applink. I have turned "Update Mesh/UV" on as a default 
now. 

Also worked a little bit displacement node. Now applink adds displacemet map node automaticly in your node tree. When using displacement with cycles you need to add subdivision surface
modifier. Applink dosen't add that automaticly for now,  because displacement is still a little bit work in progress in 2.8 so it might have some changes. 

 

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

  • Advanced Member

Hi haikalle, I really excited about new up-date things of your plug in!

then it is not about your plug in, but I test with new 3d coat beta , and generate morph with FBX and OBJ (same mesh export from 3d coat),

FBX seems still somehow corrupted I think,, because when I export as obj, I can get morph correctly, but If I export as FBX, I still see problem.

I only test one time,, then I do not know if I miss some import setting of blender FBX importer,, and as my test I use armatured mesh with plug in to transfer shape key, then it  is not simple case.. (but imported as obj work perfectly,, for complex character mesh)

(both mesh are exported with your plug in to 3d coat) then I export them manually from 3d coat and test, how new FBX work with 3d coat 4.8.34(beta)

So, could you generate mesh as moprh ? (if you try to make shape key from import version with your plug in)

If you test and can not generate morph (shape key) I may report it (FBX importer still cause issue about vertex order, I think)

 

Link to comment
Share on other sites

  • Advanced Member

As addtionary infomation, what I can confrim is,, when import mesh  as FBX to 3d coat.

 it keep vertex order. (so I can edit in 3d coat, then return it as shape key (aka morph)  for mesh (in blender) so 3d coat FBX importer can keep vertex order

What I feel problem ,, when export from 3d coat, and compare obj and FBX (which just use 3d coat exporter from paint room).  then try to generate shape key.

FBX version show same problem what I up-loaded pic before. (s mesh simply broken when apply as morph, but vertex count keep same, so blender at least generate shape key I confrim), OBJ version do not show problem. (generate clean morph shape which I edit in 3d coat) that means, 3d coat FBX exproter still remain some problem I feel,,

I test again, with same mesh ^^; I do not know why It not work before, but now I can see clean morph transfered.

So I seems mistake,, and current 3d coat FBX exporter keep vertex order, and generate morph. (I may use wrong FBX mesh to import, I afraid)

then I just expect, your plug in work well  as you mentioned, and thanks 3d coat developer team, Andrew too!"  ^^

 

Edited by tokikake
Link to comment
Share on other sites

  • Applink Developer

@tokikake I need a little bit time with shape keys. I think that it's possible do and I really like the code you send to me. It's helps a lot. I understand that you want to take shape keys mesh into 3d-coat.
But why you want to create new shape key from mesh you imported from 3d-coat. That part I don't fully understand. Why don't you just create new shape key inside on blender?

Edited by haikalle
Link to comment
Share on other sites

  • Applink Developer
26 minutes ago, tokikake said:

As addtionary infomation, what I can confrim is,, when import mesh  as FBX to 3d coat.

 it keep vertex order. (so I can edit in 3d coat, then return it as shape key (aka morph)  for mesh (in blender) so 3d coat FBX importer can keep vertex order

What I feel problem ,, when export from 3d coat, and compare obj and FBX (which just use 3d coat exporter from paint room).  then try to generate shape key.

FBX version show same problem what I up-loaded pic before. (s mesh simply broken when apply as morph, but vertex count keep same, so blender at least generate shape key I confrim), OBJ version do not show problem. (generate clean morph shape which I edit in 3d coat) that means, 3d coat FBX exproter still remain some problem I feel,,

I test again, with same mesh ^^; I do not know why It not work before, but now I can see clean morph transfered.

So I seems mistake,, and current 3d coat FBX exporter keep vertex order, and generate morph. (I may use wrong FBX mesh to import, I afraid)

then I just expect, your plug in work well  as you mentioned, and thanks 3d coat developer team, Andrew too!"  ^^

 

Good to hear. This is quite early builfd with this new way to update meshes, so if you see something funky please let me know. BTW: There is one welding vertices issue with FBX and Andrew has already fixed but the fix is not in 34 build.

Edited by haikalle
Link to comment
Share on other sites

  • Advanced Member

@haikare  I know why it seems somehow strange, to generate morph (edit in 3d coat and return it as shape key for mesh in blender) .

and As you said I usually make shape keys in blender.  (even though 3d coat retopo room edit is robust, I prefer edit in blender to make morph)

The main reason is, , I  usually render character which already made in blender.  (many shape key to change shape, with ctrl to expression which change facial bones) of course I like to make simple props  and texture with 3d coat from scratch too,,

so lets think,, now I have one already made character.   then plan to make some detail musculian texture and shape for the character.

Then I export mesh to 3d coat,  of course if I sculpt detail only, I need not edit mesh. (or work only in paint room), but eg I happend to add some muscle by sculpt in voxel room, then retopo mesh (which imported from blender) need to  follow current musculian shape.   then I can bake clean normal.

To use this normal map , of course I need to apply the normal map for the mesh  which I edit in retopo room (auto snap etc).  the normal map can not ift shape in blender any more.  Then If I return it to blender as new mesh,,, ( overwrite mesh ) it is destructive work flow. 

  I prefer "my edit about mesh  in 3d coat"  to keep as shape key, not hope to overwrite my character mesh in blender...

Then when I hope to change my character as muscular, I can use shape key + baked normal map. with keep all other morphs and texture sets.

Of course if I really hard edit,, it never pose well untill I adjust weight map again,, but to add some detail muscle,, I need to edit retopo mesh too.

then I hope to keep it as new shape for character... without overwrite original...

 

 

Link to comment
Share on other sites

  • Advanced Member

I think, it almost work well!  then one thing I may hope to know is, 3d coat setting for import export when use this plug in. I understand, plug in auto set options of blender side  for export import. FBX,  then 3d coat setting is only matter. to  "mport" and "Open in original app." 

About these test, I do not import texture,,(so do not check texture options in blender)  then I see sometimes normal not import with smooth, or pivot point change then move down  when I up-date. 

and as your option, it overwrite UVmap with mesh  too. then it show somehow strange UDIM UV map with my node stting.  (repeat many tiny texture on maps)  Usually I keep original, then I can easy transfer UV in blender,. I think those things simply change how I set in 3d coat options. so hope to know which setting may best to overwrite mesh only.  

And If you can,,  I hope 2 things to more flexible.( when user  miss setting about options)

1 option,  only import mesh , or only import UV map.  (when change UVmap,  without we keep original,, correct  UV is a little bit difficult about UDIM tiles)

2 offer option, just import mesh as new object,  without overwrite.  (it is not matter how texture are applied, when user use this option,  user only need to get mesh of vertex position.  then user  can make shpe key if I need, without overwrite.    eg now we have 2 default button, "Transfer" and "Update", then I hope one more button  eg (import)

 

  • Like 1
Link to comment
Share on other sites

  • Advanced Member

I think, current FBX exporter (of 3d coat) can not export UV tile as it were. with both option.(export UVset as tiles on off)

I export mesh UDIM type UV as FBX from blender  ,then import it again to blender.  it keep UV tiles as same as before in One UV.

So I can confrim, blender FBX importer can keep UVset (UDIM type) 

then I  import it in 3d coat, as separate UVsets.   if I export it as obj, then import it in blender, it keep UVset as same as before. 

OBJ.JPG.970f1b5c3025aac8f8f74df0e551ae0c.JPG

but If I export mesh as FBX (from 3d coat)  then import it in blender,  I  see UV corrupted. (some UV tiles are merged as one vertex) just remein one or two UV tiles. 

FBX.thumb.JPG.9a4a9bcdc99e28adc0a9fc44e230295d.JPG

 

Edited by tokikake
Link to comment
Share on other sites

  • Advanced Member

I test with monkey (separate 3 UVitiles in blender then arrange as UDIM manner) and to test easy, set material as UDIM tile name (1001, 1002, 1003)then just export, import blender and 3d coat.

What I found is, 3d coat can import as FBX with keep UV tiles when the FBX is exported from 3d coat.   and blender can import as FBX with keep UVtiles, if the FBX is exported from blender too. 

but blender can not load UV tiles correctly about  3d coat exported FBX :(  , though 3d coat can load UV tiles about blender exported FBX.(as UVset)

test please attached monkey FBX (which exported from blender , with 3 UVsets as UDIM  (in blender it is only one UV) ,and import to 3d coat.with use "import tiles as UV set" now  you can see it keep UV set as different tiles.   (so it cause no matter) 

monkey_import_fbx.thumb.JPG.c8977a87cc5982f3388ae07763aae757.JPG

 then export to blender as FBX and OBJ from 3d coat, and compare  how it work.    If I export mesh with UV from 3d coat, as FBX, UV tiles  corrupted. (I do not think  there is option to solve it) and it duplicate many material ,,

monkey_export_fbx.thumb.JPG.52c45b6001fe5984a6888144affb3099.JPG

 

monkey_import_blender.thumb.JPG.e4b39bb212d52fe8aa10f5305bdf72d2.JPG

I do not know Andrew can manage it,, (it can be said as blender side problem,, but blender developer may not agree it too,, because blender can read  fbx which blender exported,,)

I attached coatmonkey FBX  too.  which export from 3d coat. (the monkey)

it can improt  mesh to 3d coat without problem. (keep 3 UV set, and surface group with option "import tiles as UV sets" but can not import to blender, with keep UV.

==================

then If I export mesh as obj from 3d coat, it can keep UVtiles and material-slot (name slightly change, because blender material name add .004 etc,, ) . so I do not recommend obj,, but without blender full support FBX (at least 3d coat use ), I afraid, there may be remain issue. (and I do not think, blender can full support for other app FBX ,without there are many user request,,)

objimport.thumb.JPG.f1bb4f457f909dc14326a17274c70ce1.JPG

testmonkey.fbx

coatmonkey.fbx

Edited by tokikake
attach more image to comare easy
Link to comment
Share on other sites

  • Applink Developer

@tokikake With monkey object Andrew fixed one bug this week in 3d-coats fbx that was giving an error. So I wait until I get hands upgraded 3d-coat version with the fix.

Yes,  I can see the Uv-tiling problem. I will write an email to Andrew and see what he thinks about it. Thanks again for reporting this :)  

Edited by haikalle
Link to comment
Share on other sites

  • Applink Developer

@tokikake Question about uv-tiling. If you leave "Import Tiles as UV sets" OFF it will sets uv-sets name material. To me it's a little bit more clear way than settings this ON, because can 
play with materials name and not the 1001,1002, etc. Are you okey with that plan too?

Edited by haikalle
Link to comment
Share on other sites

  • Advanced Member

The only reason I may hope to use the option, is about current meshes (daz import figures) have many material, which are located in same UV tiles. 

But to edit it in 3d coat,, too many material just cause issue for me,, and  as you said, 3d coat after all generate UVset as same number as material groups.

eg hand and hand-nail are located in same UV tiles. but as you said, 3d coat just duplicate UVset of both. then generate texture for nail and for hands 

Though it only matter about those mesh, so  to be frankly said, do not care about it ^^

But even though I use your recommend option, after export as FBX, I just see, UV verts are merged which option I used . 

basically we may need not use UDIM tiles..  merge UV island as one,, then set up- texture nodes in blender,, with each matrial slot,, it not cause problem.

when we select the slot,, it show selected UV, and texture applied only for the material slot when render. 

But I saw when export as FBX,, without the UV set option,, UV corrupted in blender too, merge as one vertex about some part,,

I do not know, this problem solved if I  import mesh to 3d coat, with your suggested way, (most of case I prefer it,, it only matter about some mesh which use many material groups but  keep same UV tiles. eg daz figures have almost 14  or 15 (maybe) material  group.but UVtiles are 1001 to 1008 for some generation figures.. 

slot.thumb.JPG.afd8863f89bf8e5c62f97afb893cffc3.JPG

 

Edited by tokikake
Link to comment
Share on other sites

  • Advanced Member

And I apreciate, if Andrew try to separate material group and UVtiles as true meaning ^^; though for me,, I may better learn more untill request many things.

Actually  I do not like blender material-slot (which we can not set name, but we just apply material with name,, "it is not material group" as true meaning,

then it often cause problem to apply or exchange material sometimes very annoying   ^^;)

Link to comment
Share on other sites

  • Applink Developer

Thanks for remainding about this 19 slots <---> 8 UV sets. And I agree we need both (ON and OFF) settings available. I wrote an email to Andrew and I come back to you when 
I get respond. 

  • Like 1
Link to comment
Share on other sites

  • Applink Developer
5 hours ago, tokikake said:

About these test, I do not import texture,,(so do not check texture options in blender)  then I see sometimes normal not import with smooth, or pivot point change then move down  when I up-date. 



After Keep vertex index update I can get rid of pivot point moving to different place. I just updated the applink and now the pivot point should keep its position.

  • Like 1
Link to comment
Share on other sites

  • Advanced Member

@haikalle

now I am playing to texture then as you said,, yes I prefer both,, and if I need to choose, I may prefer your suggested way.

I improt cloth to somehow color more fancy texture,, with your plug in, then it only have one UVset with 6 material.

but If I import as UVset,, 3d coat generate only one material,,, I lost way to color belong to seprated group (zip or button etc ^^;)

merge material is not so hard work , but separate material in 3d coat, may take more time ^^;  anyway thanks you and 3d coat dev team. I really like this apricaiton and forum members. 

Link to comment
Share on other sites

  • Advanced Member

if set so, it simply generate UV set for each UVtile and 3d coat seems auto name as 1001 , 1002,, then name surface group as 1001, 1002 etc.

the inverse, (as spearte texture =ON, tiles as UV set = OFF)  generate UVset for each material group (materials), then 3d coat use name for UVset and material group. (the count is same)

I remember, 3d coat can manage when I tweak UVset (eg merge as one), auto-adjust texture,,

but will it  work,, when we merge all UV set = material group of this cloth, (in blender it have only one  UV tile,, but separated materials  to paint easy in 3d coat with use import option) ,  3d coat can generate correct texture sets? 

clothUVset.thumb.JPG.7b2ad9bba08711b6982a0bc475a70f7a.JPG

Because I hope to generate only one texture for each map (color alpha etc) for this cloth. but I afraid, once I merge UVset (UV tile),  I need to make mat from scratch,,

If I do not merge UVset,, 3d coat will  generate all texture for each UVset,,  (actually it use too  expensive memory , ,,) so idally 3d coat support material group and UV set as sepaarte meaning..

 

  • Like 1
Link to comment
Share on other sites

  • Advanced Member

I merged these UVsets (material surface) as one in UV room,, it seems work, but once I merge,  all surface material group not work any more. these are empty..so one UV set and one material surface (named as merge)

It is OK to export texture, but  I can not edit material correspond to each material group any more)  without I use selection or mask etc,.. then return UVroom,,load UV ? etc    again ,,, then when export merge them again,,  not so flexible,, I think..

mergedone.thumb.JPG.55c1d55e9186d08d3cb9e159187e6c52.JPG

(I know it beyond ,blender  app link plug in  subject,, it may better, 3d coat offer way to separate material and UV set,,,,, I hope so)

 

  • Like 1
Link to comment
Share on other sites

  • Applink Developer
17 minutes ago, Carlosan said:

Need to wait Blender 2.8.1 to use uDim. Blender 2.79 or 2.8 dont support uDims.

Actually this is very interesting because if you export object from blender that has uDim uvs and then import the same file. It works. 

The main problem is that if I import blender mesh with 1 uv-set (has uDim) into 3d-coat. Everything works ok. You can paint textures. But when you export the mesh. 3D-Coat export the mesh
with 2 uv-set. So 3D-coat takes uDims and separate them into different uv-maps. And blenders fbx importer can not read that uv data that was created in 3d-coat. It dosen't mean that 3D-coat exports bad 
uv data because I did open the same mesh in houdini and maya and they showed separate uv-maps correctly. 

So the main question: Is 3d-coat allowed to modify uv-set and uDim.  In my mind it's okey that 3d-coat modify uv-data inside the app,  but if I don't change anything in uv-data in 3d-coat and when I export
the mesh then I expect that mesh uv data is the same with the mesh before 3d-coat. 

 

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...