Question on heightmap

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Sharon1105
Posts: 5
Joined: Mon Apr 09, 2012 1:37 am

Question on heightmap

Post by Sharon1105 »

Hi,
This is my first post on Irrlicht website :D :D
I'm a newbie of C# and i'm trying to use your .NET to write a simple program to render a 3D image.
In my program i need to use the greyscale bitmap to restore a 3D image of an object. I had studied your TerrainRendering tutorial, that do really help.
but i still got some questions:
1) if i want a 360 degrees rotation of the 3D image in any direction I want what are the codes that i can use?
2) do i need to build up a 3-dimension coordinate first ?
3) how could I define the color of my heightmap? Image like this.

I need some guide code for me to use or any useful tutorials and sorry for my english is not good.

Hope anyone can help, thanks so much. :)
Virion
Competition winner
Posts: 2149
Joined: Mon Dec 18, 2006 5:04 am

Re: Question on heightmap

Post by Virion »

1. you can add an empty scene node at the origin (0, 0, 0) and then create a camera and place it wherever you want. parent the camera to the empty scene node. after that you just need to rotate the empty scene node however you like, the empty node will serve as the center pivot point of the camera which will give you the "360 degree rotation" that you want.

2. not sure what you mean

3. you can play around with the RGB value. check the black and white value of each pixel of your height map, and increase/decrease the red, green or blue color accordingly (example: the darker the pixel, the more blue color and the lesser red color).

hope this helps
My company: https://kloena.com
My profile: https://zhieng.com
My co-working space: https://deskspace.info
My game engine: https://kemena3d.com
Sharon1105
Posts: 5
Joined: Mon Apr 09, 2012 1:37 am

Re: Question on heightmap

Post by Sharon1105 »

Thanks for your fast reply Virion.
i will try it :)
Post Reply