Jump to content
Hash, Inc. Forums
Sign in to follow this  
mschoenhals

Exporting models to Unity

Recommended Posts

Hi all,

Does anyone know if there's documentation/tutorials on how to export models from AM to Unity? Anything you could pass on would be appreciated. :yay:

Thanks.

Share this post


Link to post
Share on other sites

do you know if this pipeline will work with unreal engine 4 as well. i dont want to waste $50

Share this post


Link to post
Share on other sites

It is quite likely, but I can't say for sure because I never tested it.

 

Best regards

*Fuchur*

Share this post


Link to post
Share on other sites

if i send you a model could you export it using the process so i can test it out. the demo doesnt let me save a file.

Share this post


Link to post
Share on other sites

Sure, but be aware, that complex constraint systems, etc. will most likely not work... simple bones structures should on the other hand.

 

See you

*Fuchur*

Share this post


Link to post
Share on other sites

its just a simple model. no bone, no animations. its just a test of putting a model into the game.

just give me a overview of the process to make sure i didnt miss anything in the video.

 

thanks for helping. this is all new to me.

Leather Sofa Chair.zip

Share this post


Link to post
Share on other sites

Make sure you include everything. You are using dark tree shaders there, which are not included in the file.

I'll properply need to bake them into a texture anyway, but first they need to be there.

 

Best regards

*Fuchur*

 

PS: I am going to sleep now and will look into this tomorrow.

Share this post


Link to post
Share on other sites

As I wrote before: Please provide me with a complete model (including the dark tree shaders and anything necessary).

Best regards

*Fuchur*

Share this post


Link to post
Share on other sites

As I wrote before: Please provide me with a complete model (including the dark tree shaders and anything necessary).

 

I think you will need to install the Dark Tree basic thing before embedded materials will work.

Share this post


Link to post
Share on other sites

Okay, I made a few versions of the model with 1, 4 and 16 polygones per patch using Unwrap3d.

(especially the 16 polygones version is really not suited for a game engine ;). At least not if you plan to use several models)

 

Best regards

*Fuchur*

leather_sofa_chair_no_mat.zip

Share this post


Link to post
Share on other sites

awesome could i see the 4 poly one to see if i can import it? it needs to be a FBX file.

Share this post


Link to post
Share on other sites

Sorry, as always I forgot to click on "Attach this file"...

 

Best regards

*Fuchur*

Share this post


Link to post
Share on other sites

Just tested it in Unreal 4... it works and looks great :)

 

Best regard

*Fuchur*

  • Like 1

Share this post


Link to post
Share on other sites

it needs to be a FBX file

Blender can import MDLs and export FBXes. I'm not sure those particular FBXes are fully compatible with Unity though.

Share this post


Link to post
Share on other sites

well i got that program and i think i did everything right but when i pull the model into Ureal engine 4 its all screwed up. you think you can help me figure out what went wrong?

this is what its suppose to look like.
Screenshot 2017-10-01 15.28.54.png

 

in unwrap it looks fine as well.

Screenshot 2017-10-02 01.10.37.png

 

this is what it looks like in unreal engine 4

Screenshot 2017-10-01 17.49.40.png

Share this post


Link to post
Share on other sites

Hi,

 

First I would start with a simpler object. You are using cookiecut/alpha maps there a lot. What happens if u use a model without that? Is it looking strange too?

 

How did you do the cut outs? Is that a png or a tga with alpha? Or are u using a transparency map? Both could or could not work and I would test it out.

 

Too me it seems not to be a problem with the export itself but with unreal not supporting the image type as you are using it there, but I could be wrong.

 

Best regards

*Fuchur*

Share this post


Link to post
Share on other sites

well i made the PNG and cookie cut them in AM then i baked the whole thing like you did in the instuction video and exported it as an X file. then brought it into unwrap and saved it as a FBX file. and then imported that into unreal.

ill try a simpler model to see if its all screwed up still.

Share this post


Link to post
Share on other sites

You may want to try tga instead of pngs just for tests on it.

 

Best regards

*Fuchur*

Share this post


Link to post
Share on other sites

this is everything for the model with all the steps in between. if you can take a look at it and see where i might of did something wrong. been scratching my head on this for days.

