4
4
mirror of https://github.com/H-uru/korman.git synced 2025-07-13 18:17:38 -04:00
Commit Graph

31 Commits

Author SHA1 Message Date
b27153fb1f Fix some potential issues with the _korlib CMake. 2020-06-25 10:55:33 -04:00
3897dfa1c2 Fix #126.
Warning: Korlib C API change. Version bumped.
2019-10-25 11:39:19 -04:00
ce6cd0811e C Korlib code de-duplication
Moves all PyHSPlasma struct definitions into a private header file.
Also adds move constructor and assignment support to PyObjectRef.
2019-01-14 20:50:24 -05:00
bb62fa7a4e Implement Korlib API versioning
A common error when developing with Korman and Korlib is to forget to
recompile _korlib on changes in the upstream C++ code. This will prevent
the errors from being catastrophic and will revert the user to the
python reference implementation with a minimum of fuss.
2018-12-21 22:58:57 -05:00
cb54141af7 Fix :trollface: typo 2018-12-19 23:01:32 -05:00
ad99f496f0 Fix memleak in _korlib.create_bump_LUT() 2018-12-19 19:33:59 -05:00
151c31f2e9 Implement cubemap generate operator
This operator takes a file as an argument and builds a cubemap from it.
Valid options are to supply the output from Plasma's
Graphics.Renderer.GrabCubeMap console command. The operator will find
the other five files and generate a cubemap with the faces saved by
Plasma. Otherwise, any arbitrary image can be supplied. If the filenames
do not fit the expected format, any missing faces will be replaced by
the face specified in the file selector. This will generally result in a
cubemap with six identical faces.
2018-12-14 22:59:57 -05:00
4a48f0da8d Implement cubemap export 2018-12-13 18:56:36 -05:00
035d79a7f6 Refactor image data handling for cube maps
Previously, we allowed OpenGL to generate all of the mip levels for us
in a mipmap. This was pretty doggone fast and worked reasonably well.
However, with cube maps, we will need to use images that are not always
backed in Blender... this is because Blender stores cube maps as one
single image instead of one image per face. So, we need to be able to
generate those mip levels, preferably without touching Blender's
`Image.pixels`, which is slower than Christmas...

Also of note... `Image.gl_load()` will actually scale the iamge to a POT
when Blender is using OpenGL ES... but not on other platforms. So, now,
we just ask Blender to load the image and deal with the POT-izing later.

The con here is that the pure python implementation of the image scaling
function is SLOOOOOOOW. We're talking ~40 seconds to process a 1024x1024
mipmap. No one should be using the reference implementation, however,
and the C++ implementation shows no noticable slowdown over the OpenGL
code.

Whew.
2018-12-13 18:38:07 -05:00
2a49634e43 Update korlib for texture caching
Previously, the C korlib used a custom buffer class to avoid a memcpy
operation. However, pyMipmap expects binary string (PyBytes) objects, so
this changes the code to use them. Future work would be to continue
using PyBytes and removing the copy. For now, there are bigger fish to
fry...
2018-09-05 19:24:31 -04:00
cca1a90d1c Fix __exit__ binding to wrong method, and enable the GCC warnings that
could catch this kind of thing (unused static function).
2017-12-05 13:18:41 -08:00
ee822c1fbd Remove crazy from korlib PythonInterp selection 2017-10-07 23:27:57 -04:00
6a3b09b747 Refactor export logging
The export logger and export reporter have been merged together to form
an eventually much more powerful export analysis feature. For now, the
benefit is that general log messages don't have to be so fiddly with
print statements and string formatting. You're welcome.
2017-06-12 15:36:03 -04:00
f5b5e329ae Merge pull request #50 from dpogue/bumpmaps
WIP: Normal Maps/Bumpmapping
2017-06-11 23:49:43 -04:00
8c525dca02 Update C korlib to link with string_theory 2017-06-06 22:33:08 -04:00
b1dc8a7dfe Fix for compiling with Python 3.6
Ported from libHSPlasma
2017-02-18 22:17:05 -08:00
887700f472 Move create_bump_LUT to top level korlib 2017-02-18 22:17:04 -08:00
3753714cd6 Cleanup the C++ code 2017-02-18 22:17:04 -08:00
ce5ef0d35c Generate _korlib with the right name 2017-02-18 22:17:04 -08:00
082eb0e6ca Generate the BumpLutTexture 2017-02-18 22:17:04 -08:00
83d95356d7 Fix case on GL include path 2016-12-26 13:17:16 -08:00
319b43814f Implement detail fading for Plasma Layers
Yes, this was shamelessly stolen from the max plugin. So shoot me. It's an
awesome feature.
2016-06-29 22:47:28 -04:00
36f0ac194d Implement SoundEmit modifier
This sound emitter modifier is almost as fully functional as PlasmaMAX's various sound emitter components. Additional functionality was added to C korlib so that artists can specify OGG Vorbis sound files. If korlib is not compiled, only WAVE sounds can be utilized in Korman. This fixes some of the more fiddly bugs related to exporting to CWE that were seen in PyPRP.

Sound nodes to be implemented...
2016-06-19 19:19:12 -04:00
cb6541675a Change to Blender 2.77 style bpy.types.Image.bindcode.
This idiotic change was introduced in stealth mode from 2.76 to 2.77. It has something to do with 3d textures, supposedly. I think the person who made this change is simply an asshat...
2016-05-21 20:13:59 -04:00
9e66db01a0 Flip the flopped images
Export all images right-side up. OpenGL flips them because fail, so we
have to do a bit of work to correct that. Thankfully, this operation is
not as slow as I thought.

NOTE TO SELF: remember, texture page updating would be nice to have...
2016-01-30 22:11:59 -05:00
f0ee39b1c3 Fix issues resulting from incorrect korlib merge
I merged the version with access violations related to textures not
actually being set in OpenGL. Dang! Here is the correct version.
2015-07-17 16:55:13 -04:00
3e811f58c1 Implement C korlib
NOTE: This is mostly a curiosity atm. There are many undiagnosed access
violations...
2015-07-17 13:38:04 -04:00
f3b7ae3ad5 Pure Python korlib
Yeah, korlib was a bit faster than this implementation, but, honestly,
having a second python module made life more difficult than it needed to
be. This fixes that.
2014-07-11 22:40:33 -04:00
3c0d2150b6 Update to Blender 2.71
2.71 upgrades to MSVC++2013, so we can use the newfangled log2. This fixes
a rounding bug as well :)
2014-07-10 19:32:58 -04:00
55b17ce0af Fix access violation in korlib
When "Use Alpha" was disabled, we didn't write any alpha into the buffer,
which caused squish to overrun (it expected alpha).
2014-07-04 23:41:41 -04:00
32dcac54f5 Rudimentary material exporter 2014-06-25 19:25:52 -04:00