Thursday, 6 January 2011

Developer Journal 31

* Checked whether 1 unit in Bullet means 1 kilo.
* Checked whether 1 unit in Bullet means 1 meter.
* Get the contents of the screen.
* Write contents of the screen to a file.
* Use Ogre::Image::getColourAt() to get RGB at each pixel location. Put that in another image. Write that to a file.
* Check that the contents of the screen is correct.

* Connect view port to agent vision input.
* Add food
* Re-enable serialization.
* Get agent populations surviving again.
* Have a neuron for rotating left and another neuron for rotating right.
* Have a neuron for moving forwards and another neuron for moving backwards.
* Add code to reset a cube that is not on its "feet".
* Increase heights of walls.
* Get shadows working properly.
* Implement command controls.
* Implement FPS controls.
* Re-enable communication.
* Conduct gender experiments.
* Conduct maturation experiment.
* Experiment with joints and more advanced body shapes.
* Make the graphics look more like the demos in Bullet.


From the Bullet Physics Manual:

"The minimum object size for moving objects is about 0.1 units. When using default gravity of 9.8, those units are in meters so don’t create objects smaller then 10 centimeter. It is recommended to keep the maximum size of moving objects smaller then about 5 units/meters."

1 unit in Bullet is 1 meter when the gravity is the default of 9.8.


1 unit in Bullet is i kilogram.



How to Take a 8-Bit Grey Scale Image Screenshot

Off-Screen Rendering

Yah! I can write the screen to a file!

Now to test getting RGB values from different pixel locations.

I grabbed the RGB values of different pixel locations and wrote that to another picture file. I got a blank screen. I printed out the values I was grabbing and they definitely have colour. The printing is taking a fair while.

Ogre::Image::getColourAt( x, y, z ) returns an object of type ColourValue. ColourValue stores the colors as floats between 0 and 1.

My pixel format was Ogre::PF_B8G8R8 which stores colours as values between 0 and 255.

After that discovery, no more black screen.

No comments:

Post a Comment