> When I've seen trees and bushes in the past, they've generally either
> just been a single quad with an alpha-mapped texture that's always
> facing the camera, or a pair of intersecting quads. I don't know if
> OpenGL gives you a way to have a polygon always facing the camera, but
> that would make the single-quad approach pretty simple. For collision
> detection, you could just use a distance from the central point of the
> tree and assume that the person could duck under the branches as long as
> they're not trying to walk through the trunk.
> 
> For larger trees or forests, you might want to use a real model at least
> for the trunk of the tree and some major branches, and textures for the
> rest. I've also seen cone-shaped tree models in some games.
> 
> I wouldn't get too sophisticated to start off with, though. I've seen
> too many projects get bogged down in little details. Whichever problem
> you decide to solve first, I guess I'll solve the other problem.
> 
> Since we both seem to be working in the same direction, perhaps it would
> be a good time to put this in CVS somewhere and work on a common code
> base? I tend to prefer savannah.gnu.org, but sourceforge is fine, or
> whatever. I have accounts on both Savannah and SourceForge.

I think Blam answered my "what to do first" question in another e-mail
by saying there will be built in animation functions in a future
release.  I guess for now my next objective will simply to create a
model (a tree or something) and get it in my program.  I tried playing
with import_blender.py at work until work stuff got in the way.  Oh the
life of a unix admin.  :)  Unfortunately I had little success.  I first
tried to use a couple different existing 3ds models I scrounged off the
net.  I can get them loaded into blender, but I cannot get
import_blender.py to create an output file.  At first import_blender.py
choked at line 77, which I got past by modifying the if statement at
line 76.  I changed it from "if(face.col != None):" to "if(len(face.col)
!= 0):" which I think should give the same results, but this gets me
past the error messages.  Unfortunately now it seems to just hang at
line 74:

code = code + "v = soya.model.Vertex(root_world, " + str(co[0]) + ", " +
str(co[1]) + ", " + str(co[2]) + ")\n"

I tried import_blender.py with a simple cone I created from scratch and
that works fine.

Anyway, if you want to setup a CVS repository just let me know, I'll be
happy to add stuff to it.  I've never worked on a project like this, so
I'll leave all the organization up to you.  I don't have accounts on
Savannah or SourceForge, so either one is fine with me.


As for my ideas on trees/bushes/etc.  My thoughts were to come up with
some simple level of detail code.  Basically check the distance between
the object and the camera, and when it gets closer than X, switch to a
higher poly count object, and farther away use a low poly count object. 
Similar to the LOD code in the land module.  It would probably be a good
idea to even use a sprite or small plane with a picture of a tree or
whatever at far distances, and cull it away completely when really far. 
Of course right now I'd just be happy if I could take a tree model and
get it to render.  


-- 
Jack Madison <[EMAIL PROTECTED]>



-- 
Pour vous desabonner envoyez un mail a [EMAIL PROTECTED]

Reply via email to