Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GIMP Cubemap Problem...
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#1
GIMP Cubemap Problem...

So following Your Computer's GIMP .dds cubemap export tutorial (as I never use GIMP myself), I ran into a bit of a problem... Upon export, the image comes out looking like this:

Spoiler below!
[Image: Uefed.jpg]

But to give you an idea of what it's SUPPOSED to look like, here's a full image of the cubemap slides. (NOTE: In GIMP, they are stacked just as described in YC's tutorial video )

Spoiler below!

[Image: 1TTY4.jpg]


Any ideas? I do most of my cubemap editing in Photoshop with the Nvidia plugin, but when exporting with DXT1 compression, the quality gets diminished. While it's not noticeable as much in daytime skyboxes that I've done, it's pretty noticable in a night time skybox, so I figured perhaps GIMP will provide better quality exports.

Thanks guys.
(This post was last modified: 12-07-2012, 04:36 AM by Statyk.)
12-07-2012, 04:35 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: GIMP Cubemap Problem...

Use the GIMP plug-in i made (here) and pick horizontal strip XYZ (then follow the export settings in the video).

If you're using GIMP 2.8, let me know if the plug-in works. I haven't tested it for that.

Tutorials: From Noob to Pro
(This post was last modified: 12-07-2012, 05:09 AM by Your Computer.)
12-07-2012, 05:05 AM
Website Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#3
RE: GIMP Cubemap Problem...

Hey YC, glad you're here. I ran the script, and as said in the comments of http://registry.gimp.org/node/25532 -- I get this error when trying to run in Gimp 2.8 (Mind you, I have GIMP installed on a second hard drive in my laptop, but the error still persists in the same fashion):

Traceback (most recent call last):
  File "D:\Program Files EXTRA\GIMP 2\32\lib\gimp\2.0\python\gimpfu.py", line 699, in response
    dialog.res = run_script(params)
  File "D:\Program Files EXTRA\GIMP 2\32\lib\gimp\2.0\python\gimpfu.py", line 361, in run_script
    return apply(function, params)
  File "D:\Program Files EXTRA\GIMP 2\lib\gimp\2.0\plug-ins\cubemap-to-dds.py", line 100, in cube_map_to_dds
    layer.scale(width, height, 0);
TypeError: integer argument expected, got float
(This post was last modified: 12-07-2012, 05:51 AM by Statyk.)
12-07-2012, 05:49 AM
Find
TheGreatCthulhu Offline
Member

Posts: 213
Threads: 10
Joined: Oct 2010
Reputation: 32
#4
RE: GIMP Cubemap Problem...

Hm... YC, I dont know much about Python, and I don't know how implicit type conversions work in the language, but, any chance this could be solved by simple type-casting in get_width_height()?

Or is this potentially gonna cause other errors?

Edit. Aah I think I see - this is probably where the types get's promoted to float:
if "H-strip" in layout:
        pot = math.pow(2, power);    # return value of pow() is float
        height = pot;
        width = 6 * pot;      # promoted to float
(This post was last modified: 12-07-2012, 06:24 AM by TheGreatCthulhu.)
12-07-2012, 06:18 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: GIMP Cubemap Problem...

I've updated my script and it should solve all issues. I simply explicitly type casted the floats that were causing an issue to an integer.

Tutorials: From Noob to Pro
12-07-2012, 10:07 AM
Website Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#6
RE: GIMP Cubemap Problem...

I usually use "cubemapgen". As for format try saving as a dxt3 (8 bits per pixel). Dxt1 is 4bits per pixel - ergo you would loose information as you save in dxt1 - and darker colors on the sky probably mix together.

[Image: mZiYnxe.png]


12-07-2012, 02:27 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#7
RE: GIMP Cubemap Problem...

Well, the exporter did better than last time, but I don't recommend using DXT1 with it =P DXT3 and DXT5 worked much better, but the compression is still damaging the quality... Hmm...

If you want to check out what I mean, here's a comparison shot using YC's Python script for GIMP 2.8:

Spoiler below!

[Image: VTw6b.jpg]


As you can see in the DXT3/DXT5 compression, the halo around the moon gets discolored and not as smooth as depicted in the editing software. As well, (it could be the renders here) a bit underneath the blue axis sphere, you can see where a corner of the cubemap meets due to discoloration. This isn't as noticeable in daytime skyboxes like I said, but in a cloudy night time situation, it stands out pretty bad...
(This post was last modified: 12-07-2012, 08:21 PM by Statyk.)
12-07-2012, 08:21 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#8
RE: GIMP Cubemap Problem...

Can you send me the renders later? :]

[Image: mZiYnxe.png]


12-07-2012, 08:25 PM
Find
TheGreatCthulhu Offline
Member

Posts: 213
Threads: 10
Joined: Oct 2010
Reputation: 32
#9
RE: GIMP Cubemap Problem...

You could also try using this (pretty awesome) free tool:
AMD's Cubemap Generator (modified)
(This post was last modified: 12-07-2012, 09:34 PM by TheGreatCthulhu.)
12-07-2012, 09:34 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#10
RE: GIMP Cubemap Problem...

Perhaps I will =P Thanks guys!
12-07-2012, 10:12 PM
Find




Users browsing this thread: 2 Guest(s)