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.

DarkBASIC Discussion / close=high quality / far=Low Quality

Author
Message
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 4th May 2004 00:30
How can i make far objects less detailed in texture or in smoothness?
M00NSHiNE
21
Years of Service
User Offline
Joined: 4th Aug 2003
Location: England, UK
Posted: 4th May 2004 03:47
What you mean are LOD (Level - Of - Detail) models. Ive never implemented this so Im not totally sure but it would probably be best to either have a number of models, for example highquality, mediumquality and lowquality (for a man you could call the model files man_h.x, man_m.x and man_l.x for example). Then dynamically load the models and align them to the same as the model you are replacing. it might be very processor intensive though, checking distances and loading models continuously.

Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 4th May 2004 05:16
Thanks MOONSHiNE. The thing is that in my game the levels are going to be quite large and equally detailed. I might have to use the distance in which an object is replaced as a grid system to avoid continuous glitches. But then that would be like loading a new level. I'll try this out anyway.
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 4th May 2004 07:57
You might be able to get away with just using the FOG commands. The fog will blur the edges of models, so it appears as if you have lower quality models the further they are away.

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
GameKit
22
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 4th May 2004 17:46
I think he wants to use lower quality models or textures further away to increase the performance...

I think you can use Mipmaps to lessen the texture quality when objects get farther away... I'm not sure how to do this however...

Previously known as "Game_Creator". Thou shalt not thwart the way of the dragon. For thou tasteth like chicken.
BadMonkey91
21
Years of Service
User Offline
Joined: 13th Jan 2004
Location:
Posted: 4th May 2004 18:12 Edited at: 4th May 2004 18:22
Am I the only one annoyed by the group of users that all have that FF8 Avatar? please check examples, and code base first...

You just need mipmapping... I didnt know it off the top of my head, But I personally went back through and found the command.
Its complex, so get ready to upload a buttload of info, it may explode yer brain!


It's exam29.dba Look it up. Here's a part from it, if you dont have the examples;



Make a simple matrix, and texture it with grass or something, then make a loop, and add that code in. Want me to whipe your nose too?

Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 4th May 2004 19:30 Edited at: 4th May 2004 19:33
OK then. So why isnt it working?
What version of DB uses that command?

p.s Final Fantasy is an inspiration to me, and apparently a lot of other people aswell. Whats the big deal?
BadMonkey91
21
Years of Service
User Offline
Joined: 13th Jan 2004
Location:
Posted: 4th May 2004 19:39 Edited at: 4th May 2004 19:46
erg.. Im too blunt, Im sorry that I am not friendly.
But that shud work. The texture get simpler the further away it is.
If you have the examples it's exam29.dba
Search for it.

It's DBC Enhanced.

And if you use the code I posted (Make matrix, put camera on matrix looking out, texture the matrix) Dont forget to push the 1, 2, and 3 keys to activate the mipmapping.
This demonstrate the differences between the mipmap modes.

BadMonkey91
21
Years of Service
User Offline
Joined: 13th Jan 2004
Location:
Posted: 4th May 2004 20:00 Edited at: 4th May 2004 20:00


Here's the example, I apperantly dont know how it works. You may have luck with it.
No media

Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 5th May 2004 02:30
Thank you very much.
Apparently i need to update my version of DB. No Problemo.
Don Malone
22
Years of Service
User Offline
Joined: 27th Apr 2003
Location: Birmingham, Alabama
Posted: 5th May 2004 14:45
I thought Level of detail was supposed to reduce the poly count on the models, not the texture quality.

Did I get this wrong?

This seems to be what Moonshine and Gamekit are saying. The whole point is not to reduce texture but to reduce the polygones rendered to screen to increase frame rate but still have a large world. I think by the use of fog and reduced model quality you can get what you are looking for.

Sorry if I am off base here.

