3D vertices

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
dbeyer3069
Posts: 81
Joined: Mon Dec 19, 2005 4:09 pm

3D vertices

Post by dbeyer3069 »

Has anyone come across a program (tool) that can be used to generate vertices coordinate data... that can speed up the process of making 3D objects (cars, houses, etc.). I realize this may be higher end software but it's worth a shot asking.

David Beyer
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

You could try blender: blender3d.org
User avatar
Stellar
Posts: 48
Joined: Mon Dec 12, 2005 9:13 am

Post by Stellar »

Im slightly confused about your question. It would be a little absurd that yould ask if theres a program that can just pop out cars, trees, ect at the press of a button, so im sure thats not what your asking, but its kinda how i read it O_o

anyways, i think your asking about how to export data after youve modeled something, or after youve found a model from another source.

I use Alias Maya, its the best modeler in the world. Its interface is very intuitive and you can download it for free if you use the personal edition. Im assuming the maya api works with it.

most professional tools allow you access to the core data for custom export. Ive writtin one in MEL (mayas script) and Maya Api, which Ill be posting in another thread later ( but it probably wont work with the free edition? ). Im not sure what your really looking for, but as for myself, I like to learn about everything I can. So I learned maya, and photoshop, brushed up on my drawing, and next learned maya script and api. It quite a bit of work, but well worth it... if thats what youre looking for.

if on the other hand, you just want to get ahold of some models and export it, so you can get somewhere with say a 3d engine or a game mod, then there are several online sources.

hope some of my blabering answered your question :)

later
Image
dbeyer3069
Posts: 81
Joined: Mon Dec 19, 2005 4:09 pm

Post by dbeyer3069 »

Im slightly confused about your question. It would be a little absurd that yould ask if theres a program that can just pop out cars, trees, ect at the press of a button, so im sure thats not what your asking, but its kinda how i read it O_o
I guess what I'm asking for is 3D modeling software. I am downloading the 3dblending that someone else suggested. The Alias Maya is over 200mb and it will take me a bit longer to get that.

I want something that can aid in creating characters, location, etc. models. For example, how did the DOOM creators come up with all their scenery and objects. They must have had some tools to aid with that. I may experiment and have a few 3D objects in my application (just for fun).

I understand how objects are comprised of different things such as triangles, polygons, lines, etc. and that it takes several points to define them (and X, Y and Z for depth). I'm looking for ways to speed up the creation of things such as cars, houses, characters, etc. Even if it takes more than a few clicks :)

The irony of all this is that I worked for AutoDesk a number of years ago (or at least a division of theirs) but didn't stay around (it was a bit over my head with all the higher maths needed for AutoCad, etc.). I've come full circle. I laughed when I saw AutoDesk show up.
anyways, i think your asking about how to export data after youve modeled something, or after youve found a model from another source.
Right. Can data be exported in a way that it's compatible with PSPGL (OpenGL) libraries (or something close)? In other words, data compatible for a series of calls to draw triangles, etc.
I use Alias Maya, its the best modeler in the world. Its interface is very intuitive and you can download it for free if you use the personal edition. Im assuming the maya api works with it.
At 200+ mb I will have to try to grab it overnight.
most professional tools allow you access to the core data for custom export. Ive writtin one in MEL (mayas script) and Maya Api, which Ill be posting in another thread later ( but it probably wont work with the free edition? ). Im not sure what your really looking for, but as for myself, I like to learn about everything I can. So I learned maya, and photoshop, brushed up on my drawing, and next learned maya script and api. It quite a bit of work, but well worth it... if thats what youre looking for.
It sounds like we're in the same neighborhood. I am the same way -- once I am into learning something, I try to immerse myself in it. The learning curve here is quite high... but it will pay off.
if on the other hand, you just want to get ahold of some models and export it, so you can get somewhere with say a 3d engine or a game mod, then there are several online sources.
Any and all ideas/resources for creating models and exporting PSPGL (OpenGL) compatible data is helpful.

I'm assuming people create some type of database in other environments (windows, etc) at some point when things get too complex and there's way too much data.

David Beyer
dbeyer3069
Posts: 81
Joined: Mon Dec 19, 2005 4:09 pm

Post by dbeyer3069 »

jsgf wrote:You could try blender: blender3d.org
Thanks for this link. I played with it a little bit (way late, too tired!).

The 3d box came up and I saw how to run it, change, etc.

Which export mode do you use to get closest to PSPGL compatible data?

Thanks,

David Beyer
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

GL/PSPGL doesn't have a native file format for mesh data (unlike DirectX's .x files), but there are a number of libraries for parsing various fileformats which Blender can export. .obj, .3ds and .md2 are all good candidates. .obj is particularly simple, because its basically text; you could probably write a script to turn it into a .c file with the appropriate arrays and calls to draw the model.

If you want to get really advanced, you could write a custom exporter in Python to generate any output you want. I've been thinking about doing one to prodice PSP-friendly output, but I haven't got around to doing it yet (I've only just learned how to drive Blender myself).
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

jsgf wrote:You could try blender: blender3d.org
Thanks for that, very useful! It takes a bit of getting used to but not nearly as much as I thought. I could create meshes, extrude bits, rotate bits and assign a simple coloured texture pretty fast. :)

