forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GU 3D object drawing program?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Mon Jun 25, 2007 9:15 pm    Post subject: GU 3D object drawing program? Reply with quote

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:

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 ),-1.0f,-1.0f, 1.0f },
 
   { 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 ), 1.0f, 1.0f, 1.0f },
   { GU_COLOR( 1.0f, 0.0f, 0.0f, 0.0f ), 1.0f,-1.0f, 1.0f },
 
   { GU_COLOR( 1.0f, 1.0f, 0.0f, 0.0f ),-1.0f,-1.0f,-1.0f },   // Back
   { GU_COLOR( 1.0f, 1.0f, 1.0f, 0.0f ), 1.0f,-1.0f,-1.0f },
   { GU_COLOR( 1.0f, 1.0f, 1.0f, 0.0f ),-1.0f, 1.0f,-1.0f },
 
   { GU_COLOR( 1.0f, 1.0f, 1.0f, 0.0f ),-1.0f, 1.0f,-1.0f },
   { GU_COLOR( 1.0f, 1.0f, 1.0f, 0.0f ), 1.0f,-1.0f,-1.0f },
   { GU_COLOR( 1.0f, 1.0f, 1.0f, 0.0f ), 1.0f, 1.0f,-1.0f },
 
   { GU_COLOR( 0.0f, 0.0f, 1.0f, 0.0f ),-1.0f, 1.0f,-1.0f },   // Left
   { GU_COLOR( 0.0f, 0.0f, 1.0f, 0.0f ),-1.0f, 1.0f, 1.0f },
   { GU_COLOR( 0.0f, 0.0f, 1.0f, 0.0f ),-1.0f,-1.0f,-1.0f },
 
   { GU_COLOR( 0.0f, 0.0f, 1.0f, 0.0f ),-1.0f,-1.0f,-1.0f },
   { GU_COLOR( 0.0f, 0.0f, 1.0f, 0.0f ),-1.0f, 1.0f, 1.0f },
   { GU_COLOR( 0.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 },   // Right
   { 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 },
   { 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.
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Tue Jun 26, 2007 1:02 am    Post subject: Reply with quote

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 ;)
Back to top
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Tue Jun 26, 2007 2:11 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
be2003



Joined: 20 Apr 2006
Posts: 144

PostPosted: Tue Jun 26, 2007 4:55 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Tue Jun 26, 2007 5:03 pm    Post subject: Reply with quote

No they're drawn properly, the "A" has about 14 triangles
and another 14 at the back :)
Back to top
View user's profile Send private message
be2003



Joined: 20 Apr 2006
Posts: 144

PostPosted: Tue Jun 26, 2007 6:47 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group