Jump to content
3D Coat Forums
haikalle

Blender Applink

Recommended Posts

Here is small update. My main goal is not only make this applink useful when doing texture painting, but also in your sculpting. Here is a example where I take an object from blender
and do some cutting in 3d-coat and return it back. There is some issue with this workflow but you can already see that this can be handy in some situations.

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks kind words :)    I report all steps  what I tried,,,

1  3d coat  plug in is activated in blender 2.8.  I see all panell, as same as your pic. and main action (transfer, up-date)

2  I run  3d coat 4.8.25  (and set it as paint room) too.  

3  I load cube in blender 2.8.  I select cube,  then click transfer.  I check 

my add on setting is like this pic,, I set "Per pixel painting" (So I hope to export cube to paint room with UV)

blender_coat.thumb.JPG.f4bf7665fe1899a7c19b80faf05c2c56.JPG

I could see your plug in export FBX in console.. (your script log)

"FBX export preare , and FBX export fetch,, then export finished.."

But my running 3d coat (Open GL) nothing happen. (it is arlready opend paint room)

coat.thumb.JPG.aafcee4af4aa81c1338e24989fd854e2.JPG

I try ,run 3d coat, after I "transfer" mesh from blender, about that case 3d coat just show,start up menu.

then if I close menu, it show same UI. (no paint object)

And,,, I can see setting file coat3D_exe.txt, and import.txt in my documents/3d-caotV48/Exchange,,

when I click transfer, both file are up-dated,, and I can see FBX name in import txt.

(I click 2 times, transfer button, then it show 2 FBX I think,,,)

C:\Users\TAKE\Documents\3DC2Blender\ApplinkObjects\3DC001.fbx
C:\Users\TAKE\Documents\3DC2Blender\ApplinkObjects\3DC001.fbx
[ppp]

And  coat3d_exe.txt discribe, the 3d coat path, (what I currently run,,and I set so in blender UI)

C:\myprograms\3D-Coat-V4.8.25\3D-CoatGL64C.exe

Untill you offer new app link,,  I happend to delete 3DC2Blender directory before,,,, then I re-install 3d coat several times,

