Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Woolie Wool on December 10, 2003, 12:11:25 pm

Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 12:11:25 pm
I was informed by Woomeister that HT&L won't work with ships over 30km long. Is there anyway you could bump up the size and texture limits? One of the ships in the Starforce mod will be around 50km long.
Title: HT&L size limits?
Post by: Nico on December 10, 2003, 12:19:43 pm
The pb is not the size of the ship, it's the fact they put some render limit, so what is more than 30 kms away from you won't be rendered. Is that annoying? Yes, very, ther wasn't such a limit before.
Title: HT&L size limits?
Post by: Stryke 9 on December 10, 2003, 12:23:15 pm
Don't you still hit a wall at 60?
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 12:27:00 pm
Could you please remove the rendering distance limit?
Title: HT&L size limits?
Post by: kasperl on December 10, 2003, 12:28:26 pm
Quote
Originally posted by Stryke 9
Don't you still hit a wall at 60?


no, some zero's later, askk phreak, IIRC.
Title: HT&L size limits?
Post by: kasperl on December 10, 2003, 12:29:17 pm
Quote
Originally posted by Woolie Wool
Could you please remove the rendering distance limit?


http://dynamic4.gamespy.com/~freespace/fsdoc/index.php/Removing%20the%20Distance%20Culling%20in%20HT%26L
Title: HT&L size limits?
Post by: mikhael on December 10, 2003, 12:33:17 pm
no matter how far you increase the limit, users will expand their needs to fill the space.

Having a horizon/far-clip is a good thing, as it limits the z-depth of the view to a finite, discernable distance. That translates into more efficient rendering and faster frame rates.

I'm sure I could imagine a use for a 50km capship, but somehow I suspect I could imagine a better, smaller, less extreme design.
Title: HT&L size limits?
Post by: Stryke 9 on December 10, 2003, 12:41:59 pm
You could just tex the thing so that it just looks like it gradually descends into shadow, and then stick a perpindicular silhouette at the end, I suppose... should be enough if you keep the player busy enough to not go wandering off exploring. Wouldn't need much silhouette, either, if you position the player somewhere near the center of the ship.


Anyway. Yeah, clip rates are vaguely annoying, but also seem kinda useful. Is there any way to, say, put a slider for it in the graphics options panel?
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 12:45:11 pm
The extreme design is necessary for my purposes. It is the flagship of an empire that spans half a galaxy and the most powerful warship ever built by mankind. It is not only supposed to be an effective warship, it is also supposed to be awe-inspiring. Against most opponents, it would rarely ever engage the enemy because it is so terrifying to behold. And when it does attack, woe be anything that it fires upon.

How about setting the render distance to 80km?
Title: HT&L size limits?
Post by: StratComm on December 10, 2003, 12:52:02 pm
IIRC it will eventually float to around 100km, and is already there under one of the render modes, but that's still not my issue with it.  Far clipping planes are extremely useful, but the limit should have been set PAST THE DISTANCE AT WHICH THINGS WERE RENDERED IN VANILLA FS2.  As it stands, Knossos 3 is gone at 150km from the player start location.  I'm not sure if it's a hardware concern, or an algorithm concern, or what but capping the depth somewhere and capping the depth freighteningly close to the playable range don't seem to have anything to do with each other.
Title: HT&L size limits?
Post by: phreak on December 10, 2003, 12:58:47 pm
you're going to get stuff rendering thorough each other if you set it to 150km.  that is unless you have a card that will do a 24 bit z-buffer
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 01:00:51 pm
Which cards can do a 24-bit Z-buffer? Can a GeForce2 MX do it?
Title: HT&L size limits?
Post by: phreak on December 10, 2003, 01:02:39 pm
im pretty sure.

if it can run 24 bit color, it can do a 24 bit z-buffer
Title: HT&L size limits?
Post by: Nico on December 10, 2003, 01:02:48 pm
Quote
Originally posted by mikhael
no matter how far you increase the limit, users will expand their needs to fill the space.

Having a horizon/far-clip is a good thing, as it limits the z-depth of the view to a finite, discernable distance. That translates into more efficient rendering and faster frame rates.

I'm sure I could imagine a use for a 50km capship, but somehow I suspect I could imagine a better, smaller, less extreme design.


Yes, but say goodby to scenary meshes in the distance, planets for exemple.
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 01:06:18 pm
Quote
Originally posted by PhReAk
im pretty sure.

if it can run 24 bit color, it can do a 24 bit z-buffer


There are cards still used in significant numbers today that don't support 24-bit color? Cards with 24-bit color support have been around for at least 10 years. If a card-supports 32-bit color, it should by extension support 24-bit since 32-bit is 24 with an alpha channel, right?

How do you change the render distance anyway?
Title: HT&L size limits?
Post by: phreak on December 10, 2003, 01:07:22 pm
its in the code, not to mention required to get HT&L to even function
Title: HT&L size limits?
Post by: kasperl on December 10, 2003, 01:09:07 pm
well, i know that a lot of people here, nyself for one, use TNT's and the like, so you might want to consider us doomed ones.
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 01:10:14 pm
Could you make a version of the Dec. 5 build with a really high draw distance or show me how to edit the code to increase the draw distance? How far can I go with a 24-bit Z-buffer?
Title: HT&L size limits?
Post by: Gloriano on December 10, 2003, 01:17:49 pm
so may big ships *wait's that someone do 100KM warship*
Title: HT&L size limits?
Post by: phreak on December 10, 2003, 01:43:01 pm
http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html

basically tells you how it works.  there is a java thingy there too to compute resoultion and such
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 01:56:28 pm
That doesn't show me how to change the maximum draw distance.
Title: HT&L size limits?
Post by: karajorma on December 10, 2003, 02:05:22 pm
If you have to ask how. You wouldn't know how to do it even after the explaination :D
Title: HT&L size limits?
Post by: phreak on December 10, 2003, 02:21:17 pm
do a search for "gr_set_proj_matrix", set it to whatever and recompile
Title: HT&L size limits?
Post by: Krom on December 10, 2003, 03:01:16 pm
Geforces do NOT support 24bit Z buffers, only radeons do, Geforces DO support 32bit Z buffers, and Radeons do as well I believe.  So your best bet is to simply enable a 32bit Z buffer and be done with it.  The performance loss is minimal on modern cards.

-Krom
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 03:17:26 pm
Why 32-bit but not 24-bit? That's like a car that has heated seats and a navigation system but no power windows.
Title: HT&L size limits?
Post by: Hollewanderer on December 10, 2003, 03:19:55 pm
Quote
Originally posted by Holy Imperial Gloriano
so may big ships *wait's that someone do 100KM warship*


I am doing a planetoid-sized battle station.:D


It seems that I wil not be able to use HT&L for models in my campaign, as it will take a boatloads of cool stuff out of it [attack on the huge station mentioned above, in-game planetary bombardment, fighting over the planetary surface etc].

Could you bump the limit to 300km-500km? This should last for really, really long, and should be enough for all of the super-ships, and, with some playing with distance and model sizes, planetary models in the background.
Title: HT&L size limits?
Post by: StratComm on December 10, 2003, 05:35:52 pm
Quote
Originally posted by Hollewanderer


I am doing a planetoid-sized battle station.:D


It seems that I wil not be able to use HT&L for models in my campaign, as it will take a boatloads of cool stuff out of it [attack on the huge station mentioned above, in-game planetary bombardment, fighting over the planetary surface etc].


That's where creative uses of background POF's comes into play.  If the limit was simply greater then the explorable area, all you'd need to do is place a background POF with a planet dominating one side in, and map the rest out to look like a regular FS mission.

And Woolie, 24 bit is somewhat of an irregular number as far as a computer is concerned.  They much prefer to have things in powers of two.  Though I would think that there should be some accomodation to make 24-bit work with a 32 bit device, it doesn't suprise me (especially with GeForce) that there isn't.
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 06:13:56 pm
Then could someone add 32-bit z-buffer support in later builds?
Title: HT&L size limits?
Post by: Kazan on December 10, 2003, 06:29:53 pm
24 bit was extremely common in color depth and thus got translated over to zbuffers - video cards guys dont have issues with using odd byte lengths - or even odd sized bit fields like 5:6:5 R:G:B for the most common 16-bit mode (the decision for green to be the more precise one is not arbitrary however, the human eye is most sensative to the green range)

old card support is going to have to be sacrificed sooner or later, anyone with a card that cannot do 24 or 32 bit Z and 24 or 32 bit Color needs to get out of gaming these days
Title: HT&L size limits?
Post by: Ace on December 10, 2003, 06:50:52 pm
Quote
Originally posted by mikhael
no matter how far you increase the limit, users will expand their needs to fill the space.

Having a horizon/far-clip is a good thing, as it limits the z-depth of the view to a finite, discernable distance. That translates into more efficient rendering and faster frame rates.

I'm sure I could imagine a use for a 50km capship, but somehow I suspect I could imagine a better, smaller, less extreme design.


Personally I don't like spaceships that size, but "megaliths" (i.e. the large installations and backdrops promised to be in Homeworld 2) would be a good thing.

Not much to gameplay, but it adds to the atmosphere having the debris of a 60km spaceship and you're fighting over the surface of it.
Title: HT&L size limits?
Post by: StratComm on December 10, 2003, 06:59:06 pm
Exactly what I'm thinking.

Nevermind that I would like to see knossos 3 again.
Title: HT&L size limits?
Post by: redsniper on December 10, 2003, 08:38:15 pm
...and the universe ends at 600km (600,000m on the HUD) not 60km
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 09:14:35 pm
Is there any way to download the Dec. 5 build's code in one zip or something? I'm completely clueless about coding this stuff and I don't know which of the 10 billion files on CVS has the variable governing max draw distance? Can anyone give me a step-by-step explanation on what to do here?
Title: HT&L size limits?
Post by: Taristin on December 10, 2003, 09:17:57 pm
...


:lol:


Sorry, but... *snicker*

:lol:
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 09:19:59 pm
What, is it beyond mere mortals' comprehension or something?:wtf:

What I need to know basically is:

Where to get all the files together (I assume you run that "INSTALL" exe, but you never know...)
Which one is the file with the variable
How to compile

EDIT: the whole source code is on freespace.cpp. I changed the clipping plane distance from 30000 to 400000. Now I've got to find some compiler program.

EDIT2: This file is too small to be a whole source code. Jesus Christ, the source code files are all over the place. Will I have to go through every directory and download everything?!
Title: HT&L size limits?
Post by: redmenace on December 10, 2003, 09:48:06 pm
:hopping:
dude, download CVS, then follow the instuctions from freespace.volitionwatch.com/fsscp/
not that hard
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 09:55:14 pm
Download CVS as in the whole archive at once? You can do that? Or are you talking about a CVS-related program?
Title: HT&L size limits?
Post by: redmenace on December 10, 2003, 10:19:27 pm
I am talking about wincvs. the link was here in the forums at one time. But it is gone now.
Title: HT&L size limits?
Post by: redmenace on December 10, 2003, 10:24:08 pm
http://prdownloads.sourceforge.net/cvsgui/WinCvs120.zip?download
here is the link. now all you need is the Direct X 8.1 SDK and the optional Speech SDK. You also need a Visual C++
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 10:28:27 pm
Found it with a Google search, but I don't have Visual C++ or the DirectX SDK. Do those cost money? I don't think Microsoft would give big SDKs away for free.
Title: HT&L size limits?
Post by: Stryke 9 on December 10, 2003, 11:23:14 pm
Ever hear of Kazaa?
Title: HT&L size limits?
Post by: Bobboau on December 10, 2003, 11:24:14 pm
yes they do, becase then everyone uses there SDKs that run only on there OSs, MSCV6 on the other hand does cost quite a bit, but I'm sure you could aquire it
Title: HT&L size limits?
Post by: Woolie Wool on December 10, 2003, 11:31:20 pm
How much $$$?
Title: HT&L size limits?
Post by: Bobboau on December 11, 2003, 12:03:22 am
well I got an introductory eddition for like $50
Title: HT&L size limits?
Post by: Woolie Wool on December 11, 2003, 12:07:04 am
How much for the SDK? Microsoft is known for exorbitant prices.
Title: HT&L size limits?
Post by: Bobboau on December 11, 2003, 12:10:56 am
sdk is free,
didn't I just say that?
Title: HT&L size limits?
Post by: Woolie Wool on December 11, 2003, 12:14:24 am
Your grammar in that post was kind of weird so I think I might have misinterpreted it somewhat.
Title: HT&L size limits?
Post by: redmenace on December 11, 2003, 12:22:41 am
I got a legal one of MSVC++ for free from school ;)
yes the SDKs are free and easy to find on microsoft.com in contrast to help or support on their website.
A couple of years ago I would have mailed you a burned copy but now I have more respect for the law.
Title: HT&L size limits?
Post by: Bobboau on December 11, 2003, 01:53:41 am
what, d'ya get busted or something
Title: HT&L size limits?
Post by: Fry_Day on December 11, 2003, 05:15:07 am
First of all, GeForces don't support 32-bit z-buffers, only 16 and 24-bit ones (when they say they have a 32-bit Z-Buffer, they're lying, as it's actually 24-bit Z + 8-bit stencil).

Changing the far clip plane by that amonut creates a negligible difference in accuracy, due to the nonlinear nature of the Z-Buffer.

And I urge you to obtain the MSDN collection if you ever get MSVC, since it saves a lot of going to msdn.microsoft.com :)
Title: HT&L size limits?
Post by: Nico on December 11, 2003, 06:29:22 am
Btw, I suppose the last mission in the tBP demo will look a lot less impressive, now, w/o Earth showing under the battlefield...
Title: HT&L size limits?
Post by: phreak on December 11, 2003, 08:31:54 am
its actually an earth plane that isn't all that far from the user.  i'm gonna commit some code that makes it about 250km
Title: HT&L size limits?
Post by: redmenace on December 11, 2003, 10:14:56 am
Quote
Originally posted by Bobboau
what, d'ya get busted or something

No, I became a student senator and decided to make an ethical change in my life. I don't copy audio cds either. Call me a loser or whatever I don't care. However I am sure microsoft has my name somewhere.
Title: HT&L size limits?
Post by: Kazan on December 11, 2003, 10:24:17 am
Z accuracy falters [and results in popping polygons] when the near Z is placed too close to the viewpoint - the clipping plane should be as far out as possible and still have things look right
Title: HT&L size limits?
Post by: Woolie Wool on December 11, 2003, 10:52:59 am
Quote
Originally posted by redmenace

No, I became a student senator and decided to make an ethical change in my life. I don't copy audio cds either. Call me a loser or whatever I don't care. However I am sure microsoft has my name somewhere.


Microsoft knows where you live!:drevil:;)
Title: HT&L size limits?
Post by: redmenace on December 11, 2003, 01:29:57 pm
Quote
Originally posted by Woolie Wool


Microsoft knows where you live!:drevil:;)

However, I do get cheep microsoft products because I work for staples office supply store and am enrolled in EPUP.
Title: HT&L size limits?
Post by: Nico on December 11, 2003, 02:54:26 pm
Quote
Originally posted by PhReAk
its actually an earth plane that isn't all that far from the user.


Well I'm sure it's more than 30 kms away.
Title: HT&L size limits?
Post by: KARMA on December 12, 2003, 05:44:19 am
I suppose that zbuffer is implemented into the hardware, so you can't work on modifying the algorythms, except fo the parameters.
I also suppose that you made some tests to decide wich values for far and near plane give the best results in FSO, so it is probably useless to discuss about changing them.
I also suppose that you probably have already looked into w-buffer, to see if it could be useful.
BTW, wouldn't be possible to implement in FSO both 16bit and 24/32bit z-buffer, and let the game switch between the two modes, depending by the video mode choosen with the launcher?
I'm asking this because programs like 3danalyze can force 24 or 16 bit z-buffer (it also can force wbuffer over zbuffer, and viceversa), but only if supported by both the card and the game.
If this can't be possible, then you should go to scratch support for older videocards (maybe using a "safemode" to disable most features and let people with outdated systems to still be able to play the game?), since this could limit a bit our possibilities, for example to add true planets, semi realistic landscapes, giant ships (who said death star?), and the like
Title: HT&L size limits?
Post by: IceFire on December 12, 2003, 08:20:44 am
Quote
Originally posted by Nico


Well I'm sure it's more than 30 kms away.

No I think I placed it closer than 30km...I would check but I don't seem to have a vanila FS2 anymore....I screwed with the registry of FS2 and now only SCP works and TBP doesn't like it or something :D
Title: HT&L size limits?
Post by: Kazan on December 13, 2003, 12:31:13 pm
all the wbuffer is is literally 1/zbuffer

the value in the wbuffer is the reciprocal of the value in the wbuffer -- they both have the same behavior