Gtk Question(s)

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Jemcdv
Posts: 83
Joined: Wed Sep 08, 2004 7:00 am

Gtk Question(s)

Post by Jemcdv »

First, a quick one: I was wondering if I can have a light dynamically move around a q3 map? Say, up and down or left and right against a wall, to follow some moving brush?

---

This second one might not be so quick.

I was hoping to try Q4 mapping. I downloaded GtkRadiant-1.5.0-2007-04-26.msi and whichever else was available at the time on the GtK website. I tried installing both to and got the same runtime errors (below) as it is loading, I don't even get as far to see the Gtk layout screen. After I get this error, Gtk crashes. I'm running this on Windows XP SP1.

1.4 works great though. So does the Q4 editor, but it's unbearable at times.
Started logging to C:/Documents and Settings/User1/Application Data/RadiantSettings/1.5.0/radiant.log
Today is: Thu May 24 16:08:50 2007
This is GtkRadiant '1.5.0' compiled Apr 26 2007
Official qeradiant.com build by namespace
SingletonModuleRef::initialise: type="VFS" version="1" name="*" - not found
.\mainframe.cpp:610
assertion failure: module system failed to initialise - see radiant.log for error messages
----------------

Stacktrace is disabled in release-builds
----------------
loading custom shortcuts list from "C:/Documents and Settings/User1/Application Data/RadiantSettings/1.5.0/q4.game/shortcuts.ini"
commands import: data version 1.0 is compatible with code version 1.0
parsed 0 custom shortcuts
.\commands.cpp:88
assertion failure: failed to lookup command "PatchInspector"
----------------

Stacktrace is disabled in release-builds
----------------
I've done google, I haven't found any real leads towards a cpp error, or runtime error like this one for Gtk. Assertion failure? :/ Any leads or ideas why this is, or where I can find more about it?
Magnus
Posts: 529
Joined: Wed Feb 16, 2005 6:38 pm

Post by Magnus »

Not sure about the second question, but on the first you might try making a shader with a param to make it emit light then just texture the moving brush with that shader and there you have a brush that moves and casts light where it moves.
Just be sure to make your script to cause the texture to emit light and not look like light is being cast onto it as well unless you want the moving brush to look that way.

Hope this helps. :)
Uh, well....good luck with that. :shrug:

[img]http://i57.photobucket.com/albums/g228/Magnus3204/forumheader.jpg[/img]
corsair
Posts: 972
Joined: Fri May 18, 2001 7:00 am

Post by corsair »

I don't believe that works Magnus, Jemcdv is talking q3 here, and afaik the light emited by a moving brush will be calculated only once, and thats with the brush in its original position - so when it moves, itself will stay lit as though it were still there and it wont cast any dynamic light.

About the second question, you don't need GTK for q4 mapping, the game comes with an editor itself - to acces it you need to make a shortcut to the quake4.executable. Then open its properties and add +editor to its target, and you're good to go.

You'll notice its quite unlike gtkradiant, but don't let yourself get scared, its quite a fine editor (if you've got a high resolution + a fit pc)

hf =)
Magnus
Posts: 529
Joined: Wed Feb 16, 2005 6:38 pm

Post by Magnus »

corsair wrote:I don't believe that works Magnus, Jemcdv is talking q3 here, and afaik the light emited by a moving brush will be calculated only once, and thats with the brush in its original position - so when it moves, itself will stay lit as though it were still there and it wont cast any dynamic light.
You are right corsair. I wasn't thinking. :p
Uh, well....good luck with that. :shrug:

[img]http://i57.photobucket.com/albums/g228/Magnus3204/forumheader.jpg[/img]
corsair
Posts: 972
Joined: Fri May 18, 2001 7:00 am

Post by corsair »

Though, I think it might be possible through using lightstyles. It's not the easiest method and its been a while since i last used them lightstyles, so I can't explain how exactly to use them. (someone else cover in for me here mby?)

The idea is this; You place a load of light entities along the path of the moving brush, and set them to fade from 1 to 0, back to 1, etc etc... Then make each of the lights do so in a different phase, and you've got something that looks like a moving light.
Magnus
Posts: 529
Joined: Wed Feb 16, 2005 6:38 pm

Post by Magnus »

I immagine a load of math going whith trying to set that up. :eek:

Nothing I have ever messed with before, but sounds interesting and effects that could be created useing that method could be prety dazziling.

It took me 6 months to finally come up with somewhat realistic lightning for a shock rocket I made and most of that was creating layers of textures the math was the small part in that effort.

Lots of work, but could be very cool.
Uh, well....good luck with that. :shrug:

[img]http://i57.photobucket.com/albums/g228/Magnus3204/forumheader.jpg[/img]
Amphetamine
Posts: 76
Joined: Fri Feb 23, 2007 5:15 am

Post by Amphetamine »

You could do it with lightstyles, I made a very carefully controlled "Runway Light" corridor for my tricks map.

You will only be able to use 4 different lightstyles in a single area. If you use others eleswhere in the level make damn sure that they are very separate, because -bounce 4 can make light travel a long way and it's a PITA when an almost invisible bounce causes another lightstyle not to light properly.

Anyway, if your platform is moving up and down and you have 4 lights in total, then there will be 6 "phases" of lighting.

O 1
O 2 6
O 3 5
O 4

Assuming starting from the top, phase 1 is your top light, phase 2 is the 2nd light on it's 1st pass, phase 3 is the 3rd light on it's 1st pass, phase 4 is the bottom light, phase 5 is the 3rd light on it's second pass and phase 6 is the 2nd light on it's 2nd pass. Then it all loops.

So, you need to figure out the timings to make lights 1 & 4 bright for 1/6 of the phases and lights 2 & 3 bright for 2/6 of the phases.

I've just had a really busy day at work, so I can't get my head around the exact timings right now, but hopefully the above should help you to get it sorted. If not, then shout me and I'll try to work it out for you.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

Performance may very possibly suck with complicated lightstyles. If the range in which the light is cast is limited, then you might be able to pull it off.

Another hack might involve creating an animated additive shader used as a projected decal entity.
Amphetamine
Posts: 76
Joined: Fri Feb 23, 2007 5:15 am

Post by Amphetamine »

obsidian wrote:Performance may very possibly suck with complicated lightstyles. If the range in which the light is cast is limited, then you might be able to pull it off.

Another hack might involve creating an animated additive shader used as a projected decal entity.
You'd only be able to get it to scroll in a single direction, not go up and down or side to side like a platform (Which is I believe what the poster wanted). I suppose that you could make a decal part of the actual platform and not project it, but then you'd need perfectly flat geometry for it to move accross.
Magnus
Posts: 529
Joined: Wed Feb 16, 2005 6:38 pm

Post by Magnus »

Would it be possible to create a decal that is also a shader? Or maybe a shader that seems to have a stationary background stage and a moving forground stage?

In the case of a shader that is also a decal you could create a huge (e.g. 1024x1024) immage with an alpha layer that has a single spot way off center that looks like a kind of bright spot and script it to revolve around the center point of the texture at a slow speed. Then set the shader as a decal on a large wall. Adjust everything so that the moving brush and the bright spot move together. Then you have the appearance of a moving brush casting light where it moves.

You would again be limited in distance and range of motion that your bright spot could move and thus your moving brush as well.

Although in the case of a shader that is stationary in back and motion in front you could make a series of shaders (maybe 1024x64) that the scripting is timed so that as the bright spot moves off the edge of one textured area it appears to move onto the surface of the next. That way you would be far less limited in distance and up down left right motion.

Just some thoughts :P
Uh, well....good luck with that. :shrug:

[img]http://i57.photobucket.com/albums/g228/Magnus3204/forumheader.jpg[/img]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

@Amphetamine: I suppose you could have two stages, each scrolling in its own direction and with oppositely phased, square waveforms for alpha. A little more difficult for bobbing objects or plats since their movement is logarithmic, not linear. Attaching the decal to the func_ object will work better though with the limitation mentioned.
Magnus wrote:Would it be possible to create a decal that is also a shader? Or maybe a shader that seems to have a stationary background stage and a moving forground stage?
Decals are shaders. Decal entities are a decal shader that is projected onto another brush. And yes, each stage of a shader are independent, so you can have stationary stages and animated stages.
Magnus wrote:In the case of a shader that is also a decal you could create a huge (e.g. 1024x1024) immage with an alpha layer that has a single spot way off center that looks like a kind of bright spot and script it to revolve around the center point of the texture at a slow speed. Then set the shader as a decal on a large wall. Adjust everything so that the moving brush and the bright spot move together. Then you have the appearance of a moving brush casting light where it moves.
That's kind of what I was getting at. Except scroll side to side rather than in a big circle.
Post Reply