but it can not return the directory, then I manually put directory and "Exchange_folder.txt " like that,,,,, :(

exchange.thumb.JPG.fa6d6a59b60997df9be1b15ed8d483da.JPG

And I see, "Exchange_folder.txt " and ApplinkObjects  update, when I click transfer..

If My setting is wrong, or I need another file in 3DC2Blender folda?  if I need how I can return it?  

Edited by tokikake
add pics and more steps,,

Share this post


Link to post
Share on other sites

I found it was  my fault :blush:  because I already set 3d coat "Custom documents folder" as my PC enviroment path,,

COAT_FILES_PATH =  I:\3dcoat\mylink   by  tutoriall I got in forum,,   

then when I set it, I did not know clear how app-link work with new path.   This time, I onece un-install all documents 3d coat directory too. (in default location,,,),  I still keep all user file in I drive,(my 3d cpat enviroment path) then it not cause issue for me. then re-install 3d coat.

After all I needed to  set my "Exchange" directory, not in my main drive default user  documents,

but the new path which I set as my Custom 3d coat user directory . about my case,, I:\3dcoat\mylink\Exchange

I manually locate there, then set "Exchange"  path in blender.   and re-open 3d coat, now 3d coat show improt menu ,and I return menu 

(open in original app) too ,, really thanks and sorry to take your times.. I hope if someone set custom document path already,

and app link not work,, try my way,,

 

 

Share this post


Link to post
Share on other sites

@Daniel 

I manually made "Exchange" directory" in my COAT_FILES_PATH .  (my custom 3d coat documents folda,  all 3d coat user file will be saved there,,)   once you set exchange path, I believe, other files will be  auto generated. when you click "transfer" in blender.,  and export from 3d coat. 

path.thumb.JPG.08c90861fcf43a4360fc1320079efb5f.JPG

  I alerady tested (delete all files in exchange once)  .   other files are auto- generated again. 

   but if you do not use custom 3d coat document directory.   you may need not. as default Exchange folda,  is in your document .  

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

I found when I import FBX by this plug in,, FBX rotate 90  with Y axis,, (or change X and Z axis In 3d coat)  , so if I see from front view,

suzanne.thumb.JPG.688a0084c30dccb973a5da4ea9052f62.JPG

Blender monkey look left side,. It may not cause problem but ideally I hope it keep same view (my request :p:)

Edited by tokikake
add another pic
  • Thanks 1

Share this post


Link to post
Share on other sites
24 minutes ago, tokikake said:

@Daniel 

I manually made "Exchange" directory" in my COAT_FILES_PATH .  (my custom 3d coat documents folda,  all 3d coat user file will be saved there,,)   once you set exchange path, I believe, other files will be  auto generated. when you click "transfer" in blender.,  and export from 3d coat. 

path.thumb.JPG.08c90861fcf43a4360fc1320079efb5f.JPG

  I alerady tested (delete all files in exchange once)  .   other files are auto- generated again. 

   but if you do not use custom 3d coat document directory.   you may need not. as default Exchange folda,  is in your document .  

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

I found when I import FBX by this plug in,, FBX rotate 90  with Y axis,, (or change X and Z axis In 3d coat)  , so if I see from front view,

suzanne.thumb.JPG.688a0084c30dccb973a5da4ea9052f62.JPG

Blender monkey look left side,. It may not cause problem but ideally I hope it keep same view (my request :p:)

Thanks a lot! Will do that!!!

Share this post


Link to post
Share on other sites

Good to hear that you were able to make it. Right now how it works, when pressing transfer button, applink tries to find your exchange folder most common places. Like maindrive:/.../documents/3d-coat48/exchange. If applink dosen't find your exchange folder it should give a warning text "exchange folder not found, please select it manually" 

Exchange folder must be found to make applink to work. But you don't nessessari need to set 3d-coat.exe file. This path is only used in applink when you select shift + q and choose " OPEN .3B FILE" and you 3d-coat is not open. Applink opens it for you using the path in 3d-coat.exe box.

Edited by haikalle

Share this post


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

@Daniel 

I found when I import FBX by this plug in,, FBX rotate 90  with Y axis,, (or change X and Z axis In 3d coat)  , so if I see from front view,

Interesting because in my tests objects don't rotate. Do you have z up in blender and y up in 3d-coat?

Make sure that you leave "Z-up coordinate system" Off. Applink should make axis transformation automaticly for you.

Edited by haikalle

Share this post


Link to post
Share on other sites

Hi haikalle at first I hoped to say you tahnks thanks thanks (I understand there are many user who offer those plug in as free, and we can use them

I really apreciate all your efforts as same as other plug in vendor :blush:  what I can do is only reporting something what I found only,, though I tried to check python code,

I can not solve problem,,)

Then I do not know if I need to setting about Z-up thing , of course if I export obj, I usually set plug in, so this plug in may use FBX exporter setting of blender?

If so I seems not clear what setting is best,, (so when I use this plug in I do not touch any setting about axis,, then in blender I usually see

Z up cordinate, it is default, then right to left =X axis,, front to back = Y axis..  after transfer I set 3d coat import setting like that, (it is most of case my default,,)

then loaded monkey face usually look -X axis direction.. (so in 3d coat front camera, it looks left side)   maybe it caused by FBX export setting?   

(then if this plug in use blender FBX exporter,, I think there may be case, it remain some bugs,, I everyday find  some kind of bugs about  2.8 ,(complied build from git,,);)

preference.JPG.1811417d9f08c7c0fd6d728c28205ed1.JPG

mysetting.JPG

Edited by tokikake

Share this post


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

 in blender I usually see Z up cordinate, it is default, then right to left =X axis,, front to back = Y axis..  

Interesting I have in my blender z = up, y = right, x = foward. How you can swap x and y axis in blender?

Don't worry. I'm quite sure that this is easy fix. Just need to find the main cause of this behafour :)

Edited by haikalle

Share this post


Link to post
Share on other sites

Actually when you create Monkey object in blender. It's facing to left as a default. 

 

You take a nice start with applink when you first watch quick tutorials and read the manual.  They are located at the first page.

 

Edited by haikalle

Share this post


Link to post
Share on other sites

I have a problem to get the mesh from 3dcoat again to Blender. If i set the applink in Blender to mesh for auto-retopology and than follwing the instruction in 3Dcoat i getting in "creating mesh" a crash. So i tried to do it manully and it worked but if i hit "open in original app" and export it and update it in blender nothing happens.

 

Blender Version 2.8 Beta (Build from Yesterday)

3DCoat 4.8.25

Share this post


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

I have a problem to get the mesh from 3dcoat again to Blender. If i set the applink in Blender to mesh for auto-retopology and than follwing the instruction in 3Dcoat i getting in "creating mesh" a crash. So i tried to do it manully and it worked but if i hit "open in original app" and export it and update it in blender nothing happens.

 

Blender Version 2.8 Beta (Build from Yesterday)

3DCoat 4.8.25

Hi! I have reported this auto-retopology crash to Andrew. Hope he can help to solve this issue.

Share this post


Link to post
Share on other sites

Hi again! After selecting the 3dcoat and exchange folders I get this error.

I am using 3DCoat 4.8.28A exe file and the transfer folder in documents/3D-CoatV48/Exchange. Is the exchange folder wrong? Is there another one that 4.8.28 A creates somewhere else?

 

Screenshot_244.png

Share this post


Link to post
Share on other sites

Hi! I can see that you are using build from 16th Dec. Could you try with the latest update. I hope that I fixed this bug in 20th of Dec.

  • Like 1

Share this post


Link to post
Share on other sites
On 12/20/2018 at 4:26 PM, Shiv0r said:

I have a problem to get the mesh from 3dcoat again to Blender. If i set the applink in Blender to mesh for auto-retopology and than follwing the instruction in 3Dcoat i getting in "creating mesh" a crash. So i tried to do it manully and it worked but if i hit "open in original app" and export it and update it in blender nothing happens.

 

Blender Version 2.8 Beta (Build from Yesterday)

3DCoat 4.8.25

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.

  • Like 2

Share this post


Link to post
Share on other sites

Hi thanks Haikalle after understand usage, it works well for me (though I mainly try to paint mesh from blender scene  then return it to blender with adjusting UV etc in 3d coat)

Then do you know correct way to set "3DC2Blender" directory, as in another drive?

I have set 3d coat,  custom document directory (user files for 3d coat)  in different drive already.  by set COAT_FILES_PATH.  and my "Exchange" directory are located there.  

but 3d coat and blender use "3DC2Blender/ApplinkObjects" directory  for applink  (default my document path of C drive) and it not change by "COAT_FILES_PATH"

to import export, mesh and textures.  Then I hope to exchange the locaton too. eg,, I hope to move " "3DC2Blender/ApplinkObjects"  under another drive.

then use it to store mesh, and textures.    because I often need to clean up my C dds drive, then I hope to store textures not in C drive... so all textures are saved in I drive.   I can copy and paste textures then set path again in blender shader node editor,, but  I prefer to set path for export and import as I like with plug in,,

  I assume I may only need to edit some file path, but I afraid , break current status.  If it can be done easy, help me please. And if plug in need to use the default path of  "3DC2Blender/ApplinkObjects"  I request to add option which can change ApplinkObjects directory from UI,  as future up-date :rolleyes:

Share this post


Link to post
Share on other sites
1 hour ago, tokikake said:

Hi thanks Haikalle after understand usage, it works well for me (though I mainly try to paint mesh from blender scene  then return it to blender with adjusting UV etc in 3d coat)

Then do you know correct way to set "3DC2Blender" directory, as in another drive?

I have set 3d coat,  custom document directory (user files for 3d coat)  in different drive already.  by set COAT_FILES_PATH.  and my "Exchange" directory are located there.  

but 3d coat and blender use "3DC2Blender/ApplinkObjects" directory  for applink  (default my document path of C drive) and it not change by "COAT_FILES_PATH"

to import export, mesh and textures.  Then I hope to exchange the locaton too. eg,, I hope to move " "3DC2Blender/ApplinkObjects"  under another drive.

then use it to store mesh, and textures.    because I often need to clean up my C dds drive, then I hope to store textures not in C drive... so all textures are saved in I drive.   I can copy and paste textures then set path again in blender shader node editor,, but  I prefer to set path for export and import as I like with plug in,,

  I assume I may only need to edit some file path, but I afraid , break current status.  If it can be done easy, help me please. And if plug in need to use the default path of  "3DC2Blender/ApplinkObjects"  I request to add option which can change ApplinkObjects directory from UI,  as future up-date :rolleyes:

Thanks for your feedback and you are saying a very good point. I just added this box into applink UI, where you can manually set your applinkobject folder. If you leave it empty applink is using default folder.

 

update.jpg

EDIT:  It's maybe good to mention here also how default applinkobjects folder works. RIght now I have coded very basic function that helps to clean the applink folder. Preventing it to become too big.
So right now applink counts how many files is inside of that folder and if count is more than 400 it will remove the oldest file from folder. This cleaning function is only valid when you use default folder. 
If you set your own folder then there is no count limit.

Edited by haikalle
  • Thanks 1

Share this post


Link to post
Share on other sites

Really thanks :D  I may set the object/texture  path in my each blender projects directories! then I may keep all modified texture in 3d coat without care file path in main drive , so it is very useful for me,, that I can easy change object/texture folder with each blend scene.   

Share this post


Link to post
Share on other sites

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)

 

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

×