XNA Game Development Forums
2012/05/21 19:48:27 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Terrain with Bumpmap  (Read 3956 times)
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« on: 2007/06/26 05:31:21 »

Have been playing around with bump mapping now that Chr0n1x, EclipsE and Benjamin Nitschke has solved my issues, and I thought, wouldn't it be great if you could have some nice bump map detail on your terrain!

I think I have managed to do it.

Once I have tidied the code up I will post it up here and link to my blog.

It's been a bit dead here, hope this rouses some interest...

[attachment deleted by admin]
Logged
EclipsE
Full Member
***
Offline Offline

Posts: 111


View Profile
« Reply #1 on: 2007/06/26 06:40:04 »

That looks too cool, but probably too slow...  Grin
Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #2 on: 2007/06/26 06:48:50 »

Yes, not overly fast, but pretty...

I guess you won't want a copy of the shader then....

[attachment deleted by admin]
Logged
muchrejoicing
Newbie
*
Offline Offline

Posts: 46


View Profile
« Reply #3 on: 2007/06/26 07:15:09 »

Wow -- I'm always impressed by how good things look with nice lighting. Good stuff. It does sort of worry me that all the cool lighting I've seen has been brutal on fps, even in really simple demo scenes. What's John Carmack doing right that we've forgotten?

Does the bumpmap shader try to pixel-shade the far away terrain too? If not, I'd try passing a flag from the VS to the PS, disabling bump mapping past some fixed range. (Remember Oblivion's "specular range" slider?)
Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #4 on: 2007/06/26 07:56:08 »

hmmm, I don't know...

Once I post the shader maybe you could have a look at it and maybe optomize it.
Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #5 on: 2007/06/26 08:12:26 »

Improved this a little buy putting the bump stuff in my terrain shader, the examples above were all added to Reimers. My terrain shader is a little simpler and so a little faster than his.

Here is the terrain rendered with my shader.

I will post both shaders so you guys can optomize them both...

[attachment deleted by admin]
Logged
Chr0n1x
Global Moderator
Sr. Member
*****
Offline Offline

Posts: 307


View Profile WWW
« Reply #6 on: 2007/06/26 22:09:16 »

What is John Carmack doing right? Well for one thing he is no doubt culling his terrain when its outside the view frustum, so thats one thing to include. Also Reimer's terrain shader, although it teaches it well, is terrible to FPS, something isnt working right there, and most of the time a terrain texture is generated with the terrain and so its only one texture that goes over the top, thus less texture lookups and that allows for more to be done with the shader. (Like bumpmapping)
Logged

Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #7 on: 2007/06/27 00:44:27 »

I guess if you have a solid terrain, and what I mean by that is a model of a terrain or a terrain that never alters shape, then you could produce a single texture to go over the top of it and so cut the FPS loss that way. I intend to add terrain culling in my class at some point and have a few ideas on how I will go about it. Also I think you have to keep in mind that Reimers shader is for a dynamic terrain and so that flexibility loses you some FPS, his shader is FPS heavy I agree but I guess you have to trade that of with a nice render on a dynamic terrain.

For example if you have a fixed image for your terrain, how would it manage the user altering the terrain at run time, or even if you wanted to drop a crater in there after a bomb drops? I guess you could then splat a texture over the effected area, but this model and it's shader does that for you...

I guess all we can do is put our stuff up here and as a community make it better by hearing other peoples input, so please if you have any ideas on terrain culling with this model please post them up, or even if you have a totally different way of modeling terrain, put that up to, I would love to see a ROAM model up here, I have a few links but at the moment it is a little beyond me (not read enough on it yet)
Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #8 on: 2007/06/29 01:22:38 »

I have posted the shaders and how it works on my blog:
http://randomchaosuk.blogspot.com/2007/06/engine-design-terrain-bumpnormal.html

Comments are as ever welcome.
Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
MOVED: Terrain Object Show Off Board Chr0n1x 0 2320 Last post 2007/01/27 23:23:52
by Chr0n1x
Terrain Traversing/Collision Hazy Mind XNA Engine Quinn 1 1605 Last post 2007/02/28 00:27:04
by Ardman
Bumpmap Shader General Discussion « 1 2 3 4 5 » Nemo Krad 70 21691 Last post 2007/09/06 13:15:22
by Nemo Krad
Question: Texturing Terrain General Discussion Ashe 1 2340 Last post 2007/03/17 10:28:36
by DaphydTheBard
Terrain orientation Hazy Mind XNA Engine Theoderich 1 1376 Last post 2007/07/30 00:20:17
by murga
Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.189 seconds with 19 queries.