anient pillar.zip

Share this post


Link to post
Share on other sites

Playing with it... I don't have or comprehend Unity... wish I did! But I figure if I could get it into Sketchfab, it should translate- so I am a total 'newb' at all this. My suspicion- from the images you posted, is that the UV info is being converted from a normal UV map into the per-patch Hash-mapping during the 'bake' process. Looking at your 'BS_pillar_Color' etc files that are the result of baking- I imagine... that is not a typical UV layout like the polygonal apps like to see. It would be great if A:M baked surface colors and textures into UV's that other apps understood... OR- I am missing something simple and BIG...

 

My process for Sketchfab is to export obj from A:M and import it to C4D to check it and convert to FBX for uploading... if it opens in SF then you could DL it and test in Unity...

Share this post


Link to post
Share on other sites

the UV info is being converted from a normal UV map into the per-patch Hash-mapping during the 'bake' process

Does it really do that?

Share this post


Link to post
Share on other sites

As far as I can tell, yes. It is an okay solution for minimalizing models WITHIN A:M, but not for general consumption... UNLESS there is a trick outside my knowledge. I mainly export models to obj file format for usage in C4D or E3D, and the regular way of placing and applying decals seems to carry-forward just fine as far as when they show-up in the other app and have UV assignments.

 

Attached image: You can see the distortion that happens in Jobe's baked image on the top triangular patches (probably not a good idea to have that... if you are going into game-world where less geometry is better... 1 four sided patch would be better than 4 three sided patches...)

aaa_2.jpg

Share this post


Link to post
Share on other sites

Other software should be able to read that just fine, as long as it reads the UVs right. Of cause if you want to paint with Photoshop on the texture file itself (as an 2d image file) you can't do that anymore like that.

There is really no "converting" done in the export plugin here (at least none I am aware of). It just gets the UV data from A:M and exports that to the directx file format and in the UV data there is defined how to read the texture file and how to put it on the object in the other software. That this is working just fine can be seen when thejobe did import it to Unwrap3d. There it looks nicely.

 

