Discussion:
Reducing Geometry Direct3D 9
(too old to reply)
Skybuck Flying
2014-03-29 04:50:20 UTC
Permalink
Hello,

I am using this Direct3D 9 interception DLL and callback DLL:

http://graphics.stanford.edu/~mdfisher/D3D9Interceptor.html

I want to use it to intercepts Star Trek Online DirectX Direct3D 9 calls to
reduce the ammount of geometry the game draws.

So far I have tried to modify he following routines in d3d9Callback.cpp by
adding if statements:
(HOW THE FUCK CAN I PASTE CODE IN STACKOVERFLOW ?!)
(SINCE STACK OVERFLOW SUCKS SO MUCH I LL TRY NEWSGROUPS TOO ;):))

D3D9CALLBACK_API bool ReportDrawPrimitive(D3DPRIMITIVETYPE PrimitiveType,
UINT StartVertex, UINT PrimitiveCount)
{
if(g_ReportingEvents)
{
g_Context->Files.CurrentFrameAllEvents << "DrawPrimitive\n";
}
if (PrimitiveCount >= 1)
{
PrimitiveCount = 1;
}

return g_Context->Managers.Render.DrawPrimitive(PrimitiveType,
StartVertex, PrimitiveCount);
}

D3D9CALLBACK_API bool ReportDrawIndexedPrimitive(D3DPRIMITIVETYPE
PrimitiveType, INT BaseVertexIndex, UINT MinIndex, UINT NumVertices, UINT
StartIndex, UINT PrimitiveCount)
{
if(g_ReportingEvents)
{
g_Context->Files.CurrentFrameAllEvents << "DrawIndexedPrimitive
Type=" << PrimitiveType << " BaseVertexIndex=" << BaseVertexIndex << "
MinIndex=" << MinIndex;
g_Context->Files.CurrentFrameAllEvents << " NumVertices=" <<
NumVertices << " StartIndex=" << StartIndex << " PrimitiveCount=" <<
PrimitiveCount << endl;
}
if (NumVertices >= 3)
{
NumVertices = 3;
}

if (PrimitiveCount >= 1)
{
PrimitiveCount = 1;
}

return g_Context->Managers.Render.DrawIndexedPrimitive(PrimitiveType,
BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
}
Anyway... the if statements are an attempt to reduce the number of vertices,
primitives or whatever.

I am totally clueless about Direct3D 9 and also stackoverflow.

So I seek help/advise from Direct3D 9 experts... what is the best possible
option to reduce geometry for a game like Star Trek Online by intercepting
API calls ?

I also used PIX to spy on the Direct3D calls there are many many.... I am
not sure which calls are responsible for drawing all the geometry here is a
short example:

1872131 <0x061975D8>
IDirect3DDevice9::DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0, 8383, 0,
16128) 139171121469

^ To me this looks like some draw call... I could be wrong though...

Either the callback DLL is not intercepting these calls properly or I need
to modify other draw calls ?

I tried setting parameters to zero that caused a crash... so it does seem to
be intercepted...

Thus perhaps I need to intercept other direct3d calls to try and reduce
geometry ?

Please advise how Direct3D 9 api interception can be used to reduce graphics
load if at all possible.

I am not sure if modifieing the models is possible... file format for 3d
models may be unknown or a lot of work to do... falling this api
interception trick... that option may be explored next...

Bye,
Skybuck.
Skybuck Flying
2014-03-29 05:18:07 UTC
Permalink
I am also not sure if Direct 3D 9 is the bottleneck though it seems a good
guess.

Other bottlenecks may be physics/hawk stuff.

Bye,
Skybuck.

"Skybuck Flying" wrote in message news:87bbb$53365257$5419b3e4$***@cache60.multikabel.net...

Hello,

I am using this Direct3D 9 interception DLL and callback DLL:

http://graphics.stanford.edu/~mdfisher/D3D9Interceptor.html

I want to use it to intercepts Star Trek Online DirectX Direct3D 9 calls to
reduce the ammount of geometry the game draws.

So far I have tried to modify he following routines in d3d9Callback.cpp by
adding if statements:
(HOW THE FUCK CAN I PASTE CODE IN STACKOVERFLOW ?!)
(SINCE STACK OVERFLOW SUCKS SO MUCH I LL TRY NEWSGROUPS TOO ;):))

