Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, 1 invisible), 584 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: Sky flag for camera-independent images [Re: lyingmime] #125804
08/03/07 17:54
08/03/07 17:54
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I only need one view and to render it one time.

Thats the purpose of the shader. It draws the models with that background image.

Basically: I'm just changing the skin of the model to match the background image


The depth info is already there. It's very easy and works quite well. The only problem I have now is that I'm a horrible level designer

but seriously, the only problem I've run into is aligning the image with screen coords. This would't be a problem, if it weren't dependent on camera arc and resolution.

The image needs to be aligned depending on the screen resolution and camera arc. While the resolution should be an easy [linear] equation, camera arc is quadratic, and through graphing has a noticable curve... I've got to remember how to find the formula, and get more statistics...


xXxGuitar511
- Programmer
Re: Sky flag for camera-independent images [Re: xXxGuitar511] #125805
08/04/07 02:36
08/04/07 02:36
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline OP

Senior Expert
Orange Brat  Offline OP

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
Quote:

Of course, camera-independent sky entities or very precisely scaled sprites get around the problem entirely by virtue of being in the level and having transparency channels.




Yes, scaled sprites are the best way to handle objects the player can walk behind, but if there are a lot of them and a lot of screens to design, it can become very tedious. This was the primary reason for the feature request of this thread.

Quote:

The image needs to be aligned depending on the screen resolution and camera arc.




Almost every 2.5D game uses a single resolution so you don't have to worry about multiple renders. The new standard is 1024x768, and the old standard (and one that is still used in a lot of commercial adventures) is 800x600.


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Sky flag for camera-independent images [Re: Orange Brat] #125806
08/04/07 04:56
08/04/07 04:56
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Quote:

but seriously, the only problem I've run into is aligning the image with screen coords. This would't be a problem, if it weren't dependent on camera arc and resolution.


in our shader conversation we've been having, you may have missed it but i edited one of my posts saying i was no longer having aspect issues if the second camera was changed after the camera (or perhaps wait a frame after game start and then do it).

basically the matrix works fantastically.Code:
float4x4 matTexTrans = {
0.5f, 0.f, 0.f, 0.f,
0.f, -0.5f, 0.f, 0.f,
0.f, 0.f, 1.f, 0.f,
0.5f, 0.5f, 0.f, 1.f
}


if you only use one view and render a background image over it, it'll automatically handle different arc, aspect, and resolution.

i hope this is helpful

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: Sky flag for camera-independent images [Re: JibbSmart] #125807
08/05/07 01:20
08/05/07 01:20
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I must have missed that part...

Where/which coords do I multiply by the texture matrix though?


xXxGuitar511
- Programmer
Re: Sky flag for camera-independent images [Re: xXxGuitar511] #125808
08/05/07 01:44
08/05/07 01:44
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
matOutTex = mul(matWorldViewProj,matTexTrans); // this creates a matrix...
OutPosTex = mul(InPos,matOutTex); // that converts the In.Position into appropriate coordinates for tex2Dproj to use in your PS.

julz

PS: i added your band on myspace


Formerly known as JulzMighty.
I made KarBOOM!
Re: Sky flag for camera-independent images [Re: JibbSmart] #125809
08/05/07 02:21
08/05/07 02:21
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
lol, thanks Julz. I'll make sure I confirm the add... You like the music? It's not so much of a band anymore, just me...

Also, thanks for the matrix info. I'll have to try it out. Right now I'm busy with a paid project, so my 2.5D game is on pause... or should I say freeze_mode = 3;


xXxGuitar511
- Programmer
Re: Sky flag for camera-independent images [Re: xXxGuitar511] #125810
08/08/07 02:25
08/08/07 02:25
Joined: Sep 2005
Posts: 96
L
lyingmime Offline
Junior Member
lyingmime  Offline
Junior Member
L

Joined: Sep 2005
Posts: 96
guitar, if I'm understanding correctly, your shader doesn't help with what I'm trying to do. My game concept hinges on using external scene elements---scans of hand-drawn images, digital paintings, or renders from other 3D software.

Using a render from a view, I am assuming that you are using depth information from the view to determine when an entity should be 'covered' by the view image. If this were modified such that a user-entered depth were assigned to the image and the image could be loaded from bmap, that would be a start. However, there would still be no system to manage animations. Perhaps a media stream could be assigned to the bmap that is passed to the shader? Otherwise, one would have to create a system to do what sprites or media streams already do to display animation.

Re: Sky flag for camera-independent images [Re: lyingmime] #125811
08/08/07 19:18
08/08/07 19:18
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Adding an animation stream is nothing...

As I've said a million times before, it's not rendering in the background of the level, it's rendering onto thye level geometry, so the depth info is already there.

It's simply like changing the skin of the entity to match a background image

You can use whatever method you want for the BG image. I'm rendering a high quality version of the level, and then saving it to a TGA. Then the level is set to low quality and draws the old image.

It would be possible to input the depth I suppose. Such as writing the depth factor to the alpha channel. But then the case of rendering the depth properly becomes a problem...


xXxGuitar511
- Programmer
Re: Sky flag for camera-independent images [Re: xXxGuitar511] #125812
08/09/07 15:08
08/09/07 15:08
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline OP

Senior Expert
Orange Brat  Offline OP

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
If you're technique works well and accomplishes the goals set forth in this thread, then I'd be willing to purchase your 2.5D kit (and provided I'm satisfied with the end result of course). You mentioned you might sell it cheap either in this thread or the other one. If it works on blocks, then that would be ideal. Given there's no updating of the level and it's simply taking a snapshot, the slow nature of shaders on non-model blocks shouldn't matter


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Sky flag for camera-independent images [Re: Orange Brat] #125813
08/10/07 17:45
08/10/07 17:45
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I wouldn't recommend usinbg it on blocks, but it would work...

I'm working on a racing project with a small team for now, so all development of my project is on hold (I hvan't touched it in a week).

If I can find time to work on the shader, then I'll clean it up and send it yo you (OB). You can mess with it freely...

I just want credit for my work/time


xXxGuitar511
- Programmer
Page 3 of 4 1 2 3 4

Moderated by  aztec, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1