I am baking it in the video tutorial, because some game engines could not handle more than one texture per object by default (at least some of the older versions weren't able to do that, I am not sure what for instance GameStudio does today). In the end, if the 3d or game engine can handle more than one, you can easily get rid of that baking step. Leave it out and it may result in higher quality (not interpolation involved then) and it is human readable too.

 

Best regards

*Fuchur*

 

PS: Eventhough the thread was at the start about Unity, we are now talking about Unreal Game Engine now.

Both software programs have a free version available, so if you want to play with it: Go ahead and download them.

 

PPS: If I find the time today, I'll play with the model and see if I can figure out what is going on there... but I am not sure if I can do that today.

Share this post


Link to post
Share on other sites

https://skfb.ly/69pzK

 

With some reworking here and there... cleaning up of group names and spline-age... re-applying of decals... a brief pit-stop in C4D... and some tweeks to the settings in Sketchfab- here is my result. Seeing as Sketchfab is basically a game engine- the hope is that you could download from SF (link in lower left) and try in Unreal/Unity...

 

ALSO- to 'bake' your Darktree concrete texture, I made a simple flat plane and applied the material... brought it into the choreography and rendered-out a jpeg(below) and used that as a decal- applied it some 9-12 times to get all the angles of the pillar. In Sketchfab, I used it to drive a bump map...

 

The more I work in 3D, the more I find it is much better to model things geometrically and use less imagery... can't always do that tho. My Ice-Cream cone image contest entry is an example where I used nothing of bitmap-imagery... the sky could of easily been photographic... even the 'HH' printed on the napkin could have been- but wasn't- as you can see in the wireframe.

 

I will load the new model pillar2 here if you want to see how bad I bastardized it...

 

Hope all this helps, Jobe!

 

EDIT: Ha- I see Sketchfab now allows mp3 audio files... how COOL! If you view the SF link above and hear music... don't be alarmed... just me and the Rolling Stones goofing off! If you zoom closer to the pillar- sound gets louder- 3D sound... sweet!

stone _1.jpg

Share this post


Link to post
Share on other sites

Okay... had no luck for now with unreal neighter...

With Unity it does work so... (had to reassign the textures, but all in all it works)

I'll see if I can get a file out which works with Unreal, but this really seems to be an interpretation problem at Unreal.

Best regards

*Fuchur*

screen_01.JPG

Share this post


Link to post
Share on other sites

I don't get that programm (Unreal) at all... First I tried to import the models itself again.

Same result as with the examples shown here. Now I just tried to put the same texture on a plane cube.

Did not work neighter.

 

So next I tried to import the Cube again with a texture without alpha/full opacity.

I imported it again and now I can see that the UVs and the geometry itself are okay... but the image is not shown as it should be shown... (see colors in the editor)

After that I tried a few different image types... JPG, BMP, TGA, EXR... some are a little bit different, but all in all it really is bad for each and every one of them.

 

It looks like it is interpreted as a normalmap or something, but it really is not...in the mat-editor there is nothing connected to the Normal channel.

 

I can't really help you there... the images seem to be the problem somehow... but what is going on there? I am not sure. I thought about wrong normals and stuff like that, but even in the 2d editor of Unreal the image file looks very strange to me...

 

I think, Unreal is somehow in need of phsyical materials and cant handle what is imported there... Unity can handle it, Unwarp3d can handle it too. I am not sure how to go on from here...

 

Anyone has an idea what is going on there?

 

Best regards

*Fuchur*

screen_02.JPG

screen_03.JPG

th_jpg.jpg

Share this post


Link to post
Share on other sites

yeah im liking unity much better myself but these guys are stuck on unreal. i been at it for days and nothing makes sense to me. they keep saying edit blueprints but i have no idea what they are talking about. i will just have to not use alpha maps. which is going to stink but oh well.

Share this post


Link to post
Share on other sites

ok i have been running tests and this is the first problem i run into.

just a plain cube with a solid color and an image with an alpha channel.

the background should still have the solid color but in unwrap it goes completely transparent.

how do i fix this? is it in unwrap or is it in the export settings?

Screenshot 2017-10-07 16.25.14.png

Screenshot 2017-10-07 16.25.33.png

Share this post


Link to post
Share on other sites

Unwrap3d interprets the alpha you are using as transparency channel for the whole cube It does not go totally transparent. The text is still visible.

DirectX can't export several channels (like color, transparency, etc) if I am not wrong, but that is really not that important. All you need are the UVs and you'll set the materials/texture interpretation themselves in the game engine you want to use.

 

If you still want to get that right in this case, you can bake the textures in A:M first. Like that, the green surface color will be merge with the texture and you should get what you expect.

The other possibility is to just use no alpha and put the background in the image itself.

 

But it really is more about the game engine itself.

 

Best regards

*Fuchur*

Share this post


Link to post
Share on other sites

I find a lot of the times (like when I export an obj to C4D) that the images need to be 're-hooked-up' in the other program... the model does not just pop-up looking like it does in A:M, but with a little 're-introduction' the images and UV info can be restored forthwith.

Share this post


Link to post
Share on other sites

I'm glad you guys are figuring this out. The game engine stuff is very interesting.

Share this post


Link to post
Share on other sites

I'm glad you guys are figuring this out. The game engine stuff is very interesting.

Sketchfab is a lot of fun too, just as a viewer with limited animation capabilities for now- and new features being added all the time. Nice thing about SF is that it works right in your browser- no plug-ins to install or 3rd party gimmicks. They just added a very simple sound feature, and I am hoping their next feature will be basic interactivity, as in 'buttons that cause actions'... current workflow is to export obj(seqs) to another app like Blender or C4D, and then convert to FBX file format which SF can import. Game engines are the future... would be great if we could persuade someone to write an FBX file exporter for A:M to make it an eligible model and animation solution...

 

MAN- I miss Arctic Pigs!

Share this post


Link to post
Share on other sites

Thank you for the Unity export tut, Fuchur! Do you or anyone have a suggestion for a similar software package to UltimateUnwrap3D for Mac OS 10.11.6? I've found UVLayout, but it is much more expensive than Unwrap3D. Does anyone know if it is capable of doing the same thing as Unwrap and if the .fbx exporter (save) function is similar for game development?

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
Sign in to follow this  

×