x


Making each tree unique?

I am using the Tree Creator to make trees, with great success. (In the creation)

I want to use them individually, I am not trying to integrate them with the terrain system.

The Prefab that is created isn't quite like other Prefabs... If you spawn a copy of the prefab, then change the Seed on the tree (to make it another randomized version of the settings) it changes the Seed value in not only the active tree, but any other trees that are copies, and also on the tree Prefab.

Is this related to the ID of the tree? If I want to have multiple procedural versions of the same tree, do I have to create them ahead of time in the editor?

more ▼

asked Dec 07, 2011 at 02:41 AM

Tasarran gravatar image

Tasarran
1.4k 46 43 56

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Try making the seed, putting it in its own prefab, then use that prefab as a separate game object as any other. So if you want 10 different types of trees, you'd have 10 different prefabs, each holding a separate tree.

Does that make sense? Lol.

Basically, if you put multiple prefabs out in a field, then you change the root prefab, well, all the children of that prefab are going to change too because they want to be like the root. So if you make different prefabs, it'll be the same way... Lol.

Maybe this won't work though, and if not, sorry =P.

more ▼

answered Dec 07, 2011 at 03:24 AM

Justin Warner gravatar image

Justin Warner
6.7k 45 49 95

Not ideal, but OK if I can't control it directly.

Any other ideas, anyone?

Dec 07, 2011 at 04:29 AM Tasarran

I'd really love to find a way to make each one unique, some way to script uniqueness on the fly, but if nobody else comes up with an idea, I'll flag you as the answerer... ;)

Dec 07, 2011 at 03:23 PM Tasarran

In all honesty, if you have 10 prefabs, and put a script that randomly rotates them and scales them slightly, no one is going to notice similiarities... Bad example, but CoD2 had about 5 trees per-a-terrain type... So 5 snow, 5 bush, 5 dessert, etc. But that's just my opinion =).

Dec 07, 2011 at 02:17 PM Justin Warner
(comments are locked)
10|3000 characters needed characters left

Seems to be linked in order to prevent the generation of an excessive number of models. Would be cool with individual trees, but as long as you have a couple players won't notice.

more ▼

answered Jul 04, 2012 at 06:09 PM

P_Hansson gravatar image

P_Hansson
1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x367
x27

asked: Dec 07, 2011 at 02:41 AM

Seen: 2536 times

Last Updated: Jul 04, 2012 at 06:09 PM