Initial work for loading 3D models with Ruby

Got a perspective 3D camera working with 3D models rendering. Here’s what the source looks like (gist contains demo videos of loading Mario from Mario 64, Cloud Strife from FFVII, and the Arwing from Starfox 64): DragonRuby Game Toolkit: Loading an OBJ file and rendering triangles. · GitHub

The code demonstrates the following:
1. Usage of matrix math for transforming, rotating, and scaling points.
2. Logic for converting triangles in three-dimensional space to perspective 2D.
3. “Mouse Look” camera logic.
4. Parsing an OBJ file (representing a 3D model).

Thoughts/feedback?

···

Sent from my iPhone

Sent from my iPhone

It looks good, 3D stuff can get verbose very quickly. Perhaps move some of
those magic numbers out into constants (near = 3000.0 for example) to make
adjustment easier in the future. Nothing big

Onward with back (hidden) surface culling and colouring / texturing :slight_smile:

···

On Mon, 18 Apr 2022 at 01:32, Amir Rajan <ar@amirrajan.net> wrote:

Got a perspective 3D camera working with 3D models rendering. Here’s what
the source looks like (gist contains demo videos of loading Mario from
Mario 64, Cloud Strife from FFVII, and the Arwing from Starfox 64):
DragonRuby Game Toolkit: Loading an OBJ file and rendering triangles. · GitHub

The code demonstrates the following:
1. Usage of matrix math for transforming, rotating, and scaling points.
2. Logic for converting triangles in three-dimensional space to
perspective 2D.
3. “Mouse Look” camera logic.
4. Parsing an OBJ file (representing a 3D model).

Thoughts/feedback?

Sent from my iPhone

Sent from my iPhone

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<ruby-talk list: member options login page>

Thanks for the feedback! And yes materials/texture vertices and normal maps
(for lighting) are next on the list :slight_smile:

A live-reloaded Quake I demo stage (written in pure Ruby) is the goal. Long
way to go

···

On Mon, Apr 18, 2022 at 3:02 AM Peter Hickman < peterhickman386@googlemail.com> wrote:

It looks good, 3D stuff can get verbose very quickly. Perhaps move some of
those magic numbers out into constants (near = 3000.0 for example) to
make adjustment easier in the future. Nothing big

Onward with back (hidden) surface culling and colouring / texturing :slight_smile:

On Mon, 18 Apr 2022 at 01:32, Amir Rajan <ar@amirrajan.net> wrote:

Got a perspective 3D camera working with 3D models rendering. Here’s what
the source looks like (gist contains demo videos of loading Mario from
Mario 64, Cloud Strife from FFVII, and the Arwing from Starfox 64):
DragonRuby Game Toolkit: Loading an OBJ file and rendering triangles. · GitHub

The code demonstrates the following:
1. Usage of matrix math for transforming, rotating, and scaling points.
2. Logic for converting triangles in three-dimensional space to
perspective 2D.
3. “Mouse Look” camera logic.
4. Parsing an OBJ file (representing a 3D model).

Thoughts/feedback?

Sent from my iPhone

Sent from my iPhone

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<ruby-talk list: member options login page>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<ruby-talk list: member options login page>

--

* Amir Rajan
** PS
I welcome VSRE emails. Learn more at http://vsre.info/.
** PPS
I reply to every legitimate email I get. So, if you don't hear from me
within a week. Email me again since there's a high chance that the email
got lost in my inbox.