Bug: Complexity not read properly

syedhs

16-10-2008 15:00:01

No matter what value I set as complexity, it still retains the original value (264). Setting it manually in the demo project (main.cpp) which now reads Hydrax::Module::ProjectedGrid::Options(100)); (instead of 264) does the trick.

And another: I really think that one forumer's suggestion of calculating wave in the GPU (instead of in the CPU) is a good as it greatly increase the performance. I believe not many people will want the interaction with water (such as cause the ripply geometrically) in the expense of performance.

Netskate

16-10-2008 15:04:34


And another: I really think that one forumer's suggestion of calculating wave in the GPU (instead of in the CPU) is a good as it greatly increase the performance. I believe not many people will want the interaction with water (such as cause the ripply geometrically) in the expense of performance.
*

Thrakbad

16-10-2008 15:12:43

Strange, because that worked for me. I was able to change the complexity of the projected grid through the editor and load the correct value.

syedhs

16-10-2008 16:24:42

Editor works fine, but try running the hydrax demo and change the value for <int>PG_Complexity in HydraxDemo.hdx.

Thrakbad

16-10-2008 17:11:24

Yep, you're right. And when I try to load HydraxDemo.hdx with the editor it crashes.

Xavyiy

16-10-2008 17:51:51

I'm going to look into this, it's extrange, Maybe I've mixed old config files with the last Hydrax version in the demo...

Xavyiy

16-10-2008 19:43:06

Hydrax bug, I'm going to release a 0.4.1 version fixing these minor bugs.

Xavi

syedhs

16-10-2008 19:54:00

Hmm I dont know if you have fixed it, but I have found the culprit :wink: The config value for entry "Module" should be "Module=ProjectedGridVertex". So instead of

Module=ProjectedGrid

it should be changed to

Module=ProjectedGridVertex

It causes Module::loadCfg to return false, which subsequently causes the rest of the setting not read.

Edit: There seems to be another bug which I think result because Complexity value read here is not consistent - this time, no water was displayed.

Edit2: I am confused: There are two 'options' variable here: mMeshOption and mOption. So while mOption is updated, mMeshOption is not updated but it is the one that get applied as in this line :

mMesh->setOptions(mModule->getMeshOptions());

syedhs

16-10-2008 20:39:05

And there is another one: sorry I didn't create different thread because I think this is just too small for one separate thread :wink:

I notice quite a few lines like this in the code:

mHydrax->getSceneManager()->getMovableObjectIterator("Entity");


What if the scene has many many entities, therefore setting the material or hiding them all will be time consuming, isn't it? Probably the code can be modified to accept a list of the related movables (such as the ones touched the water), and this list is used instead.

Xavyiy

16-10-2008 21:11:22

@syedhs
About the config file, yes, this is the reason of that it crashes in the editor, the because is that the editor search the module name in a std::vector an it return NULL if the module isn't found, Hydrax::loadCfg() only must avoid parameters, but musn't crash.

It've fixed some bugs ProjectedGrid/SimpleGrid.cpp related with this, I'm going to uptade the .rar and upload it, just wait 10 minutes ;).

After it, this musn't crash and load the water :)

Xavi

Xavyiy

16-10-2008 21:37:29

Sorry for don't reply to your last question.
Yes, I've thought it before, I think I'm going to doing something like: if the camera has been moved, caltulate what rendereables are in the camera frustum and touch the water, put them on a list and just change the material of them. I'll add this to the 0.5 version ToDo.

------------------

I'm trying to upload the updated Hydrax 0.4 and demo rar's, my conexion sucks and it seems not to upload to rigsofrods host. I'll reply the post when the upload will be finished.

Xavyiy

17-10-2008 11:09:55

Updated ;)

It must work as expected now.

-- Edit: ---
The updated demo package link seems to be broken, I'm going to trying to fix it(Because 90% of times I can't upload files to rigsofrod host).

tdev

18-10-2008 23:03:23

Updated ;)
The updated demo package link seems to be broken, I'm going to trying to fix it(Because 90% of times I can't upload files to rigsofrod host).

ouch, sorry for that.
just sent me a PM or email or anything and i will care about your upload.