Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VDrift Graphical Upgrades
05-14-2010, 04:22 PM,
#64
 
Quote:should i bother the cpu to get them normalized
A lot of lighting models are using dot/cross products with the surface normal so normalizing it is a good idea. The speed shouldn't be an issue. We are not going to generate wheels per frame.

Quote:any way to alter a shader to have it draw vertex normals extending like little hairs off the vertex
Write your mesh into a file(you can use std::cerr) in obj file format and check it in blender. It's really simple.

obj file format (from wikipedia):
Code:
# this is a comment
# List of Vertices, with (x,y,z) coordinates.
v 0.123 0.234 0.345
v ...
...

#Texture coordinates, in (u,v) coordinates.
vt 0.500 -1.352
vt ...
...

#Normals in (x,y,z) form; normals might not be unit.
vn 0.707 0.000 0.707
vn ...
..

#Each face is given by a set of three indices each to the vertex/texture/normal
#coordinate array that precedes this.
#Hence f 1/1/1 2/2/2 3/3/3 is a triangle having texture coordinates and
#normals for those 3 vertices,
#and having for the vertex 1 (1/1/1) the vertex 1 from the "v" list, texture coordinate 1 from
#the "vt" list, and the normal 1 from the "vn" list; then for the 2nd vertex:
#the vertex 2 from the "v" list, texture coordinate 2 from
#the "vt" list, and the normal 2 from the "vn" list; for the 3rd vertex:
#vertex 3 from the "v" list, texture coordinate 3 from
#the "vt" list, and the normal 3 from the "vn" list
#NOTE: The list of vertices, etc. is one-based-indexing (meaning the first vertex in the file is v1).

f v1/vt1/vn1 v2/vt2/vn2 v3/vt3/vn3
f ...
Reply


Messages In This Thread
RE: VDrift Graphical Upgrades - by zimluura - 03-12-2010, 03:35 PM
[No subject] - by portets - 03-12-2010, 08:18 PM
[No subject] - by NaN - 03-13-2010, 05:53 AM
[No subject] - by NaN - 03-13-2010, 06:33 AM
[No subject] - by portets - 03-13-2010, 06:41 AM
[No subject] - by NaN - 03-13-2010, 09:43 AM
[No subject] - by portets - 03-13-2010, 11:49 AM
[No subject] - by sebiastisch - 03-13-2010, 02:17 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-14-2010, 01:30 AM
[No subject] - by portets - 03-14-2010, 02:51 AM
[No subject] - by NaN - 03-14-2010, 09:08 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-14-2010, 04:44 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-14-2010, 04:49 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-14-2010, 04:50 PM
[No subject] - by portets - 03-14-2010, 07:00 PM
[No subject] - by NaN - 03-14-2010, 08:00 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-14-2010, 10:50 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-14-2010, 10:51 PM
[No subject] - by portets - 03-15-2010, 12:39 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-15-2010, 01:03 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-15-2010, 01:04 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-15-2010, 11:17 PM
[No subject] - by zimluura - 03-16-2010, 05:03 AM
[No subject] - by NaN - 03-16-2010, 05:22 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-16-2010, 09:39 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-16-2010, 09:48 PM
[No subject] - by zimluura - 03-17-2010, 06:34 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-19-2010, 09:43 PM
[No subject] - by zimluura - 03-19-2010, 10:15 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-20-2010, 12:28 PM
[No subject] - by zimluura - 03-20-2010, 02:18 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-23-2010, 10:04 PM
[No subject] - by zimluura - 03-23-2010, 10:41 PM
[No subject] - by zimluura - 04-25-2010, 03:48 AM
[No subject] - by nomoo - 04-25-2010, 06:45 AM
[No subject] - by joevenzon_phpbb2_import3 - 04-25-2010, 03:01 PM
[No subject] - by zimluura - 04-26-2010, 11:11 PM
[No subject] - by joevenzon_phpbb2_import3 - 04-27-2010, 10:34 AM
[No subject] - by zimluura - 04-27-2010, 01:10 PM
progress report - by zimluura - 04-29-2010, 02:31 PM
[No subject] - by NaN - 04-30-2010, 02:18 AM
[No subject] - by zimluura - 04-30-2010, 01:07 PM
[No subject] - by NaN - 04-30-2010, 01:55 PM
[No subject] - by zimluura - 04-30-2010, 04:32 PM
[No subject] - by NaN - 04-30-2010, 05:04 PM
[No subject] - by zimluura - 05-01-2010, 02:08 AM
[No subject] - by joevenzon_phpbb2_import3 - 05-01-2010, 06:35 PM
[No subject] - by zimluura - 05-02-2010, 04:01 AM
[No subject] - by joevenzon_phpbb2_import3 - 05-09-2010, 12:51 PM
[No subject] - by zimluura - 05-11-2010, 11:36 AM
[No subject] - by joevenzon_phpbb2_import3 - 05-11-2010, 09:52 PM
[No subject] - by zimluura - 05-13-2010, 12:17 AM
[No subject] - by NaN - 05-13-2010, 01:45 AM
[No subject] - by zimluura - 05-13-2010, 03:09 AM
[No subject] - by NaN - 05-13-2010, 03:57 AM
[No subject] - by NaN - 05-13-2010, 04:16 AM
[No subject] - by joevenzon_phpbb2_import3 - 05-13-2010, 10:41 AM
[No subject] - by zimluura - 05-13-2010, 11:46 AM
[No subject] - by NaN - 05-13-2010, 02:34 PM
[No subject] - by zimluura - 05-13-2010, 04:34 PM
[No subject] - by joevenzon_phpbb2_import3 - 05-14-2010, 01:41 AM
[No subject] - by zimluura - 05-14-2010, 11:37 AM
[No subject] - by NaN - 05-14-2010, 04:22 PM
[No subject] - by NaN - 05-14-2010, 05:00 PM
[No subject] - by joevenzon_phpbb2_import3 - 05-14-2010, 09:51 PM
[No subject] - by zimluura - 05-15-2010, 02:57 AM
[No subject] - by zimluura - 05-18-2010, 09:08 AM
[No subject] - by zimluura - 05-20-2010, 12:58 PM
[No subject] - by NaN - 05-21-2010, 03:30 AM
[No subject] - by joevenzon_phpbb2_import3 - 05-21-2010, 12:00 PM
[No subject] - by zimluura - 05-21-2010, 04:02 PM
[No subject] - by zimluura - 05-25-2010, 06:07 AM
[No subject] - by NaN - 05-25-2010, 08:29 AM
[No subject] - by NaN - 05-25-2010, 08:55 AM
[No subject] - by joevenzon_phpbb2_import3 - 05-25-2010, 10:24 AM
[No subject] - by zimluura - 05-25-2010, 05:15 PM
[No subject] - by NaN - 05-26-2010, 10:23 AM
[No subject] - by zimluura - 05-26-2010, 11:53 AM
[No subject] - by NaN - 05-26-2010, 02:42 PM
[No subject] - by zimluura - 05-26-2010, 03:56 PM
[No subject] - by joevenzon_phpbb2_import3 - 05-27-2010, 01:35 AM
[No subject] - by portets - 05-27-2010, 08:06 AM
[No subject] - by joevenzon_phpbb2_import3 - 05-27-2010, 11:15 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)