Horde3D

Next-Generation Graphics Engine
It is currently 27.11.2024, 14:53

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Relief Mapping
PostPosted: 27.10.2008, 04:47 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
Ive been working on a Relief Shader for OpenGL and Horde3D this week-end! First of all, it is based on ATI's work and it was originally planned to be on DirectX HLSL, so I had to translate a lot of stuff and it werent really easy to do since some functions were missing, but in overall, the shader is working well.

I am not giving the source now, since I need to work a little bit to clean up the code wich is really big for a shader! But I plan to release it this week.

With the default Horde3D parallax shader :
Image

With Relief Mapping :
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Relief Mapping
PostPosted: 27.10.2008, 05:47 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
Nice work ;)

what kind of frame-rates do you get relative to the sample parallax?


Top
 Profile  
Reply with quote  
 Post subject: Re: Relief Mapping
PostPosted: 27.10.2008, 14:15 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
In the chicago scene, I'm getting about 50 to 100 FPS depending on my angle of view, for the parallax shader. With the relief mapping, it's about 20 to 50 FPS, with 12 to 30 samples depending on the viewer position. But when i'm looking at the complete scene away from it, I'm getting 50 FPS for both of them because the relief mapping is changing to bump mapping depending on the distance.

At this time, my driver is crashing when I'm using the HDR pipeline when I'm using the lightning context for the relief mapping. It work fine in a foward lightning context.

My spec are :
-Thinkpad notebook
-Quadro FX 570M
-4 GB RAM
-Core 2 Duo T9300
-Windows Vista 64Bit


Top
 Profile  
Reply with quote  
 Post subject: Re: Relief Mapping
PostPosted: 03.11.2008, 04:52 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
Ive been able to optimise the shader! The difference about the parallax shader and the relief shader is about 4 to 10 FPS on my computer. This done by mixing a normal map shader and the relief shader depending on the distance with a distance attenuation uniform variable.

I have uploaded the latest version here(With source and binaries):
http://www.mediafire.com/download.php?zzuwvindijm

I haven't had time to finalise the shader, so there is a lot of warnings, but it should work well.


Top
 Profile  
Reply with quote  
 Post subject: Re: Relief Mapping
PostPosted: 03.11.2008, 06:26 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
Ive sent the shader to a friend, and he had a probleme with the max() function on his computer.

Ive uploaded a fix for this.


Attachments:
File comment: Relief shader
relief.shader.rar [3.44 KiB]
Downloaded 1215 times
Top
 Profile  
Reply with quote  
 Post subject: Re: Relief Mapping
PostPosted: 03.11.2008, 21:49 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Thanks a lot for sharing this! It is great to see that piece by piece we get a quite impressive shader library. :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Relief Mapping
PostPosted: 04.11.2008, 02:08 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
marciano wrote:
Thanks a lot for sharing this! It is great to see that piece by piece we get a quite impressive shader library. :)


It would be nice to have a some kind of shader/material pack wich could contain a lot of shaders with different examples. Maybe it could be a new demo for Horde3D wich present one by one each of those materials. It's always interesting to see those things in an engine! I would have no problem to work on a pack or a demo like this, it's always pleasent to add a new shader to Horde3D :D


Top
 Profile  
Reply with quote  
 Post subject: Re: Relief Mapping
PostPosted: 04.11.2008, 08:24 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
I agree,... maybe we can create some public repository usable by the editor in the community branch. This way it would be easy to integrate existing models, shaders, etc. into a new scene. There is already a Repository directory in the SVN, but currently it is empty. Not sure if it would be a good idea to add it directly to the editors directory because maybe not everyone want's to check out the probably growing repository directory. Maybe we should add an Assets directory to the trunk directory instead.


Top
 Profile  
Reply with quote  
 Post subject: Re: Relief Mapping
PostPosted: 06.01.2009, 03:56 
Offline

Joined: 04.04.2008, 16:28
Posts: 13
Hi,

Does anyone still have the release of this? The link is dead and I would love to play with it. The shader he attached in a latter post won't compile for me, and I want a go at the binary included in the release. From what I can tell it looks awesome, great work!

Thanks.


Top
 Profile  
Reply with quote  
 Post subject: Re: Relief Mapping
PostPosted: 21.01.2009, 04:45 
Offline

Joined: 16.01.2008, 00:24
Posts: 73
Location: Canada/Quebec
Hi,

Could you show the compilation that you have in the H3D log? The last version was tested on one ATI and two Nvidia card, and it worked for them, but sometimes, there are some shaders errors specific to some drivers or graphic card.

BTW, the binary contain an outdated version of this shader. it does not work with ATI graphic cards, since sometimes, an error for ATI graphic card is only a warning for NVidia graphic card.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group