Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Register Log in

Need Help Extracting Texture Data

moleary

New member
Anyone have an example that extracts texture data from a model. I am using the prodb_surface_tessellation function, but I get all 0.0 values for my u,v coordinates that are returned. Any help would be greatly appreciated!
 

williaps

New member
moleary,


Did you look up the function prodb_get_surface_props? Look in the API Wizard under User's Guide->Graphics and Object Display->Cosmetic Properties->Surface Properties. You might find your answer there.





Patrick
 

moleary

New member
Thanks for the help Patrick, but I've seen this. I think I really need some example source to figure out what's going wrong. I've made all of the calls to the functions I need, but still get UV values of 0.0. The one thing I am not entirely sure about is how to set the Pro_uv_attr structure that is passed to the prodb_surface_tessellate function. Does anyone know how this should be set up? Thanks for any help you can give!
 

williaps

New member
Well, you can call pro_db_get_surface_props. In the returned structure there is a projection and local_csys, both of which you need to populate the Pro_uv_attr. Then you can tessellate the surface. I have not done it but that is where I would start.
 

moleary

New member
I was using this structure returned, but it was crashing sometimes so I had removed it. ThenI realized that codewasn't respecting the function return value and accessing invalid memory. Thanks again for the help!
 

him13

New member
Hi Moleary & Patrick,

Did you get your answer? I think,we do not get proper values for local_csys from prodb_get_surface_props.

I have same requirement of getting uv coordiantes for textre mapping. Let me know if you have some clues.

Thanks in advance.
 

Sponsor

Top