GU 3D object drawing program?

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

Moderators: cheriff, TyRaNiD

Post Reply
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

GU 3D object drawing program?

Post by Art »

Hi Guys,
Does anyone know of a program that will let you draw a graphic object,
and then auto generate structures like this to use in a GU program?

Code: Select all

Vertex __attribute__((aligned(16))) cube[3*12] = 
{
	{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ),-1.0f, 1.0f,-1.0f },	// Top
	{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ), 1.0f, 1.0f,-1.0f },
	{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ),-1.0f, 1.0f, 1.0f },
 
	{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ),-1.0f, 1.0f, 1.0f },
	{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ), 1.0f, 1.0f,-1.0f },
	{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ), 1.0f, 1.0f, 1.0f },
 
	{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ),-1.0f,-1.0f, 1.0f },	// Bottom
	{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ), 1.0f,-1.0f, 1.0f },
	{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ),-1.0f,-1.0f,-1.0f },
 
	{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ),-1.0f,-1.0f,-1.0f },
	{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ), 1.0f,-1.0f, 1.0f },
	{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ), 1.0f,-1.0f,-1.0f },
 
	{ GU_COLOR( 1.0f, 0.0f, 0.0f, 0.0f ),-1.0f, 1.0f, 1.0f },	// Front
	{ GU_COLOR( 1.0f, 0.0f, 0.0f, 0.0f ), 1.0f, 1.0f, 1.0f },
	{ GU_COLOR( 1.0f, 0.0f, 0.0f, 0.0f ),-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, 1.0f },
 
	{ GU_COLOR( 1.0f, 0.0f, 1.0f, 0.0f ), 1.0f,-1.0f, 1.0f },
	{ GU_COLOR( 1.0f, 0.0f, 1.0f, 0.0f ), 1.0f, 1.0f,-1.0f },
	{ GU_COLOR( 1.0f, 0.0f, 1.0f, 0.0f ), 1.0f,-1.0f,-1.0f }
 
};
Cheers, Art.
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

I do not think that this exists yet, but you could probably code it up in a scripting language :) However, it would be better to use a model loader ;)
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

Hello again :)

Well thanks for the reply. I would have thought someone would do a Windows program for it.

I wonder why noone uses a 3D font this way? like this:
http://www.youtube.com/watch?v=XQfMWIoYyRI
http://www.youtube.com/watch?v=DqMcCRgZi_k
I think idealy, each letter would be it's own object, spinning on it's own and zeroed to centre.
Art.
be2003
Posts: 144
Joined: Thu Apr 20, 2006 2:46 pm

Post by be2003 »

Art wrote:Hello again :)

Well thanks for the reply. I would have thought someone would do a Windows program for it.

I wonder why noone uses a 3D font this way? like this:
http://www.youtube.com/watch?v=XQfMWIoYyRI
http://www.youtube.com/watch?v=DqMcCRgZi_k
I think idealy, each letter would be it's own object, spinning on it's own and zeroed to centre.
Art.
im guessing those are just 2 triangles per letter with transparent letters set as the textures

i might implement that into my new engine after i tackle collision detection and custom bsp... blah

very good idea though
- be2003
blog
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

No they're drawn properly, the "A" has about 14 triangles
and another 14 at the back :)
be2003
Posts: 144
Joined: Thu Apr 20, 2006 2:46 pm

Post by be2003 »

oh ouch
i imagine it would be a wonderful pain to try to draw intricate fonts...

it looks like some n64 games implement that, i wanna say mario kart but i am not for sure
- be2003
blog
Post Reply