Thanks!
dbeyer3069
Posts: 81
Joined: Mon Dec 19, 2005 4:09 pm

Post by dbeyer3069 »

jsgf wrote:GL/PSPGL doesn't have a native file format for mesh data (unlike DirectX's .x files), but there are a number of libraries for parsing various fileformats which Blender can export. .obj, .3ds and .md2 are all good candidates. .obj is particularly simple, because its basically text; you could probably write a script to turn it into a .c file with the appropriate arrays and calls to draw the model.

If you want to get really advanced, you could write a custom exporter in Python to generate any output you want. I've been thinking about doing one to prodice PSP-friendly output, but I haven't got around to doing it yet (I've only just learned how to drive Blender myself).
It sounds like a .obj to C converter would be pretty handy. I can't imagine coding/debugging those things by hand.

David Beyer
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Post by cheriff »

A great .obj parser, with an example application:http://www.xmission.com/~nate/smooth.html It is just a .c and a .h that you include in you app (or buils into a lib if you like) that reads a .obj and then lets you pull the vertex, normal and material data (i cant remember if tex co-ords too?) from a series of structs & accessor functions. It can smooth normals too, given a cut-off angle between adjacent faces (so it wont try to average the normals on the faces of a cube, for instance)
At first I included the code directly in my project (admittedly on ps2) and worked directly on the obj. Later i moved to a pc-side tool that takes a .obj and writes a custom format for my program. (basically just dma chains of vertex data) You could probably do something similar for an offline build of displaylists, or a more friendly format.
- cheriff

PS - the example is pc/opengl code but was still very applicable to ps2, so psp should be no problem. And the included .exe works well enough under wine, for the linux folks - obviously if you get it compiled yourself it's faster.
PPS - also has a bunch of .obj files of various complexity that are useful for testing, etc.
Damn, I need a decent signature!
dbeyer3069
Posts: 81
Joined: Mon Dec 19, 2005 4:09 pm

Post by dbeyer3069 »

cheriff wrote:A great .obj parser, with an example application:http://www.xmission.com/~nate/smooth.html It is just a .c and a .h that you include in you app (or buils into a lib if you like) that reads a .obj and then lets you pull the vertex, normal and material data (i cant remember if tex co-ords too?) from a series of structs & accessor functions. It can smooth normals too, given a cut-off angle between adjacent faces (so it wont try to average the normals on the faces of a cube, for instance)
At first I included the code directly in my project (admittedly on ps2) and worked directly on the obj. Later i moved to a pc-side tool that takes a .obj and writes a custom format for my program. (basically just dma chains of vertex data) You could probably do something similar for an offline build of displaylists, or a more friendly format.
- cheriff

PS - the example is pc/opengl code but was still very applicable to ps2, so psp should be no problem. And the included .exe works well enough under wine, for the linux folks - obviously if you get it compiled yourself it's faster.
PPS - also has a bunch of .obj files of various complexity that are useful for testing, etc.
Wow. Thanks. I will grab that later and try it.

In the 3D world... is swapping buffers the best (or only) way to have a 2D background (PNG) and 3D objects animating or moving in the foreground? I am trying to get an idea of how little or much I can incorporate into my program initially and get more bang and bells and whistles without jumping in all the way. I'm strictly a 2D guy up to this point.

David Beyer
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Post by cheriff »

You could also turn off zbuffer writes and draw the background with a single sprite (or many smaller, striped ones if you're a speed freak) or blit it directly to vram, then turn z writes on and to the 3d stuff as normal?
(heh, im not sure what you mean by flipping buffers to do this, but thats how i would try first)

Hmm, all this talk it making me want to get back into gfx coding after taking a bit of a hiatus :)

- cheriff
Damn, I need a decent signature!
dbeyer3069
Posts: 81
Joined: Mon Dec 19, 2005 4:09 pm

Post by dbeyer3069 »

[quote="cheriff"]You could also turn off zbuffer writes and draw the background with a single sprite (or many smaller, striped ones if you're a speed freak) or blit it directly to vram, then turn z writes on and to the 3d stuff as normal?
(heh, im not sure what you mean by flipping buffers to do this, but thats how i would try first)

Hmm, all this talk it making me want to get back into gfx coding after taking a bit of a hiatus :)

- cheriff[/quote

What I mean is the swapping of the buffers... ie: draw 2D, swap buffers and then draw the 3D.. like you do with 2D animation (to move an object's location, etc). It sounds like your other suggestion would be cleaner and wouldn't result in the flicker that's possible the other way.

David Beyer
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Post by jsgf »

The simple thing is to just draw everything as 3D. Draw your 2D background with GU/GL, then draw everything in front of it. If you're using double buffering, then you won't get flickering regardless of how you do it.
dbeyer3069
Posts: 81
Joined: Mon Dec 19, 2005 4:09 pm

Post by dbeyer3069 »

jsgf wrote:The simple thing is to just draw everything as 3D. Draw your 2D background with GU/GL, then draw everything in front of it. If you're using double buffering, then you won't get flickering regardless of how you do it.
Thanks for the suggestions everyone.

David Beyer
Post Reply