Jump to content


Photo

Importing custom object


  • Please log in to reply
21 replies to this topic

#1 LasseThid

LasseThid

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • LocationMölndal, Sweden

Posted 15 February 2014 - 09:52 AM

I searched for and found som free trees that I have tried to import into Unity with mixed results.

Does anyone have any idea as to how to get these trees looking correct?

Fir tree, 3DS-file

Fir_3DS.jpg

Red Oak, OBJ-file

Red_Oak_OBJ.jpg

Tree pack, obj-files

Tree_Pack_OBJ.jpg

The last ones I had to map the bark texture and the leaf texture manually, but they still look like crap.

I read somewhere that you should try to import the .obj-file after importing the textures in order to the the mapping correct, but that doesn't work for me.


Mobo: Asus Sabertooth P67 CPU: Intel Core i7-2600K CPU Cooler: Corsair Hydro H60 RAM: Corsair Vengeance DDR 3 1600 MHz 8GB GPU: MSI GeForce 970 GTX Gaming 4G Sound: Creative Soundblaster Extreme Gamer SSD: OCZ Agility 3 64GB HDD: 1x 2TB, 1x 1TB, 1x 320 GB Western Digital PSU: Corsair CX 600W Chassi: Thermaltake Aguila


#2 Brucey Mc

Brucey Mc

    Advanced Member

  • Members
  • PipPipPip
  • 438 posts
  • LocationTeesside, UK #UTB

Posted 15 February 2014 - 10:13 AM

Looks like you need to set your material shader to have some transparency on it.  I don't think its as simple as importing trees as .obj file unless you want them to be static either.

Bruce



#3 Kablammo11

Kablammo11

    Obscure Person

  • Members
  • PipPipPip
  • 3,953 posts

Posted 15 February 2014 - 10:38 AM

The common denominator is that all the bits that should be transparent in your foliage are not. Should be simple enough to correct. My suggestion is that you pick a Unity tree and click on it's element to find out where they are stored in the utterly complex Unity folder structure.

I believe an imported tree and all its materials and textures need to be placed inside the folder and the subfolders of "Trees - Ambient Occlusion". Find the leaf materials and textures for Unity trees somewhere in there and try to replicate their settings for your foliage.

 

Even though Unity handles wavefront .obj files well, the most elegant way would be to render, create or download your tree, where ever it came from, in the .fbx file format. That would make importing it much easier.

 

I noticed from your last screenshot that you dragged your trees into the viewer. That turns them into a prefab (any imported object). Eventually, though, you need to import trees as a tree brush (the little tree button in your terrain settings > edit tree > add tree)


>>>>>>> Ka-Boom!





• Mulligan Municipal • Willow Heath • Pommeroy • Karen • Five Sisters • Xaxnax Borealis • Aroha • Prison Puttˆ

• The Upchuck   The Shogun  • Black Swan (•)

 

<<<<<


#4 LasseThid

LasseThid

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • LocationMölndal, Sweden

Posted 15 February 2014 - 12:20 PM

Thanks K.

I'm still just playing around trying to figure things out. It took a while, but eventually I managed to get the fir to look like this...

Fir_3DS_corrected.jpg


Mobo: Asus Sabertooth P67 CPU: Intel Core i7-2600K CPU Cooler: Corsair Hydro H60 RAM: Corsair Vengeance DDR 3 1600 MHz 8GB GPU: MSI GeForce 970 GTX Gaming 4G Sound: Creative Soundblaster Extreme Gamer SSD: OCZ Agility 3 64GB HDD: 1x 2TB, 1x 1TB, 1x 320 GB Western Digital PSU: Corsair CX 600W Chassi: Thermaltake Aguila


#5 IanD

IanD

    Advanced Member

  • Members
  • PipPipPip
  • 3,371 posts

Posted 15 February 2014 - 01:21 PM

Looks like progression...! Maybe more feathering needed certainly, or perhaps an attempt at something easier before hitting this particular type of tree... keep it up!



#6 LasseThid

LasseThid

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • LocationMölndal, Sweden

Posted 15 February 2014 - 01:50 PM

I've fixed the textures for about 30 more trees, so I'm gonna start adding those after I've done the dishes and fed the kids. B)

 

A piece of advice: Whatever you do, DON'T drop 60+ objects into your Assets folder if you intend to work with Unity.

I added all of the trees I downloaded and after an hour it seemed as though Unity had stopped working so I forced it to quit and then launched it again. That was three hours ago and it's still importing the damned trees... LOL


Mobo: Asus Sabertooth P67 CPU: Intel Core i7-2600K CPU Cooler: Corsair Hydro H60 RAM: Corsair Vengeance DDR 3 1600 MHz 8GB GPU: MSI GeForce 970 GTX Gaming 4G Sound: Creative Soundblaster Extreme Gamer SSD: OCZ Agility 3 64GB HDD: 1x 2TB, 1x 1TB, 1x 320 GB Western Digital PSU: Corsair CX 600W Chassi: Thermaltake Aguila


#7 LasseThid

LasseThid

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • LocationMölndal, Sweden

