Jump to content
3DCoat Forums

3DCoat AppLink description


Recommended Posts

There is possibility to interact between 3D-Coat and other applications since 3.2.11.

You may write plugin that will allow to paint some part of scene withing 3D-Coat and bring it back to your favorite App.

The description of the pipeline is attached.

3DCAppLinkUpdated18.doc

Edit: specification updated since 3.5.01

Edit2: specifications updated again in 3.5.01+

Edit 3: specifications updated in 3.5.06, new command [curv] introduced

Edit 4: Updated to 1.3, see changes with green font

Edit 5: Updated to 1.5, see changes in orange font

Edit 6: Updated to 1.6, workfolder chnged

 

Link to comment
Share on other sites

  • Advanced Member

Hi Andrew,

OK cool thanks for the docs, got it working :)

It's an interesting concept, but highlights a bit of an issue I have generally with exporting. Specifically, Displacement maps aren't exported along with everything else!

Currently, I use Colour and Displacement 100% of the time, Spec maybe 60% of the time and nothing else. My shader will turn a Disp map into a Normal map if I want/need that. Sadly, I have to Export Model, go through all that, and then in addition do Texture->Export->Displace Map Visible Layers, which aside from being in a very deep nested menu, is a lot of extra work.

This import/export system certainly would speed things up... except I still have to go export the Displace Map. IMO the Displace Map should be an option in the Model Export, then everybody wins :)

In addition, and somewhat less important IMO, is an ability to "export with previous settings" so it becomes a one-button thing to Export to an app (creating the export.txt file of course) which would make for a super fast workflow.

Cheers,

Peter B

Link to comment
Share on other sites

  • Advanced Member

Sorry, one more thing: The name of the textures includes the UV set, which makes sense. The problem is, that name has to be typed in when you import, so the application plugin to re-load the textures has to also have that typed in.

I can write code that scans the dir using glob or regex and ignores the uv name, but ideally there would be some way to handle this automatically.

Cheers,

Peter B

Link to comment
Share on other sites

  • Advanced Member

Andrew this is awesome! I'll see what I can do with 3DSMax today.

Some requests

Dont restrict this to perpixel paint. the UV Room and the other paint rooms would be viable. I allready have a script written for max which watches OBJ files

and imports UVs from them into a model without ruining the models history in max. this could be used with the UV Room.

It would be much better to be able to bipass the model loading dialog and instead pass keywords within the export.txt file to define the parameters.

eg.

mode PERPIXEL
model test.obj
imageWidth 1024
imageHeight 1024
subdivisionItterations 1
smoothUVs 1

also it would be nicer to be able to define the layers/files being worked with in export.txt. recent releases of max can work with image

stacks much like photoshop. being able to preserve the layer stack between imports/exports could be very nice.

layer myLayer
   type diffuse
   transferMode Multiply
   file filename.png
endLayer

Link to comment
Share on other sites

  • Advanced Member

Will this allow for an external app to make changes to a model's geometry that will then be updated in 3DC? or is it just texture changes?

as it is now its just a texture exchange

Link to comment
Share on other sites

  • Member

This feature is a good idea and I appreciate the effort in this direction. Getting objects to and from 3DC is something that I think anyone having to do it on a regular basis would like to see automated as much as possible.

I have to say though, I'd much prefer to have an 3DC SDK that allowed me to control 3DC more directly via scripts. Same basic idea, but using a script interface of some sort that my plugin would create as needed for 3DC to process. A basic script interface with just a few commands could provide the applink functionality with room to grow in the future so that other aspects of 3DC could eventually be scripted.

The main benefit of this is that 3DCoat's functionality could evolve without breaking existing scripts or plugins that generate the scripts because new versions of 3DC would simply expose new commands as they were developed which older scripts of course wouldn't be using.

Python is probably a good way to go given it's cross platform capabilities. I've exposed functionality like this in applications before, it's really not too much trouble to hook up Python.

Here are some commands that would be useful (optional arguments in [] ) and I think would be just enough to support applink type functionality:

NewScene
ImportModel file.<obj|lwo>
NewLayer [Layer#]           // creates a layer after the specified layer, or on the top of the stack if unspecified.
SelectLayer Layer#
SetLayerName Name [Layer#]
SetLayerBlendMode [Standard|Multiply|Burn|etc] [Layer#]
ImportLayerColor file.png [Layer#]
ImportLayerSpecular file.png [Layer#]
ImportLayerBump file.png [Layer#]
ExportLayerColor [file.png] [Layer#]       // Uses cached filename and current layer if params not specified
ExportLayerSpecular [file.png] [Layer#]
ExportLayerBump [file.png] [Layer#]
ExportAllLayers         // uses cached filenames

We'd then be able to just create "automate3dcoat.py" which 3DC would process when it detected it. Different plugin authors could then make the import process do as many useful things as they wanted (like Roger's great idea of working with Max's layers) or in my case something more specific to Softimage's way of dealing with texture layers.

Just something to think about perhaps - I don't really expect Andrew to have time for this sort of thing but if he did I would definitely use this.

Thanks for reading

Link to comment
Share on other sites

  • Advanced Member

This feature is a good idea and I appreciate the effort in this direction. Getting objects to and from 3DC is something that I think anyone having to do it on a regular basis would like to see automated as much as possible.

I have to say though, I'd much prefer to have an 3DC SDK that allowed me to control 3DC more directly via scripts. Same basic idea, but using a script interface of some sort that my plugin would create as needed for 3DC to process. A basic script interface with just a few commands could provide the applink functionality with room to grow in the future so that other aspects of 3DC could eventually be scripted.

The main benefit of this is that 3DCoat's functionality could evolve without breaking existing scripts or plugins that generate the scripts because new versions of 3DC would simply expose new commands as they were developed which older scripts of course wouldn't be using.

Python is probably a good way to go given it's cross platform capabilities. I've exposed functionality like this in applications before, it's really not too much trouble to hook up Python.

Here are some commands that would be useful (optional arguments in [] ) and I think would be just enough to support applink type functionality:

NewScene
ImportModel file.<obj|lwo>
NewLayer [Layer#]           // creates a layer after the specified layer, or on the top of the stack if unspecified.
SelectLayer Layer#
SetLayerName Name [Layer#]
SetLayerBlendMode [Standard|Multiply|Burn|etc] [Layer#]
ImportLayerColor file.png [Layer#]
ImportLayerSpecular file.png [Layer#]
ImportLayerBump file.png [Layer#]
ExportLayerColor [file.png] [Layer#]       // Uses cached filename and current layer if params not specified
ExportLayerSpecular [file.png] [Layer#]
ExportLayerBump [file.png] [Layer#]
ExportAllLayers         // uses cached filenames

We'd then be able to just create "automate3dcoat.py" which 3DC would process when it detected it. Different plugin authors could then make the import process do as many useful things as they wanted (like Roger's great idea of working with Max's layers) or in my case something more specific to Softimage's way of dealing with texture layers.

Just something to think about perhaps - I don't really expect Andrew to have time for this sort of thing but if he did I would definitely use this.

Thanks for reading

add ExportGeometry to that list of commands and it could be very awesome.

Link to comment
Share on other sites

  • 3 weeks later...
  • Advanced Member

There is possibility to interact between 3D-Coat and other applications since 3.2.11.

You may write plugin that will allow to paint some part of scene withing 3D-Coat and bring it back to your favorite App.

The description of the pipeline is attached.

Andrew, this doc makes reference to a file location that only exists on Windows. Where is the corresponding location on OSX (and Linux)? Can you please add that information to the document?

Thanks!

Link to comment
Share on other sites

Andrew, this doc makes reference to a file location that only exists on Windows. Where is the corresponding location on OSX (and Linux)? Can you please add that information to the document?

Thanks!

In OSX & Linuxt you should store files to 3D-Coat's folder/Exchange/

You should create folder if it does not exist.

Link to comment
Share on other sites

  • Advanced Member

In OSX & Linuxt you should store files to 3D-Coat's folder/Exchange/

You should create folder if it does not exist.

Ugh, someplace like "~/Library/Application Support/3DCoat/Exchange/" would be a much better place to put such data. By using a directory under "Applications" you run the risk of permission problems, as regular users aren't supposed to have r/w privs in Applications (admin users do, but not all users are admins in corporate environments). Similar problems exist for Linux users, and I guess "~/.3dcoat/exchange/" would be a nice equivalent location on Linux. That way, they're both in locations where even regular users have write privs.

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...
  • Advanced Member

One more minor request (it might be easy to do now, not quite sure): It'd be idea if we had a way to trigger an external program/script (with adjustable command line) as part of the events that occur when the user triggers AppLink on the 3DC side. I don't believe that can be done with existing features, can it?

That way, using LW as an example, we could launch Lightwave directing it to use a specific startup script that knows how to use the output file to load all the exported data. By making the command adjustable, we could also put a script in-between 3DC and the other app to do any content mgmt tasks we might want to do like checkpointing the output file, etc. If we wanted to get fancy (example for Mac, but Windows WSH as feasible), we could have it trigger an applescript that checks if the app's already launched, and if so just signals it to run the import lscript, but if LW isn't running the applescript launches it and then signals it to run the lscript.

Initially we could just get by with a preference for "what command to issue after AppLink export complete". Ideally, we'd either be able to select one of multiple app's launch profiles from a menu in prefs (allowing folks with multiple receiving apps to change which gets launched as needed, potentially even adding further automation).

Link to comment
Share on other sites

  • 3 weeks later...
  • Member

AppLink doesn't appear to be exporting the output .obj for me.

My steps:

* Create an obj

* Put the obj filename and output filename into import.txt as documented.

* Paint a bit of color

* Use the "Bring object back" menu item.

Results:

The image maps are created, but the .obj is not exported. The export.txt file has the correct filename, but there is no corresponding obj or mtl file- just the texture files get exported.

Thanks for any fixes.

PS it would be nice if it detected the resolution of the source materials and defaulted to the same resolution. I think it would also be useful if it could export to the same images files that were imported.

Link to comment
Share on other sites

  • 3 months later...
  • Reputable Contributor

AppLink specifications updated to make possible not only pipeline App->Coat->App but also Coat->App, 3.5.01 re-uploaded.

I'm not clear what to expect with this....are we waiting on volunteers to step in an write a link, try and do this ourselves, or will there be options in a menu to link to given programs?
Link to comment
Share on other sites

  • Advanced Member

Nice it looks like there is a new forum section dedicated to applinks -

http://www.3d-coat.com/forum/index.php?showforum=60

Modo would be nice but I think that there is no silo 2.0 sdk access at the moment. I really hope Silo wakes up someday. It's great program.

Yeah same here i think it's great also. I think V1 has a SDK though, i actually still use V1 with a custom layout still as i have V2 beta installed but it is still buggy. I noticed they have a iphone app now so the company is still staying around which is good, hopefully they will get focus back to silo and also make a V2 SDK.

Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...
  • Carlosan changed the title to 3DCoat AppLink description

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