General Category > General Anim8or Forum

WEEHEEEE oh, oh wait its dead, I thought it was dancing (CRE8OR NOTICE)

<< < (28/58) > >>

cooldude234:
I pretty much already have the plant generation algorithm done, I just need to figure out how to distribute it over geometry.
As you seen in the images, its just being placed on a flat plane at y axis 0

Thanos:
Maybe follow the heightmap? (Although you probably already know this.)

@cello95: Seen it, liked it, suggested it! Nice tool indeed.

cooldude234:
I,m not using height maps, I only have the vertex data of the mesh to work with.

Thanos:
Uh huh. So you want to place vegetation on a random object. ouch, bump. It will probably take a lot of thought.

Hmm maybe a workaround. I don't have any code in front of me, but it's the first thing that comes in my mind right now.
Find target x,z of the next plant. Shoot vertical ray and check collisions. Add faces collided with the ray in a list [<-- tough part - you have to first add the objects the ray finds in a list, and the shoot another ray for each object for face detection (I think)]. Find collision point with max y, store the face it was found on too. Find slope of stored face. Place the plant on x,y,z, rotate it with the slope.

I dunno. It looks kinda hard to me.

cooldude234:
yea still don't have line plane intersections :\

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version