Quake 3 lightmaps - PVR Multi-Texture

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
User avatar
hilltopper06
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 26
Joined: Mon Sep 21, 2009 10:39 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by hilltopper06 » Wed May 06, 2015 8:52 am

That is looking awesome!

Any chance you can upload some more video footage? Thanks!
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM » Thu May 07, 2015 10:47 pm

Thanks for following!

I can not upload a video due to bandwidth ( on mobile data for the next few days ), but I will when I am back on fullspeed.

However, some good progress has been made with instancing animated models

Image
User avatar
bogglez
Moderator
Moderator
Posts: 576
Joined: Sun Apr 20, 2014 9:45 am
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bogglez » Fri May 08, 2015 4:23 pm

:o :o :o

I'm swamped with university projects lately, you really make me hope to get back to DC dev right now!
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM » Sat May 09, 2015 9:15 pm

I know the feeling, school comes before DC projects!

Anyhow, I've implemented a simple HUD system in my engine, right now it is using custom sprites for Counter-Strike...
Image

Also, I have refined the Flashlight effect a bit...
Image

Player->World Collision is done, the next step for me is to add Player->Player Collision for projectiles, so we can shoot these mofo's
Image
User avatar
hilltopper06
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 26
Joined: Mon Sep 21, 2009 10:39 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by hilltopper06 » Mon May 11, 2015 9:06 am

Amazing stuff. You are really showing how powerful your API can be.
User avatar
MisterDave
DCEmu Freak
DCEmu Freak
Posts: 58
Joined: Mon Apr 08, 2013 1:16 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by MisterDave » Mon May 11, 2015 12:11 pm

Fantastic work. You are pushing this project quite far.
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM » Tue May 12, 2015 8:35 pm

Thanks for the encouragement guys!

MisterDave - dont be afraid to share your DC projects here as well!

Hilltopper06 - Here is a vid to show the current state of things.


The Flash Light still needs some refining, and the HUD transparency needs some tweaking, but other than that, I am quite happy with this build.
I could go into detail, but simply put, things can still be optimized even further when need be.
User avatar
hilltopper06
DCEmu Crazy Poster
DCEmu Crazy Poster
Posts: 26
Joined: Mon Sep 21, 2009 10:39 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by hilltopper06 » Wed May 13, 2015 3:06 pm

Very nice! Keep up the great work and keep us updated!
User avatar
SiZiOUS
DC Developer
DC Developer
Posts: 386
Joined: Fri Mar 05, 2004 2:22 pm
Location: France
Has liked: 13 times
Been liked: 10 times
Contact:

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by SiZiOUS » Wed May 20, 2015 2:43 am

PH3NOM, keep up the good work! :)
User avatar
bogglez
Moderator
Moderator
Posts: 576
Joined: Sun Apr 20, 2014 9:45 am
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bogglez » Wed May 20, 2015 3:58 am

How did you implement mesh animation? Keyframe based I guess?
I was browsing the extension registry lately and found this skeletal animation extension, if you're interested in that:
https://www.opengl.org/registry/specs/A ... alette.txt
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
Anthony817
Insane DCEmu
Insane DCEmu
Posts: 129
Joined: Wed Mar 10, 2010 1:29 am
Location: Fort Worth, Texas
Has liked: 10 times
Been liked: 3 times

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by Anthony817 » Thu May 21, 2015 5:35 pm

Damn, everything you work on is gold. Nice job man this is shaping up to be quite the competition for an homebrew FPS engine that looks better than Half-Life.

I know you said you have commercial plans later on, but do you think you could release a simple open source version of the engine sometime after you make your game so others might be able to make homebrew FPS games?
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM » Fri May 22, 2015 8:56 pm

Thanks for the encouragement guys!

@bogglez-
Yes, the current model format is using key frame animation.
The modelview matrix palette is an interesting idea, but for this format the transforms are per-vertex, thus a huge number of unique matrices would be required, making this extension unfeasible. Currently, the transformations are being computed each frame per-vertex to avoid memory consumption.

@Anthony817-
I dont want to get ahead of myself. For now, just imagine the possibilities :P

Last night, I uploaded a video to utube.
The build features the ability to fire the weapon, including bullet decals where the bullet hits something.
Weapon Sprites and Sound Effects are also implemented.


Today I have taken things a step further, and implemented Collision Detection for Bullets ( or Rays ) against Enemy Models.
This Screenshot is a dev build that actually renders the Model Bounding Boxes, for visual confirmation.
Image
User avatar
bogglez
Moderator
Moderator
Posts: 576
Joined: Sun Apr 20, 2014 9:45 am
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bogglez » Sat May 23, 2015 4:34 am

PH3NOM wrote:Thanks for the encouragement guys!

@bogglez-
Yes, the current model format is using key frame animation.
The modelview matrix palette is an interesting idea, but for this format the transforms are per-vertex, thus a huge number of unique matrices would be required, making this extension unfeasible. Currently, the transformations are being computed each frame per-vertex to avoid memory consumption.
No, that's not how it works. You specify an array of M matrices (may be a large number), but each vertex can have only N indices and weights (on the DC probably N=2 or 3).
Instead of multiplying each vertex by 1 transformation matrix you now multiply by N matrices and average the result.
I saw a slide for the game Shadowman where it was written that they're using skeletal animation like this. I do have to say that game doesn't look too great though. The animations are bad, so they don't make great use of the skeleton and the rest of the graphics looks poor.. maybe this computation is still too expensive.

EDIT:
actually I just realized that the extension it is derived from is much more suitable for the Dreamcast:
https://www.opengl.org/registry/specs/A ... _blend.txt

It's the same thing without matrix indices. So you would bind 2-3 matrices, pass 2-3 weights per vertex and vertex i belongs to matrix i.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM » Mon May 25, 2015 9:52 pm

I have written bullet collision detection code for the engine, based on rays.

This is a large BSP from True Combat Quake 3 Total Conversion.

The Light Map render is currently using a 2 pass approach, and I should be able to increase the speed even on this large BSP.
But for now a quick video:
User avatar
bbmario
DCEmu Freak
DCEmu Freak
Posts: 69
Joined: Wed Feb 05, 2014 5:58 am
Has liked: 1 time
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bbmario » Sat Jun 13, 2015 11:28 am

I'm dying to see that code. :o

Do you plan on releasing the BSP loader?
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM » Sun Jun 28, 2015 8:22 pm

@bbmario -
Right now, I am still at work on my Q3 engine and it is currently closed-source.
However, I can release an older build of my source that is render-only using OpenGL DC, if that is of interest.

Some more progress on my engine, 2 players are now fully supported including animated model render, light map rendering, collision detection, etc.

Image

Image
User avatar
bbmario
DCEmu Freak
DCEmu Freak
Posts: 69
Joined: Wed Feb 05, 2014 5:58 am
Has liked: 1 time
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bbmario » Mon Jun 29, 2015 10:04 am

Yes, that would be great. I'm interested in learning more about what OpenGL DC is capable of, and loading Q3 BSP is a great way to learn more about it.
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM » Mon Jun 29, 2015 9:15 pm

Alright man, here is an older build using OpenGL DC Multi-Texture.
This code is a stripped-down, render only build for multi-texture surfaces. Collision Detection code is not included, nor is the PVS system.
That said, this should give you a good idea of how the basic 3D render pipeline works.

SRC:
dce-q3-gl-alpha-src.tar.gz
(26.79 KiB) Downloaded 97 times
DATA:
data.tar.gz
(545.65 KiB) Downloaded 92 times
SCREEN:
Image
User avatar
bbmario
DCEmu Freak
DCEmu Freak
Posts: 69
Joined: Wed Feb 05, 2014 5:58 am
Has liked: 1 time
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bbmario » Tue Jun 30, 2015 8:30 am

Thank you! That's really useful. :)
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 574
Joined: Fri Jun 18, 2010 9:29 pm
Has liked: 0
Been liked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM » Fri Jul 03, 2015 10:49 pm

Your welcome.

Here is the latest build, featuring 2 Player mode.
Post Reply