|
 |
|
|
|
|
|
GTA Modification Forums
[Wip|Test] VC Gfx Real Reflections + Specular Lighting
 |
|
 |
| |
DexX  |
Posted: Saturday, Jun 16 2007, 02:56
|
Black Hat

Group: Retired Staff
Joined: May 16, 2002


|
Ok, for those of you having problems, there's a couple things: -your having trouble with the "reflection map" - "specular maps" are something else entirely, and this mod doesn't use them. The specularity you see is calculated per vertex, and no textures are involved. not trying to nitpick, but we're all going to get confused if we start using incorrect terminology. your issues are with the reflection map. Your video card should not make any difference, since i'm only using functions that are already in the game. since i'm re-using code that shipped with the executable, you should not see any new errors. More than likely, there is a difference between the exe you are using (by "you" i mean everyone with the reflection problem) and the one i tested this mod against. As i mentioned in the first post, i was only able to test it against an american 1.0 exe. if you know this is not the exe you have, please tell me which one you are using. @ Squiddy/Steavor/Ak - i'm ok on standardizing a certain plugin folder, and that's probably the name of the folder i would cast my vote for; "plugins". short, simple, and intuitive. @Ak - the specular power is set in the ini. i had planned on somehow tying it in with the weather (along with some other attributes) so the effect would be dynamic, and actually change over time. That, i would be willing to help code an external config file for, but i would still like to keep the material specular multipliers, and the specular power, as separate floats. @ ir and masterk - i'll probably add a spec multiplier for peds, since they do look a little more dynamic with it. then people who don't want it, can simply turn it off, and you can set it to whatever you want. best of both worlds. | QUOTE | is it possible to add blur effect to VC like THAT It have been done with San Andreas... |
maybe, but it would take some work (besides turning on trails and putting on full AA). part of the reason it looks like that, is because R* is notorious for touching up their screenshots outside of the game engine. @ everyone else - thank you for the feedback!
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
LCSurvivor  |
Posted: Saturday, Jun 16 2007, 19:58
|
X

Group: Members
Joined: Jan 24, 2006


|
I've tested your mod, your screens look great, but it doesn't work. Not in my LC-modified Vice, or in my clean Vice City folder, both tested with the original uk .exe version, and the No-CD .exe. I'm thinking, since most people who have posted with problems haven't got the US version, the problem might be the different .exe's. Would be great if you got it to work for the other versions too
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
LCSurvivor  |
Posted: Saturday, Jun 16 2007, 20:29
|
X

Group: Members
Joined: Jan 24, 2006


|
Ah yeah, the vcversion.dll allready was in the LC folder, and I just tried it with the .dll in the VC folder, still nothing. I don't know where I can see what version of directX I have installed, but I thought it was the latest version. I can't think of anything else that could cause the problem, I'll see if I can find a directX update. Hope that solves it.
EDIT: I've updated my drivers, and checked my DirectX, and that's also up to date now. It still doesn't work. Pity.
Any more ideas?
This post has been edited by LCSurvivor on Saturday, Jun 16 2007, 20:58
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
AK-73  |
|
Hustler

Group: Members
Joined: Oct 31, 2005

|
| QUOTE (Ben @ Jun 14 2007, 23:58) | I agree as well. It'd certainly be more "user-friendly" for people who are less experienced in the world of modding, and it makes logical sense. Not that I could program anything that would make it work, but I hope someone out there can.

@DexX - looks great, I'll be sure to check this out when my uni holidays start next Wednesday.  |
It's not too difficult either. You do it by hooking into the .dff loading process. You check the currently loading model with a list of names (derived via .cfg file) and if it contains it, you overwrite the existing data with the specular lighting data from the .cfg file (per texture). Config file would have to look something like this: [model = banshee] sometexturename = 0.7 someothertexturename = 0.0 ... [model = cheetah] ... You get the idea. You can even do another section for world geometry. World Geometry does have specular values for certain textures - R* created it but the game doesn't make use of it. How to make use of it? Simple: if the name of a model is included in the .cfg, one could create normals on the fly. All this is of course ressource heavy. It's then up to the user to decide how much specular lighting their computer can stand. And while we're on the subject of hooking into .dff loading: the standard .dffs does only contain one float dedicated to specular lighting per texture, no? But we need two, right? So if you don't use a clever mechanism to store both of them within 4 bytes, you need to allocate an additional float per texture. Which might be doable. For example, now while writing a new update to GTA:FPS I am already capable of storing all kinds of custom data per actor. I use that in my case to store which firemode (burst, full auto, single shot) gets used for a weapon (per slot). But which solution you go for is ultimately up to you.  Alex This post has been edited by AK-73 on Monday, Jun 18 2007, 10:18
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
DexX  |
|
Black Hat

Group: Retired Staff
Joined: May 16, 2002


|
| QUOTE (AK-73 @ Jun 18 2007, 05:12) | It's not too difficult either. You do it by hooking into the .dff loading process. You check the currently loading model with a list of names (derived via .cfg file) and if it contains it, you overwrite the existing data with the specular lighting data from the .cfg file (per texture).
Config file would have to look something like this:
[model = banshee] sometexturename = 0.7 someothertexturename = 0.0 ...
[model = cheetah] ...
You get the idea.
You can even do another section for world geometry. World Geometry does have specular values for certain textures - R* created it but the game doesn't make use of it. How to make use of it? Simple: if the name of a model is included in the .cfg, one could create normals on the fly. All this is of course ressource heavy. It's then up to the user to decide how much specular lighting their computer can stannd. |
are you familiar with the concept of Materials? i'll briefly explain. Each triangle gets a material assignment, which contains not just texture references, if any, but also the specular, diffuse, ambient and other lighting attributes. So for example, the artist could create a wheel for his model that uses 2 materials, and one texture; the first material for the rubber (tread, sidewall) on the wheel could have very low specular settings, the second material for the metal part of the wheel might have significantly higher specular settings. Both materials however, are using the same wheel texture. So with your method, every time the wheel texture is called, it would override the specular settings of the material, effectively nullifying the work of the artist. There is also the issue of glass, and other flat-colored materials that are not textured, and would thus not be affected. Personally, i think it would be preferable to re-export the models that need changing. it may be slower, but it provides the utmost control. creating files that would over-ride settings the models already have isn't exactly an ideal solution. | QUOTE | | And while we're on the subject of hooking into .dff loading: the standard .dffs does only contain one float dedicated to specular lighting per texture, no? But we need two, right? So if you don't use a clever mechanism to store both of them within 4 bytes, you need to allocate an additional float per texture. Which might be doable. For example, now while writing a new update to GTA:FPS I am already capable of storing all kinds of custom data per actor. I use that in my case to store which firemode (burst, full auto, single shot) gets used for a weapon (per slot). |
adding extra data to the model, or in this case, material would be preferred, so yes, i like that idea. To accurately calculate specular lighting, you need 2 floats: -specular multiplier, which controls the overall amount of spec. this is already present. -specular power, which controls the intensity of the specular hilight. this is NOT present in Rw materials. The specular multiplier changes significantly more per material than the power does, which is why i'm content with leaving the power as a global variable. however, if could append our own float to each material in the dff, and use that for the specular power, i wouldn't say no. infact, the plugin system in Rw was created just for this purpose, and R* used it (object frame names in vc, lots of places in SA), so all the code we need is present in the game already. I've already stated i'm willing to re-export the models, so appending extra data isn't a big deal to me. | QUOTE | | is it a problem when you have other mods like cars, trees and a new map and man.scm installed because the game freezes.. |
i test mods on a nearly-stock VC install, since it's the only set of files i know everyone has, or had at one time. With that in mind, i would need to know which exact mods you had installed, so i could try them for myself. only the material settings and reflection images are changed. your game might look "different" depending on the mod, but it should not crash. | QUOTE | | Combined with xbox graphics for pc .dll |
ditch that. this does what it did, only better and with more control. if you want trails, i can add them real fast. | QUOTE | | So, i think it's because of different video cards, don't ask me why |
i hope it's not, because that's really out of my control, unless i know the exact difference(s) that cause it to work/not work.. for the record, my card is a GeForce 7600 GS The next release will with either incorporate Hammer's version dll (thanks for the heads up), or a similar version checking routine. Sidenote: Are reflections the only thing people are having problems with? Does the specular lighting work ok? no-one seems to be compliaining about spec, just the messed up reflection map...
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
AK-73  |
Posted: Tuesday, Jun 19 2007, 12:25
|
Hustler

Group: Members
Joined: Oct 31, 2005

|
| QUOTE (DexX @ Jun 18 2007, 19:02) | are you familiar with the concept of Materials?
|
Yes.  | QUOTE | Both materials however, are using the same wheel texture.
|
Well, texture name doesn't have to be the identifier, it was just a suggestion... how to correctly identify the relevant material is a matter of mechanism. | QUOTE | So with your method, every time the wheel texture is called, it would override the specular settings of the material, effectively nullifying the work of the artist.
|
Yeah, that seems to be the *point*. The point behind the config would be to be able to specify your own specular values without having to recompile any model, solving distribution problems that way also. One argument against re-export is that you'd have to make available all re-exported cars. If you want to avoid that you must make the relevant data available from a different source, no? | QUOTE | There is also the issue of glass, and other flat-colored materials that are not textured, and would thus not be affected.
|
Again, this is a question of developing an identifying mechanism for a material. | QUOTE | Personally, i think it would be preferable to re-export the models that need changing. it may be slower, but it provides the utmost control. creating files that would over-ride settings the models already have isn't exactly an ideal solution.
|
It's your mod but I'd disagree on that. Control via a config file is by no means less than via re-export - the exact same values are present... only in different locations. It's even possible to extent material properties this way if so desired without changing a single .dff. The one disadvantage I see to that is speed. | QUOTE | adding extra data to the model, or in this case, material would be preferred, so yes, i like that idea. To accurately calculate specular lighting, you need 2 floats: -specular multiplier, which controls the overall amount of spec. this is already present. -specular power, which controls the intensity of the specular hilight. this is NOT present in Rw materials. The specular multiplier changes significantly more per material than the power does, which is why i'm content with leaving the power as a global variable. however, if could append our own float to each material in the dff, and use that for the specular power, i wouldn't say no. infact, the plugin system in Rw was created just for this purpose, and R* used it (object frame names in vc, lots of places in SA), so all the code we need is present in the game already. I've already stated i'm willing to re-export the models, so appending extra data isn't a big deal to me.
|
If you need some hints for where to look at, I could give you.  Alex
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(8) 1 [2] 3 4 ... Last »
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|