Posted 17 February 2014 - 10:55 AM

I scrapped this project since the .obj-files were close to 2.3 Gb in total and Unity started to crash when I was mapping the trees, which is a shame as the birch trees I found looked really good. Unfortunately most of them were 100-250 Mb each and my Unity project was close to 8 Gb in size.

I did however find out how to apply the mappings in order for most trees to look good.

I'm gonna give the tree builder a new shot once I find the time. Most of what I have done so far has looked like crap, but I have some new angles to approach it that I will try.


Mobo: Asus Sabertooth P67 CPU: Intel Core i7-2600K CPU Cooler: Corsair Hydro H60 RAM: Corsair Vengeance DDR 3 1600 MHz 8GB GPU: MSI GeForce 970 GTX Gaming 4G Sound: Creative Soundblaster Extreme Gamer SSD: OCZ Agility 3 64GB HDD: 1x 2TB, 1x 1TB, 1x 320 GB Western Digital PSU: Corsair CX 600W Chassi: Thermaltake Aguila


#8 IanD

IanD

    Advanced Member

  • Members
  • PipPipPip
  • 3,371 posts

Posted 17 February 2014 - 12:12 PM

Sounds good... be interested to see your results and what possible pitfalls to avoid...



#9 Kablammo11

Kablammo11

    Obscure Person

  • Members
  • PipPipPip
  • 3,953 posts

Posted 17 February 2014 - 12:59 PM

Lasse, regarding tree crashes...

There is a "final tree" bug around: If you want to delete the last tree standing, Unity will freeze on you. Place a million, delete 999'999 - no problem. But the last tree will get you. I don't know if that happened in your case.

Try to fiddle with the tree settings in your terrain settings. Draw distance and especially billboard start distance can make a big difference if you lower them. I usually have draw distance at around 800m and billboard start at 350m.

Sorry if you knew this already. Good luck with the tree editor - I fiercly despise that thing, but may you fare better.


>>>>>>> Ka-Boom!





• Mulligan Municipal • Willow Heath • Pommeroy • Karen • Five Sisters • Xaxnax Borealis • Aroha • Prison Puttˆ

• The Upchuck   The Shogun  • Black Swan (•)

 

<<<<<


#10 Mike Jones

Mike Jones

    Advanced Member

  • Administrators
  • 6,159 posts

Posted 17 February 2014 - 03:38 PM

Just a word of caution - although Unity can import all manner of 3d objects you might find that a whole bunch of them are not 'game friendly' The maximum recommended triangle count for trees in real time applications is around 3k -5k so if you import a bunch of 100k triangle trees don't be surprised if you get 10 fps when you try and run it!



#11 LasseThid

LasseThid

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • LocationMölndal, Sweden

Posted 17 February 2014 - 08:43 PM

K: My problem was that when I imported the trees into Unity the materials and shader settings became FUBAR, so I had to update all materials and set the shaders correctly. At the time I started having problems I had a grand total of 5 trees planted on the course and that was one each of five different trees...

I went to update the shader and boom... Unity crashed. I started Unity up again and noticed I only had two trees on the course, one of those not mapped correctly, so I fixed it and added two more trees that I had to remap then added another and boom.... Unity crashed again.

 

MJ: I bet you some of those trees had more than 100k triangels each as it took 20-30 minutes per tree to import them into Unity and I had to set the scale to 0.02 in order for them to be what looked like 5-7 meters tall...  :lol:


Mobo: Asus Sabertooth P67 CPU: Intel Core i7-2600K CPU Cooler: Corsair Hydro H60 RAM: Corsair Vengeance DDR 3 1600 MHz 8GB GPU: MSI GeForce 970 GTX Gaming 4G Sound: Creative Soundblaster Extreme Gamer SSD: OCZ Agility 3 64GB HDD: 1x 2TB, 1x 1TB, 1x 320 GB Western Digital PSU: Corsair CX 600W Chassi: Thermaltake Aguila


#12 shimonko

shimonko

    Advanced Member

  • Members
  • PipPipPip
  • 1,718 posts

Posted 17 February 2014 - 09:09 PM

The trees you've pictured above should be only be a few hundred KB for the model and a few MB for the textures, so I guess you're talking about trees not pictured?

 

100MB+ is typical for trees meant for non-real time rendering (e.g., architectural visualisation), often having 2-3 million polys.



#13 LasseThid

LasseThid

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • LocationMölndal, Sweden

Posted 18 February 2014 - 05:37 AM

Yes, Shimonko. The trees I'm talking about are not in the pictures above. Here's an example of a 256 Mb .obj-file tree.

256Mb_Birch_Tree.jpg


  • IanD likes this

Mobo: Asus Sabertooth P67 CPU: Intel Core i7-2600K CPU Cooler: Corsair Hydro H60 RAM: Corsair Vengeance DDR 3 1600 MHz 8GB GPU: MSI GeForce 970 GTX Gaming 4G Sound: Creative Soundblaster Extreme Gamer SSD: OCZ Agility 3 64GB HDD: 1x 2TB, 1x 1TB, 1x 320 GB Western Digital PSU: Corsair CX 600W Chassi: Thermaltake Aguila


