Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Fri Mar 29, 2024 10:20 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Parallax mapping ...
PostPosted: Wed Jun 11, 2008 11:55 am 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
For working parallax mapping is needed TBN calculation, because TRI file contain only one normal, is created tangent and bibormal for every vertex after loading?

When not, then it's necessery ;) here is good and working method:

http://www.terathon.com/code/tangent.php


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 11, 2008 3:08 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

I really have no idea :?

What is parallax mapping :shock: Tbn :shock:

I can have a look at tri file loading it seem that tangent are computed:

Code:
 raydium_normal_generate_lastest_tangent

normal.c line 74

Is it what you are looking for ?




Xfennec some help :D

Have a nice day

Ouille


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 11, 2008 4:49 pm 
Offline
User avatar

Joined: Thu Aug 24, 2006 4:06 pm
Posts: 73
Location: SLOVAKIA
T = Tangent
B = Binormal
N = Normal

normal.c looks good, but then is problem in parabump shader, because heightmap is shaded always from view direction end not from light position.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 15, 2008 10:09 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
I'm probably a bit late here, but have a look at chapter 49.1 from the documentation: Raydium computes and provides a tangent attribute to shaders.

Code:
attribute vec3 tangent;
...
void main()
{
...
vec3 binormal = cross(tangent, gl_Normal);
mat3 TBN_Matrix = gl_NormalMatrix * mat3(tangent, binormal, gl_Normal);


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 27 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