How to design a mesh class ?

Started by
9 comments, last by Frederick 15 years, 12 months ago
Hi Deathkrush,

thank you for your answer =)

Quote:
To answer your other question, if you need a range other than (0..1) or (0..255), just apply a scale and bias to the values in the shader.


Okay, it is really that complicated - so I will have to decide which range of values I need, for example for my deformations. I believe that is really too much trouble, because I don´t have performance problems at all at the moment and so much else to care for. I am not pushing anything, just building the engine and game framework. I don´t even have a mesh loader at the moment, because I am figuring out how to lay out my meshes in memory.
Then again I am not striving too much for performance - it is a single person project and there have to be some cuts. I will have to do (and actually like to do) the 3D arts by myself - so probably average perfomance would do for me.

Quote:
Also, are you compressing vertices to save memory, increase performance or both?


Oh I thought about it, because it was your advice and it sounded pretty cool to do updates in 1/4 of memory and time, but I believe that this is an optimization that could be eventually done, when everything is already working and some extra performance is needed.

Quote:
I guess manipulating unsigned bytes is hard in Java because the only unsigned type is 16-bit char! Which graphics API are you using?


I am using OpenGL (with the Option to do DirectX later, if ever :-). Actually it is a mixed C++/Java project. C++ for talking to the hardware and Java for everything else. So I always have the option to do data conversion in the C++ part, for example pass a buffer of javafloats to C++ and convert them to ubyte. Unfortunately I won´t be able to use them directly.

So I am not sure if I will stay with delta vectors, because it is doubling the vertex data of my deformable geometry (static + delta buffer) I will also have to do an addition for every vertex (maybe thats not too expensive even if its done 9x times in a fur shader). But it would reduce complexity and I wouldn´t need to deform normals and binormals (I will have to read up what this is ;-)) on the CPU separately. So its maybe worth the additional amount of memory. While writing this I decide to stay with it :-) Its just fine. Thank you!

This topic is closed to new replies.

Advertisement