Foliage collision

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

Foliage collision

Post by Taivyx »

Simply put:
Is there any way to make foliage with collision?
That would make my life sooo much easier (and anyone else who's doing a forest map)

and if there is, is there a way to set the distance the foliage can be viewed from?
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Re: Foliage collision

Post by Caleb1117 »

The veiw at which you can see foliage, should be in it's ODF, not at home ATM, or I'd post the line.

I know there are folliage objects with it, but I don't know if you could emulate that in other foliage.

What are you trying to do? could you use the invisible collision primitives?
Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

Re: Foliage collision

Post by Taivyx »

Right, I found the line shortly after I posted the topic.
What I'm trying to do is make it so that a huge, detailed forest is just "a click away", without adding to the object count.
Unfortunately one can't do that right now since the trees would have no collision.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Foliage collision

Post by Teancum »

Foliage by its nature has no collision.
Grev
Hoth Battle Chief
Hoth Battle Chief
Posts: 3132
Joined: Sun Dec 09, 2007 11:45 pm
Projects :: No Mod project currently.
Games I'm Playing :: Minecraft
Location: A Certain Box Canyon

Re: Foliage collision

Post by Grev »

I dont know much about it, but cant an option msh (I think thats what its called), like for scaling up, that would make it collision?
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Foliage collision

Post by Teancum »

No, using foliage turns all collision off.
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Re: Foliage collision

Post by MandeRek »

Sorry to post here, but i can't find it.. How to set up foliage? :?
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Foliage collision

Post by Teancum »

I think it's in zeroeditor_guide.doc. It's one of the Zero guide docs anyways.
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Re: Foliage collision

Post by MandeRek »

Yup, it's in that one.. Thanks :P

It does not really make sense to me with the layers, but I'll play with it

Sorry that i went offtopic :|
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Foliage collision

Post by FragMe! »

Taivyx wrote:Right, I found the line shortly after I posted the topic.
What I'm trying to do is make it so that a huge, detailed forest is just "a click away", without adding to the object count.
Unfortunately one can't do that right now since the trees would have no collision.
By a huge detailed forest do you mean one you can run through or just stand there and say "What a nice forest but now I must go shoot something" if it is the latter and no one is supposed to enter there should be tree billboards in the assets somewhere, that used with invcol meshes to give it collision.
Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

Re: Foliage collision

Post by Taivyx »

A forest one can play in, but since Tean's answered the question, I'll just have to resort to placing trees individually and copying/pasting using multi-select
Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

Re: Foliage collision

Post by Taivyx »

I've found something that suggests it can be done.

Endor's .wld file has no objects, in any layer.

Also, it's .prp has this section:

Code: Select all

 	Mesh()
	{
		File("end_prop_treeclump_1.msh", 50);
		Frequency(50);
		Scale(1);
		Stiffness(0.0);
		CollisionSound("foliage_collision");
	        ColorVariation(0.2);
		AIVisibilityFactor(0.35,0.6);
	}
Also, in the ZeroEditor_guide.doc documentation, it's example of a prp file has a section similar to that as well.

Code: Select all

    Mesh()
    {
        File("end_prop_treeclump_1.msh", 50);
        Frequency(80);
        Scale(1);
        Stiffness(0.0);
        CollisionSound("foliage_collision");
        ColorVariation(0.2);
    }
}
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Foliage collision

Post by Teancum »

Nice Find :thumbs: I always wondered how they did it on Endor. Let us know how it turns out.
Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

Re: Foliage collision

Post by Taivyx »

Nope, didn't work :?
Trees flat-out didn't show up
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Foliage collision

Post by FragMe! »

check your world req file and make sure this is in there:

REQN
{
"prop"
"end1"
}

of course end1 would be the name of your prop file.
Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

Re: Foliage collision

Post by Taivyx »

It must be there, since the ferns I also added into the same foliage layer show up fine.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Foliage collision

Post by FragMe! »

Taivyx wrote: Endor's .wld file has no objects, in any layer.
You sure? I just did a search for clump in the end1 world file, (opened in notepad) and it found a whole clump of end_prop_treeclump_01 things.
Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

Re: Foliage collision

Post by Taivyx »

Couldn't see them in zeroeditor, in any case
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Foliage collision

Post by Maveritchell »

Taivyx wrote:Endor's .wld file has no objects, in any layer.
Taivyx wrote:Couldn't see them in zeroeditor, in any case
That's cause ZE won't render them. Why? I don't know. Probably because there are about a thousand of them. They still show up on the object list in ZE.
Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

Re: Foliage collision

Post by Taivyx »

Hm, that's strange, cause I have a map with about a thousand trees as well, and they render fine, although a tiny bit laggy
Post Reply