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
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Mon Sep 21, 2009 10:39 pm
Has thanked: 0
Been thanked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by hilltopper06 »

That is looking awesome!

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

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM »

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: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bogglez »

: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: 576
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM »

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 thanked: 0
Been thanked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by hilltopper06 »

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 thanked: 0
Been thanked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by MisterDave »

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

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM »

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 thanked: 0
Been thanked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by hilltopper06 »

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

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by SiZiOUS »

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

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bogglez »

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: 132
Joined: Wed Mar 10, 2010 1:29 am
Location: Fort Worth, Texas
Has thanked: 12 times
Been thanked: 4 times

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by Anthony817 »

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: 576
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM »

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: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bogglez »

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: 576
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM »

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: 88
Joined: Wed Feb 05, 2014 5:58 am
Has thanked: 9 times
Been thanked: 3 times

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bbmario »

I'm dying to see that code. :o

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

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM »

@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: 88
Joined: Wed Feb 05, 2014 5:58 am
Has thanked: 9 times
Been thanked: 3 times

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bbmario »

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: 576
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM »

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 149 times
DATA:
data.tar.gz
(545.65 KiB) Downloaded 132 times
SCREEN:
Image
User avatar
bbmario
DCEmu Freak
DCEmu Freak
Posts: 88
Joined: Wed Feb 05, 2014 5:58 am
Has thanked: 9 times
Been thanked: 3 times

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by bbmario »

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

Re: Quake 3 lightmaps - PVR Multi-Texture

Post by PH3NOM »

Your welcome.

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