Change log for this release :
Texture factory :
-> Some new functions allowing to manipulate pixels in textures
-> GetPixelArray, SetPixelFloat, GetPixelFloat, SetPixelArrayFloat, GetPixelArrayFloat added
-> the Float functions are useful to get or update the values of a floating point texture (Float16/Float32)
Support for fast GPGPU (General Processing on GPU) now !
-> You can now get the values from rendersurfaces, either floating point or normal rendersurfaces.
-> If you remember well, you can't directly get values from a RS, you can't lock a Rendersurface.
-> So now you must enable the system copy of the RS with RS.SetSystemMemCopy(bool bEnable).
-> Then you can use GetPixel/GetPixelArray/GetPixelArrayFloat/GetPixelFloat to get the values
-> You can't use SetPixel/SetPixelFloat though (use the Screen2D drawing functions)
-> Enabling system copy takes more RAM so use it only if needed.
-> Try to call GetPixel**** functions quite far from the RS render so that the CPU doesn't wait too much for the GPU.
Support for hardware occlusion queries now !
-> You probably heard about an hardware way to do occlusion with queries. How does it work ?
-> The principle is simple, a query allows to know how many pixels has been rendered and passed the Zbuffer between a Begin and a End
-> If no pixel has been rendered then the object is totally occluded.
-> So a simple way to use that for occlusion culling :
- Create a rendersurface, smaller than the backbuffer size usually to not use too much memory & fillrate.
- Init the camera occlusion system with : Camera.OccQuery_Init with the number of queries that you plan to make per frame.
- Put the same camera object as the main viewport (using RS.SetNewCamera function)
- Render all possible occluders in this RS with usual functions. You might even render low-LOD versions of your objects.
- Then for each object that you want to check the occlusion on :
-> call OccQuery_Begin() (it returns a query ID, that can be used for the GetData function afterwards)
-> draw the bounding box or quad with OccQuery_**** functions. These will only do checks on the Zbuffer and not actually draw the object at all, so it's quite fast and doesn't take too much fillrate.
-> call OccQuery_End()
-> call OccQuery_GetData(queryId, true), it returns the number of pixels of the boundingbox/quad that are visible.
-> if you have a number of queries == 0 then you can skip the rendering of the object (can be very interesting if it's a high poly mesh or complex actor)
-> Some optimizations for that :
- The CPU and GPU are doing their work asynchronously, so try to call GetData after all Begin/End and sometime after the RS rendering. This way the GPU will have had the time to finish the boundingbox drawings and tests.
- Try to group all Begin()/Draw()/End() calls. Don't do GetData directly after each End(). Thats why multiple queries are possible.
-> More integration of this culling technique (to make it a little more automatic) in the next updates probably.
Camera :
-> Added all occlusion functions
-> Added Destroy
Particle system :
-> Fixed a problem in Loading/saving particle emitter position
-> Added SetName/GetName
Minimesh :
-> Fixed a bug with minimesh culling and minimesh position when using GlobalPosition
-> Now the minimeshs should be rendered at the good place (don't be surprised if your minimeshes moved a little)
-> Finally you can now use custom Shader on minimeshes ! (Minimesh.setShader)
-> Here is a sample of custom shaders to use with minimeshes
http://www.truevision3d.com/download.php?secure=2&file=CustomMinimesh.fx it's quite simple and once you know the semantics, you can wrote your own.
Text rendering :
-> Added small Unicode support for text rendering. Only for NormalFont ! NormalFont_DrawTextUnicode & NormalFont_GetTextSizeUnicode
-> This is only for NormalFont because it would require too many characters on a TextureFont.
-> Optimized TextureFont quite a lot (up to 30% faster when drawing small bits of text)
-> To get the entire optimization, you must use correctly Action_BeginText and Action_EndText.
-> Now you can also use Screen2D to draw texture fonts ! For that, you must set the boolean in Action_BeginText to True. This will actually use internally the DrawTexture function of Screen2DImmediate. This could also speed up the rendering a little and allow you to mix rendering between 2D and text in the same Action_Begin2D and Action_End2D.
MousePicking :
-> Fixed the GetCollisionTextureUV function, it was returning the same result as GetCollisionUV, now it returns the correct texture coordinates of the impact, which can be used to find the pixel with TextureFactory.GetPixel .
Main Engine :
-> Fixed problem with Adapter.
-> Now SetInitAdapter before the engine init should work.
Package :
-> Some bugs fixed in Package handling
-> Now the engine tries to load textures automatically from packages when you load a mesh/actor/particle system from the package.
-> Still a small bug in package extraction when using encryption (only in very specific cases), we're working on it.
Node :
-> Fixed some problem with Node initialization (it was initialized with a NULL matrix for some reason)
Shader :
-> Fixed the annoying FOG semantic problem that would crash all the TVShaders.
-> Added several semantics to use :
GLOBALAMBIENT/AMBIENTGLOBAL/GLOBAL_AMBIENT : Global ambient value.
LIGHTPOINT0_POSITION, LIGHTPOINT0_ATTENUATION,LIGHTPOINT0_RANGE, LIGHTPOINT0_FALLOFF, LIGHTPOINT0_PHI, LIGHTPOINT0_THETA, LIGHTPOINT0_DIRECTION (same from light 1 to 4). And well spot lights are treated as point lights (hence the LIGHTPOINT0_DIRECTION)
-> Fixed OffsetBumpMapping (at least I think so). Please test again the offset bump mapping on meshes and let us know if it has been fixed entirely. Thanks
Misc :
-> Small other bugs fixed (like memory leaks etc.)
-> Some problems with GDI objects for Fonts not released correctly fixed.
Tools :
Quite a lot of changes to the tools (yea that happens sometimes !)
All tools :
-> Some big changes are getting done for more standardization, GUI improvements etc..
-> The locale of all tools is now English by default, so no more problem with decimal separators or GUI file not loading correctly.
Modelview :
-> Added Alphablending support for actor & mesh
-> Added ShowBoneNames, ShowSkeleton and ShowBoundingBox in Scene panel.
-> Changed a lot the Animation Ranges feature. It is now more flexible and based on new functions of the TVActor classes.
-> Added command line support to use with file association.
Particle Editor
-> TVP viewer included. You can now preview the TVP files that you exported. It's a read-only mode though.
-> Lots of bugs fixed from the latest release
-> Better texture support in the TVPJ loading
-> Added command line support to use with file association.
Converter GUI
-> A good small GUI for the Converter.exe has been created. It allows easily to convert 3DS to TVM, OBJ to TVM and MDL to TVA.
-> The options are enabled according to the source mesh.
darqSHADOW will complete the change log soon.[/url]