Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
lag avoidance
Topic Started: Sep 16 2007, 05:36 AM (349 Views)
RockyBee
Member
[ *  * ]
ok, usually in normal GM d3d, i'm using this code to keep the fps stays at 100fps (i usually use 100 as fps)
Code:
 
distance=point_distance(camera.x,camera.y,x,y)
if distance<512
{
d3d_draw_model(modelID,x,y,z)
}


but would this possible to do the same with u3d? it just that i cant figure out the way to do this :wacko:
Offline Profile Quote Post Goto Top
 
Linkin
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Is this a code to draw a less detailed model if the camera is further away?
Posted Image
Want something done in Photoshop, make a request Here

Formerly known as DS-Development.
Offline Profile Quote Post Goto Top
 
gamemakerguy1560
Member Avatar
Creator of Expedition: Prehistory
[ *  *  *  *  *  * ]
try the built in LOD function lol. look it up in the manual.
Posted Image
My Forums
Offline Profile Quote Post Goto Top
 
RockyBee
Member
[ *  * ]
gamemakerguy1560
Sep 16 2007, 04:24 AM
try the built in LOD function lol. look it up in the manual.

well, i'm not talking about the LOD function, i know how to use it but my question is that possible to not drawing the object when it is far from the camera at a given distance. the LOD is still drawing the object at a smaller triangle count. my room is about 1024*6 width and 769*8 height so there are many objects in the room (buildings, roads, traffic lights). i think Zip already answered my question in another forum so thanks anyway for willing to help ^_^
Offline Profile Quote Post Goto Top
 
NoodleNog
Advanced Member
[ *  *  * ]
U3D has built in Frustum culling. Just change the max_range variable in the camera object to whatever you want.
Offline Profile Quote Post Goto Top
 
zelda4evr
Member Avatar
Forum God
[ *  *  *  *  *  * ]
use lods, it looks better, and its more efficient.

Posted Image
Offline Profile Quote Post Goto Top
 
Matrix_Square
Member Avatar
Matrix Square Entertainment Developer
[ *  *  *  * ]
zelda4evr
Sep 16 2007, 03:06 PM
use lods, it looks better, and its more efficient.

Uhhh... What?

Anything out of the camera's range when using frustum culling will NOT be rendered, thus taking NO computation cycles.

Compare that to a low LOD model which is still taking computational cycles, frustum culling is more efficient.

That said, using LOD may improve the overall look of the game if you need long draw distances, since frustum culling will look weird if the draw distance of the game is greater than the frustum culling range (since you'll see models chopped in half if it's right at the edge of the camera's max range).
SPRING time PROGRAMMING - GM & Ultimate3D Tutorials
Offline Profile Quote Post Goto Top
 
RockyBee
Member
[ *  * ]
i guess NoodleNog gets what i mean :thumb_up:
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply