PDA

View Full Version : 2D texture or 3D texture



CGMY
10-07-2006, 08:13 PM
If I want to Texture a complex 3D model,which method should I choose?
How to texture a model only once,need not texture a model multiple times for diffeent parts of it?

ZbuffeR
10-08-2006, 12:28 AM
3D texture takes a lot of place and not really usefull if you only need to texture the surface of the model (instead of 'volume rendering).
Wrapping a 2D texture around a complex model is difficult, but a range of sulutions exist depending of your needs :
Use a real modeler to generate the needed custom texture coordinates :
http://www.blender3d.org/cms/UV_Unwrapping.363.0.html

Some tools allow to directly paint on the model : http://www.cgray.com.cn/upload/2005_06/05061322299495.jpg
http://www.pixologic.com/zbrush/products/products.html

In simple cases, try to fit a simple texture projection on the model (plane, cylindre, shpere, cube), unwrap it, and draw the texture on the unwrapped mesh. If you can't unwrap, you are left to draw texture, map it to check it is ok, and change texture accordingly, until you reach a good-enough solution.

CGMY
10-08-2006, 07:46 PM
I think my expression is not correct.I mean I need to write a program to texture 3D models,the calculateing of texture coordinates is difficult,is there any good arithmetic I can use or consult?

ZbuffeR
10-09-2006, 03:56 AM
Search inside blender source :-)

Anyway I still don't understand if you need texcoord generation (to map a texture on a mesh) or inversion (to find out where is a given 3D point on the 2D texture).
Generation for simple cases (plane, sphere, you may easily imagine for a cylinder) :
http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texgen.html
For inversion, I guess you need to invert the texture matrix.
http://www.rush3d.com/reference/opengl-redbook-1.1/chapter09.html

CGMY
10-09-2006, 07:19 PM
The model I want to texture is not regular,like strata model.Its surface is closed,and I need to texture the closed surface.

zed
10-10-2006, 01:36 PM
for most models u will need to define the texture coordinates yourself inside the modelling program which is usually a timeconsuming task

there are some magic functions/algorithms that will automatically generate texcoords by either attempting to unwrap a model or another method, but these will give worse results than hand generated texturecoordinates thus u have to tweek these

CGMY
10-11-2006, 03:14 AM
Are there any better functions/algorithms that automatically generate texcoords can be used in my program?Because I think it is hard for me to excogitate it.

ZbuffeR
10-11-2006, 04:39 AM
Your problem is under-constrained :)

zed
10-11-2006, 03:40 PM
easy on u two, some of us have vocabularies of 7 year olds


Are there any better functions/algorithms that automatically generate texcoords can be used in my program?look in your 3d modelling program, there will be a menu with UV texture coordinate generation, play around with that

CGMY
10-12-2006, 07:23 PM
Are there any better functions/algorithms that automatically generate texcoords can be used by my program?Is it right now?

zed
10-13-2006, 09:12 PM
what modelling program do u use + post a screenshot of your model

CGMY
10-16-2006, 07:24 PM
I don't do modeling ,I only need to texture the strata models that were already modeling,I only have the data structure of the surface of the model.

ZbuffeR
10-17-2006, 12:12 AM
If you already have texture coordinates, it is easy :
glTexCoord2D(...) before each relevant vertex.

CGMY
10-20-2006, 05:34 AM
No,I don't have the texture coordinates,I want to know how to calculate them.I think it is difficult for me. :confused:

ZbuffeR
10-20-2006, 06:43 AM
... here come the Blender modeler : not to create the model itself, but to easily create texcoords on it.

CGMY
10-22-2006, 02:59 AM
What is your mean?I can't understand.What should I do?