HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.
Pages: [1] 2

Author Topic: [Resolved] Removing speedtree collision?  (Read 3383 times)

A_White_Guy

  • World Owners
  • ****
  • Posts: 29
    • View Profile
[Resolved] Removing speedtree collision?
« on: Jun 27, 13, 05:04:18 PM »

Hi, i made some grass in speed tree with mesh planes, and i was wondering if there was a way to remove collision because players walking on top of grass doesn't really make sense. So far the only way i have found is to turn it off manually from the properties window, but is there some option in the modelling/compiling process that will remove it or is there some setting i can apply to in in the library?
« Last Edit: Jul 03, 13, 04:31:29 PM by HE-Cooper »
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Removing speedtree collision?
« Reply #1 on: Jun 27, 13, 07:26:13 PM »

You can make the library command be to place an object with it's properties set not to collide. I think you can set collision true false per section of hierarchy in speedtree, but I'd have to look. Their documentation is frequently the best place to start for that.
Logged

A_White_Guy

  • World Owners
  • ****
  • Posts: 29
    • View Profile
Re: Removing speedtree collision?
« Reply #2 on: Jun 27, 13, 09:38:31 PM »

Forgive me, but i must admit I am not familiar with library commands. How would one go about making that type of library command? I know how to add commands to an object in the library, I just don't know what code to put in it.
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Removing speedtree collision?
« Reply #3 on: Jul 03, 13, 04:30:43 PM »

Select the object, right click in the library, and add the selection. This will instantiate the selected objects with their current properties next time you use the library entry.
Logged

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: [Resolved] Removing speedtree collision?
« Reply #4 on: Oct 01, 14, 01:24:13 AM »

You can make the library command be to place an object with it's properties set not to collide. I think you can set collision true false per section of hierarchy in speedtree, but I'd have to look. Their documentation is frequently the best place to start for that.

Is there any update to this?

I have been searching for sometime on how to remove collision from certain layers within my speedtree but no luck.

Quote
By default, HeroEngine uses the Static Asset model to create a Collision Model for the server. This can now be overriden in HeroEngine_1_Release_40 by creating a simple model for Collision with "_Collision" as the suffix of the name for the Collision mesh and exported it with the Static Asset as one mesh file. A Material is not needed for the collision mesh.
http://hewiki.heroengine.com/wiki/Collision

Does this work with speed tree files as well? In my personal testing it did not work.

Has anyone successfully disabled the leaves from being collidable while the rest of the tree has a collide?

I have even tried the "generate collision primitives in Speedtree but the whole tree still seems to be collidable.
« Last Edit: Oct 02, 14, 04:01:44 AM by nocake »
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: [Resolved] Removing speedtree collision?
« Reply #5 on: Oct 02, 14, 11:58:00 AM »

You can change the collision in speedtree, can remove it completely so for things like grass etc you can remove it.

Or for trees you can set the collision model to only be as tall as a player can reach, which saves a ton of collision costs, usually also about the same height as the player, no need to deal with collision on limbs etc.

Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: [Resolved] Removing speedtree collision?
« Reply #6 on: Oct 02, 14, 04:10:02 PM »

How do you change the collision in speedtree? I have found no documentation  on this.

The only way I have found so far to disable collision is as Cooper mentioned above about disabling the objects collisions in its properties within heroengine. I have found no other method, screenshots would really help.

thanks in advance for any knowledge.
« Last Edit: Oct 02, 14, 04:19:55 PM by nocake »
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: [Resolved] Removing speedtree collision?
« Reply #7 on: Oct 03, 14, 04:44:54 PM »

http://screencast.com/t/hucYCfJJid

See image

You click on the tool bar icon for collision object it will show you the collision objects. Can resize or delete them all together.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: [Resolved] Removing speedtree collision?
« Reply #8 on: Oct 04, 14, 02:48:23 AM »

That tool bar does nothing for me. I have tried it both ways:

Code: [Select]
1. Deleted all of the collision meshes

2. Added a huge collision to it (see images attached)

Both scenarios result in the speedtree having the same collision which appears to be the trees exact wireframe.

I also attempted the Collision Override method:

Code: [Select]
I placed Broadleaf.srt and Broadleaf_Collision.hgm in the same directory.

The speed tree HE compiler appears to have some export mesh function but it doesn't work for me. (see image attached)





keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: [Resolved] Removing speedtree collision?
« Reply #9 on: Oct 04, 14, 06:13:44 PM »

In the collision tab on the left in speed tree. Do you have generate collision primitives? it's a toggle to say generate collision for everything aka leaves and all.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: [Resolved] Removing speedtree collision?
« Reply #10 on: Oct 05, 14, 04:01:21 PM »

As I stated before, I generated collision primitives and it didn't work. I tried deleting all collisions as well as making them extremely large collision boxes. Still nothing.

I dont see this check box you are talking about in the left hand panel under collisions for the entire tree. Only the leaf collision and proxy collision, which is for generation and not mesh box collision.

Have you actually exported a speedtree without the leaf collisions?

« Last Edit: Oct 05, 14, 04:39:37 PM by nocake »
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: [Resolved] Removing speedtree collision?
« Reply #11 on: Oct 05, 14, 06:52:01 PM »

We have, challenge is you have to make a lot of selections in speedtree.

For example can't have wind affect on the object in speedtree cause if you do then HE needs to have physics data to work with, so that means when you look at physics data you see that data there. Also have to change proxy collisions on the meshes themselves inside of speedtree, etc. Also you want to make speedtree not export a mesh but only it's billboards textures instead. Cause you don't want to really have a physical mesh, your just creating a billboard.

So yes it can be done but you really have to know speed tree inside and out and understand how it exports data, and how HE uses that data.

Overall though...

The main easiest option is to set the asset to just not collide for player. If you don't want to spend the time working out the components in speedtree, also if you want it to move in the wind, then you will need to leave the phsyics data there for HE, so still will be using the library command to set the asset to not be colliding for player.

OR what I recommend, is placing the asset in the world, putting a few groups of it together, setting their collision value to false for player, npc, and camera. Then selecting the 5 or 6 you placed, and group them as 1 asset and save it as a new asset. Sorta of making your own prefabs,

Do that all the time to save me the hassle of spawning dozens over and over, I can just spawn a few random ones, with some random rotations, and drag the cluster around some, then just place the few solo ones as needed.

Oh and you can save it as a library asset with collision and one marked no collision, just incase you want to use it with collision. OR if you have something else you want to have collision.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: [Resolved] Removing speedtree collision?
« Reply #12 on: Oct 05, 14, 08:42:38 PM »

From what I can tell removing proxy collision does nothing for collisions in HE.


It doesnt matter what I do to the speedtree it is always shows the same wire mesh in HE which works as its collisions as well.


keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: [Resolved] Removing speedtree collision?
« Reply #13 on: Oct 06, 14, 12:43:27 AM »

did you go into the mesh for the leaves and remove the proxy weight and values, also remove the bones from the trunk, and the leaves in the physics section of each, So that there are no bones, once again this means no wind effect.

I can tell you it's a royal pain in the arse to get it to work so leaves don't have a physics representation. And it breaks 99% of the reason to use speedtree, which is to have trees with leaves that can have collision without having to crush the physics engine.

The easiest thing to do is just set the asset's collision factors.

If you want to really cheat, and we started doing this so we could have no collision trees but keep their wind effect, was break our trees into two sections. The trunk and the Branches and Leaves. We then re-assembled them in game and made a pre-fab library asset out of them. With the leaves and branches set for no collision. Was super easy to do and works great, even allowed us some free mix and match, or in game rotation aspects, aka I can rotate the top of the tree seperate from the bottom, which gives me even more customization without any real work.

Just saying it can be done, it's a pain to do, though, and it breaks a lot of the reason to use speedtree.

It can however be done, keep all the reason for using speedtree, and only takes 3 seconds to setup in HE. Just put the asset in the game world, set the no collision, and save the asset back to the library. Poof got what you want and takes just a few moments.
From there just double click and go.


Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

nocake

  • General Accounts
  • *
  • Posts: 404
    • View Profile
    • BlightMMO
Re: [Resolved] Removing speedtree collision?
« Reply #14 on: Oct 06, 14, 02:42:59 AM »

Even if I do everything you say everything is still the same.

Also I have no idea what "and the leaves in the physics section of each" means?

Proxy Collision is for wind generation and colliding while blowing which if you dont group your layers lowering the value does nothing.
« Last Edit: Oct 06, 14, 02:53:06 AM by nocake »
Logged
Pages: [1] 2