Water and Puzzles in Korman?
-
- Councilor of Technical Direction
- Posts: 2180
- Joined: Fri Nov 16, 2007 9:45 pm
- MOULa KI#: 23335
- Location: South Georgia
- Contact:
Re: Water and Puzzles in Korman?
Blender has some support for translation and has exposed... something... about it in the python API. I'm not sure how it all works, though. It's possible that it would only work for the C-level code. If it is usable from the Python end, I wouldn't be surprised if there is zero documentation for how to do so. Most of what I learn about the Blender Python API comes from quite literally reading the blender source code. Ugh.

Re: Water and Puzzles in Korman?
It's very hard to find the docs about this, but digging through the C code and back out to Python eventually led me to this: https://docs.blender.org/api/2.79/bpy.a ... tions.htmlTsar Hoikas wrote:Blender has some support for translation and has exposed... something... about it in the python API. I'm not sure how it all works, though. It's possible that it would only work for the C-level code. If it is usable from the Python end, I wouldn't be surprised if there is zero documentation for how to do so. Most of what I learn about the Blender Python API comes from quite literally reading the blender source code. Ugh.
Re: Water and Puzzles in Korman?
Yes, Blender's API is really hard to navigate, and unfortunately it seems like really few people actually write addons for it, so there aren't a lot of informations about it on the internet...Tsar Hoikas wrote:Most of what I learn about the Blender Python API comes from quite literally reading the blender source code. Ugh.
-------
Hmmm, okay back to topic, I imported a few objects from Alabaster (the sky, and a few water objects). I got swimming working (I can jump in it, even from higher up. And I can swim underwater if I pull some vertices down).
And I can see the water. However the water itself is completely white.
But I narrowed down the issue to the dynamic envmap itself... Wot !

Also, may I suggest keeping the texture space to None instead of direct ? I don't know the difference, but it seems to be the default in Cyan's PRPs from what I've seen

Another suggestion: waveset don't work correctly without envmaps (once again they will only look white). If the envmap isn't specified it might be a good idea to automatically create one with a high yon setting, so it reflects the sky correctly...
Anyway... I hacked the exported envmap so I could push things a bit further... I managed to get the waveset working, however it reflects the sky way too much compared to the original. I'm not sure why. Dulcamara, here is my current Blender file. I hope it helps you fix the swim regions. Like I said when exporting the water visual is still buggy and white, so this will have to wait until the issue in Korman is patched.
https://www.dropbox.com/s/rlxsq5rpow0yr ... rt.7z?dl=1
-
- Councilor of Technical Direction
- Posts: 2180
- Joined: Fri Nov 16, 2007 9:45 pm
- MOULa KI#: 23335
- Location: South Georgia
- Contact:
Re: Water and Puzzles in Korman?
This appears to be a fault with libHSPlasma not zero initializing those fields properly. I had a look and saw that no "easy" way exists to set these values in libHSPlasma. There is a way, but it would involve either 6 LOC or a loop. I'll fix it on the libHSPlasma end soon. But, anyway, don't be confused by seeing those other types in there. That's a dedicated enumeration, and the garbage values appear to be overrunning into another section of the DLL's memory, returning strings from the type map's enumeration. Yikes. We're really lucky that kind of crap doesn't crash PRPShop instead...Sirius wrote:Wot !Some SDL, armature and networking typeIDs got mixed up with the envmap itself!
RGB8888 is by definition in direct color space. Unless you'd rather use the greyscale color space?Sirius wrote:Also, may I suggest keeping the texture space to None instead of direct ? I don't know the difference, but it seems to be the default in Cyan's PRPs from what I've seen

Perhaps. I am more curious to know what's wrong with the default environment map that the engine makes. If the issue is that the effect visibility set is not present, then there is probably little that can be done automatically from Korman.Sirius wrote:If the envmap isn't specified it might be a good idea to automatically create one with a high yon setting, so it reflects the sky correctly...

Re: Water and Puzzles in Korman?
Hehehe. The joys of c++ and manual memory management I guess...Tsar Hoikas wrote:and the garbage values appear to be overrunning into another section of the DLL's memory, returning strings from the type map's enumeration. Yikes. We're really lucky that kind of crap doesn't crash PRPShop instead...
True enoughTsar Hoikas wrote:RGB8888 is by definition in direct color space. Unless you'd rather use the greyscale color space?![]()

Hmmm, so it does look like Plasma internally creates a default envmap with a yon of 10,000 around line 2268... Strange. I'll have to check again, but I remember not specifying an envmap resulted in the water being completely white, as if the envmap failed to render anything useful. Either I messed something up, or that's a PotS specific issue.Tsar Hoikas wrote:Perhaps. I am more curious to know what's wrong with the default environment map that the engine makes. If the issue is that the effect visibility set is not present, then there is probably little that can be done automatically from Korman.
Re: Water and Puzzles in Korman?
Thank you for your work, Sirius.Sirius wrote:
Dulcamara, here is my current Blender file. I hope it helps you fix the swim regions. Like I said when exporting the water visual is still buggy and white, so this will have to wait until the issue in Korman is patched.
I am still in the try phase.
One problem I have: The water I need right now is for my Age AlabastersDepths. There is heaven, but you can only see it through a grid. The rest of the Age is in a cave. I do not know if this is relevant to the water parameters, but I wanted to give you the information.
By the way, I once have had white color water, but in the next test not. Later, I had a white box in the Age. I thought it was the swim detect region. But after deleting it was still there.
I will try more.
I will not be able to build for a while now because we are on vacation.
So i test it again at the beginning of October. Thanks again.
Dulcamara
