PDA

View Full Version : Real Relief



www.sibvrv.com
15-08-2007, 12:11 PM
http://www.sibvrv.com/images.gl/screen_002_sm.jpg

http://www.sibvrv.com/

Real Relief :) simple not optimized but work :)
Works fine on nVidia Geforce MX 440 and above. :)

Keys:
WASD - Movements,
F - FlashLight,
lesft mouse button and drag - Turn camera

any coments are welcome :)

jdarling
15-08-2007, 12:40 PM
While it was choppy at best, it ran fine on my POS system. Specs as follows:

Dell INSPIRON 4100
PIII 1Ghz
ATI Mobility video card (no shader support)
768Mb ram

As I said, it was choppy but at least it ran :).

Traveler
15-08-2007, 12:42 PM
That sure is looking really nice!

Welcome to PGD btw :)

jasonf
15-08-2007, 02:13 PM
I've been excited by the prospect of this technique since I saw Doom3 running with relief mapping enabled.. very cool.

This was done using Pascal and OpenGL?

After playing with your textures a little, I'm of the conclusion that *This* is the future of high detail meshes. As soon as common or garden graphics cards can handle it that is ;-)

savage
15-08-2007, 02:17 PM
Hi Roman,
great to see you found the time to post on here. The screen shot looks very sweet indeed.

chronozphere
15-08-2007, 02:33 PM
That looks great 8)

I noticed two things while moving through the enviroment:

> Somehow the camera control with the mouse works annoying.
If i want to turn my camera, my mouse cannot go further to the left/right.
I should make it more sensitive. :)

> The occlusion culling system has some glitches. When i walked into a "dead end" and managed to look back, i saw a large black gap just around the corner. You should take a look at this.

But i do like the bumpmapping very much. :D

It works on my system:

Vista Ultimate
AMD 64X2 5400+
2Gig RAM
Geforce 8600GT

Good luck. Hope to see more of this. :P

Robert Kosek
15-08-2007, 02:40 PM
The effect is nice looking, but I think it provides a little too much depth to things like the rocks. About half that is more realistic, as I've never seen a rock wall that juts that much. I have seen several rock walls that have half that much variance though, and the bricks are a little too far out as well. Other than the subtle things, the overall algorithm makes a nice effect.

Slightly choppy, but a workable 74FPS on:
AMD 4800+ X2 64
XFX 8600GTS 256MB
2GB 6400 G.SKILL RAM

Chronzo, the mouse does a click-turn, click-stay style manner of looking. So click and look, then click and recenter your mouse. A little tedious, yes, but better than nothing. ;)

www.sibvrv.com
15-08-2007, 02:45 PM
for chronozphere

The occlusion culling system has some glitches. When i walked into a "dead end" and managed to look back, i saw a large black gap just around the corner. You should take a look at this.
yes i know about it i dont have free time to finish it. :) this is simple maze culling :)

for savage
Hi Dominique, iam back to my city ~1 sept :) i dont have normal network here to post my version of quake to delphi... i have added Half life maps and some effects :)

for jasonf

This was done using Pascal and OpenGL?
Yes YEs Yes :) only pascal :) but with asm :)

www.sibvrv.com
15-08-2007, 03:00 PM
for Robert Kosek,
i only show the way to render real relief on very slow GPU without any of shaders and bump mapping. i have created this demo on my very slow computer :
Intel (32 bit) 1 Ghz 512 Mb Ram
nVidia Gf MX 440

and on my video board the FPS is 13-20.
and i have tested it on this machine in VMwave ~ 2 FPS

with video board GFfx 6600 > 250fps...

may be VSync is enabled on your board ?

jasonf
15-08-2007, 03:28 PM
Would it be difficult to apply a masked reflection map to a relief mapped surface?...

That would be amazing... Imagine, a texture with metal pipes on a brick wall, some parts of the bricks are wet because of leaky pipes.. the pipes are mostly shiny but near to the joints they're corroded. All of this with 2 polygons, 3 textures, 1 environment map (if not calculated at runtime) and a load of processing :D and if done well, almost photo realistic levels.

www.sibvrv.com
15-08-2007, 03:53 PM
Would it be difficult to apply a masked reflection map to a relief mapped surface?...

very easy :)


That would be amazing... Imagine, a texture with metal pipes on a brick wall, some parts of the bricks are wet because of leaky pipes.. the pipes are mostly shiny but near to the joints they're corroded. All of this with 2 polygons, 3 textures, 1 environment map (if not calculated at runtime) and a load of processing :D and if done well, almost photo realistic levels.

Do you want to create levels and models for my games with your design ?

jasonf
15-08-2007, 04:34 PM
http://upload2.postimage.org/285062/untitled.jpg (http://upload2.postimage.org/285062/photo_hosting.html)

quick mockup of pipes... it's a little jagged, but it looks ok

Huehnerschaender
15-08-2007, 10:44 PM
Personally, I am VERY impressed of what you visually present out of a simple 2D texture. I would never say that the effect you show is too big and that it does not fit to the natural look of something. Rather than that I have to say that the effects are absolutely awesome. Making this 3D look out of a 2D picture is awesome. You show the extremes of what is possible I guess.... lowering the visual effect is just a thing of tweaking I guess.

Bumpmapping is one thing (and I understand it!), but this.... I don't know how you make the things look like this when they are viewed from the side.... they look like the 3D mesh is build out of the picture...... Could you explain the texhnique a little more? :)

Greetings,
Dirk

www.sibvrv.com
16-08-2007, 06:44 AM
quick mockup of pipes... it's a little jagged, but it looks ok
very nice modification :)

savage
16-08-2007, 06:53 AM
http://upload2.postimage.org/285062/untitled.jpg (http://upload2.postimage.org/285062/photo_hosting.html)

quick mockup of pipes... it's a little jagged, but it looks ok

Noiceee!

wodzu
16-08-2007, 07:50 AM
Simply an outstanding demo.

Works ~5 FPS on:

AMD Athlon 1900+
SiS 741 64 MB Ram

Being on your site I must say that you are a titan of work! Impressive!

jasonf
16-08-2007, 08:24 AM
Now, can you imagine taking the Delphi Doom source (which uses OpenGL I think) and applying this relief mapping to the textures.
Sure, there'd be a mammoth effort to generate the required relief maps for the textures, but it'd look really cool.. there are lots of textures which have a lot of details on them which would come alive with relief mapping. Buttons, faces, gargoyles.. Light fixings.

NecroDOME
16-08-2007, 09:37 AM
I like it! However, sometimes I got framedrops to 25. It runs normaly on 75.

How did you do it? Did you use the texture as hightmap and model the relief or did you use a fancy shader to do that for you?

EDIT:


Now, can you imagine taking the Delphi Doom source (which uses OpenGL I think) and applying this relief mapping to the textures.
Yeah, give it a try!

NecroDOME
16-08-2007, 01:00 PM
k, I ripped a texture from Doomsdayhq (hires doom texture, not original). I did have to adapt the "heightmap". Here is the result:

http://necrodome.homeftp.net/zooi/DoomBump1.jpg
http://necrodome.homeftp.net/zooi/DoomBump2.jpg
http://necrodome.homeftp.net/zooi/DoomBump3.jpg

jasonf
16-08-2007, 01:39 PM
I foresee a beautiful thing starting :wink:

www.sibvrv.com
16-08-2007, 03:19 PM
NecroDOME, jasonf...
Now I optimize my simple engine and add shadows with physics, but i cant create levels for it... who want to help me?
btw i have trying load Q1 levels with Reliefs, new demo coming soon :)

NecroDOME
16-08-2007, 05:00 PM
looking forward!

WILL
16-08-2007, 08:46 PM
A level editor would be a helpful tool...? Maybe someone could make a tool that can be extended so that way the workload could get spread around.

jasonf
16-08-2007, 09:10 PM
What kind of game is it? what sort of levels are you interested in?

Do you have textures already? I have used apps like worldcraft to make quake maps, but it's been a while.. I used to make maps for the Torque engine.

It does seem a little old hat though, CSG levels do tend to look very boxy and it's very hard to make certain shapes.

PM me if you don't want to discuss everything in a public forum, although the more people you can get interested in helping out, the faster things will get done..

NecroDOME
16-08-2007, 09:24 PM
CSG levels do tend to look very boxy

Unreal (and unreal tournament) have CSG levels. And they look nice - not boxy (well... it looks boxy cause old games do by default). The only thing you need with this is vertex editing. And thats the easy part of CSG.

jasonf
16-08-2007, 10:16 PM
Vertex editing is also an easy way to bugger up a CSG level :lol:

It's true though, with skill, it's possible to make stunning levels. I always end up breaking mine whenever I mess with the vertexes though. I do wish that some of the tools would allow better control of the geometry... perhaps it was a torque thing but it was always a hit&miss affair for me trying to make organic looking shapes. sometimes things would look different after compliation than they did in the editor.

In my experience, CSG is great for boxy rooms, but as soon as you want something smooth or intricate, then the skill/results graph starts to go a bit turbo.

UT2004 has some truly amazing looking levels.. I think they use something else, there appears to be a lot of repeated, hi-res models used in the environments. Perhaps they've taken the bsp tree model and applied it to fixed entity positions.

Robert Kosek
16-08-2007, 10:24 PM
UT2k4 makes use of "static meshes", or meshes that never change and are completely cachable by the graphics card. So it's like a display list.

Traveler
16-08-2007, 10:41 PM
Ohh.. this is really nice!

Very interested to see where this is going to :D

NecroDOME
17-08-2007, 09:01 AM
True about the "static meshes". UT2k4 uses CSG to make the basic 'level geometry', and they finish that with filling the spots with static meshes and terrain. And it indeed looked very nice! But if you try to make oranic shapes, you should make a mesh and add that to the world, don't model it with CSG. However the unreal editor handles CSG pretty nice! Sometimes it still bugs a but, but with a little edit-vertex tweaking you could fix most things!

EDIT:

@Will: Here are some ppl writing "a better 2D engine". Why not start a project "a better 3D engine" (with editor). I'm sure you guys could manage it! However I'm not going to help with coding, but could point you guys in the right direction. And the pascal-community would have a 3D engine with editor to make fancy looking games.

Anyhow to get on-topic: you could also model the walls in stead of make a heightmap out of it :P . It would be faster and in most cases beter looking.

jasonf
17-08-2007, 10:08 AM
Garage games have recently completed work on their Constructor tool, which they've been working on for the last 2 years.. which is released for Free! I've not used it yet, but as Torque uses csg for its interiors, and as constructor exports to .map format, it might be worth a look into before we go off down the reinvent the wheel road

Here are some CSG editors, some free, some commercial..

Cartography Shop: http://cartographyshop.thegamecreators.com/
3D World Studio: http://3dworldstudio.thegamecreators.com/
Quark: http://quark.planetquake.gamespy.com/
Hammer: http://games.softpedia.com/get/Tools/Valve-Hammer-Editor.shtml
Constructor: http://www.garagegames.com/products/torque/constructor/

so why on earth would we want to write another one?... :lol:

www.sibvrv.com
17-08-2007, 11:48 AM
so why on earth would we want to write another one?... :lol:
answer : try to load and edit Doom 3 map in Doom 1 map editor :)

jasonf
17-08-2007, 12:02 PM
Ah, yes.. Doom1 editors cannot create Doom3 maps.. this is a fact. Completely different technologies.

So are you implying that your game requires maps which use a different technology to those generated by the common editors, before you only wanted quake maps. :wink:

If, as you mentioned before, you're interested in using Quake style maps, then the hard work has already been done in the form of an existing editor.

They ALL support the .map format, which is a published standard so any game could, in theory, use these editors to create their CSG geometry.

Unless there is a real need to create another editor from scratch, unless the engine is truly revolutionary and the current offerings of tools are just not up to scratch or hold you back, I would strongly advise against the wheel reinvention route.

However saying that, if attempting to use an existing tool is slowing you down and it would save more time to just write a new editor, then it should be done.

I've seen too many half baked, half finished mesh editors while I was working with Torque and the community there wanted to create yet another milkshape (only free.. as if the $30 was too expensive), the developers lost momentum, or didn't get the support they expected from the community.. because the existing apps offered more tools or had fewer bugs.

The very smart guys at garagegames took 2 years to make constructor.. using a technology they know well and a language they are experts in.

Passion is one thing, reality is something else.



edit: I've just re-read this and I sound like a bit of an arse.. it's not my intention to sound critical. :oops:

If your engine can support quake style bsp's then (via the .map import) then I'm sure people can quickly create level data for you.. It's also a toolset which people know well and can be productive in quickly. :)

www.sibvrv.com
17-08-2007, 02:23 PM
New demo is coming very soon :)

I dont have time to make very best design and very big level with lots of detalies...(may be very good designers can help)


This map is created as tempory only for testing how does my engine work with all maps created in Quark.... the engine is work fine. Now i optimizing it and making minimum physics.

http://www.sibvrv.com/images.gl/temp_demo_2.jpg

for jasonf : This map created in quark and saved as ".map" file :)

www.sibvrv.com
17-08-2007, 02:35 PM
I've seen too many half baked, half finished mesh editors while I was working with Torque and the community there wanted to create yet another milkshape (only free.. as if the $30 was too expensive), the developers lost momentum, or didn't get the support they expected from the community.. because the existing apps offered more tools or had fewer bugs.

About Milkshape :) in 2003 year i have started my project Dreams 3D Model Editor it is contain all functions like in Milkshape and 3D Studio Max and Radiant Quake Editor... And it can load levels from Doom 3 / Quak 4, also can open many file formats... about milkshape import/export plugins if you have it - my model editor load.. :) but i dont have time to make site for it. :( may be in the next month i finish the site for model editor.

jasonf
17-08-2007, 02:52 PM
I am eagerly anticipating another demo in which I can load a .map file. (where's the icon for jumping around? :D)

I'd like to see what sort of realism this effect can generate when mixed with standard csg.

You're making an full featured editor too? Are you like, the Coding Terminator or something? :D :cylon: 8)

www.sibvrv.com
17-08-2007, 03:24 PM
jasonf .... "start" :)
http://www.sibvrv.com/images.gl/temp_demo_3.jpg

jasonf
17-08-2007, 03:52 PM
On a slightly different note, I've installed Constructor and had a quick play with it... OOOooohhh it's lovely :lol: . At first glance, it beats all other csg editors I've used into a quivering pulp.

I reckon I'll be able to make a nice enough looking level.

I'll need a copy of your program though (compiled is fine) which allows me to specify a filename.
I'll also need textures.

I'll also need sprite sizes.. no point making doors if the player can't fit through them :D

savage
18-08-2007, 01:41 PM
If I understand this technique correctly it is like height maps but for walls right?

Now the other great thing about Real Relief is that at run-time if a rocket hits the wall, you should be able to make it look like a real chunk of wall was taken out. Or if you skin a character using it, you should be able to virtually show body parts caving in when hit by missles.

Couple that with some physics and collapsable buildings and it should be a very sweet experience for the gamer.

jasonf
18-08-2007, 05:32 PM
I wonder what this would be like animated...

Imagine a solder model, as the solder walks into the water, his uniform gets wet and the creases are sharper and more hugging. As they dry off, the uniform begins to flow more freely.

Or, you give the player a crowbar.. previously in games like halflife, although you could hit the walls with the crowbar, you couldn't actually damage them.. bullet holes were just decals on the very solid wall..

Now imagine that the crowbar could make indentations in the wall, the concept of a decal relief map could be born.. bullets actually make indentations in the wall which can be seen from an angle. The crowbar could take chunks of plaster off the wall. There are lots of things you could do with this effect.

A texture in an adventure game of a pebbled stream.. currently, this effect would take a lot of polyons to acheive, but using relief mapping, the stones on the bottom of the stream would literally stick out.

Imagine a RTS game where tanks leaf actual indentations in the ground where they've been driving.. churning up the mud as they go..

A 4x4 off road game with real mud...

A ray gun fired at a metal door.. not only does it start to glow, but bubble too..

Rivets in metal hulls of submarines,

ridges and bumps on alien bodies..

Realistic egyptian tombs, with realistic sandstone.

savage
18-08-2007, 06:06 PM
Roman, is there any chance that you could explain the technique you are using further or are you keeping it a secret until you release a commercial game with it?

NecroDOME
18-08-2007, 07:14 PM
nice!!

www.sibvrv.com
18-08-2007, 08:45 PM
Loading maps from Quark finished :)

http://www.sibvrv.com/images.gl/shot0000.jpg
http://www.sibvrv.com/images.gl/shot0001.jpg
http://www.sibvrv.com/images.gl/shot0002.jpg
http://www.sibvrv.com/images.gl/shot0004.jpg

www.sibvrv.com
18-08-2007, 09:00 PM
Roman, is there any chance that you could explain the technique you are using further or are you keeping it a secret until you release a commercial game with it?
Dominique, thats is not a secret :) only one problem - i can't write good description in English :)

:roll: btw, today i have created first physics for engine, with lots of bugs (now trying to fix) :)
physics materials - metal, wood, brick, glass and cloth.
if shot the glass it crash where bullet damage it :) about metal - can twist and crash.

jasonf
18-08-2007, 10:40 PM
Matey, this is looking damn fine :D 8)

Luuk van Venrooij
20-08-2007, 01:03 AM
I was wondering how he did that cool relief effect and lighting without any shaders. So I quickly created my own version using a heightmap and the standart OGL lighting. Gives some pretty nice results that look like parallax mapping with per pixel lighting.

The demo has 1 surface with 4 rotating lights with different properties.

Screenshot:
http://img264.imageshack.us/img264/1094/untitledky6.jpg (http://imageshack.us)

Download link:
http://www.genesisdevice.net/downloads/ReliefDemo.zip

www.sibvrv.com
20-08-2007, 08:17 AM
I was wondering how he did that cool relief effect and lighting without any shaders. So I quickly created my own version using a heightmap and the standart OGL lighting. Gives some pretty nice results that look like parallax mapping with per pixel lighting.


My Congratulations! You move by my steps :)

Parallax, bump and "relief"(displace texture) maps are - fake :)
Real relief - means mesh relief without any fake technologies and you have a good start. Good Luck!

Luuk van Venrooij
20-08-2007, 08:33 AM
Thank you:). I personally think this looks better than parallax mapping. The problem with this methods is when you look at a steep angle at the surface you can see the edge is flat. To bad the polycount is so high for a single surface:).

Also I was pretty impressed with the effects that can be created with the standard OGL lighting system. Never done much with it before, but the results speak for themselves :D

I am currently working on a simple Wolfenstein like engine to experiment more with this technique. This engine will have 2 render modes. One using only OGL 1.0 (like the demo a few posts back) and one using geometry shaders which are already available though some nvidia extensions on my gf 8800 card. This will be an ARB feature when OGL 3.0 comes allong and allows you the generate/add geometry via shaders:).

21o6
20-08-2007, 12:14 PM
hi :D

i hope this is of interest.

as the trend always was biased to fooling the user in believing he is seeing something that looks realistic (that's what raster-gfx is all about, after all), techniques like dot3/bump/parallax mapping evolved, because "nobody" "seemed to care" about recreating reality (like making relief from vertices = an object).
of course, speed wasn't there in the past so mapping-techniques had a sense, but as speed increased nobody "switched the system", they just pumped more speed into the pixels, which was - in my eyes - senseless back then and still is now.

today "everybody" is still trying to create ways to let the user see something which isn't "really" there (like the relief via parallax mapping, where the illusion of an object is created ... the "object" is a flat picture).

if the gfx-chip-creators would have pumped more speed into vertex-handling rather than pixels, gfx-coding would be waaay more easy
and gfx would have evolved even further by now (and i wouldn't have stopped coding on x86 :D).

why i am telling you this? because i wanted to make sure you know that G80 is SLOW when it comes to geometry-shaders (so you don't start thinking it could be your fault if it runs slow). no, i do not compare with ATI, i own a 8800 gts 640, which is FAST (oh yeah *gg*) ... but not when it comes to geometry-shading.

... and i wanted to rant a bit *gg*

www.sibvrv.com:
i _really_ like that you are using vertices instead of a mapping technique. it feel's so good that somebody shows what can be done when one does not follow the way of the masses.
thank you for this and inspiring others to follow you :D
the picture looks great (the in-demo-gfx too) and i hope you'll find a technique for making it fast enough so i can watch a demo or something on my notebook with integrated graphics (got 11 fps here *argh* *gg*).

... and sometime's i tend to write more than is needed. sorry for that, i'm just strange :D

Robert Kosek
20-08-2007, 01:14 PM
That is a really impressive effect. I still go "wow" when I look at the screenshots.

My primary question is just how efficient can we make this type of effect? I would guess that at a low enough heightmap resolution we could optimize a texture into a display list, and then transform coordinates and render the display list. Or, you could have an intermediary level compiler that turned the world into a static "mesh" based off the textures and heightmaps. You'd loose the deformable walls and such, but you'd be able to blend around corners easier.

At least high-polygonal things aren't as inefficient as swapping around textures.

Luuk van Venrooij
20-08-2007, 10:00 PM
A little update on my reliefmapping wolfenstein engine. The engine now has a material and lighting system based on the basic opengl system. The detail of the reliefmapping can be set. This last effects the detail and lighing of the surfaces. The higher the better but at a higher polycount. Also I wrote some stuff to bind surfaces with different angles and materials together. Later this week Ill start working on a mapformat, some spatial partitioning and light management code:)

Some screens:

http://img474.imageshack.us/img474/4081/33756068vm2.th.jpg (http://img474.imageshack.us/my.php?image=33756068vm2.jpg)
Light effects:)

http://img523.imageshack.us/img523/8736/32356639ix6.th.jpg (http://img523.imageshack.us/my.php?image=32356639ix6.jpg)
More light effects. Note the seemles edge.

http://img206.imageshack.us/img206/2751/40628407sa7.th.jpg (http://img206.imageshack.us/my.php?image=40628407sa7.jpg)
Different relief details

Huehnerschaender
20-08-2007, 10:15 PM
Thats crazy! Absolutely awesome :)

