HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [SOLVED inc.tutorial] Add SpeedTrees from library  (Read 5486 times)

Gothrek

  • General Accounts
  • *
  • Posts: 92
    • View Profile
[SOLVED inc.tutorial] Add SpeedTrees from library
« on: Jul 30, 11, 04:18:53 PM »

Hi guys,
i try to import some speedtrees from the libreries (4.2 disk1 and disk2 from the wiki http://wiki.heroengine.com/wiki/Speedtree)
from create menu i choice speedtree load speedtree
i choice my speedtree (saguarocactus for example)
in my asset i can see saguarocactus_rt.spt
i go again in the createmenu and in speedtree section i can choice saguarocactus but nothing happen

??? why? (only work with deafult speedtree in cleanengine)
« Last Edit: Aug 01, 11, 06:53:08 AM by Gothrek »
Logged

WoE-Rel

  • Developer
  • *
  • Posts: 17
    • View Profile
Re: Add SpeedTrees from library
« Reply #1 on: Jul 30, 11, 08:59:00 PM »

Because there are no details I am just gona make an assumption and say that your error is

Code: [Select]
!ERROR!System:SpeedTreeAssetSpec:  no textures specified for <SpeedTree File Name>
To confirm that this is your error you can open the console window and try adding your tree. This error shows no other symptoms.

Your problem is probably that you ether have not uploaded your textures for your .spt file or you have not converted them to .dds files. Take a look at http://hewiki.heroengine.com/wiki/Speedtree you need to perform every step there let me know here if that works for you.

For the most upto date info about this see the wiki article I started http://hewiki.heroengine.com/wiki/Error:_!ERROR!System:SpeedTreeAssetSpec
« Last Edit: Jul 30, 11, 09:33:50 PM by WoE-Rel »
Logged

Gothrek

  • General Accounts
  • *
  • Posts: 92
    • View Profile
Re: Add SpeedTrees from library
« Reply #2 on: Jul 31, 11, 05:22:14 AM »

True!!
now i m going to convert all tga in dds and try again.

tks a lot
Logged

Stadi_Thompson

  • General Accounts
  • *
  • Posts: 324
    • View Profile
Re: Add SpeedTrees from library
« Reply #3 on: Jul 31, 11, 01:01:52 PM »

made this for our team, thought I would share it

SPEEDTREE HERO EXPORT TUTORIAL
You can browse the library of 4.2 realtime trees here http://www.speedtree.com/trees/

First thing you want to do is make a copy of the tree.

Always use the speedtree file  “whateverthetreesname_RT.spt”. RT stands for real time (game engine use).

Lets convert the CurlyPalm.RT for Hero. I made a local directory to match the repo and copied the whole library there. The Curly Palm is located in C:\HE\world\livecontent\speedtrees\Yourname Trees\Palms_Cacti_&_Cycads\Curly_Palm on my local drive.

I made a copy of CurlyPalm_RT.spt  and renamed it to CurlyPalm_RT_Yourname.spt.  Reason for doing this is Speedtree will write to your master file if you do not.

Open up “CurlyPalm_RT_Yourname.spt” in SpeedTree CAD 4.2
Click on the “Composite Map” icon on the left hand side (the tenth button down, looks a keyboard with an arrow above it)

Composite map exporter dialog will pop up.

What is composite map export?  It allows you to adjust billboard size/and how many billboard angles you want.  At the same time it will make you a texture and normal map for the tree, it will then combine/composite the billboards and maps into dds files.

In the bottom right corner of that window set the project directory (“folder” field). Browse to  C:\HE\world\livecontent\speedtrees\Yourname Trees\Palms_Cacti_&_Cycads\Curly_Palm
Set the file name above that to something like Curly_Palm_Yourname, check “Convert branch map to dds” and select “.dds” from the dropdown menu next to it.

The box in the top left hand that says, for example, “ Composite map (1024x1024)”  shows the overall map size, you can adjust it realtime.

To do so,  in the lower left hand corner you will see “Adjust Billboard sizes” adjust the dial and see realtime how much space you are giving to the billboards(yellow blocks) and how much space you are giving to the bark and leaf (orange and green blocks) texture map. You can also change the billboard “count” above that.

Honestly 6 (the default) looks harsh when transitioning from the billboard LOD in Hero. Maybe 12 would be a good number, you can make them small since they will be distant.
I have attached a screenshot of what my composite looks like, make sure you check those other options also to match the screenshot.

Click “OK” when you have everything ready.

I chose specular and detail in the composite options, the Curly Palm didn’t have either TGA for those, so I was greeted with a little error after it created the composite. No big deal, just ignore it.

Close the error box, another dialog box will pop up titled “File Modification Detected” saying your file has been modified, click yes. The tree will turn white. Now “file>save” from the menu.

You must now setup a user data file so Hero can read the tree info.

From the menu click “edit>user data”
A user data input box will popup
The layout/template for the user data information looks like this:
CompositeDiffuse = CompositeMapDiffuse.dds
CompositeNormal = CompositeNormalMap.dds
BarkDiffuse = BarkTexture.dds
BarkNormal = BarkNormalMap.dds
BarkDetail = BarkDetailMap.dds
SelfShadow = SelfShadowMap.dds

What we want to do is replace the above names with the DDS names of our newly generated Curly Palm dds files.  Your generated CurlyPalm files will be located in C:\HE\world\livecontent\speedtrees\Yourname Trees\Palms_Cacti_&_Cycads\Curly_Palm . Edit it so it looks like the text below (or whatever you named your  dds files)
CompositeDiffuse = Curly_Palm_Yourname_Diffuse.dds
CompositeNormal = Curly_Palm_Yourname_Normal.dds
BarkDiffuse = CurlyPalmBark.dds
BarkNormal = CurlyPalmBark_Normal.dds
BarkDetail = CurlyPalmBark_Detail.dds

Notice I deleted the SelfShadow line. The CurlyPalm didn’t have a selfshadow. If the tree does have a shadow file it will be in that directory also, convert it to a DXT1 DDS and save it, then enter the name of the dds on the selfshadow line.

IMPORTANT MAKE SURE YOU SAVE THE FILE AGAIN, so the user data will be saved
Copy   Curly_Palm_Yourname_Diffuse.dds, Curly_Palm_Yourname_Normal.dds, CurlyPalmBark.dds, CurlyPalmBark_Normal.dds, CurlyPalmBark_Detail.dds and CurlyPalm_RT_Yourname.spt to it matching directory on the repo.
Logged

Gothrek

  • General Accounts
  • *
  • Posts: 92
    • View Profile
Re: Add SpeedTrees from library
« Reply #4 on: Jul 31, 11, 01:24:39 PM »

thanks for share it man, mm i dont found the attach
Logged

WoE-Rel

  • Developer
  • *
  • Posts: 17
    • View Profile
Re: Add SpeedTrees from library
« Reply #5 on: Jul 31, 11, 03:21:38 PM »

made this for our team, thought I would share it

thank you for sharing this will really help with my team :)
Logged

Gothrek

  • General Accounts
  • *
  • Posts: 92
    • View Profile
Re: Add SpeedTrees from library
« Reply #6 on: Aug 01, 11, 06:36:11 AM »

OK, now works!!

great tutorial!!
« Last Edit: Aug 01, 11, 06:52:43 AM by Gothrek »
Logged

Shaffer

  • General Accounts
  • *
  • Posts: 1
    • View Profile
Re: [SOLVED inc.tutorial] Add SpeedTrees from library
« Reply #7 on: Aug 21, 11, 12:39:30 PM »

Thanks for the tutorial man, will help me I'm sure.
Logged

Gothrek

  • General Accounts
  • *
  • Posts: 92
    • View Profile
Re: [SOLVED inc.tutorial] Add SpeedTrees from library
« Reply #8 on: Oct 07, 11, 04:23:18 AM »

if someone need, i create a short visual guide (in italian) for import speetree trees from 4.2 to HE. Enjoy it

http://www.riseofcivilizations.com/Doc/Guida speedtree x HE.doc
Logged