2 registered members (AndrewAMD, juanex),
1,247
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Objects rendering
#105615
01/06/07 15:22
01/06/07 15:22
|
Joined: Aug 2002
Posts: 375 Germany
Salva
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2002
Posts: 375
Germany
|
Hi to all! and happy new year 2007!! We hope this is a year that give us more time to create, instead that look for and correct errors! Then my question that upsets me from some time, the framerate!! a thing that upsets many I creed, then my game is a very big outdoor game, with many objects, which: trees, stones, vines, houses, and many other things that locate in nature, know that our engine is a bsp engine, and he render each thing that locates in front of the camera and behind the camera!, this it naturally is a loss of memory with a decrease of the framerate! in my level, when I rotate the camera for look at to the right or left , it is blocked for some seconds, 5 or 6 sec. and then continue to rotate, this naturally is not a beautiful thing to see seen that the level still is not complete, that I still should add many other things, tree, houses, and many other objects!, but already seeing as, I am afraid. of add any other thing, because otherwise then creed doesn't work more!, I now want to know if there is a script or an other system (but not that to divide the level in more sublevels) that allows the camera to render only that that you see, and not that that you not seen! I have tried to use the clip_far together to the fog but it is not seen well, because I use a skycube, then the mountains of the skycube is not covered from the fog system, and creed that I not need to explain how the scene is seen, with the houses befogged and the mountains clear on the background! salva
|
|
|
Re: Objects rendering
[Re: Salva]
#105616
01/06/07 20:12
01/06/07 20:12
|
Joined: Jan 2007
Posts: 1,619 Germany
Scorpion
Serious User
|
Serious User
Joined: Jan 2007
Posts: 1,619
Germany
|
another thing: use LOD, you can also create your own system with some lines of c-script (seein the last aums) for far away models, you can also use models with just 10faces or a sprite. also you could use vec_to_screen to locate if the model is in the screen, if not make in invisible here a little example(play with it and youll get good results) Code:
action low_fps_model { var my_lod=1; while(1) { if(vec_to_screen (my.x,camera)==0) { my.invisible=on; } else { temp = vec_dist(my.x,camera.x); if(temp<500&&my_lod!=1) { ent_morph(me,"high_poly_model.mdl"); my_lod = 1; goto(end); } if(temp>10000&&my_lod!=3)//far far far away { ent_morph(me,"sprite.tga");//make me 2D //here parhaps a scale... my_lod = 3; goto(end); } if(temp>5000&&my_lod!=2) { ent_morph(me,"low_poly.,mdl"); my_lod = 2; goto(end); } //you can add more stages of LOD,but you have to make more models ;P } end: wait(1); } }
edit: because the skycube: you can try to make the sky-color near to the fog-color(think this is also possible with scripting), just look at AAA-games, they all have this problem.
Last edited by Scorpion; 01/06/07 20:20.
|
|
|
Re: Objects rendering
[Re: Salva]
#105617
01/06/07 20:58
01/06/07 20:58
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
gday mate!
give us a screenshot of your level, because it sounds to me like you are either using too hi-poly models, your textures are too big, you have too many entities on screen, or many other things. the community and i wont be able to give you specific help until we know what you are trying to run in realtime!
here are some tips: use LoD -- models switch to lower-poly/res versions when they are further from the screen; use less models -- instead of having a whole bunch of rock entities near each other, have one entity that contains all those rocks. less entities is generally better; custom culling -- in your script, try to make small and less-noticeable entities (like grass) fade out to invisible at a fairly close distance, and try to make your own code that tells your objects to turn invisible or even remove themselves (they can be put back in when they are needed with more code) when there is no way for the player to see them from their position (for example, objects that are indoors while the player is outdoors, or objects behind a large wall);
plenty of other 3DGS users have better tips than i do, im sure. there is a thread under "game design" i think, that has hundreds of tips on improving framerate.
hope this helps!
show us a scene that runs really slow!
julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: Objects rendering
[Re: JibbSmart]
#105618
01/07/07 17:23
01/07/07 17:23
|
Joined: Aug 2002
Posts: 375 Germany
Salva
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2002
Posts: 375
Germany
|
Hi Scorpion! and JulzMighty! Thank for your help! @ Scorpion: I have found the last release of aum! 61! and there is that what I looked for, I have experimented with all the 4 systems, but one don't look as if it works to me and that is trace_booster, it seems me that the objects must locate behind a wmb block to make it works, and then this could be used, but only in some cases, the good second could be dist_booster, good from use for vines, trees, stones, grass. however the trace_booster would be that that I likes more, but like told the objekt must locate behind to a wmb "wall" otherwise don't work, or I have made a mistake anything. @ JulzMighty: The level terrain is fairly big, but like told already there are few objects in the level, 4 house a pair of trees and a lake that use a shader in fact and when I turn around toward the lake that the engine is blocked for more of 5 or 6 seconds, I have tried to eliminate the lake temporarily for testing, but it is blocked the same, in that direction there is few trees and any stone and the river, I however send you the screenshot, and as you could see.But I must also tell to that this appears only the first time that the player rotate (look) in the direction of the lake,and each game start. here the images: from here: to here: Behind the wall in the middle of the second shoot, there are the lake, the few trees, and the river. greets. salva
Last edited by Salva; 01/07/07 17:47.
|
|
|
Re: Objects rendering
[Re: Salva]
#105619
01/07/07 17:56
01/07/07 17:56
|
Joined: Jan 2007
Posts: 1,619 Germany
Scorpion
Serious User
|
Serious User
Joined: Jan 2007
Posts: 1,619
Germany
|
first your level looks really nice yes, it is right trace_booster isnt good for your level,, but it work also with mdl, not only with wmb blocks in the second picture: i see,the mountains, that really dont look so nice, write: d3d_fogcolor1.red=80; d3d_fogcolor2.green=100; d3d_fogcolor1.blue=150; just try my small script, perhaps it helps.
|
|
|
Re: Objects rendering
[Re: Scorpion]
#105620
01/07/07 19:03
01/07/07 19:03
|
Joined: Aug 2002
Posts: 375 Germany
Salva
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2002
Posts: 375
Germany
|
Thank you! Yes the fog color is too bright, I change it, For the script i will try it and let you know. salva
|
|
|
Re: Objects rendering
[Re: Scorpion]
#105622
01/08/07 06:34
01/08/07 06:34
|
Joined: Aug 2005
Posts: 312 Sweden
tindust
Senior Member
|
Senior Member
Joined: Aug 2005
Posts: 312
Sweden
|
If you are using the mouse pointer in your level you will gain a lot of fps by assigning "my.untouchable = on" in the action of the entities that do not have to be recognized by the mouse. It makes those entities "invisible" to the mouse. Why does this work? Because all entities in the field of view of the camera are constantly being monitored if they are touched by the mouse arrow. I found that the jerks you get when you rotate and new entities (even high poly with hi res textures) come into view and near the mouse pointer completely disappear when their untouchable is turned on. Untouchable is turned off by default for all your intities by the engine.
For entities that have not been assigned an action it might be worthwhile to give them one with just the line:
my.untouchable = on;
Just another option to consider and check for.
Cheers
Lighten Your Load With DynaLights 1.0
Realtime 3D Lighting. Free Trial Version available. 3DGS 660P
|
|
|
|