Forum

Fog in DP / DP extensions

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Fog in DP / DP extensions

Postby CocoT » Mon Oct 30, 2006 9:40 pm

Two little questions for you :)

1) For some reason, I seem to be unable to enable (sorry for the redundancy) fog in Darkplaces. It used to work fine and now, well, it doesn't. I use the "fog" command, by the way. Any suggestion as to why it could suddenly stop working. I have installed a clean copy of quake with a new version of DP and it still doesn't work...

2) Newbie alert... How exactly do you use the DP extensions? I found for example the following:

//DP_TE_SPARK
//idea: LordHavoc
//darkplaces implementation: LordHavoc
//builtin definitions:
void(vector org, vector vel, float howmany) te_spark = #411;
//temp entity definitions:
//float TE_SPARK = 51;
//protocol:
//vector origin
//byte xvelocity (-128 to 127)
//byte yvelocity (-128 to 127)
//byte zvelocity (-128 to 127)
//byte count (number of sparks)
//description:
//creates a shower of sparks and a smoke puff.

I'd like to create an entity that has smoke coming out of it... Is that the part I should look at? Is there an easy way to implement it into QC and have an entity attached to it?

Thanks in advance! :)
User avatar
CocoT
 
Posts: 695
Joined: Tue Dec 14, 2004 5:39 pm
Location: Belly-Gum

Postby Sajt » Tue Oct 31, 2006 12:32 am

Not sure about the fog...

The te effects aren't very good for constant effects, spamming them every 0.1 seconds is possible but blegh.

Looking for an EF_ flag is what you want. Though I don't think DP has an EF_ smoke. Maybe you could find what the DP field is called that overrides the model flags and add a grenade smoketrail.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby shadowtails » Tue Oct 31, 2006 5:24 am

Is there some way how to active fog in Q3a maps?
Example: When i load in darkplaces q3tourney with klesk the fog has got white texture.How can i enable it just normal fogin Q3a?
shadowtails
 
Posts: 11
Joined: Sun Jul 30, 2006 7:16 am

Postby Sajt » Tue Oct 31, 2006 8:53 am

Don't think Darkplaces has support for the volumetric fog.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby CocoT » Tue Oct 31, 2006 10:00 am

Oh yeah, a grenade smoketrail, that's a good idea :)

As for the fog, I wasn't thinking volumetric, but plain all-through-the-level fog. I don't understand what's wrong with my comp :/
User avatar
CocoT
 
Posts: 695
Joined: Tue Dec 14, 2004 5:39 pm
Location: Belly-Gum

Postby Sajt » Wed Nov 01, 2006 1:26 am

Fog works for me. Maybe you have an old build? Latest: http://icculus.org/twilight/darkplaces/ ... 3beta1.zip

Maybe you're giving a wacky setting in the console... 'fog 0.025 1 1 1' seems to show up well.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby CocoT » Wed Nov 01, 2006 10:51 am

Nope... I tried that and it still doesn't work. I tried on a totally clean install of Quake, and it didn't work either... Then I tried in nexuiz and it didn't work either... weird, uh?
Could it have something to do with the way my graphic card is configured? Fog used to work fine the last time I tried, no more than two or three months ago! I'm perplexed (/me makes a Jim-from-the-Office-is-perplexed face) :-/
User avatar
CocoT
 
Posts: 695
Joined: Tue Dec 14, 2004 5:39 pm
Location: Belly-Gum

Postby Sajt » Wed Nov 01, 2006 1:00 pm

Have you updated your drivers? What's your video card? (Stupid questions)

Try r_glsl 1 (or 0 if you're already using 1). (Might work, not sure)

Other than that I can't think of much...
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby CocoT » Wed Nov 01, 2006 1:31 pm

Nope... it doesn't seem to work, either... how bizarre. But thanks a lot for trying to come up with answers, I really appreciate it, Sajt :)

My card is a GeForce FX Go5200 ... I'm using a laptop. I tried this morning to update the drivers, had some difficulties finding the right stuff... I'll try again.

At worse I could work on my mod and test it on my wife's laptop. It's kind of silly, though.
User avatar
CocoT
 
Posts: 695
Joined: Tue Dec 14, 2004 5:39 pm
Location: Belly-Gum

Postby HeadThump » Wed Nov 01, 2006 5:30 pm

:)

jim-from-the-office-staring-at-his -screen-avoiding-gaze-of-pranked-coworker.
HeadThump
 
Posts: 74
Joined: Sun May 14, 2006 3:21 pm
Location: Zin

Postby Lardarse » Wed Nov 01, 2006 10:58 pm

2) Newbie alert... How exactly do you use the DP extensions?

You need to add dpextensions.qc to your progs.src, after defs.qc but before anything else. That includes all of the constant and function declarations that you will need for all of the extensions.

The extension that you mention will automatically send out the message for a temporary entity that will generate the effects. All you need to do is set where it happens, which directions the sparks move in, and how many sparks there are.

You might want to come into #qc or #dp if you have specific questions about other extensions...
User avatar
Lardarse
 
Posts: 266
Joined: Sat Nov 05, 2005 1:58 pm
Location: Bristol, UK

Postby CocoT » Thu Nov 02, 2006 11:43 am

Thanks, Lardarse! I had thought about it and tried it but I had some errors while compiling, so I thought I was doing something wrong. Now I realized some parts were being redeclared (one because of an olf TQ extension from the base I use and another in FrikBot), so I commented them out and now it compiles fine. Yeepee! (/me jumps around like drunken Pam during the Dundee's)Now I need to look into how it will all work in the mod :)
Yeah, I know, the last time I dropped by IRC was ages ago... I should do it more often :P
User avatar
CocoT
 
Posts: 695
Joined: Tue Dec 14, 2004 5:39 pm
Location: Belly-Gum


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest