Jump to content
Sign in to follow this  
kegetys

DXDLL 1.0 (not Geforce MX compatible)

Recommended Posts

Thanks for replying...

I did everything correct, the folder is there, the dll...

I'm going mad  crazy_o.gif

Share this post


Link to post
Share on other sites
smile_o.gif Tank you lads for this awesome job. Makes me wonder if OFP2 is really needed?! rock.gifbiggrin_o.gif

Share this post


Link to post
Share on other sites

Hello this looks like a good addon to the OFP world. This is a great job for OFP with all limatations and stuff. But i keep having that problem with Postprocessing it keeps saying PostProcessing Can Not Create Texture even with the right folders in the place. I even turned off Postprocessing and it didnt work. Can Someone help me with this.  rock.gif

Share this post


Link to post
Share on other sites

I found this bug >>> with CARS :

kegdll_01.jpg

kegdll_02.jpg

kegdll_03.jpg

What about it rock.gif

fighter

smile_o.gif

Share this post


Link to post
Share on other sites

I'm despirate to try it but OFP just CRASHES now to a black screen please help.

Share this post


Link to post
Share on other sites

Well just look at this picture of "Scars" leopard tank to see how brilliant this man Kegety realy is (As if we didn't know already).Thanks for making OFP even better.... biggrin_o.gif

leopardenhanced.jpg

Share this post


Link to post
Share on other sites
I found this bug >>> with CARS :

What about it rock.gif

fighter

smile_o.gif

doesn't have anything to do with dxdll.

rather seems like a major bug in OFP itself which wasn't noticed by anyone till now.

because how often do ya put a car over water ? biggrin_o.gif

Share this post


Link to post
Share on other sites

@ Locke@Germany

Yes , you have right !

It is serious bug in original OFP . The pic below is from OFP without addons ("clean" version 1.96) sad_o.gif

orig_ofp196.jpg

My apologies for Kegetys.

fighter

smile_o.gif

Share this post


Link to post
Share on other sites
Well just look at this picture of "Scars" leopard tank to see how brilliant this man Kegety realy is (As if we didn't know already).Thanks for making OFP even better.... biggrin_o.gif

See how brillant the author of this leopard is, too. =)

Edit: sorry for the image tounge_o.gif

Share this post


Link to post
Share on other sites

Pretty clever how you managed that guys (I tip my hat to you). Wish I'd thought of it! Now I see how you've done it though, it's even more clever IMHO.

You basically have created a new DLL that has the same procedures exposed as the official Windows DirectX 8 dxd8.DLL.

<Warning. A load of technical shite follows. I love looking at how people do clever stuff. This text might help others who would like to do something along similar lines.>

The LoadLibrary Win32 API usually starts in the application (flashpointresistance.exe) path and so Operation Flashpoint will find your custom DLL first, ignoring the Windows version. I dare say other smart people could use this technique for improving the graphics output...

When OFP requests an IDirect3D8 interface (in order to create the 3D device needed to render to the screen) your custom DLL will return a pointer to your custom IDirect3D8 interface. OFP won't know the difference.

However, your DLL wraps IDirect3D8::CreateDevice and returns a pointer to a *custom* IDirect3DDevice8 interface.

When methods on the interface are called, they are going to your custom routines.

You are then using Direct3DDevice8::SetTextureStageState to add bump maps to the water textures (very nice, if you ever wondered what the .png file was for in the zip)  and to mipmap. How do you know what texture is what, though? Go on, tell me smile_o.gif 

To get your interactive help up, you must be using DrawText on the device context (DC) when your Direct3DDevice8::EndScene is called.

How did you check the keyboard? Did you use the Win32 API's SetWindowLong to point to a custom WNDPROC and check the keys that way?  (This technique, btw, would allow other types of custom overlays on OFP.)

One thing that puzzles me though is how you do the reflections and the postprocessing. Judging by the low performance hit it must be in hardware but fooked if I know how. Care to explain please? Just curious!

Oh all right, I'll shut up. I was just admiring what you did..

biggrin_o.gif

Share this post


Link to post
Share on other sites

The textures are "detected" using a CRC check on the texture data right after the texture data is written by OFP by hooking into the surface's unlockrect function. The new drawIndexedPrimitive function does detection on whats going on by checking mapped textures, used vertex format, etc. to know when to switch to the reflection texture target and do an additional drawIndexedPrimitive call to render to the reflection texture, which is then used as a projected texture with the EMBM bumpmap effect once water is being draw.

Postprocessing is done by setting the render target at beingScene to a custom render to texture surface, which is then drawn with a quad to the screen at endscene, with various pixel shader effects which do the postprocessing.

The keyboard interface is just a normal windows keyboard hook, overlay text is drawn using the D3DX library font thing.

Share this post


Link to post
Share on other sites
However, your DLL wraps IDirect3D8::CreateDevice and returns a pointer to a *custom* IDirect3DDevice8 interface.

Actually, no. It is standard IDirect3DDevice8 interface, it's the actual COM+ vtable which is modified to point to wrapper functions.

You are then using Direct3DDevice8::SetTextureStageState to add bump maps to the water textures (very nice, if you ever wondered what the .png file was for in the zip) and to mipmap. How do you know what texture is what, though? Go on, tell me smile_o.gif

Just standard CRC32 checksum on surface's UnlockRect.

To get your interactive help up, you must be using DrawText on the device context (DC) when your Direct3DDevice8::EndScene is called.

There are Direct3D functions available for that om DXUtil libraries, no need to fool around with GDI DC, which probably does not even work with fullscreen Direct3D.

How did you check the keyboard? Did you use the Win32 API's SetWindowLong to point to a custom WNDPROC and check the keys that way? (This technique, btw, would allow other types of custom overlays on OFP.)

SetWindowsHookEx

One thing that puzzles me though is how you do the reflections and the postprocessing. Judging by the low performance hit it must be in hardware but fooked if I know how. Care to explain please? Just curious!

Reflections are done by rendering everything twice, once to normal backbuffer and 2nd time to water texture. Then whenever DrawPrimitive is called while water texture is active, instead of standard water texture EMBM water is used instead. Performance hit would be more noticeable if OFP wasn't so much CPU bound in its performance, if you take a look at OFP using any analyzer, you can see that GPU is idling most of the time just waiting for CPU to do something.

Postprocessing is just pixel shaders.

Share this post


Link to post
Share on other sites

Hey kegety and feer Im sorry for writing that the new nighttime look really hurt your eyes! The real problem was that my bro was playin Raven Shield with the brightness all the way uP! So I was getting this really blurry image and it seemed as if I was seeing like, a bunch of brighly colored squares everywhere....well anyways this thing rocks!

Some Bugs:

If you go more than 600-800 ft in the air, you start to see a BIG black line go across the screen, I think this is made by the reflections i dont know why but I just think that.

I dont know if this is a bug or if it is something you just couldnt fix, but, when you turn around and stuff to admire all the pretty reflections everywhere, the water reflections seem to be flickering to different positions rock.gif

I'll keep looking for more, BUT THIS THING ROCKS, TIME TO GO ONTO OFP AGAIN AND STARE AT THE WATER! crazy_o.gif

Share this post


Link to post
Share on other sites
If you go more than 600-800 ft in the air, you start to see a BIG black line go across the screen.

yup, i get this as well on my gf5600fx

Share this post


Link to post
Share on other sites

Ok guys 1 thing is first, from the screenshots that I’ve looked at this look looks well nice.

1 problem... it seems to look like someone had very bad dandruff and now the desert looks like snow and it looks like someone didn’t like me so they put a crap load of oil in the water

I’m using a G-Force 4 MX AGP8 graphics card, 768mb of ram, and a AMD XP 2600+ CPU

So what’s going wrong here???

Cheers, Philly

Share this post


Link to post
Share on other sites
I’m using a G-Force 4 MX AGP8 graphics card, 768mb of ram, and a AMD XP 2600+ CPU

So what’s going wrong here???

Again, GeForce4 MX is not supported as it it does not support pixel shaders, being technically almost the same card as GeForce2.

Share this post


Link to post
Share on other sites

If I edit the waterbump.png to a different color, say to have a tropical look, will the reflections also be effected?

Share this post


Link to post
Share on other sites

If OFP shows black screen and crashes to desktop: try to start OFP with attribute "-nomap".

That fixed it for me - thx to the guy who gave this hint a few pages before!

Share this post


Link to post
Share on other sites
If you go more than 600-800 ft in the air, you start to see a BIG black line go across the screen.

turn off exponential fog in reflection options and it will be gone

Share this post


Link to post
Share on other sites
By the way, will the New OFP use this FX pack? they are stupid if they don't.

Well I would assume they have reflective water in OFP2, yes.

But using this pack, why on earth would they use a community-made OFP1 "hijacker", so to speak?

Share this post


Link to post
Share on other sites
If you go more than 600-800 ft in the air, you start to see a BIG black line go across the screen.

turn off exponential fog in reflection options and it will be gone

thx i'll try it

Share this post


Link to post
Share on other sites

Nope it didnt work, I still have a big black line going through the "edges of the sky, I really dont know how to explain it but I DO remember getting this with regular flashpoint, before all the patches of coarse  rock.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×