Traveler
20-08-2007, 10:32 PM
indeed, quite stunning :shock:

WILL
21-08-2007, 01:00 AM
Wolfenstein 4D anybody? :)

wodzu
21-08-2007, 08:17 AM
Roman do you have there some time-doubling machine or what?;) May I ask how much time daily you spend on coding?
If you finish your editor (include some textures) I will gladly make some level for it. However I was working only on maps from Doom 1/2, Heretic 1/2, Hexen (my favourite game;) and Quake 3 so I don't know how map making changed since that times.

savage
21-08-2007, 12:31 PM
I occasionally need to remind Roman, that he needs to take it easy.

NecroDOME
21-08-2007, 09:44 PM
You could make the walls that don't require that much detail just flat and when you come close you could make them relief mapped.

(sorry, didn't had much time last 2 day's to follow this thread - busy with Uber Zombie :) )

EDIT:
@Luuk van Venrooij
Look neat, you planning to actually add wolfenstein enemys (sprites)? You should also implement MegaTextures (id Tech 5 uses them:) ) It's per-triangle unique texture.

This would be next-gen wolfenstein 3D :P

Chebmaster
22-08-2007, 08:50 PM
I did always believe this approach is better.
The bump-mapping and other "fake" techniques require a ton of extra calculations per vertex, the same power could be put to much better use.

chronozphere
22-08-2007, 09:26 PM
That looks absolutely stunning... great work :thumbup:

I always believed that shaders where faster for these effects, because where a lot more flexible then any fixed-function approach. But i guess this proves the opposite. Speaking of that, has anyone compared the speeds of these techniques yet?? :razz:

I assume that bumpmapping makes heavy use of pixelshaders, since these are executed far more often than Vertexshaders, this would decrease the performance significantly. This brute force approach might be faster, but i think the visual quality and the polycount should be well-balanced in order to gain some good speed.

@Luuk van venrooij: I'm also very curioous about the polycounts you are getting (let's say for 1 side of the cube in that screenshot)?

Keep up the good work :)

Robert Kosek
22-08-2007, 09:48 PM
I downloaded the single surface demo he put together and it was roughly 113k polygons just for that one surface. That's a pretty high polygon scene there.

NecroDOME
22-08-2007, 10:00 PM
The best and fastest way is just to model it. This way you can remove unwanted triangles and still have a nice result. Unreal 2003/2004 makes use of this and it looks great! But no every big company uses shaders indicating that thats the best way to do it on modern hardware (sorry Chebmaster).

An other thing: shadowing. Try making a 10k object cast shadows! it will work, but I think you need a nVidia Uber something to render it at a decent fps!

If some one can tell me why many triangles is better (and gives better result!), plz tell me. I'm sure shaders (more vertex caluclation) with the correct models (les triangles) IS faster!

cronodragon
22-08-2007, 10:08 PM
YYou should also implement MegaTextures (id Tech 5 uses them:) ) It's per-triangle unique texture.

