DirectX using C#
DirectX using C++
DirectX using Visual Basic

Latest Forum posts

 Account settings
  Posted by: igthorn
  When: 21/04/2014 at 10:20:00

 Pavtube 2014 Easter Deals with 20% off
  Posted by: igthorn
  When: 21/04/2014 at 10:16:23

 20% off on iMedia Converter for Mac
  Posted by: VIKIVannessa
  When: 20/04/2014 at 01:35:54

 Pavtube Video Converter Ultimate Deal
  Posted by: VIKIVannessa
  When: 20/04/2014 at 01:35:50

 Easter Day Deals
  Posted by: Applefly
  When: 19/04/2014 at 22:18:14

 40% OFF Pavtube DVD Ripper for Mac
  Posted by: VIKIVannessa
  When: 19/04/2014 at 02:02:54

 DVD Ripper with 40% off
  Posted by: VIKIVannessa
  When: 19/04/2014 at 02:02:22

 Get DVD Ripper Wind/Mac + $14 Coupon
  Posted by: VIKIVannessa
  When: 19/04/2014 at 02:02:03

 Backup DVD Escape Plan
  Posted by: Applefly
  When: 17/04/2014 at 06:00:12

 Disney DVDs to MP4
  Posted by: Applefly
  When: 17/04/2014 at 05:56:07

 DVD movies through media streamer
  Posted by: VIKIVannessa
  When: 16/04/2014 at 02:25:09

 DVD movies to play on Galaxy Tab 3 10.1
  Posted by: VIKIVannessa
  When: 16/04/2014 at 02:20:51

 Blu-ray to Apple ProRes
  Posted by: Applefly
  When: 12/04/2014 at 00:47:46

 HD H.264 MP4 format
  Posted by: Applefly
  When: 12/04/2014 at 00:43:23

 DVD collection to computer
  Posted by: VIKIVannessa
  When: 04/04/2014 at 07:13:33

 DVD movies to play on Galaxy Tab 3 10.1
  Posted by: VIKIVannessa
  When: 04/04/2014 at 07:11:27

 DVD movies to play on Galaxy Tab 3 10.1
  Posted by: VIKIVannessa
  When: 04/04/2014 at 07:11:27

 DVD Ripper to populate
  Posted by: Applefly
  When: 04/04/2014 at 05:01:35

 kids and family watch DVD
  Posted by: Applefly
  When: 04/04/2014 at 04:59:21

 Blu-ray movie for your lovely kids
  Posted by: VIKIVannessa
  When: 02/04/2014 at 05:47:49

Topic: normx

Goto parent category
Create a new user account

 Poster : vijay
 Posts: 60
 Country : India
 City: Trichy

Posted by vijay on 03/07/2008 at 03:43:10
Hi Riemer,
Thank u very much for ur tutorials..
In this chapter can u explain me what does normx vector do...

Vector3 normX = new Vector3((terrainVertices[x - 1 + y * WIDTH].Position.Z - terrainVertices[x + 1 + y * WIDTH].Position.Z) / 2, 0, 1);
             Vector3 normY = new Vector3(0, (terrainVertices[x + (y - 1) * WIDTH].Position.Z - terrainVertices[x + (y + 1) * WIDTH].Position.Z) / 2, 1);
 Poster : Archenon
 Posts: 428
 Country : Romania
 City: Oradea

Posted by Archenon on 03/07/2008 at 04:55:00
I think here you calculate the average normal vector for the vertex.

The vertexes which is on the edge should have its normal vector the average normal vector of the triangles.
 Poster : vijay
 Posts: 60
 Country : India
 City: Trichy

Posted by vijay on 03/07/2008 at 06:15:03
Thank u for ur reply,
Initially they r in what position why we are calculating the normal vector...
 Poster : riemer
 Posts: 1392
 Country : Belgium
 City: Antwerp

Posted by riemer on 03/07/2008 at 13:26:09
They indicate the 'steepness' at that position, as they're the first derivative of the height at that position.

However, you should use the CalculateNormals method of series 1 instead. In a few days, I will put the updates Series 4 online.
 Poster : ieldanth
 Posts: 13
 Country : US
 City: Lebanon

Posted by ieldanth on 08/07/2008 at 00:59:50
Steepness is useful for multitexturing on terrains amongst other things.  

Just blending over to a sort of cubemap version of the rock texture based on the steepness of the terrain helps keep the terrain from looking like a stretched skin.  It's an old technique adapted from landscape generating programs like Terragen.
 Poster : m_Maky
 Posts: 67
 Country : france
 City: Nice

Posted by m_Maky on 08/07/2008 at 03:22:52
can you post a screenshot of this? it sounds intresting!
 Poster : ieldanth
 Posts: 13
 Country : US
 City: Lebanon

Posted by ieldanth on 08/07/2008 at 17:15:37
Sure!  I'm a beginner at this so the code would need a massive tweak overhaul.  Getting about 30fps.

 Poster : Quasar
 Posts: 121
 Country : Australia
 City: Brisbane

Posted by Quasar on 08/07/2008 at 19:04:39
I was already planning on applying a cliff texture to steep slopes, but the idea of using a cubemap to prevent the texture being stretched never occured to me. I'll have to have a look into it...

If it works I owe you a beer, ieldanth.
 Poster : Anonymous
 Country :

Posted by Anonymous on 03/11/2012 at 04:52:32
Sir can you help me please on this one? I did intslal this directx10 in my XP but still I can't play devil may weep 4 in directx10 I reckon there are two types of directX to be intslal in the computer, first the  10 for the OS and second is the  10 for the graphics card wich is the cd driver. Now the problem here is that my geforce 9500 gt cd has only  9 driver but I'm sure my card is compatible to  10 but the problem is I dont have a  10 cd driver for my card.

Post a new reply

If you appreciate the amount of time I spend creating and updating
these pages, feel free to donate -- any amount is welcome !
- Website design & DirectX code : Riemer Grootjans -
©2006 Riemer Grootjans

XNA 2.0 Recipes Book (8)
XNA 3.0 Recipes Book (8)
Extra Reading (3)
Matrices: geometrical
Matrix Mathematics
Homogenous matrices
Community Projects (1)
Tutorials (160)
XNA 4.0 using C# (89)
DirectX using C# (54)
Series 1:Terrain (14)
Opening a window
Linking to the Device
Drawing a triangle
Rotation - Translation
Terrain creation
Terrain from file
Importing bmp files
Colored vertices
DirectX Light basics
Mesh creation
Mesh lighting
Series 2: Flightsim (19)
Series 3: HLSL (19)
Short Tuts (2)
Resizing problem
Checking Device caps
DirectX using C++ (15)
DirectX using VB (2)