CHAI3DCHAI3D

normal How to enable texture mapping for the 20-map examp

More
16 Aug 2016 14:07 #1

Dear all,

I am a return user for chai3d and have just installed chai3d 3.1.1. I am working with the example source code of 20-map to make it texture mapping from an input image because the current source code always shows the blue color whatever the input image is. Does anyone know how to enable texture mapping from any 2D image as the input? What I want to do is haptic rendering with its original image color from a 2d input image. Thank you for your help in advance.

Best,

Sam

Please Log in or Create an account to join the conversation.

More
18 Aug 2016 04:36 #2

Hi sam,

I have i attached three image files.

I added a small piece of code in the main function.

and in the function loadHeightMap() , i changed the variable fileload to the desired texture file ,just to create the mesh of required size.

Or I think you can also scale the texture image to fit the mesh in the main function.


Hope this helps you.

Attachments:

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum