Isometric camera

Discuss programming topics for the various GPL'd game engine sources.
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Isometric camera

Post by Mexicouger »

I followed the Custom chase cam tutorials. They are great and all, And I am trying to go for the isometric look. However, when I add chase_back, The camera doesn't do what I am looking for. All I want to do is an Isometric camera. Any ideas?
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

I'm assuming you mean with the camera at a fixed distance and angle behind the player looking slightly down that rotates with the view and doesn't do any traceline checking for a collision point.

There is enough infos in this thread to do that, I believe:

http://forums.inside3d.com/viewtopic.php?t=1158

Now this will probably be slightly wrong since I don't have time to test this nor a way to conveniently test this, but my initial thoughts ...

Here is the code from frag.machine for where the chase_active = 2 scenario ...

Code: Select all

{
        chase_dest[0] = r_refdef.vieworg[0] + chase_back.value;
        chase_dest[1] = r_refdef.vieworg[1] + chase_right.value;
        chase_dest[2] = r_refdef.vieworg[2] + chase_up.value;

        // this is from the chasecam fix - start
        TraceLine (r_refdef.vieworg, chase_dest, stop);     
        if (Length (stop) != 0)
        {
            VectorCopy (stop, chase_dest);
        }
        // this is from the chasecam fix - end

        VectorCopy (chase_dest, r_refdef.vieworg);
        r_refdef.viewangles[ROLL] = chase_roll.value;
        r_refdef.viewangles[YAW] = chase_yaw.value;
        r_refdef.viewangles[PITCH] = chase_pitch.value;
    }
Now you want static pitch (never changes), static position relative to player (never changes) and .... ergh ... I'm thinking you want static roll.

So you only want yaw to change.

So ...

Code: Select all

{
        chase_dest[0] = r_refdef.vieworg[0] + chase_back.value;
        chase_dest[1] = r_refdef.vieworg[1] + chase_right.value;
        chase_dest[2] = r_refdef.vieworg[2] + chase_up.value;

// Baker says no ...
// Cause you don't want the traceline to check for walls and alter the chase camera position based on the collision, as isometric should be an equivalent distance at all times
#if 0
        // this is from the chasecam fix - start
        TraceLine (r_refdef.vieworg, chase_dest, stop);     
        if (Length (stop) != 0)
        {
            VectorCopy (stop, chase_dest);
        }
        // this is from the chasecam fix - end
#endif
// End Baker says no

        VectorCopy (chase_dest, r_refdef.vieworg);
        r_refdef.viewangles[ROLL] = chase_roll.value;
// Baker says no start
// We want the camera to be in sync with overhead angle the player is facing
#if 0
        r_refdef.viewangles[YAW] = chase_yaw.value;
#endif
// Baker says no end
        r_refdef.viewangles[PITCH] = chase_pitch.value;
    }
The above should do the trick, giving you a camera at a fixed position specified by chase_up/_right/_back/_roll/_pitch but flexible yaw that will NOT clip against walls or ceilings.

So put the camera some arbitrary distance above the player like 150 and make sure that no map objects are above that in your maps otherwise the camera will be in the ceiling/wall/whatever. Also make sure that your chase_back has clearance in your map design.

And of course use cvar settings like:
chase_right -160
chase_back -160
chase_up 200
chase_roll 0
chase_pitch 45
Isn't that tutorial frag.machine pure awesomeness? Hehe :D
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Post by Mexicouger »

It is great! I just wish there was a patch to guard against clipping objects. Any work arounds for that?
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Mexicouger wrote:It is great! I just wish there was a patch to guard against clipping objects. Any work arounds for that?
Level design.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Error
InsideQC Staff
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA
Contact:

Post by Error »

Krimzon made a isometric engine mod and released it during one of the QExpos I believe.
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Post by Mexicouger »

Do you know the name of the Mod? I will have to take a look at the source code. I Like Top-Down, but I feel very limited. I need to adjust I suppose
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Just make your map like this:

http://www.youtube.com/watch?v=4FTQ4I5FRys

If you want an isometric camera, make the map in a way that supports the camera. Don't make the walls higher than 64 units high, place the camera 128 units above the player. It is not hard. I mean if you don't want the camera to poke into stuff for a map designed for such a camera, make the map specifically for the camera.

If you are making a mod with an isometric camera in mind and the map you made is causing the camera to poke into the walls then ...

Image

On anohter note, the mod Error mentioned by Krimzon ...

Image


http://qexpo2005.quakedev.com/booths.php?id=31
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Post by Mexicouger »

And by the way Baker, This tut didn't do anything :/
The code basically made me in fps view
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

when using csqc in either fte or dp, there is a special view property flag which can be set, which forces a true isometric projection matrix. It could be a really basic csqc mod with just one line added, no need for csqc ents.
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Post by Mexicouger »

Well I decided to make my mod Top-Down after all. We thought it all out, and the possibilities are very good.

Just out of curiosity, are any of you guys interested in Top-Down style games anymore? Or are those out of style now. I keep getting people saying that Top-Down style games suck, and it is really discouraging. I want to show the PSP community another aspect of Quake mods, and maybe others in this genre will open up, Knowing what is possible.
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

depends whats your mod all about see some work and gameplay. thats all that matters. id play a top down.
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Post by Mexicouger »

ceriux wrote:depends whats your mod all about see some work and gameplay. thats all that matters. id play a top down.
well it is a Halo Top-Down mod. And Everone but a few seemed to complain about the Idea. All I can tell them is, sit back and enjoy the ride. I just imagine that the mod will look pretty, but Let's see.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Mexicouger wrote:And by the way Baker, This tut didn't do anything :/
The code basically made me in fps view
I'm rather skeptical of your claim and think it is more likely you not understanding what I am suggesting above or how it relates to frag.machine's chase_active 2 tutorial.

I'm just saying ...
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

hmm if your going halo do your best to do that isometric thing in my oppinion. also go single player / coop or something...
Mexicouger
Posts: 514
Joined: Sat May 01, 2010 10:12 pm
Contact:

Post by Mexicouger »

ceriux wrote:hmm if your going halo do your best to do that isometric thing in my oppinion. also go single player / coop or something...
Well, we are going Top-Down, Not Isometric. We can save alot more memory if we go Top-down(Deleting unseen Triangles). We have big shoes to fill, and do have several plans for game modes. I don't want to tell the public something that I doubt I can do. We have a Basic Firefight coded now, and Next is Survival. And, Depening on how our 3rd person weapon system goes, we may allow the player to choose between a spartan or elite for Slayer(Only).

Plans for Campaign/coop are happening. It should be simpler to make the maps. Chances are, we are going to have a little spartan team that you will fight along, and in Firefight, get Marine allies.

May seem like a fantasy to some, But I feel that I can do it all.

And Baker, I get what you were trying to say now, after I overlooked the code. I viewed this as a quick tut. My bad. :?

And here is the Camera I used. This is my own little Kurok engine that I work on. I created a Slider to adjust the camera Height. :D

http://www.moddb.com/games/halo-revampe ... own-camera
Post Reply