Skip to main content
GameDev.net gamedev.net
🔒 Locked

Run-time Texture Coordinate Generation

Started by kieren_j Mar 27, 2000 at 1:23 PM 0 replies 350+ views
Original Post
kieren_j
kieren_j
Hi. From previous posts, you may know that I am building a D3DIM engine from scratch (don''t ask my why). I have already made a 3D Studio .ASC file loaded; this was quite simple. However, at the moment if I want to texture an object, I add a special line to the .ASC file only recognised by my engine that specifies a file that contains all the texture co-ordinates (as they''re not included in the types of .ASC file I use). However, it''s obviously very tedious to put in all the texture co-ordinates for a model with 6 vertices, let alone 18! I''d also like to be able to map textures for dynamically-generated models. So, I''m just asking you basically, what is the standard texture mapping alogrithm for calculating texture co-ordinates. I''ve had a couple of thoughts: (1) Map almost directly, using the X and Y vertex co-ordinates to calculate U and V, respectively (i.e. front on, it looks okay) (2) Disperse evenly over the entire model using a total surface area calculation routine and then map the texture using the area of the face So, what do you guys use? - thanks

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.