Jump to content

Polyhaven-Browser extension


klepto2
 Share

Recommended Posts

Here is a first version of the Polyhaven-extension polyhaven_browser.zip:

This is an early release, but nearly everything should be working.

Screenshot:

image.thumb.png.3a1b448b5b32a0204722f6a8515d9d9e.png

Some notes:

There might be some errors while converting some materials. this is due the fact that some materials have multiple diffuse files configured and i am currently assuming a "Diffuse" slot and not the other configured maps. This will be fixed and adressed in a later release.

The settings dialog is a proof of concept extension which i plan to release as a standalone extension later and which might be a replacement for the current options dialog in the tools section.

The scripts still have some garbage included which i will get rid of in a future release.

 

Download:

polyhaven_browser.zip

Installation:

Extract the content of the zip into your UltraEngine installation folder. The file structure in zip reflects the needed structure to get it working.

 

  • Like 4
  • Thanks 1
  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
Link to comment
Share on other sites

For Steam users, placing libcurl.dll in the program folder will cause the Steamworks library to crash:
https://steamcommunity.com/groups/steamworks/discussions/0/6699728899096777474/

There are two ways around this.

  1. Recompile libcurl to use a different DLL name. I used a precompiled binary because I could not figure out how to compile libcurl with SSL.
  2. Before loading the OpenAI module, copy libcurl.dll to the program directory, then load the OpenAI module, then immediately remove the DLL. Not sure if this will work if the DLL is loaded.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • 2 weeks later...

I came across something else when looking at the OpenAI API. It appears that the executable curl does work with authorization maybe:

curl https://api.openai.com/v1/images/edits \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -F image="@sunlit_lounge.png" \
  -F mask="@mask.png" \
  -F model="dall-e-2" \
  -F prompt="A sunlit indoor lounge area with a pool containing a flamingo" \
  -F n=1 \
  -F size="1024x1024"

Curl comes standard on win10 and 11 now.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Yeah, if you look in OpenAI.lua there are two different calls that use two different approaches. One is using the default content type, and then the other is using JSON. The only tricky part was figuring out how to encode JSON in a command line and then encode that in a Lua file. So, for every quotation mark you have to replace it with \\\"

If you use curl instead of curl.exe, it will make the script cross-platform compatible, I think.

Interesting stuff, anyways.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...