buildcubemaps renders the small 3D skybox !

buildcubemaps renders the small 3D skybox !

Re: buildcubemaps renders the small 3D skybox ! Posted by Digi on Wed May 23rd 2012 at 1:18am
Digi
17 posts
Posted 2012-05-23 1:18am
Digi
member
17 posts 3 snarkmarks Registered: Apr 6th 2012 Occupation: Student Location: Romania
So recently when I use the buildcubemaps command I get the 3D skybox rendered... it was above the map so I moved it below the map and it STILL shows in the buildcubemaps preview shots, what's up with that ?

To show you what I'm talking about:
[URL=http://imageshack.us/photo/my-images/94/clipboard01gtr.jpg/][IMG]http://img94.imageshack.us/img94/4409/clipboard01gtr.jpg[/IMG][/URL]

This is one of those shots, the big green and gray textures are the actual skybox rendered in 16 times scale (normal 3D skybox) but the big black circle, the small high textured green block along with the glow sprite in the left are from the small scale 3D skybox which is under the map, why does that show up there ? :/
Re: buildcubemaps renders the small 3D skybox ! Posted by haymaker on Wed May 23rd 2012 at 6:24pm
haymaker
439 posts
Posted 2012-05-23 6:24pm
haymaker
member
439 posts 921 snarkmarks Registered: Apr 1st 2007 Location: CAN
Are you saying that you see specular 3dsky geometry on interior geometry, where it shouldn't be seen? Only things I can think of are that you're not runnning full vis, or it fails; or you don't have at least one env_cubemap in your 3dbox.

Not sure I understand your comment "it was above the map so I moved it below the map", the 3dsky geometry is always relative to the sky_camera entity, which you originally placed at 0 0 0 before copying / scaling your 3dsky geometry. Doesn't matter where in the grid it is located.

I have seen in-game errors where a map will reflect the previously loaded map's cubemaps, but this seems different
Re: buildcubemaps renders the small 3D skybox ! Posted by sgtfly on Thu May 24th 2012 at 12:59am
sgtfly
273 posts
Posted 2012-05-24 12:59am
sgtfly
member
273 posts 347 snarkmarks Registered: Jan 24th 2005 Occupation: 5 more years of BS and I'm done. WOOHOO! Location: Batavia,IL USA
You are using the small green block and glow sprite for your reference geometry? You can't use env_sprite for that and did you delete the reference geometry from the small skybox. If thats not what you used, those 2 items might be between your sky camera and reference geometry that's why they get rendered there. Just a thought.
Also did you delete the sky camera from the main map area you can't have one in the map and in the skybox.
Light is faster than sound:That is why some people appear bright until you hear them speak.

Your riches in life are family and friends, everything else is just a distraction.
Re: buildcubemaps renders the small 3D skybox ! Posted by Riven on Fri May 25th 2012 at 6:46pm
Riven
1640 posts
Posted 2012-05-25 6:46pm
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
sgtfly said:
Also did you delete the sky camera from the main map area you can't have one in the map and in the skybox.
Yea, only one skycamera entity per map. -And it should be contained within the separate sealed 3D skybox box only.

Also, delete or otherwise visgroup and disable the reference geometry before compiling. It will compile as well. Reference geometry should not be visible when you go to compile. (WYSIWYG).

Also, cubemaps will only take shots of the geometry around them and project it only on that geometry. This does not include the 3D skybox (however if not built it will reflect the 2D skybox by default). If you want reflective surfaces in the 3D skybox to reflect things, you need a cubemap in the separate 3D skybox volume as well. That cubemap does not interact with the skycamera and will only take shots of the surrounding geometry just in the 3D skybox and not from the rest of the level. This is why you see in Valve maps big surfaces with a low-res texture floating below the geometry in a 3D skybox, so that the cubemaps in the skybox don't reflect a bright base on everything coming from the 2D skybox texture.

I hope that explains it? Otherwise I'm not sure what your issue is.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: buildcubemaps renders the small 3D skybox ! Posted by Digi on Mon May 28th 2012 at 9:23pm
Digi
17 posts
Posted 2012-05-28 9:23pm
Digi
member
17 posts 3 snarkmarks Registered: Apr 6th 2012 Occupation: Student Location: Romania
Short version: none of those are the issue (but look below for more shots)

Long version:
haymaker said:
Are you saying that you see specular 3dsky geometry on interior geometry, where it shouldn't be seen? Only things I can think of are that you're not runnning full vis, or it fails; or you don't have at least one env_cubemap in your 3dbox.
Ehm.. I'm seeing 2 instances of skybox! The small one which is made in hammer and the big one which is rendered by the game... and by "seeing" I mean when I use buildcubemaps.
haymaker said:
Not sure I understand your comment "it was above the map so I moved it below the map", the 3dsky geometry is always relative to the sky_camera entity, which you originally placed at 0 0 0 before copying / scaling your 3dsky geometry. Doesn't matter where in the grid it is located.
The 3D skybox's position doesn't matter, yes, but here it DOES because it's smaller counterpart gets rendered.
sgtfly said:
You are using the small green block and glow sprite for your reference geometry? You can't use env_sprite for that and did you delete the reference geometry from the small skybox. If thats not what you used, those 2 items might be between your sky camera and reference geometry that's why they get rendered there. Just a thought.
Also did you delete the sky camera from the main map area you can't have one in the map and in the skybox.
No, there aren't any reference geometries there.
The "small" green block is actually a quarter of the entire grid which is a huge field of grass, the sprite was a test with lightning, nvm that.
The thing is that's the entire skybox, those aren't select objects that are rendered, I belive if I add more stuff they'll render too.

No, I didn't forget any 3D sky cam around because I didn't use the copy-paste method since it wasn't necesairy for such a simple design.
Riven said:
sgtfly said:
Also did you delete the sky camera from the main map area you can't have one in the map and in the skybox.
Yea, only one skycamera entity per map. -And it should be contained within the separate sealed 3D skybox box only.

Also, delete or otherwise visgroup and disable the reference geometry before compiling. It will compile as well. Reference geometry should not be visible when you go to compile. (WYSIWYG).

Also, cubemaps will only take shots of the geometry around them and project it only on that geometry. This does not include the 3D skybox (however if not built it will reflect the 2D skybox by default). If you want reflective surfaces in the 3D skybox to reflect things, you need a cubemap in the separate 3D skybox volume as well. That cubemap does not interact with the skycamera and will only take shots of the surrounding geometry just in the 3D skybox and not from the rest of the level. This is why you see in Valve maps big surfaces with a low-res texture floating below the geometry in a 3D skybox, so that the cubemaps in the skybox don't reflect a bright base on everything coming from the 2D skybox texture.

I hope that explains it? Otherwise I'm not sure what your issue is.
Yes, they're 2 big separate rooms.
All I used for reference was the train track which was removed afterwards, so no I don't have any references.

About the cubemaps, I don't really need them to reflect geometry but it seems it DOES capture skybox geometry... but it captures both scale skybox and small skybox.
But to give you guys a perspective on things, a few other screenshots:

[URL=http://imageshack.us/photo/my-images/256/ss1c.jpg/][IMG]http://img256.imageshack.us/img256/5259/ss1c.th.jpg[/IMG][/URL]
This is the map itself in the full scale map, a train, the blue surrounding is the skybox texture.

[URL=http://imageshack.us/photo/my-images/826/ss2ku.jpg/][IMG]http://img826.imageshack.us/img826/756/ss2ku.th.jpg[/IMG][/URL]
This is the 3D skybox, the green long box in the middle is "block light" texture, it's in a very rough shape of the train 16 times smaller.

[URL=http://imageshack.us/photo/my-images/857/ss3fi.jpg/][IMG]http://img857.imageshack.us/img857/6176/ss3fi.th.jpg[/IMG][/URL]
The skybox again, showing the fake fog along, the selected dark-red thing is a black brush below the map, the left block is the grass field and in the right the fake fog ofc :P

[URL=http://imageshack.us/photo/my-images/88/ss4zk.jpg/][IMG]http://img88.imageshack.us/img88/133/ss4zk.th.jpg[/IMG][/URL]
In game, skybox and map together, normal.

[URL=http://imageshack.us/photo/my-images/94/ss5my.jpg/][IMG]http://img94.imageshack.us/img94/1889/ss5my.th.jpg[/IMG][/URL]
In game, same perspective in wireframe to show you that you can't normally see the 3Dskybox below the map

[URL=http://imageshack.us/photo/my-images/545/ss6v.jpg/][IMG]http://img545.imageshack.us/img545/2839/ss6v.th.jpg[/IMG][/URL]
In game, I've gone below the map a bit to make the game render the small scale 3Dskybox.

[URL=http://imageshack.us/photo/my-images/525/ss7l.jpg/][IMG]http://img525.imageshack.us/img525/917/ss7l.th.jpg[/IMG][/URL]
That black puff there was a particle system lightning from the skybox... but the thing is I can see it being rendered twice because I can see the flash below my feet, see next screenshot:

[URL=http://imageshack.us/photo/my-images/820/ss8gt.jpg/][IMG]http://img820.imageshack.us/img820/5482/ss8gt.th.jpg[/IMG][/URL]
That is the lightning from the smallscale 3Dskybox below the map, which I can't see (according to mat_wireframe at least)

[URL=http://imageshack.us/photo/my-images/195/ss9yp.jpg/][IMG]http://img195.imageshack.us/img195/8893/ss9yp.th.jpg[/IMG][/URL]
And this is another perspective of that duplicated lightning event with the wireframe on.

So... my quetsion: wO0t ?
Something new, I can also see the light flashes of L4D2's Hard Rain particle systems when I look down through the floor.

Hmm, I must mention that the skybox is an instance, could THAT be the problem ? I recently found out that func_breakable_surf doesn't work in instances... so I suspect it's the same now, I'm going to test.
EDIT: aparently no, collapsing the instance of the 3D skybox yelds the same weird effect.

EDIT#2: now with the solid black color as the 3D skybox's floor the full scale 3D skybox isn't visible anymore in the buildcubemaps O.o only the small scale one that's below the map :/
[URL=http://imageshack.us/photo/my-images/233/ss10m.jpg/][IMG]http://img233.imageshack.us/img233/1572/ss10m.th.jpg[/IMG][/URL]
This means that the 3D skybox below the map is rendered as real map which gets in front of the 3D skybox (real geometry has higher Z buffer priority than the full size rendered 3D skybox)
Re: buildcubemaps renders the small 3D skybox ! Posted by haymaker on Tue May 29th 2012 at 8:37pm
haymaker
439 posts
Posted 2012-05-29 8:37pm
haymaker
member
439 posts 921 snarkmarks Registered: Apr 1st 2007 Location: CAN
Can you post your oompile log? I'd suspect vvis is screwing something up
Re: buildcubemaps renders the small 3D skybox ! Posted by Digi on Wed May 30th 2012 at 11:55am
Digi
17 posts
Posted 2012-05-30 11:55am
Digi
member
17 posts 3 snarkmarks Registered: Apr 6th 2012 Occupation: Student Location: Romania
Sure.
Compiled in 'normal' mode: VIS fast, RAD Fast + HDR (NOT the -fast argument)
[spoiler]
[code]
Loading D:\Dev\Half-Life 2\L4D2\maps_src\train\train.vmf
fixing up env_cubemap materials on brush sides...
0...1...2...3...4...5...6...7...8...9...100...1...2...3...4...5...6...7...8...9...10Processing areas...done (0)
Building Faces...done (0)
Chop Details...done (0)
Find Visible Detail Sides...
Merged 6 detail faces...done (0)
Merging details...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
writing D:\Dev\Half-Life 2\L4D2\maps_src\train\train.prt...Building visibility clusters...
done (0)
Finding displacement neighbors...
Finding lightmap sample positions...
Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10
Building Physics collision data...
done (4) (405419 bytes)
Cannot build Physics2 data
-----------
DataLinker total stream size 0.0 KiB
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 1761 texinfos to 557
Reduced 132 texdatas to 114 (4448 bytes to 4061)
Writing D:\Dev\Half-Life 2\L4D2\maps_src\train\train.bsp
10 seconds elapsed

2 threads
reading d:\dev\half-life 2\l4d2\maps_src\train\train.bsp
max farz in all env_fog_controller entities: 15000.000000 (used for radial vis)
reading d:\dev\half-life 2\l4d2\maps_src\train\train.prt
2 portalclusters
0 numportals
0...1...2...3...4...5...6...7...8...9...10Optimized: 0 visible clusters (0.00%)
Total clusters visible: 2
Average clusters visible: 1
Building PAS...
Average clusters audible: 1
visdatasize:24 compressed from 32
writing d:\dev\half-life 2\l4d2\maps_src\train\train.bsp
0 seconds elapsed

[Reading texlights from 'lights.rad']
[2 texlights parsed from 'lights.rad']

Loading d:\dev\half-life 2\l4d2\maps_src\train\train.bsp
6908 faces
3 degenerate faces
26771950 square feet [3855160832.00 square inches]
0 Displacements
0 Square Feet [0.00 Square Inches]
6905 patches before subdivision
126227 patches after subdivision
32 direct lights
0...1...2...3...4...5...6...7...8...9...100...1...2...3...4...5...6...7...8...9...10transfers 62453109, max 1240
transfer lists: 476.5 megs
0...1...2...3...4...5...6...7...8...9...10 Bounce #1 added RGB(39341, 37426, 28428)
0...1...2...3...4...5...6...7...8...9...10 Bounce #2 added RGB(8384, 6548, 5073)
0...1...2...3...4...5...6...7...8...9...10 Bounce #3 added RGB(3212, 2765, 2346)
0...1...2...3...4...5...6...7...8...9...10 Bounce #4 added RGB(1484, 1345, 1164)
0...1...2...3...4...5...6...7...8...9...10 Bounce #5 added RGB(768, 709, 614)
0...1...2...3...4...5...6...7...8...9...10 Bounce #6 added RGB(420, 389, 336)
0...1...2...3...4...5...6...7...8...9...10 Bounce #7 added RGB(238, 220, 190)
0...1...2...3...4...5...6...7...8...9...10 Bounce #8 added RGB(138, 127, 109)
0...1...2...3...4...5...6...7...8...9...10 Bounce #9 added RGB(81, 75, 64)
0...1...2...3...4...5...6...7...8...9...10 Bounce #10 added RGB(48, 44, 38)
0...1...2...3...4...5...6...7...8...9...10 Bounce #11 added RGB(29, 26, 22)
0...1...2...3...4...5...6...7...8...9...10 Bounce #12 added RGB(17, 16, 13)
0...1...2...3...4...5...6...7...8...9...10 Bounce #13 added RGB(10, 10, 8)
0...1...2...3...4...5...6...7...8...9...10 Bounce #14 added RGB(6, 6, 5)
0...1...2...3...4...5...6...7...8...9...10 Bounce #15 added RGB(4, 4, 3)
0...1...2...3...4...5...6...7...8...9...10 Bounce #16 added RGB(2, 2, 2)
0...1...2...3...4...5...6...7...8...9...10 Bounce #17 added RGB(1, 1, 1)
0...1...2...3...4...5...6...7...8...9...10 Bounce #18 added RGB(1, 1, 1)
Build Patch/Sample Hash Table(s).....Done<0.2459 sec>
0...1...2...3...4...5...6...7...8...9...10FinalLightFace Done
0 of 0 (0% of) surface lights went in leaf ambient cubes.
0...1...2...3...4...5...6...7...8...9...10Writing leaf ambient...done
Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 156/1024 7488/49152 (15.2%)
brushes 849/8192 10188/98304 (10.4%)
brushsides 5982/65536 47856/524288 ( 9.1%)
planes 3546/65536 70920/1310720 ( 5.4%)
vertexes 10471/65536 125652/786432 (16.0%)
nodes 7126/65536 228032/2097152 (10.9%)
texinfos 557/12288 40104/884736 ( 4.5%)
texdata 114/2048 3648/65536 ( 5.6%)
dispinfos 0/0 0/0 ( 0.0%)
disp_verts 0/0 0/0 ( 0.0%)
disp_tris 0/0 0/0 ( 0.0%)
disp_lmsamples 0/0 0/0 ( 0.0%)
faces 6908/65536 386848/3670016 (10.5%)
hdr faces 0/65536 0/3670016 ( 0.0%)
origfaces 2403/65536 134568/3670016 ( 3.7%)
leaves 7283/65536 233056/2097152 (11.1%)
leaffaces 7319/65536 14638/131072 (11.2%)
leafbrushes 6110/65536 12220/131072 ( 9.3%)
areas 3/256 24/2048 ( 1.2%)
surfedges 40079/512000 160316/2048000 ( 7.8%)
edges 23747/256000 94988/1024000 ( 9.3%)
LDR worldlights 32/8192 3200/819200 ( 0.4%)
HDR worldlights 0/8192 0/819200 ( 0.0%)
leafwaterdata 0/32768 0/393216 ( 0.0%)
waterstrips 226/32768 2260/327680 ( 0.7%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 4368/65536 8736/131072 ( 6.7%)
cubemapsamples 22/1024 352/16384 ( 2.1%)
overlays 7/512 2464/180224 ( 1.4%)
LDR lightdata [variable] 4740308/0 ( 0.0%)
HDR lightdata [variable] 0/0 ( 0.0%)
visdata [variable] 24/16777216 ( 0.0%)
entdata [variable] 142227/393216 (36.2%)
LDR ambient table 7283/65536 29132/262144 (11.1%)
HDR ambient table 7283/65536 29132/262144 (11.1%)
LDR leaf ambient 18600/65536 520800/1835008 (28.4%)
HDR leaf ambient 7283/65536 203924/1835008 (11.1%)
occluders 0/0 0/0 ( 0.0%)
occluder polygons 0/0 0/0 ( 0.0%)
occluder vert ind 0/0 0/0 ( 0.0%)
Prop Hull Verts 0/0 0/0 ( 0.0%)
Prop Hull Blob 0/0 0/0 ( 0.0%)
Prop Hull Lists 0/0 0/0 ( 0.0%)
Prop Hulls 0/0 0/0 ( 0.0%)
Prop Hull trilist 0/0 0/0 ( 0.0%)
detail props [variable] 1/12 ( 8.3%)
static props [variable] 1/10266 ( 0.0%)
pakfile [variable] 1328607/0 ( 0.0%)
physics [variable] 405419/4194304 ( 9.7%)
physics terrain [variable] 2/1048576 ( 0.0%)

Level flags = 0

Total triangle count: 16459
Writing d:\dev\half-life 2\l4d2\maps_src\train\train.bsp
4 minutes, 27 seconds elapsed

[Reading texlights from 'lights.rad']
[2 texlights parsed from 'lights.rad']

Loading d:\dev\half-life 2\l4d2\maps_src\train\train.bsp
6908 faces
3 degenerate faces
26771950 square feet [3855160832.00 square inches]
0 Displacements
0 Square Feet [0.00 Square Inches]
6905 patches before subdivision
126227 patches after subdivision
32 direct lights
0...1...2...3...4...5...6...7...8...9...100...1...2...3...4...5...6...7...8...9...10transfers 62453109, max 1240
transfer lists: 476.5 megs
0...1...2...3...4...5...6...7...8...9...10 Bounce #1 added RGB(23620, 25469, 20705)
0...1...2...3...4...5...6...7...8...9...10 Bounce #2 added RGB(4195, 3279, 2543)
0...1...2...3...4...5...6...7...8...9...10 Bounce #3 added RGB(1607, 1384, 1175)
0...1...2...3...4...5...6...7...8...9...10 Bounce #4 added RGB(743, 673, 583)
0...1...2...3...4...5...6...7...8...9...10 Bounce #5 added RGB(384, 355, 307)
0...1...2...3...4...5...6...7...8...9...10 Bounce #6 added RGB(210, 195, 168)
0...1...2...3...4...5...6...7...8...9...10 Bounce #7 added RGB(119, 110, 95)
0...1...2...3...4...5...6...7...8...9...10 Bounce #8 added RGB(69, 64, 55)
0...1...2...3...4...5...6...7...8...9...10 Bounce #9 added RGB(41, 37, 32)
0...1...2...3...4...5...6...7...8...9...10 Bounce #10 added RGB(24, 22, 19)
0...1...2...3...4...5...6...7...8...9...10 Bounce #11 added RGB(14, 13, 11)
0...1...2...3...4...5...6...7...8...9...10 Bounce #12 added RGB(9, 8, 7)
0...1...2...3...4...5...6...7...8...9...10 Bounce #13 added RGB(5, 5, 4)
0...1...2...3...4...5...6...7...8...9...10 Bounce #14 added RGB(3, 3, 2)
0...1...2...3...4...5...6...7...8...9...10 Bounce #15 added RGB(2, 2, 1)
0...1...2...3...4...5...6...7...8...9...10 Bounce #16 added RGB(1, 1, 1)
0...1...2...3...4...5...6...7...8...9...10 Bounce #17 added RGB(1, 1, 1)
Build Patch/Sample Hash Table(s).....Done<0.2122 sec>
0...1...2...3...4...5...6...7...8...9...10FinalLightFace Done
0 of 0 (0% of) surface lights went in leaf ambient cubes.
0...1...2...3...4...5...6...7...8...9...10Writing leaf ambient...done
Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 156/1024 7488/49152 (15.2%)
brushes 849/8192 10188/98304 (10.4%)
brushsides 5982/65536 47856/524288 ( 9.1%)
planes 3546/65536 70920/1310720 ( 5.4%)
vertexes 10471/65536 125652/786432 (16.0%)
nodes 7126/65536 228032/2097152 (10.9%)
texinfos 557/12288 40104/884736 ( 4.5%)
texdata 114/2048 3648/65536 ( 5.6%)
dispinfos
Re: buildcubemaps renders the small 3D skybox ! Posted by Riven on Wed May 30th 2012 at 5:22pm
Riven
1640 posts
Posted 2012-05-30 5:22pm
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
compile log as far as I can tell looks normal.

It's hard to say because you're using an instance. Here's a hunch I think I have...

The grass texture you're using for your ground looks like a standard texture meant only for "cheap" displacement surfaces. Try changing your ground texture either into something that doesn't use a blend (like for a displacement)in the texture browser, or change your ground texture into a massive displacement surface. (I'd recommend finding a texture not meant for a displacement to use instead (since it's such a large flat surface). -At least for testing purposes. I forget what keyvalue in the .vmt that would specify a texture for displacement use (or if there is one), but maybe that's why you can see through it.

As far as the double geometry goes, maybe the instance already included a skycamera entitiy? Idk. I'd make the 3D skybox from scratch TBH just to see.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: buildcubemaps renders the small 3D skybox ! Posted by Digi on Wed May 30th 2012 at 9:23pm
Digi
17 posts
Posted 2012-05-30 9:23pm
Digi
member
17 posts 3 snarkmarks Registered: Apr 6th 2012 Occupation: Student Location: Romania
The grass texture is a custom one that's motion blured in a direction because it's scrolling.

And I can see the lightning through the floor of the train as well, so the grass block isn't causing the "see"-through.

I've already tried if it's the instance's fault, it seems to behave the same without it... but I'll delete the instance and make a new simple skybox just for test's sake.

This one is a freakin' puzzle tough.