#14 IanD

IanD

    Advanced Member

  • Members
  • PipPipPip
  • 3,371 posts

Posted 18 February 2014 - 06:16 AM

I am loving that silver birch.....



#15 LasseThid

LasseThid

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • LocationMölndal, Sweden

Posted 18 February 2014 - 07:05 PM

I created this tree in Unity and to me it still looks like crap even though it's at 15k tris...

Birch.jpg


  • highfade likes this

Mobo: Asus Sabertooth P67 CPU: Intel Core i7-2600K CPU Cooler: Corsair Hydro H60 RAM: Corsair Vengeance DDR 3 1600 MHz 8GB GPU: MSI GeForce 970 GTX Gaming 4G Sound: Creative Soundblaster Extreme Gamer SSD: OCZ Agility 3 64GB HDD: 1x 2TB, 1x 1TB, 1x 320 GB Western Digital PSU: Corsair CX 600W Chassi: Thermaltake Aguila


#16 Mike Jones

Mike Jones

    Advanced Member

  • Administrators
  • 6,159 posts

Posted 18 February 2014 - 08:13 PM

Props for giving the Unity tree creator a go. You might find this link interesting - 

 

http://forum.unity3d...



#17 LasseThid

LasseThid

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • LocationMölndal, Sweden

Posted 19 February 2014 - 07:35 PM

Thanks for the link Mike.

Working on my first tree following the tutorial. Picture will be posted when I have something to show...


Mobo: Asus Sabertooth P67 CPU: Intel Core i7-2600K CPU Cooler: Corsair Hydro H60 RAM: Corsair Vengeance DDR 3 1600 MHz 8GB GPU: MSI GeForce 970 GTX Gaming 4G Sound: Creative Soundblaster Extreme Gamer SSD: OCZ Agility 3 64GB HDD: 1x 2TB, 1x 1TB, 1x 320 GB Western Digital PSU: Corsair CX 600W Chassi: Thermaltake Aguila


#18 LasseThid

LasseThid

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • LocationMölndal, Sweden

Posted 20 February 2014 - 06:20 AM

Well, I ran into a wall of problems... LOL

The Guide I'm following says:

  • Open your favorite 3d app and start with a simple plane.
  • Assign your leave texture.
  • Manually subdivide the mesh and give it a 3d shape. Usually leave planes are modeled somehow like a kite. Just have a look at the trees shipped with unity’s terrain asset.
  • As you need double sided geometry for the leaves: Double the mesh, flip its normals and combine both meshes into a single one.

I haven't done much work with any 3D app, but I managed to create a simple plane and assign my texture in 3DS MAX.

I also managed to give it a bit of a 3D shape by moving the verts, copy the mesh, move the verts the opposite way and move the two meshes so they are basically touching each other, but I can't figure out how to combine the two meshes into a single mesh.

Does anyone know how to combine two meshes into one?


Mobo: Asus Sabertooth P67 CPU: Intel Core i7-2600K CPU Cooler: Corsair Hydro H60 RAM: Corsair Vengeance DDR 3 1600 MHz 8GB GPU: MSI GeForce 970 GTX Gaming 4G Sound: Creative Soundblaster Extreme Gamer SSD: OCZ Agility 3 64GB HDD: 1x 2TB, 1x 1TB, 1x 320 GB Western Digital PSU: Corsair CX 600W Chassi: Thermaltake Aguila


#19 TimBoch

TimBoch

    Advanced Member

  • Members
  • PipPipPip
  • 359 posts
  • LocationFarmington, MN

Posted 08 April 2015 - 05:06 AM

I decided to do a little playing around with making a clubhouse. Here is what I have so far.

5PZimyM.jpg?1

I saved it as a .max and exported it also as a .fbx.  I was able to drag it into unity, but when I planted it, non of the textures came through.

ZIickzA.jpg?1

Any idea how to make the textures come through?

Thanks for the help.


Course Forge Courses in various stages of design: Dwan Golf Club, Hyland Greens, Faribault CC, Desert Valley CC/ Woodland Trail(fictional), Infamous Golf Course (fantasy)
Links 2003 Designs: Dwan Golf Club, Infamous Golf Course, Hazeltine National Golf Club (assistant designer), Woodland Trail/Desert Valley CC , Faribault CC (beta), Hyland Greens (beta), Double Eagle (beta), King's Walk (beta), Interlachen CC (still in planning)
Intel Core i7-4710HQ 2.5GHz
  • Microsoft Windows 8.1 64-bit
  • 16GB DDR3L RAM
  • 750GB 7,200RPM Hard Drive
  • NVIDIA GeForce GTX 850M

#20 Brucey Mc

Brucey Mc

    Advanced Member

  • Members
  • PipPipPip
  • 438 posts
  • LocationTeesside, UK #UTB

Posted 08 April 2015 - 08:48 AM

Tim, have your textures from 3ds max been imported into unity when you dragged your model in? They might just need dragging in to your model objects.

Regards

Bruce




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users