Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
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:
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 )
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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.
(This post was last modified: 12-07-2012, 05:09 AM by Your Computer.)
|
|
12-07-2012, 05:05 AM |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
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 |
|
TheGreatCthulhu
Member
Posts: 213
Threads: 10
Joined: Oct 2010
Reputation:
32
|
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
|
|
12-07-2012, 06:18 AM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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.
|
|
12-07-2012, 10:07 AM |
|
Acies
Posting Freak
Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation:
73
|
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.
ジ
|
|
12-07-2012, 02:27 PM |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
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:
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 |
|
Acies
Posting Freak
Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation:
73
|
RE: GIMP Cubemap Problem...
Can you send me the renders later? :]
ジ
|
|
12-07-2012, 08:25 PM |
|
TheGreatCthulhu
Member
Posts: 213
Threads: 10
Joined: Oct 2010
Reputation:
32
|
|
12-07-2012, 09:34 PM |
|
Statyk
Schrödinger's Mod
Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation:
241
|
RE: GIMP Cubemap Problem...
Perhaps I will =P Thanks guys!
|
|
12-07-2012, 10:12 PM |
|
|