[gameprogrammer] Re: Generating and rendering meshes

Hi Vince,

I will certainly look at that.  I am not doing these by hand.  I am
writing a simple model creator/editor that will save to a format that
can by used anywhere.  I already have a bunch of code to do the
rendering and loading of models using primitives.  The thing is that I
have never used any 3D design programs before and I don't have the
cash to shell out for pro software.

I have an arbitrary file format and structure already in use so my options are:

a) Ditch my existing format and learn to use a 3rd party designer.
Then decode the file format so that I can import into my existing
code...

or

b) Put together a simple and easy to use editor that will save in
exactly the format I need.

As I said, I already have a very basic editor that compiles quads,
tris, etc so I want expand on that.  I think I might try using a face
average normal and see how that goes.

Regards

Richard

On 27/03/2008, Vince <uberneen@xxxxxxxxx> wrote:
> When it comes to geometry, normals, and UV
> coordinates, I let blender do all the work.  It seems
> to me that generating your meshes by hand would be a
> long and brutal process.
> I modified the .tri exporter that Raydium uses to spit
> out approximately what I need, and then just make a
> few manual adjustments to the file.  I'm in no way
> familiar with python, but I'm sure it's trivial to
> adjust the exporter to put the information I'm adding
> by hand in manually.  The blender export script, an
> example completed mesh, and the required classes can
> be found here:
> http://tyranny.ckt.net/tabasco/dev/
>
> I'm using VBO's to render, so I use GLEW to wrangle
> the appropriate extensions.  That also means that I'm
> using three vertexes per triangle.
>
> It sounds like we're working on similar things.  If
> you'd like to see my complete framework, I'd be happy
> to upload it.  It's nothing special, in fact it's
> probably a little embarrassing, but it does contain
> what I consider to be some pretty useful proofs of
> concept. (Most recent branch has half-assed bullet
> physics!)
>
> Vince~
>
> --- richard sabbarton <richard.sabbarton@xxxxxxxxx>
> wrote:
>
> > Hi There,
> >
> > I am looking to create a MESH loading and rendering
> > class that I can
> > use to expand on the standard primitives normally
> > available.  I
> > haven't looked much at meshes before and I am making
> > a few
> > assumptions...
> >
> >  - The mesh will form an array of vertex points
> >  - The mesh will be defined by the width and height
> > of the array
> >
> > When I am rendering the mesh I will need to render
> > two triangles for
> > each set of 4 vertices that make up that part of the
> > mesh and then
> > loop through each segment.  I am OK so far but I
> > have some areas that
> > are a little unclear.
> >
> > Each vertex should also have a Normal and a
> > TextureCoord as well which
> > is not a problem.  My question is, what is the best
> > way of calculating
> > the Vertex Normals?  I have already written code to
> > calculate the
> > normal of a face but with per vertex normals the
> > vertex will be part
> > of several faces with different normals.  So how do
> > I decide what the
> > normal should be for the vertex?  My initial thought
> > was to take an
> > average of all of the face normals that this vertex
> > is part of and
> > then normalize the average but I was wondering if
> > there is a specific
> > method that other 3D apps etc. would calculate these
> > values.
> > Performance is not an issue because I will be
> > precalculating the
> > norrmals at design time.  I am just trying to
> > determine which
> > direction to go...
> >
> > Any thoughts?
> >
> > Regards
> >
> > Richard
> >
> > ---------------------
> > To unsubscribe go to
> > http://gameprogrammer.com/mailinglist.html
> >
> >
> >
>
>
>
>      
> ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>
>

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: