Hello,

I'm still trying to get vertex animated genmeshes with variable 
vertex/triangle count right. On advice of Jorrit I keep vertex/triangle 
count fixed in factory and set all unused vertices equal to already uses 
values and collapse all unused triangles to one vertex.

Doing so I discovered some more problems, reproducible but not always 
occurring: execution seems to hang indefinitely within some calculations 
inside obb.cpp, trying to build a tree of some sort.

The code in obb.cpp ist hard to read, but my guess is that the 
calculated tree degenerates in a really time consuming way when using 
many equal vertex values.

Some other strange behavior I encountered: inserting an unnecessary 
SetVertexCount/SetTriangleCount (with unchanged counts) before 
manipulating the vertices and triangles considerably speeds up the 
drawing process.

The best working solution / ugly hack I came up so far is:
- create a factory with enough vertices / triangles for every possible 
dynamically calculated animation. This fixes wrong colors/lighting after 
mesh update but gives lots of not really used vertices/triangles.
- call SetVertexCount/SetTriangleCount before mesh manipulation without 
really changing the values for better drawing speed.
- randomize unused vertices, so that calculation in obb.cpp does not hang.

I now have spend numerous hours over several days trying to come up with 
clean working solution, but have only found more problems and strange 
behavior. Hopefully someone with more insight in the depths of CS can 
help me out.

Philipp

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to