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

Author Topic: Speedtree Questions  (Read 5352 times)

Oakenhorn

  • World Owners
  • ****
  • Posts: 8
    • View Profile
Speedtree Questions
« on: Jun 30, 15, 06:23:25 PM »

Hello all,

     I have been attempting to create various trees for use in my world and I am experiencing a few issues which hopefully someone can help me with.
     First, on the speedtree modeler I can get wind to affect the leaves with no problem, however this does not seem to carry over to my world when I import them.  The trunk and branches seem to move. . .at least at the first branch level, but leaves do not.  Am I doing something wrong or is this just the way it is with speedtree trees?
     Also I am able to adjust the various color setting on speedtree to get excellent and varied colors using stock leaf textures.  These settings do not seem to move over to the game world.  I am aware that there is a leaf coloring option in the heroengine, but it definitely does not look the same.  Is it possible to get the color changes made on speedtree to import with the tree or is this not an option?

Thanks in advance for any assistance you can offer!
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Speedtree Questions
« Reply #1 on: Jun 30, 15, 06:52:51 PM »

Lighting colors in the speedtree modeler wont' export. You would need to make the changes to the textures you're exporting. Wind on the speedtrees, I believe only functions at one level. Meaning you'd need to set wind on either branches or on billboards. But I might be wrong. We'll see if others who have used it more recently have another answer.
Logged

Oakenhorn

  • World Owners
  • ****
  • Posts: 8
    • View Profile
Re: Speedtree Questions
« Reply #2 on: Jun 30, 15, 08:56:37 PM »

Thank you for the quick answer!  I thought that the colors might need to be changed in the textures, but thought I would ask anyways.  The wind was the more important question.  I have turned off the wind effect on the branches but still am unable to get the leaves to move.  Any advice anyone might have to make the leaves move would be appreciated.
Logged

Oakenhorn

  • World Owners
  • ****
  • Posts: 8
    • View Profile
Re: Speedtree Questions
« Reply #3 on: Jul 01, 15, 09:23:06 PM »

     I have been trying several different combinations on speedtrees with no luck for leaf movement.  Is there anyone else who has gotten wind to work on the leaves from speedtree 6.2.2 in heroengine and if so could you let me know what selections you have active and which are not?
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Speedtree Questions
« Reply #4 on: Jul 02, 15, 01:31:33 AM »

Haven't had any issues with our speedTrees.

Some were created as late as last week, and leaves move properly when the wind is blowing.

We don't make full use of what the modeler can do, for us , less is better, so it may be that you've edited some setting(s) that affect wind differently than our setup.

Have you tried simply starting a new tree with default settings, don't change anything, just apply templates, one at a time (which might be your issue some of the templates IIRC don't work correctly and may throw compiler errors)?

Dont use a root, just start with a trunk, apply branches, (use the _RT templates) then leaves, make sure you then apply materials to each, (don't forget the caps) and save/compile upload it and try it out.  A basic tree such as this should shake like a ragdoll in a gusty area.

Oakenhorn

  • World Owners
  • ****
  • Posts: 8
    • View Profile
Re: Speedtree Questions
« Reply #5 on: Jul 02, 15, 07:23:35 PM »

Thank you for the reply!  It's nice to know there are people who will try to help out there.

     Unfortunately I have tried everything you suggested below.  I created a new file without changing any settings.  I created a new tree with the basic RT templates (standard everything) with the provided textures, enabled wind and ran it through the compiler then to heroengine.  No luck. . . just like every other tree I have tried, I get branch movement and no leaf movement.  Oddly enough, while I was trying to find a solution to this I turned off motion at the branch level and left it on for leaves and I still get branch movement in heroengine.  I have gone so far as to uninstall and reinstall speedtree just in case I screwed something up, and still there is no change.

     Any other suggestions?
« Last Edit: Jul 02, 15, 08:36:29 PM by Oakenhorn »
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Speedtree Questions
« Reply #6 on: Jul 02, 15, 10:58:50 PM »

One thing I noticed you said, you turned wind on.  Don't, and try that (leave everything default except adding your components and textures to them).  Then set only the LoD settings, and compile and upload.

for applying wind in speed tree modeler, you can only apply to two distinct levels, I never use that setting (for one reason we don't want trees moving very much).  Also, just to point out, As far as I've seen, the leaves do not move independant of the branches, thats why you still got branch movement with branches turned off.  IF you turn it on for leaves, the branch is gonna move, and vice versa.  the leaves and branch move together, the leaves do not move by themselves/individually(that would be a nice effect but would take a bit of power to do).  Default, if you use 1 trunk, and 1 level of branches, the trunk, and the branch will move.  the leaves will move with the branch.  If you're looking for the leaves to blow/ripple in the wind, like a real tree, thats not their behavior, but with more complex editing, you can edit the forces to create really cool looking wind effects.   I think there are several tutorial videos posted on the wiki to get ya started with those settings.
http://hewiki.heroengine.com/wiki/Speedtree

Oakenhorn

  • World Owners
  • ****
  • Posts: 8
    • View Profile
Re: Speedtree Questions
« Reply #7 on: Jul 02, 15, 11:39:49 PM »

Ahha!  That is the answer I was looking for.  So you are saying the leaves do not shake or roll as they do in the speedtree modeler, they only move with the branch.  This I can get to happen.  The branches move and the leaves move with them, but there is no actual leaf billboard motion.  Is this confirmed to be the only type of motion we can get inside heroengine?  If it is, that is fine and I can move on, but I would like to know as it would be nice to have the option to have leaf motion in limited circumstances.

Thanks for the answer ToY-Krun.
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Speedtree Questions
« Reply #8 on: Jul 02, 15, 11:47:43 PM »

I thought that Might be what you were looking for, but let me clarify a bit more.

With the proper textures, and with custom leaf meshes, It it probably possible to get the effect of leaves blowing about independant of the branch BUT, the example meshes are large and blocky, and when the wind hits the leaves, it moves the whole block.  Make sense?  If the blocks were smaller (i think there may be some smaller ones in the examples) OR the textures smaller, it might appear more like what you want.   Playing with the forces you also might accomplish something more like this.  To add that many individual leaves (which i believe there is a template for) It would require adding many more polygons to the tree which, for our part, we do not want, but in your case, you might find it suitable to research it.

Some of the other teams may be using similar trees to what you want, and maybe they'll reply.

*Addition*
Best to just play around with it and then decide whats best for you.  try using individual leaves template on the branches, and using various example materials on them and see what kind of effect you get, but keep an eye on the total poly count of the tree.

**Edit**
Yeah I did a few quick tests myself and it seems that , not only is 2 nodes the maximum that you can apply wind to, but also 2 nodes are required.  I applied wind to only the leaves and there is no movement in the game, but with wind applied to the branch (or second tier of branches) and leaves, with the right adjustments and light wind, it looks like only the leaves are moving, at least from a ways off.  Most of our trees use a few large branches for first tier branches and then more smaller ones on a second tier.  That seems to allow to the individual leave groups to move a bit more variably.
« Last Edit: Jul 03, 15, 12:09:07 AM by ToY-Krun »
Logged

Oakenhorn

  • World Owners
  • ****
  • Posts: 8
    • View Profile
Re: Speedtree Questions
« Reply #9 on: Jul 05, 15, 03:35:11 PM »

     Okay, just so I can be clear, do the leaf billboards move independently of the branches?
Logged

McIndus

  • General Accounts
  • *
  • Posts: 18
    • View Profile
Re: Speedtree Questions
« Reply #10 on: Jul 10, 15, 01:33:11 PM »

     Okay, just so I can be clear, do the leaf billboards move independently of the branches?

This brings up an awesome point. 
Is there anywhere that lets us know what features from SpeedTree actually work in HE?

For example, lighting/color changes don't export, alpha scalar changes don't export (probably a per-pixel issue), parallax bumps aren't applying to textures, trans maps don't seem to apply, and Wind only functions on a very basic level, but the specifics as to what wind settings DO work are unknown.

Some extra info on the wiki would be helpful and prevent me and MANY other devs from wasting more time.  I've already spent about 30 hours on trial/error in SpeedTree trying to figure out WTF HE supports.

From my experience, unless the object has bones with physics applied, it won't move in the wind... and even then, weird stuff happens.

I can't get bushes I've made to blow in the wind.  I made them out of fronds, and when I select 'Fronds as Leaves", the wind settings don't export to HE.  (since leaves have no bones, I'm assuming... even when I manually create bones)

After a lot of trial and error, I found that by keeping the leaves as 'fronds' I could use a few settings that work well to make the wind for fronds 'act' more like leaves, even though they are still fronds.  Things look great in SpeedTree, but as soon as I import them using the compiler, the leaves 'stretch/contract' dramatically in game and look like crap instead of blowing in the wind.  This is totally unpredictable behavior at the moment, and would be really nice to find a fix, or at least to know specifically how HE handles SpeedTree wind.

I don't think wind actually applies to billboards at all.  Is there a workaround for this?
Logged

ToY-Krun

  • General Accounts
  • *
  • Posts: 677
  • Support Volunteer
    • View Profile
Re: Speedtree Questions
« Reply #11 on: Jul 10, 15, 02:13:19 PM »

I use the weights in speedtree to manipulate how HE will move what.  branches/leaves get more/less weight depending on how I want them to move.  If I dont want the branch to move I put alot more weight on it then I do the leaves.

I agree, the trees don't behave in HE as they do in speedTree modeler, but I'm sure the wind prop in speedtree doesn't work quite the same as the production wind in HE.  The Modeler is pretty complex so I don't know the half of it , I've only focused on what we need, and we don't at this time plan on making use of complex trees (they usually get turned off anyway lol).

If you activate wind on a tier of branches and also on their children leaves/fronds, they'll move in the wind in game.
I'm not sure how strict those requirements are, but apparently you either have to have a minimum of two nodes with wind, OR a node and its children(branch/leaf).  For small frond plants, I use a small branch connected to the fronds with both wind activated.

Something else about leaves/fronds and wind, the wind moves the mesh, it doesn't "contort" or morph the mesh, so the whole texture moves at once.  If you add/subtract too much weight (or use other forces) the meshes begin to get distorted (thus the stretching/contracting described by McIndus). 

Thats about all the info I got atm, so take it with a grain of salt, and maybe someone more versed in this can help further.