Jump to content
3DCoat Forums

Unity AppLink


vfxdomain
 Share

Recommended Posts

  • Contributor

############################################################################################

#

# Description: 3D-Coat AppLink for Unity 3D

#

# Version: 1.00 b3

#

# Author: Ilia Zaslavsky <|> Email: vfxdomain@gmail.com <|> Web: http://flavors.me/vfxdomain

#

# Credits: Realspaik <|> Email: realspaik@gmail.com (Help with Base AppLink & Normal Maps Fix Scripts), Sven Lennartz (Help with AppLink Shader)

#

# Last Update: 00:15 11/05/11

#

############################################################################################

Installation:

Unzip the archive.

Install the AppLink_Vxxx.unitypackage as usual

############################################################################################

Usage (AppLink):

In Unity choose the mesh (GameObject with MeshFilter on it) you want to edit in 3D-Coat,

then run AppLink UI by choosing 3D-Coat AppLink from the AppLink menu. Select 3D-Coat

identifier from the dropdown (PerPixel Painting, MicroVertex Painting, UV Mapping etc.)

and hit "Send to 3D-Coat" button. Choose the name and save your .OBJ in prefered location.

Start 3D-Coat application (or switch to 3D-Coat if it's started earlier), "import object"

dialog will pop up, set your options, hit OK and edit imported mesh to your heart content.

When done, hit File -> Open in original app in 3D-Coat main menu. Now switch back to Unity,

run AppLink and select "Get from 3D-Coat" button to bring edited mesh with textures created

in 3D-Coat back to Unity 3D. You can repeat the whole process as many times as needed.

############################################################################################

Usage (Auto AppLink):

Now you can send meshes to Unity straight from 3D-Coat, by using File -> Export to -> Unity

Unity will be started if needed and mesh will appear in the scene automatically, but you should

choose the root of your Unity project's "Assets" folder as .OBJ save location when doing

File -> Export to -> Unity, otherwise it won't work.

############################################################################################

IMPORTANT!!!

Befoure using Auto AppLink by using File -> Export to -> Unity, you should run "Normal" AppLink

at least once from inside Unity, so it could create needed files for the Auto AppLink functionality.

############################################################################################

IMPORTANT!!!

Unity does not supports 16-bit TIF files, so choose 8-bit PNG/TGA/BMP or 32-bit EXR as

a displacement format. There is no "standard" displacement mapping feature similar to

displacement in 3D packages, AFAIK, so if you're exporting displacement from 3D-Coat

i am applying it as a paralax/height map in Unity.

############################################################################################

IMPORTANT!!!

Unity has the limit of 65K vertices per single mesh, so don't try to export

hi-poly meshes to Unity. Also try to keep 1 UV set per mesh

(or 2 UV sets if you're going to do lightmapping), remember that Unity is a

Game Engine and not usual 3D package, so Hi-Poly meshes with multiple

UV sets and multiple textures per mesh wont work.

############################################################################################

Multiupload link: http://www.multiupload.com/R0OF111B5R

Vimeo Video Demo:

YouTube Video:

############################################################################################

Unity_AppLink_V1.00_b3.zip

Link to comment
Share on other sites

  • Contributor

Texturing for Unity does not work quite as you think. Its all around PSD and adjustments layers.

post-1407-0-68591300-1305120224_thumb.jp

Well, it's quite outside of the AppLink's scope, it's a simple tool to allow easier interchange of textured meshes between 3D-Coat and Unity. Also while layered PSD may be very cool for creating textures, Unity is a Game Engine and it needs meshes and textures to me as optimized as possible, so PSD with layers is not an option for the runtime anyways.

Link to comment
Share on other sites

  • Contributor

Unity converts it to DXT5 on the fly after import :)

One of the best features of the engine.

The basic idea of ​​storing textures in PSD - textures evolve following the change in lighting, lightmap settings, shaders, camera position etc..

And immediately after the import from 3d software textures never look good before fine-tuning.

In addition, game objects are usually provided by groups: a several tiles of one wall, or floor.

Configure one of them, you want to apply settings to another. This can be done easily by copying part of the tuning layers of one PSD file to another.

  • Like 1
Link to comment
Share on other sites

  • Contributor

Идеальные 2 способа, как это все могло бы работать:

Или: Полная совместимость с фотошопом (чтобы 3дкоат читал и сохранял маски, слои эффектов вроде уровней итд, как на сркриншоте выше)

Или: при сохранении текстуры в psd при уже существующем файле, изменять только слои, за которые ответственен 3дкоат. Все остальные слои в псд не трогать (тоесть коат не просто пишет psd, а читает его, разбирается что там принадлежит ему, а что чужое, и сохраняет только свои данные).

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...
  • 4 months later...
  • Advanced Member

no Edit button.... sorry about the Multipost.

Got the shader to work. Just add the following pragma:

#pragma target 3.0[/CODE]

Seems that Unity else tries to also compile the shader for mobile/flash, which has less registers available (or something, I got that error on import that tells me it needs 10 registers but only 8 are available, with a reference to flash close by)

Hope this helps anyone

Gian-Reto

Link to comment
Share on other sites

  • 2 months later...
  • 4 years later...
  • 1 year later...

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