Andrew Shpagin

3D-Coat AppLink description

38 posts in this topic

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.

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

Andrew, I know you are very busy right now, but when you have time could you add microverts and ptex into applink. Thanks.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

Writing of plugins started. I hired several peoples. The first one - for 3D-Max is almost ready.

Share this post


Link to post
Share on other sites

Cool. IS there a connection to Cinema4D in the pipeline as well?

Peace,

Rich_Art. :good:

Share this post


Link to post
Share on other sites

Writing of plugins started. I hired several peoples. The first one - for 3D-Max is almost ready.

That's music to my ears. :D

Share this post


Link to post
Share on other sites

it's music...but I think it's key is off just a slight bit. :D

(waiting for a Maya applink) ;)

In general we have in pipeline

Max, Maya, LW, Blender, Houdini, XSI, C4D, ZBrush, Rhino, Messiah, list may be expanded.

Share this post


Link to post
Share on other sites

In general we have in pipeline

Max, Maya, LW, Blender, Houdini, XSI, C4D, ZBrush, Rhino, Messiah, list may be expanded.

Modo ? Silo ?

Share this post


Link to post
Share on other sites

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.

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