Join also our Discord channel! Click here.

Re the announcement above.

Post questions about game models here, or help out others!
OneOneSeven
advanced
Posts: 45
Joined: Sun Jul 16, 2006 6:54 am
Location: Around
Contact:

Post by OneOneSeven » Thu Jan 11, 2007 12:09 am

Xela wrote:
so effectively you need 4 times the space just to double the resolution!
That is obviously correct. But what throws me off here is that strange deformation of "2". I would expect to see croped texture , but with aspect ratio maintained.
My previous mention about that "wave" displacement alpha map may have something to do with it, but still something is not right (or expected) how the program "trims" excess pixels.

I try to make another yet example on land to see what happens then.
Ima say that it just stops reading after a certain point. Essentially what happens is the program opens the file, reads the RGB values for a 64x64 texture and then just quits.

User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post by alera » Thu Jan 11, 2007 6:24 am

OneOneSeven wrote: Ima say that it just stops reading after a certain point. Essentially what happens is the program opens the file, reads the RGB values for a 64x64 texture and then just quits.
yup, and if it doesn't and actually reads pass its pre-allocated buffer then the program would crash sooner or later


--
Sorry I didn't read your post in detail before OneOneSeven.

I just wanted to clarify something, BSP and Oct trees are spatial subdivision schemes and are not used for rendering terrain at all

spatial subdivision is a very interesting and vast topic, it is a way for an engine to classify the data in order to proccess it efficiently and a crucial part of a game engine.

an quad tree, oct tree, bsp tree or kd-tree is basicaly a hierarchical tree with distance as it's base. The engine uses this to know with what object a moving object could potentionaly hit or for visibility determination, it is mainly used to speed up the process of picking

here is an example of a scene with spatial subdivision, lets say we want to test if object A collided with something
__________
|A......|.....B|
|C......|.......|
--------------

in the above example object A and C are in cell 1 and object B is in cell 2.
Traditionally the computer would have first tested to see if object A collides with object B and then repeat the same test with object C. but with spatial subdivision it only checks object C as B is in another cell and therefore can't possibly collide with object A.

we skipped one test :) hurray!
as scenes grow more complex, the need for quickly discarding unneeded tests becomes crucial.

oct trees are in heavy use todays engines.
As OneOneSeven says bsp is an old method with many shortfalls
I believe it actually stands for Binary Space Partition :) and it was made for the original quake engine.

Sorry for the lengthy post :) I just thought it would be interesting.

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Post by Savage » Thu Jan 11, 2007 8:00 pm

What i can say? 8D
Really nice post, thanks :!:
Image

OneOneSeven
advanced
Posts: 45
Joined: Sun Jul 16, 2006 6:54 am
Location: Around
Contact:

Post by OneOneSeven » Thu Jan 11, 2007 10:47 pm

You're correct, alera. Thanks for pointing out my error--

To clarify, a BSP tree refers to a technique involving the creation of 'blocks' and then categorizes them in to certain 'branches' and 'leaves' based on visibility. What I've primarily been referring to there are the brushes, or rectangular prisms that constitute the actual level geometry. While limited in scope, it can be used for terrain-- HL2 does a passable job at it, but they're primarily made for indoor environments. Feel free to correct me if I'm wrong, but I believe the concept was originally implemented in Quake. The simple levels and limited power of the GPU lent itself well to the system. Now that I think about it, Doom 3 uses a similar method as well, although it's been hybridized with model entities using per-polygon collision.

The collision detection thingy is pretty neat, too. Instead of checking EVERY piece of geometry (which would take quite a while!) for a collision, your area is chopped up into segments. The engine then uses a binary search pattern to determine which area you're in (I think around 8-ish standard initial divisions for octrees, likewise for quad. Once again correct me if I'm wrong.) and then progressively whittles away at the segments until it finds what you hit. Very efficient, and works along the principles of the numbers game, if you're having trouble visualizing it.

There are other nifty methods of testing, such as axis-aligned bounding boxes (the potential movements of the objects are checked against lines in three different perspectives, theoretically could be implemented/optimized to use two) and bounding spheres (Is the object's center within this distance of our origin? It is? Boot it.) You can also use planes, which is essentially a simplified version of a-abb.

Speaking of interesting search algorithms, I read a fascinating article on the AI of F.E.A.R. It uses an A* search algorithm that constantly determines the most efficient way of killing you, the player, based on conditions like cover, current status, ammunition, player facing, etc. Other enemies can and do actively work together to bring you down. Absolute genius, wondering if I can somehow improve upon the process. If you haven't checked out the game, do so (be advised that you need a reasonably capable computer!) as the AI, storytelling and atmosphere is top-notch. Beats out Halo overall in my opinion, and coming from a Halo fan, this means something (Bonus points if you already knew this. If you don't know what I'm referring to then don't bother.)

EDIT: Whoops, didn't see you already posted the Quake thingy XD.

And yes, BSP stands for Binary Space Partition. In plain English, it keeps halving the divisions(partitions) of space.

EDIT 2:
alera wrote:doubling a texture resolution basically adds 4 times the data, that may be why you are getting only 1/4 of the picture so the resolution is locked :(



original resolution
1(think of this as a square)

to enhance one needs to add 1 3 times to maintain the same aspect ration

12
34

3 times as big will be
123
456

so effectively you need 4 times the space just to double the resolution!
FYI it's exponential. 2^n :)

User avatar
alera
advanced
Posts: 71
Joined: Fri Oct 06, 2006 2:33 am
Has thanked: 14 times
Been thanked: 5 times

Post by alera » Sat Jan 13, 2007 4:01 am

OneOneSeven wrote: Speaking of interesting search algorithms, I read a fascinating article on the AI of F.E.A.R. It uses an A* search algorithm that constantly determines the most efficient way of killing you, the player, based on conditions like cover, current status, ammunition, player facing, etc. Other enemies can and do actively work together to bring you down. Absolute genius, wondering if I can somehow improve upon the process. If you haven't checked out the game, do so (be advised that you need a reasonably capable computer!) as the AI, storytelling and atmosphere is top-notch. Beats out Halo overall in my opinion, and coming from a Halo fan, this means something (Bonus points if you already knew this. If you don't know what I'm referring to then don't bother.)
lol I remember halo :) quite repetitive but the ai was something fun :D!

I don't remember what was the name of the toughest difficulty but the friendly ai was horrible >.< I gave up on finishing the game at top difficulty because of it :( jumping around like a rabbit trying to have an overview of what was happening while trying to get the captain out of the ship wasn't fun at all

I heard of F.E.A.R but I am much more inclined towards prey, maybe because portal engines have always intrigued me, not as much for it's 0 overdraw but because of the illusion it can create :) oh and the "useless" interactivity that I love so much

however my pc is currently only a work station and I played neither :P bleh
Savage wrote: What i can say?
Really nice post, thanks
cool :)

--
LOL when I search the internet to check if wolfenstain was spelled correctly I came across something rather amusing http://en.wikipedia.org/wiki/Castle_Wolfenstein

look at the graphics improvements the commodore 64 had!(I seriously thought Wow!)

and it is game programmed mostly in underpants! haha

Post Reply