Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Martin_HH, TipmyPip), 1,279 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Tips on using directx or opengl functions #244315
01/04/09 00:17
01/04/09 00:17
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline OP
Junior Member
DiegoFloor  Offline OP
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
Hi there
I'm just starting to learn 3dgs. The advantage of using 3dgs is that it gives you great flexibility without having to deal with a lot of complicated stuff. But what if I need to change something a little more fundamental? I understand we can use directx functions and that's great! But all the examples in the 'work' folder (concerning directx and opengl) shows basically how to initialize and create vertex. But all of this we can do without using directx functions.

How can we use this funcions as a complement to our 3dgs projects? Like editing entities or create a simple modeler software, for example.

I expect this to be a very difficult task that cannot be achieved without a long and dedicated study of directx. So I'm not expecting tutorials, long explanations or anything like that. But I would apreciate if someone could simply point me in the right direction (like a project that deals with this, for example) smile

I searched this forum and found very few people talking about this.

Re: Tips on using directx or opengl functions [Re: DiegoFloor] #244324
01/04/09 01:01
01/04/09 01:01
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Without any more specific questions, I cant help much, as Im only new
to directx myself.

But check the 3DGS manual for any mention of "mesh", especially functions
with 'mesh' in their name. When 3DGS talks of meshes, they ARE directx meshes
extracted from the models by 3dgs functions.

If you are familiar with C/C++/C#, also look in the "D3D9.H" file in your
gamestudio INCLUDE folder, that will give you an idea what directx interfaces
are readily available.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Tips on using directx or opengl functions [Re: EvilSOB] #244339
01/04/09 03:15
01/04/09 03:15
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline OP
Junior Member
DiegoFloor  Offline OP
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
Well, I do have a more specific question! ( here ) My objective is to modify geometry in real time. But not only move vertex around, but create new ones, delete faces.. as I said earlier, I'm just exploring for now. :P So far it seems that this is not a trivial task at all...

Re: Tips on using directx or opengl functions [Re: DiegoFloor] #244344
01/04/09 03:50
01/04/09 03:50
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Ive read your other post and YES, this is not a trivial task at all!
Adding polys and vertices is VERY maths hungry, and will eat HUGE amounts of
processor time, slowing game response beyond acceptable limits.

But if you are just deleting polys and vertices thats easily managable in
real-time, but it will leave actual holes in the model/entity that may
screw up dynamic lighting effects of the rest of model that has been cut.

I would go for a more carefully designed model that has patches of polys that
can be "lowered" using directx commands so they appear as 'deep pits' rather
than 'holes', and lighting will be OK then. Thats the cleaner way to do it,
and it will still be fast enough to be used in real-time.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Tips on using directx or opengl functions [Re: EvilSOB] #244345
01/04/09 04:27
01/04/09 04:27
Joined: Jan 2009
Posts: 86
Brasil - RS
D
DiegoFloor Offline OP
Junior Member
DiegoFloor  Offline OP
Junior Member
D

Joined: Jan 2009
Posts: 86
Brasil - RS
Yep.. thought so.

Actually, for simpler tasks, such as lowering terrain, simulate earthquakes, etc, there's the vec_for_mesh.

I started wondering about this because of an idea I had a while ago. Something like a mining droid exploring the underground, collecting resources, installing defense turrets against underground creatures... all this through tunnels created by the player! lol Kind of a 'head in the clouds' idea. But no harm in asking, right? smile

I have simpler ideas to work. Maybe I'll get back to this one someday.

Thanks for the advices though! laugh

Re: Tips on using directx or opengl functions [Re: DiegoFloor] #244362
01/04/09 09:50
01/04/09 09:50
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
It is simple to modify vertexes, there are many engine functions for it, but when you want to add or remove vertexes you must replace the mesh. Use the ent_getmesh and ent_setmesh functions and then create a new mesh with DirectX functions.

The documentation of the DirectX functions comes with the DirectX 9 SDK that you can download from the Microsoft website.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1