Nasty block on Cameratexture.

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Firewolf
Posts: 256
Joined: Fri Jul 28, 2006 12:08 pm
Location: Alaska

Nasty block on Cameratexture.

Post by Firewolf »

I've been playing with camera textures recently and keep getting a fairly nasty gray block when drawn on anything. (In this case, the hud with hudmessage)
I recall seeing a post about this, but I can't find it.
Spoiler:
Any help will be appreciated. Thanks.
User avatar
Enjay
 
 
Posts: 27001
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Nasty block on Cameratexture.

Post by Enjay »

A camera texture requires a few elements to be done correctly together. Without seeing your file, or getting more detail, it's hard to track down the problem.
User avatar
Firewolf
Posts: 256
Joined: Fri Jul 28, 2006 12:08 pm
Location: Alaska

Re: Nasty block on Cameratexture.

Post by Firewolf »

Enjay wrote:A camera texture requires a few elements to be done correctly together. Without seeing your file, or getting more detail, it's hard to track down the problem.
I can do that, give me a minute to isolate said resources so I don't throw the whole wad at you.
In the meantime, I'm using a 1024 x 768 camera texture to cover the entire players screen through Hudmessage. The designated camera being another player.
I've got all the scripts setup correctly, and the texture DOES work, if it weren't for that nasty box in the corner and a good bottom of the Camera appears to be missing. (In resolutions lower then 1024 x 768, the texture gets silly.)

Here, wad file goodness: http://files.filefront.com/CamErrorwad/ ... einfo.html
User avatar
Enjay
 
 
Posts: 27001
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Nasty block on Cameratexture.

Post by Enjay »

Well, I have to admit, I'm stumped. I've tried a whole bunch of things and can't get the effect that you want. If I remove the script that sets the camera texture to P1CAM, then the right half of my screen is filled with that funny pink colour. This is what I would expect because an uninitialised camera texture is half black on the left and pink on the right. So, the uninitialised texture is showing up in the right place. If I put a 1024x768 graphic into the WAD and remove the ANIMDEFS, then the graphic shows up correctly positioned. However, if I put it all back together, the view that I get on screen is in the wrong place and has some of the pink colour that I would associate with an uninitialised cam texture. If I mess with my screen resolutions the position of the camera view changes, as it also does if I mess with the resolutions defined in ANIMDEFS. If I mess with the HUDMESSAGE instruction, I can get the effect to move but I can't get it to move where I want it to. I also tried using a traditional camera instead of the camera baron but the results were the same. The view on screen is almost like it is drawing an uninitialised cam texture on screen, then drawing the camera view in the wrong placs on top of it.

So, short version, I don't know what is going on here. :(

[edit] Doh! Everything that I tried was in GZdoom. I just tried in Zdoom (both the last official build and the latest SVN build (r1424M) and the effect that you want seemed to work. ie, my whole view was taken over by the view from the baron. It looks like this could be a GZdoom problem, assuming that you are using GZdoom too. Perhaps Graf can shed some light on this. If he doesn't spot this thread, I suggest reporting it as a GZdoom bug over at the DRD forum.

As an aside, the latest SVN version of GZdoom (r300) slowed down significantly when the camera texture was active but the slowdown was far less in 1.1.6 official.

Just for info, here's what the effect looked like in GZdoom running at 640x480 (I replaced the missing textures with BSTONE).

Image

[/edit]
User avatar
Enjay
 
 
Posts: 27001
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Nasty block on Cameratexture.

Post by Enjay »

Because this thread highlights something else that I've been noticing recently, I've put a bug report about my issue in the DRD forum and linked back to here.

http://forum.drdteam.org/viewtopic.php?p=34937
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Nasty block on Cameratexture.

Post by Graf Zahl »

You can not use camera textures that are larger than the screen. At the time I wrote the code there was no decent way to set up secondary render buffers in OpenGL and it just renders to the screen buffer and then reads its contents into a texture buffer.
User avatar
Enjay
 
 
Posts: 27001
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Nasty block on Cameratexture.

Post by Enjay »

Aha! Setting all the relevant numbers to use 320x240 does indeed allow the effect to work (though not as hi-res, obviously). I thought that I'd already tried that. Apparently not. :?
Locked

Return to “Editing (Archive)”