View Full Version : Workflow for Speedtree in UDK
tomacmuni
11-06-2009, 03:12 AM
How to actually get the speedtree model into the Unreal editor?
If it's just a demo version, you can export ...
Xendance
11-06-2009, 07:29 AM
1. Make the tree in the speedtree modeler and save it
2. Open speedtree compiler and compile the .spt file into .srt file
3. Import into UDK
Simple as that. I haven't looked at the compilation settings yet, but it works.
Brexer
11-06-2009, 07:46 AM
Its actually not that simple, though exporting the model is.
It creates some atlas textures wich you need to import to use in material editor, and i for one have no clue how to set that material up to apply to the tree model.
Some of the textures are simple enough though, but some are confusing :)
ambershee
11-06-2009, 08:42 AM
If you have a copy of UT3, it should be worth looking at as an example; there are a handful of (admittedly much older) speedtrees in there.
Steve Polge
11-07-2009, 03:34 PM
The speedtree documentation is now available on public UDN.
http://udn.epicgames.com/Three/SpeedTree.html
Also, the UT content included with the UDK includes some trees created with the new SpeedTree 5.0 included with the UDK.
Ettans
11-08-2009, 09:11 AM
I couldn't get the trees look anywhere close to the ones in the documentation page. I can import it nicely and make the materials. When I apply the bark material, it looks perfect, but the leaves look very wrong. Instead of leaves, I seem to get some kind of plates. Here's a screenshot with materials applied: www.ettans.co.uk/elements/user/CONIFER_UDK.png
Even when I just import the tree, the leaves look like plates in the SpeedTree editor of Unreal Development Kit Editor.
Brexer
11-08-2009, 02:38 PM
I couldn't get the trees look anywhere close to the ones in the documentation page. I can import it nicely and make the materials. When I apply the bark material, it looks perfect, but the leaves look very wrong. Instead of leaves, I seem to get some kind of plates. Here's a screenshot with materials applied: www.ettans.co.uk/elements/user/CONIFER_UDK.png
Even when I just import the tree, the leaves look like plates in the SpeedTree editor of Unreal Development Kit Editor.
Follow this texture setup for the Atlas textures to make them work.
tomacmuni
11-08-2009, 11:22 PM
Make a tree in Speedtree Modeler UDK, then save it as .spm
Open up Speedtree Compiler in the UDK/binaries folder and process your. spm out to a folder by pressing F7
(your model and any tex used should then show up in that folder).
For a standard-ish tree this seems to work ok using default settings.
Importing tree mesh in UDK:
Choose View/Browser Windows/Content Browser
In the opened Content Browser, use the 'Import' button at the bottom of that window.
Browse to your compiled tree folder and choose all the files (the tree and the textures). They'll all load up into the content browser in My packages.
You can drag the object into the viewport and see the nice tree geometry.
To give this object back its textures ... right-click on the tree asset and choose the "Edit User Speed Tree Editor" settings.
Here you'll see texture input slots that all say None. Presumably these can be replaced with the correct textures.
However, to do this requires first creating some materials, one by one, for those texture maps to work in (trunk: diffuse, normal, opacity channels etc).
To make materials go to: Content Browser (down at the bottom of it)/New/Package/Physical Materials ... etc. and completely set up a material for each texture component of the tree.
This part isn't too hard. Just have to remember to place the new textures in the right locations and add the components using 'Texture/TextureSampleParameter2D' then connecting the nodes.
If you add the TextureSampleParameter2D with the appropriate texture selected in the browser it will add itself within the material editor.
Please let me know if this is actually a wrong workflow (I guessed my way through this).
I don't see why that whole thing can't be automated, given most trees use a similar architecture ???
One little problem occurs when dealing with the leaf opacity:
Looking in the Material property values (below all the visual feedback) there's a value called Opacity Mask Clip Value (for me, I noticed that the default is a bit high, so I dropped it to .1). Also, it seemed to help to set the Blend Mode to 'BLEND_Masked'.
http://www.tomacmuni.com/files/dcmv.jpg
http://www.tomacmuni.com/files/leafclip.jpg
Any tips appreciated. Tom.
Crozz
11-08-2009, 11:52 PM
I don't know if this answers any of your questions directly, but here's a vid I found on the whole speedtree process from creation to ued
http://www.passion3d.com/projet1/projet1.mov
Ettans
11-09-2009, 01:20 AM
Thank you so much tomacmuni. That really helped me out. It looks almost identical to this: http://scr3.golem.de/screenshots/0503/speedtree_ut3/unreal3_09.jpg
Seems as if the thread creator answered the question for himself and everyone else. :P
Xendance
11-09-2009, 01:10 PM
tomacmuni, you're using the leaf specular map for the alpha, which is wrong. If you noticed, the actual diffuse texture is a DXT5 texture after importin (at least it is for me), so that contains the alpha information. Just connect the diffuse texture's white channel into the alpha mask node, set material to masked and two sided, voila.
Ettans
11-11-2009, 06:21 AM
Thanks for the tip Xendance. Here's my final-result: http://www.ettans.co.uk/content/misc/broadleaf.png
KoKoS
11-11-2009, 11:11 AM
I don't know if I should post it in this thread but I can't seem to figure out something that should be really easy, how do I apply materials to the bark / leaves etc in speedtree?
I add material, it's enabled etc but the model stays gray (yes it's on textured). It must be really simple because I can't find an answer anywhere but I've looked around the program a thousand times and I can't find out what to do.
c0l f0rb1n
11-11-2009, 11:21 AM
I don't know if I should post it in this thread but I can't seem to figure out something that should be really easy, how do I apply materials to the bark / leaves etc in speedtree?
I add material, it's enabled etc but the model stays gray (yes it's on textured).
Select the node and in the Object Properties bar there is a Materials property group. Each node has at least one Material property that is a drop-down and you can select any material you have already added to the assets.
Hope that helped.
Ettans
11-11-2009, 11:31 AM
Here's how to setup the materials for the trunk and atlas:
Trunk: http://ettans.co.uk/content/misc/mat_editor_trunk.png
Atlas (Leaves etc.): http://ettans.co.uk/content/misc/mat_editor_leaf.png
KoKoS
11-11-2009, 11:47 AM
Select the node and in the Object Properties bar there is a Materials property group. Each node has at least one Material property that is a drop-down and you can select any material you have already added to the assets.
Hope that helped.
Can't believe I missed that, thank you :)
@ Ettans I was talking about speedtree not UDK but that will probably come in handy when exporting, cheers.
tomacmuni
11-13-2009, 03:23 AM
Xendance; yep ... thanks.
Pleco
11-16-2009, 10:16 PM
Here's how to setup the materials for the trunk and atlas:
Trunk: http://ettans.co.uk/content/misc/mat_editor_trunk.png
Atlas (Leaves etc.): http://ettans.co.uk/content/misc/mat_editor_leaf.png
Thanks Ettans, that was just what I was searching for.
Xendance
11-17-2009, 07:31 AM
Here's how to setup the materials for the trunk and atlas:
Trunk: http://ettans.co.uk/content/misc/mat_editor_trunk.png
Atlas (Leaves etc.): http://ettans.co.uk/content/misc/mat_editor_leaf.png
You don't have to link the trunk (the bark texture) into the opacity node, unless you want see-through tree trunks :rolleyes:
Ettans
11-17-2009, 11:41 AM
Hm, I didn't really see through it, but thanks for clearing that up. :)
c0l f0rb1n
11-17-2009, 11:44 AM
Most bark textures either have no alpha layer or are all 100% opaque so any opacity settings wouldn't matter. It's not incorrect - probably just an unnecessary step.
pboost
11-19-2009, 03:38 PM
Thanx to this thread I got a Speedtree model working in my testmap ;-)
http://i729.photobucket.com/albums/ww298/pboost/speedtree_test.jpg
Powered by vBulletin® Version 4.1.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.