D3D9CALLBACK_API bool ReportDrawPrimitive(D3DPRIMITIVETYPE PrimitiveType,
UINT StartVertex, UINT PrimitiveCount)
{
if(g_ReportingEvents)
{
g_Context->Files.CurrentFrameAllEvents << "DrawPrimitive\n";
}
if (PrimitiveCount >= 1)
{
PrimitiveCount = 1;
}

return g_Context->Managers.Render.DrawPrimitive(PrimitiveType,
StartVertex, PrimitiveCount);
}

D3D9CALLBACK_API bool ReportDrawIndexedPrimitive(D3DPRIMITIVETYPE
PrimitiveType, INT BaseVertexIndex, UINT MinIndex, UINT NumVertices, UINT
StartIndex, UINT PrimitiveCount)
{
if(g_ReportingEvents)
{
g_Context->Files.CurrentFrameAllEvents << "DrawIndexedPrimitive
Type=" << PrimitiveType << " BaseVertexIndex=" << BaseVertexIndex << "
MinIndex=" << MinIndex;
g_Context->Files.CurrentFrameAllEvents << " NumVertices=" <<
NumVertices << " StartIndex=" << StartIndex << " PrimitiveCount=" <<
PrimitiveCount << endl;
}
if (NumVertices >= 3)
{
NumVertices = 3;
}

if (PrimitiveCount >= 1)
{
PrimitiveCount = 1;
}

return g_Context->Managers.Render.DrawIndexedPrimitive(PrimitiveType,
BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
}
Anyway... the if statements are an attempt to reduce the number of vertices,
primitives or whatever.

I am totally clueless about Direct3D 9 and also stackoverflow.

So I seek help/advise from Direct3D 9 experts... what is the best possible
option to reduce geometry for a game like Star Trek Online by intercepting
API calls ?

I also used PIX to spy on the Direct3D calls there are many many.... I am
not sure which calls are responsible for drawing all the geometry here is a
short example:

1872131 <0x061975D8>
IDirect3DDevice9::DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0, 8383, 0,
16128) 139171121469

^ To me this looks like some draw call... I could be wrong though...

Either the callback DLL is not intercepting these calls properly or I need
to modify other draw calls ?

I tried setting parameters to zero that caused a crash... so it does seem to
be intercepted...

Thus perhaps I need to intercept other direct3d calls to try and reduce
geometry ?

Please advise how Direct3D 9 api interception can be used to reduce graphics
load if at all possible.

I am not sure if modifieing the models is possible... file format for 3d
models may be unknown or a lot of work to do... falling this api
interception trick... that option may be explored next...

Bye,
Skybuck.
Skybuck Flying
2014-03-29 13:13:29 UTC
Permalink
I finally figured out how that fucking whore site stack overflow works with
code snippets.

4 spaces must be inserted before every line of code ! HOW LAME.

Further more only one question can be posted every 20 minutes ! BORINGLY
LAME

and... every edit must be TAGGED and shit like that/CONFIRMED ! INCREDIBLE
LAME.

At least now my posting looks a bit better on stack overflow and no more
swearing in it I think.

Stupid shit site... I have absolutely no idea why those retards are using
it.

It's fucking slow/lame/overheadish...

I guess they are egotrippers that want those stupid points. BLEH MORE
ULTIMATELY LAMENESS.

Bye,
Skybuck.
Jeff Higgins
2014-10-12 13:04:50 UTC
Permalink
On 03/29/2014 09:13 AM, Skybuck Flying wrote:
<http://blog.codinghorror.com/suspension-ban-or-hellban/>
Skybuck Flying
2014-10-14 08:59:53 UTC
Permalink
On 03/29/2014 09:13 AM, Skybuck Flying wrote:
<http://blog.codinghorror.com/suspension-ban-or-hellban/>

Lol, more lameness.

Apperently they have never heard of the internet that was constructued for
the sole purpose of routing around "bans" lol.

Welcome TOR ! ;) Double LOL.

More time wasting for them.

Bye,
Skybuck.

Loading...