Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Detail

Author
Message
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 27th Jan 2007 01:53
Hi I looking a way of making my game faster, for instance Im creating a plantmapper and a respective module that interpetates the info and position objects like grass, or trees on the position defined in the plantmap, and also controls the maximum distance that those objects are visible!..So I would like to know if there is a way to diminuish the number of poligons of an object in real time, so that when its far away the engine wouldn't need to render it fully? or something else that would help me!
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 27th Jan 2007 04:31 Edited at: 27th Jan 2007 04:36
Two ways that this can be done:

1. First of all, make heavy use of your Camera range function. DGDK supports functions to set the rendering range of the camera frustrum so that polygons will not be rendered if they are out of range. See :dbCameraRange etc.

You didn't make clear whether this is DGDK (C++) or DGDK.NET otherwise I'd point you in the right direction for function names.

DGDK supports BSP files which, if mapped correctly using a tool like (Valve's Hammer Tool) or a tool like 3D World Studio, terrain maps can be created which conpensate for visual culling and object oclusion. Now, I'm not saying that BSP is an ideal solution becuase it isn't, but you need to think about how you're going to render and control the actual objects that NEED to be rendered based on their distance from the camera or player.

My only advice without getting too technical, is to use a mapping tool like 3D World Studio for mapping, and then using the Inca Demo code as a reference for something more complex. This is all found in the Cartography Shop/3DWS forum further down in the TGC forum list.

[EDIT] Link regarding the Inca demo and code:

[href]null[/href]http://forum.thegamecreators.com/?m=forum_view&t=79298&b=13

Paul.

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 27th Jan 2007 11:28
Yeah that Inca code with the faster rendering uses my frustum culling code on the limbs. It can be found here if anyone wants to convert it to the DGDK (or DGDK.net):

http://forum.thegamecreators.com/?m=forum_view&t=67369&b=6

Zeal has a working version (of one of the older codes) if you can get ahold of him. You will need to use the added getmatrix element code posted in this thread as neither DBP nor DGDK has such a function and I had to use the DKShop plugin:

http://forum.thegamecreators.com/?m=forum_view&t=76143&b=22

APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 27th Jan 2007 11:49 Edited at: 27th Jan 2007 11:49
Lost, how ironic, I spoke to Dmitry regarding the DKShop plugin, and got the source to convert it for DGDK.NET. I've already implemented the PickLimb and IntersectLimb functions, but I want to get the other functions finished before I send the lot back to Dmitry for distribution. But those functions are exposed in 1.0.7.0 of DGDK.NET.

Paul.

Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 27th Jan 2007 15:10
APEXnow from what was able to understand your saying that 3D World Studio already does it, but 3d World Studio looks and is a bit complex and I'm trying to make a few libraries that could help people that want to have control over everything they are using...like me(that one of a reasons why I don't like Torque)!
GaaraBTK
17
Years of Service
User Offline
Joined: 15th Jan 2007
Location:
Posted: 27th Jan 2007 19:10
Hi, i have a question.
I want to use LOD for the Terrain.But i dont know u does it works in DGDK.NET.
I make Terrain with Highmaps that are 256x256 large and scale them x16,2,16

So, what do i need? special Highmaps?
What commands do i need or who do i add a simply LOD with a Terrain?

sry, for the bad english ^^'


thx in advance
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 29th Jan 2007 21:58
GaaraBTK : hmmm I don't know but that it really boost fps...about the english don't worry

Guys do you know how can I position an object so that it has the same position has the mouse, I can't seem to do it because the mouse uses the XY system and the object uses the XYZ system.
Miguel Melo
18
Years of Service
User Offline
Joined: 8th Aug 2005
Location:
Posted: 29th Jan 2007 22:08
Quote: "Guys do you know how can I position an object so that it has the same position has the mouse, I can't seem to do it because the mouse uses the XY system and the object uses the XYZ system."


This is not the cleanest of code but try using this...



You can then call it like this:



The number '50' you see there places the "tip" of the vector you're pointing along at 50 units distance. Simply adjust that to the depth you want.

I have vague plans for World Domination
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 29th Jan 2007 22:57
Obrigado Miguel!

p.s Just said Thanks
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 30th Jan 2007 15:20
Heres what Ive done so far...It only loads the images and objects in the media directory..to return from preview press Space, to place an instance press Return! Miguel I can seem to use your function...please see my code, I think what you gave me is not exactilly what I need...I need a way of convert XYZ coord in XY!( maybe I expressed my self badly before)

Attachments

Login to view attachments
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 11th Feb 2007 20:29
Can't anyone help me?
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 11th Feb 2007 23:09
jna, I've already tried to provide one solution earlier in the thread, but to be honest, unless you implement an occlusion system for only showing objects that NEED to be shown, not sure what else I can offer as a solution. Lost In Thought created a similiar system with the Inca demo that's available under the 3DWS thread, maybe this code could be used. You may need to ask him via email to see if this can be moved foward.

Paul.

Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 12th Feb 2007 14:53
ok APEXnow I'll take a look

Login to post a reply

Server time is: 2024-06-26 09:23:29
Your offset time is: 2024-06-26 09:23:29