Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Funky Blending layer support #250

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented Apr 29, 2021

To Do

  • Fix the Python korlib texture generation

@dpogue dpogue requested a review from Hoikas April 29, 2021 00:40
Copy link
Member

@Hoikas Hoikas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass through

korlib/bumpmap.cpp Outdated Show resolved Hide resolved
korman/exporter/material.py Outdated Show resolved Hide resolved
korman/exporter/material.py Outdated Show resolved Hide resolved
korman/ui/ui_texture.py Show resolved Hide resolved

if layer_props.funky_type != "FunkyDist":
# Mention that values are angles
layout.label("Values should be viewing angles in degrees between 0 and 180.", icon="RESTRICT_VIEW_OFF")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should probably be a separate set of properties that display as angles in the UI. You could have another set of properties as your universal getters. IIRC angle float types in blender return in radians so the export math would be simpler.

Comment on lines 257 to 258
funky_ramp = self.export_funky_slot(bo, bm, hsgmat, slot, idx)
if funky_ramp:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh, if we were on Python 3.8 this would be a good place to use the walrus...

korman/korlib/__init__.py Outdated Show resolved Hide resolved
korman/korlib/__init__.py Outdated Show resolved Hide resolved
korlib/bumpmap.cpp Outdated Show resolved Hide resolved
else:
buf[start:end] = [b for b in (255, 255, 255, int((x * y) * 255.9))]

mipmap.setRawImage(bytes(buf))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The C++ uses setImageData instead of setRawImage?

@Hoikas Hoikas added the feature label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants