Water and Puzzles in Korman?

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Re: Water and Puzzles in Korman?

Postby Tsar Hoikas » Wed Sep 12, 2018 5:15 pm

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.
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Water and Puzzles in Korman?

Postby Paradox » Wed Sep 12, 2018 10:34 pm

Tsar 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.


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.html
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: Water and Puzzles in Korman?

Postby Sirius » Sun Sep 16, 2018 6:29 am

Tsar Hoikas wrote:Most of what I learn about the Blender Python API comes from quite literally reading the blender source code. Ugh.

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...

-------

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...
envmap_wrong.png
envmap_wrong.png (80.84 KiB) Viewed 3288 times

Wot ! :shock: Some SDL, armature and networking typeIDs got mixed up with the envmap itself ! Here is how it should look:
envmap_correct.png
envmap_correct.png (58.37 KiB) Viewed 3288 times

That's an error with Korman itself, but it's probably trivial to fix. Just need to force the textures subtypes to rgb8888
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 :P
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.
KIimage0013.jpg
KIimage0013.jpg (110.11 KiB) Viewed 3288 times


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/rlxsq5rpow0yrtd/alabaster_export.7z?dl=1
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Water and Puzzles in Korman?

Postby Tsar Hoikas » Sun Sep 16, 2018 3:42 pm

Sirius wrote:Wot ! :shock: Some SDL, armature and networking typeIDs got mixed up with the envmap itself!

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: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 :P

RGB8888 is by definition in direct color space. Unless you'd rather use the greyscale color space? ;)

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...


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.
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Water and Puzzles in Korman?

Postby Sirius » Mon Sep 17, 2018 12:01 am

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...

Hehehe. The joys of c++ and manual memory management I guess...

Tsar Hoikas wrote:RGB8888 is by definition in direct color space. Unless you'd rather use the greyscale color space? ;)

True enough :lol: I thought "none" was just to let the engine choose the optimized default or something.

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.

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.
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: Water and Puzzles in Korman?

Postby Dulcamara » Mon Sep 17, 2018 4:43 am

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.


Thank you for your work, Sirius.
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 :)
Dulcamara
 
Posts: 376
Joined: Fri Sep 03, 2010 11:06 am
Location: Alabaster

Previous

Return to Building

Who is online

Users browsing this forum: No registered users and 8 guests