Wasting CPU Cycles since the 286 was a hot machine.
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 5th May 2004 15:25
Aura, there are two different ways of smoothing objects when the distance between the camera and the object increases.

1. LOD:
Just like they told you above, you make different meshes of 1 object. Let's say are you making a forest. You model a tree - high detailed, another one - medium detailed and just a plain with a semi-transparent texture on it.
When the distance increases you just switch to another mesh.
example:

distance:
0 - 500 : high-detailed
500 - 1000 : medium/low-detailed
1000 - 1500 : plain
1500> : nothing


2. The second way is MIP-mapping (if I remember correctly, MIP stands for Multum-in-Parvum).
You can do this like BadMonkey91 said.
Put "set mipmap mode 2" at the top of your code and use "set object texture nr,0,1" for each object. The loading times will increase though

Quote: "
UPDATED

Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb
"
BadMonkey91
21
Years of Service
User Offline
Joined: 13th Jan 2004
Location:
Posted: 5th May 2004 18:20
There is no distance command for DBC is there? hrm..
If not than that would be an enormous pain in the ass

Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 5th May 2004 18:22
its easy to calculate the distance.

distance# = sqrt( (camera position x()-object position x(nr))^2 + (camera position y()-object position y(nr))^2 + (camera position z()-object position z(nr))^2 )

Quote: "
UPDATED

Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb
"
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 5th May 2004 19:07
This is great info people. Should solve quite a few major problems in my code . I'll write in if I find that this all helps.
Till then then.
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 7th May 2004 00:50
Quote: "Am I the only one annoyed by the group of users that all have that FF8 Avatar?"


LOL!!!!!!! hey, FF8 is a great game! ...perhaps i'll put me a Black Waltz No. 3 avatar from FF9...

Anyway....good looking codes there these will help me too

:: Pentium 300 Mhz, old 8Mb video card, 64Mb RAM, 5 gb & 1.6 gb HD's, W98 SE, Sound Blaster AWE 32 ::
aliasNIGMA
21
Years of Service
User Offline
Joined: 8th May 2004
Location:
Posted: 8th May 2004 10:39
Heres what Ive done. Im just starting out and might tweak my design a bit.

Im using DBC but im sure itll tanslate to Professional as well.

In my 3rd person adventure game, I noticed that about 30 - 40 hi poly models (760 Triangles ea.) made the frame rate drop significantly, I also noticed this was the case even when my matrix terrain was visually overlapping distant objects (another optimization issue).

As an initial solution I made a function that determines the distance of a specified object from the player object. Then any objects beyond a certain distance are hidden and all within are visible.

In other words of theyre too far away then they arent drawn.

I am having an issue with things popping in and out of the distance so im gonna have to tweak the fog & obj draw distances, but its not a big problem.

You get the point...
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 4th Jun 2004 14:23 Edited at: 4th Jun 2004 14:24
Well. Im implementing all of the above into my game, so thankyou all million times. If you want to see the game its in WIP titled 'RPG Deja Vu'.
Thanks again!

Infra-Dark
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 4th Jun 2004 23:19
or, you can do something: load the 3 LOD models (man_h.x, man_m.x and man_l.x, for example) and put all of them where the original model is (using a cube for the pivot), and, if the character is near, hide the medium and low detail models and show only the high detail model, if it's far, hide the high and medium detail model and show the low detail model...I think it works...

:: Pentium 300 Mhz, 8Mb video card, 64Mb RAM, 5 gb & 1.6 gb HD's, W98SE, Sound Blaster AWE 32 ::

http://darkguy.redgaming.net
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 5th Jun 2004 22:26
Currently Im trying to use tree's in my game and alls working fine so far.Its very similar to what DARKguy just said but with no pivots.

P.S. BadMonkey91, I just noticed that you became a member on my birthday. (could'nt find a cake...)

Infra-Dark

Login to post a reply

Server time is: 2025-05-24 03:49:02
Your offset time is: 2025-05-24 03:49:02