One could texture a whole level with a 256x256 texture i.e., but what should be the resolution of a texture to be called MegaTexture? How much should you zoom until you see the pixelation?

NecroDOME
22-08-2007, 10:19 PM
mega texture would more define a 16.000x16.000 texture

21o6
23-08-2007, 03:05 PM
the MegaTexture (http://http://en.wikipedia.org/wiki/Megatexture) technique by John Carmack. :)

altough the idea isn't really groundbreaking, you at least have to find a
speedy way to implement the streaming, unless you're generating the textures at runtime (farbrausch (http://www.farbrausch.com/productions.php), anyone? :D)

I think the biggest positive on having an engine that streams the texture-data is that - providing it works *g* - you never ever have to think about handling texture maps again, because you get vram-size-independency. :D

NecroDOME
23-08-2007, 04:14 PM
http://en.wikipedia.org/wiki/Megatexture (link fix)

cronodragon
23-08-2007, 04:27 PM
And how is the technology of MegaTextures working? I can think about it as dividing the mesh in several pieces (the visible ones), loading the texture fragment for the corresponding meshes and rendering (paging). Might not be that simple, or does it? Also, if U-V coordinates are values from Single(0.0) to Single(1.0), isn't it a problem to deal with that huge resolution (128000x128000 pixels) to map the meshes? There should be a limit regarding to floating point precission. Or is it possible to feed the U-V with practical values larger that 1.0? :?

NecroDOME
23-08-2007, 05:18 PM
its more that they divide the texture into a grid of all textures needed for a render call. (according to this thread @ GameDev.net http://www.gamedev.net/community/forums/topic.asp?topic_id=460053)
They have some textures where they put up the mipmaps and textures used for that render call. As carmack said: we can render the entire scene in 3 render call (don't ask me how) if we disable culling n stuff...

Luuk van Venrooij
23-08-2007, 06:02 PM
First something about the relief demo. Shaders ARE and probebly will always be faster to produce such results. Simply because the transformations that need te be applied to the massive ammounts of triangles is extreme. And todays cards are more build towards shaders then vertex processing. One thing I`m working on right now is using opengl geometry shaders to procude the same result. Just render the quads normaly and pas the heightmap and texture down the geometry and pixel shaders. Use the color texture to generate the pixel color and the heightmap to generate the traingles on the surface. Will hopefully finish this somehere this weekend.

And a thing about the megatexture. I have actualy studied this technique. There is a mod for the doom 3 engine available unlocking this.

http://quake4.filefront.com/file/Megatexture_Technology_Demo;72878

The shaders used for this technique can be extacted from the pakfile. The same goes for the Quake Wars beta if you have it. Once I took a look at the shaders the techique isnt really that hard. It is basicly the same is clipmapping. Here is a screenshot of clipmapping on a terrain surface.

http://gameprog.it/hosted/typhoon/terrain_shots/terrainWire2.jpg

As you can see the further away the camera is the les striangles are used in a quadlike manner. Moving the camera arround just moves your quad boundaries arround. the can be streamed from the harddisk very effeciently. Megatexture does basicly the same but then in on a texture level. Instead of quads of detail on the geometry carmack uses 3 texture buffers of 512, 1024 and 2048. These are then filled From a base texture of 32*32 k . The large one is used up close and the others are used the further away you get. Here is a screen of the result with texturing instead of geometry.

http://doom3.filefront.com/screenshots/File/72779/4

The shaders for this are actually pretty easy. What I want to know is how he streams the new texture date in memory and how that he compresses a 32000 x 32000 pixel texture in 500 mb. (size in quake wars).

One thing I did discover in the quake wars files is that they also use detailtextures for up close with a coveragemap allowing up the 3 textures.

Also I found an engine a while back the could render terrain using the similar technique. ALso L3DT, the terrain generator I use has this technique implemented in it`s viewer.

http://www.bundysoft.com/coppermine/displayimage.php?album=22&pos=5

Like al stuff Carmack makes, someone thought it up a long time ago, he`s just the first to effectively use it and make it mainstream. (BSP, static lightmapping, stencilshadows, normal mapping enz)

NecroDOME
23-08-2007, 07:07 PM
@Luuk van Venrooij, That pretty neat stuff. Never gone in depth on terrain render or mega textures, but I well interested in the technique!