<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Rendering a 3D Scene?</title>
<description> I really need some help here guys. I&amp;#039;ve been looking over tutorials, namely the NeHe tutorials and trying to cross them over from OpenGL to GX. However, I&amp;#039;m still having problems creating a 3D scene. Basically, all I want to do at this point is create:

1 Floor
1 Skybox
4 Walls

I&amp;#039;m not sure what I&amp;#039;m doing wrong. Here is my function for drawing my floor:

// Create the floor
void DrawFloor() {
GX_Begin(GX_QUADS, GX_VTXFMT1, 4);
GX_Normal3f32(0.0, 1.0, 0.0); // Normal pointing up
GX_TexCoord2f32(0.0f, 1.0f); // Bottom-left of texture
GX_Position3f32(-2.0, 0.0, 2.0); // Bottom-left corner of floor
GX_TexCoord2f32(0.0f, 0.0f); // Top-left of texture
GX_Position3f32(-2.0, 0.0, -2.0); // Top-left corner of floor
GX_TexCoord2f32(1.0f, 0.0f); // Top-right of texture
GX_Position3f32(2.0, 0.0, -2.0); // Top-right corner of floor
GX_TexCoord2f32(1.0f, 1.0f); // Bottom-right of texture
GX_Position3f32(2.0, 0.0, 2.0); // Bottom-right corner of floor
GX_End();
}

Is there an easier way to going about drawing a scene? Or do I have to do the entire scene like the above? I know there&amp;#039;s something wrong with my code above, because it&amp;#039;s not displaying on the screen. I&amp;#039;ve been at this damn 3D rendering for a few months, and I haven&amp;#039;t really gotten anywhere. Can someone point me in a better direction?

Here is a screenshot of the scene I&amp;#039;m going for: 3D Scene Screenshot

EDIT: One more question...would it be easier to create a 3D scene using something like 3DSMax, export it to something like MD2 and load from SD? If so, what would be the best format to use? MD2?</description><link>http://forum.wiibrew.org/read.php?11,20370,20370#msg-20370</link><lastBuildDate>Sat, 18 Apr 2026 21:22:48 +0200</lastBuildDate>
<generator>Phorum 5.2.23</generator>
<item>
<guid>http://forum.wiibrew.org/read.php?11,20370,22014#msg-22014</guid>
<title>Re: Rendering a 3D Scene?</title><link>http://forum.wiibrew.org/read.php?11,20370,22014#msg-22014</link><description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>lasouze</strong><br />I think, but i&#039;m not sure, Wii needed 4 GX_Normal3f32</div></blockquote><br />Correct. Wii also expects the data in the order: position, normal, texture.]]></description>
<dc:creator>Michael</dc:creator>
<category>Coding</category><pubDate>Wed, 24 Jun 2009 18:52:21 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,20370,21991#msg-21991</guid>
<title>Re: Rendering a 3D Scene?</title><link>http://forum.wiibrew.org/read.php?11,20370,21991#msg-21991</link><description><![CDATA[ @ technik - I had an older release of the src, but never compiled it. I&#039;ll download the latest and check it out. It sounded promising when I first got it, but never had the time to check it out.<br /><br />Edit: By the way, I got it compiled and starting to edit REVmain.c but had some questions. I posted a topic in the Revolution forum. Thanks for the engine technik, I think it&#039;ll work great once I figure out how to use the code.<br /><br />@ Lasouze - I&#039;ll try adding the GX_Normal3f32&#039;s in and see if that helps.<br /><br />Thanks for the help guys, starting to get frustrated.]]></description>
<dc:creator>RazorChrist</dc:creator>
<category>Coding</category><pubDate>Wed, 24 Jun 2009 16:15:53 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,20370,21988#msg-21988</guid>
<title>Re: Rendering a 3D Scene?</title><link>http://forum.wiibrew.org/read.php?11,20370,21988#msg-21988</link><description><![CDATA[ I think, but i&#039;m not sure, Wii needed 4 GX_Normal3f32<br /><br />Lasouze]]></description>
<dc:creator>lasouze</dc:creator>
<category>Coding</category><pubDate>Wed, 24 Jun 2009 15:25:20 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,20370,21974#msg-21974</guid>
<title>Re: Rendering a 3D Scene?</title><link>http://forum.wiibrew.org/read.php?11,20370,21974#msg-21974</link><description><![CDATA[ There is a library for rendering 3D scenes<br />It&#039;s still buggy and pretty basic but it works<br />It&#039;s revolution engine, you can check it <a href="http://www.revolutionengine.tk" rel="nofollow">here</a><br />it lets you creating textured objects in 3D space and playing around with them (moving, rotating, ...)<br />Version 0.4 is suposed to be released this summer, but by now you can use 0.3<br />However, if you don&#039;t want to use the library, you can check it&#039;s source code as an example on how to use GX]]></description>
<dc:creator>technik</dc:creator>
<category>Coding</category><pubDate>Wed, 24 Jun 2009 13:10:20 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,20370,20545#msg-20545</guid>
<title>Re: Rendering a 3D Scene?</title><link>http://forum.wiibrew.org/read.php?11,20370,20545#msg-20545</link><description><![CDATA[ I think you are not positionning the vertices correctly in space regarding the default camera position, making them not visible in the rendered scene.<br />I also think the order of texture coordinates and their relation to one vertice position is important... unfortunately, I always proceeded using test&retry until I got something on screen because I was not sure of GX drawing restrictions & conventions...<br /><br />If I were you I would try to first catch the difference between your code and the original one...]]></description>
<dc:creator>ekeeke</dc:creator>
<category>Coding</category><pubDate>Sat, 13 Jun 2009 18:45:59 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,20370,20502#msg-20502</guid>
<title>Re: Rendering a 3D Scene?</title><link>http://forum.wiibrew.org/read.php?11,20370,20502#msg-20502</link><description><![CDATA[ I&#039;m using NeHe&#039;s tutorials as a starting template for my code, then adding in the objects as I go. I didn&#039;t change anything of NeHe&#039;s code, just added mine in.]]></description>
<dc:creator>RazorChrist</dc:creator>
<category>Coding</category><pubDate>Sat, 13 Jun 2009 10:39:44 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,20370,20391#msg-20391</guid>
<title>Re: Rendering a 3D Scene?</title><link>http://forum.wiibrew.org/read.php?11,20370,20391#msg-20391</link><description><![CDATA[ This function is only used to render something (in that specific case, a textured quad) but you also need to setup a few things like camera position, projection matrix, viewport, etc...<br />The fact it does not display anything could be due to a lot of things: it could be the camera not configured properly, the rendered scene not copied to video output, etc... there is no way this little code snippet could help anybody to tell you what&#039;s wrong ...<br /><br />If you are already familiar with OpenGL, this should not be too difficult to use the GX functions to setup the environment, they are very similar Some of Nehe&#039;s tutorials have been also ported for libogc if that matters.<br /><br />Finally, If you want something "easier", you probably mean a library which encapsulates all these low-level GX functions into more user-friendly routines ... unfortunately, I don&#039;t think such thing exist for homebrew devs at the moment.]]></description>
<dc:creator>ekeeke</dc:creator>
<category>Coding</category><pubDate>Fri, 12 Jun 2009 17:19:22 +0200</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,20370,20370#msg-20370</guid>
<title>Rendering a 3D Scene?</title><link>http://forum.wiibrew.org/read.php?11,20370,20370#msg-20370</link><description><![CDATA[ I really need some help here guys. I&#039;ve been looking over tutorials, namely the NeHe tutorials and trying to cross them over from OpenGL to GX. However, I&#039;m still having problems creating a 3D scene. Basically, all I want to do at this point is create:<br /><br />1 Floor<br />1 Skybox<br />4 Walls<br /><br />I&#039;m not sure what I&#039;m doing wrong. Here is my function for drawing my floor:<br /><br /><pre class="bbcode">// Create the floor
void DrawFloor() {
	GX_Begin(GX_QUADS, GX_VTXFMT1, 4);
		GX_Normal3f32(0.0, 1.0, 0.0);			// Normal pointing up
		GX_TexCoord2f32(0.0f, 1.0f);			// Bottom-left of texture
		GX_Position3f32(-2.0, 0.0, 2.0);		// Bottom-left corner of floor
		GX_TexCoord2f32(0.0f, 0.0f);			// Top-left of texture
		GX_Position3f32(-2.0, 0.0, -2.0);		// Top-left corner of floor
		GX_TexCoord2f32(1.0f, 0.0f);			// Top-right of texture
		GX_Position3f32(2.0, 0.0, -2.0);		// Top-right corner of floor
		GX_TexCoord2f32(1.0f, 1.0f);			// Bottom-right of texture
		GX_Position3f32(2.0, 0.0, 2.0);			// Bottom-right corner of floor
	GX_End();
}</pre><br />Is there an easier way to going about drawing a scene? Or do I have to do the entire scene like the above? I know there&#039;s something wrong with my code above, because it&#039;s not displaying on the screen. I&#039;ve been at this damn 3D rendering for a few months, and I haven&#039;t really gotten anywhere. Can someone point me in a better direction?<br /><br />Here is a screenshot of the scene I&#039;m going for: <a href="http://www.wiibrew.org/wiki/File:Troncycles_3d_test1.png" rel="nofollow">3D Scene Screenshot</a><br /><br />EDIT: One more question...would it be easier to create a 3D scene using something like 3DSMax, export it to something like MD2 and load from SD? If so, what would be the best format to use? MD2?]]></description>
<dc:creator>RazorChrist</dc:creator>
<category>Coding</category><pubDate>Fri, 12 Jun 2009 14:51:26 +0200</pubDate></item>
</channel>
</rss>