Product Chat / What is it exactly cube mapping effect?

Author
Message
stor
9
Years of Service
User Offline
Joined: 27th Feb 2015
Location:
Posted: 10th Feb 2017 17:41
I did not understand what it is and how I use it and whether it can be used to improve existing models???
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 10th Feb 2017 19:38 Edited at: 9th Mar 2017 04:08
Cube mapping is like reflecting the Skybox on objects to simulate reflections for Glass, Metal, smooth surface materials like ceramics and even water puddles. Preben has even mirrors working with this in tests.

If you look in the scenery folder, you will find an object called shiny skull.

It is set up for this effect. Take a look at the texture that says cube. It contains 6 layers representing top bottom forward back left and right. Notice how it is named. To use this texture for any other model you may have. Rename the model name part, keeping the _CUBE.dds part. Edit your FPE file to use the cube shader. Add an alpha channel to the diffuse texture, _D and save it with dxt3 compression.

This should make the object have a reflection on it.

Note that this will only work with the private beta at the moment I believe. If the public preview version has updated today, perhaps it is in there now also.

Can this be used to improve existing models? Most definitely. I am waiting to upgrade all my store media once these new shaders have been released to all.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 10th Feb 2017 19:40
Once Preben has updated the shaders to reflect (pardon the pun), the latest shadow additions, I will make a new public preview so you can check out all the latest progress
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 10th Feb 2017 21:09
Plugin for Gimp

Nvidia cubemap tools - pluging for photoshop

Related info

If you own 3ds max

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
granada
Forum Support
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 10th Feb 2017 21:13
Thanks 3com,that a great help .

Dave
Windows 10 Pro
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 10th Feb 2017 21:59
Hi all, so is the cube map the same layout as a sky box map?

Reliquia....
Intel(R) Core(TM) i3-4160 @ 3,60GHz. 8GB Ram. NVidia GeForce GTX 750. Acer 24" Monitors x 2 @ 1920 x 1080. Windows 10 Pro 64-bit.
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 10th Feb 2017 22:53 Edited at: 11th Feb 2017 09:38
this is quite good for skybox creation, a gimp script to generate cubemap layers:

http://registry.gimp.org/node/25532

and a bucket load of skybox images:

http://www.custommapmakers.org/skyboxes.php

[update - to use the script, click on the link above, then click on the plugin text file link and save to the GIMP plugin folder (e.g. C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins) with the suffix as .py. run Gimp and create a new 2048x2048 image and then from the Filters->Generic menu select Cubemap Layers Generator. Select 'Horizontal Cross' radio button and open up a skybox image. You should see 6 layers. Export out as a DDS file and as a cubemap with DXT1 compression. Voila you have your cube map. For GameGuru Skyboxes, each layer would need to be saved out with _B, _F etc at the end of each file name and the .X file has to be the same name as the textures e.g. myskybox.X, myskybox_B.dds, myskybox_F.dds etc.
]

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Jerry Tremble
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 11th Feb 2017 00:53
Thanks for the links, 3com and Bored. They should be very useful! Myke, my Scenery directory doesn't have a shiny skull asset. It has skull rock and creature Skull but no shiny skull. Is it part of a pack (thought I had them all) or a recent add on that I just don't have yet?
Desktop: i7 4770@3.4Ghz (passmark 9809), 12GB RAM, Win 10/64, GeForce GTX 1080 (passmark 12006), 1TB SSD, 1TB HDD; Laptop: i7 4800MQ@2.7Ghz, 16GB RAM, Win 10/64, GeForce GTX870M , 1TB SSD.
PM
Jerry Tremble
GameGuru TGC Backer
12
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 11th Feb 2017 00:55
Wow, ask and you shall receive, lol, just verified files on Steam and there it is, lol. Nevermind, Myke, and thanks!
Desktop: i7 4770@3.4Ghz (passmark 9809), 12GB RAM, Win 10/64, GeForce GTX 1080 (passmark 12006), 1TB SSD, 1TB HDD; Laptop: i7 4800MQ@2.7Ghz, 16GB RAM, Win 10/64, GeForce GTX870M , 1TB SSD.
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 11th Feb 2017 03:50 Edited at: 9th Mar 2017 04:07
Our skyboxes are set up different then a cubemap.

The Cubemap will look like this in GIMP:







Replace the image inside each of these layers.

Then save with the following settings: (Photoshop NVidia DDS plugin should have the same options)


Rename it the same as your diffuse texture and add the _CUBE.dds to it.

Change the _D texture to have an alpha channel in it.
Alpha shown in light purple. ( i masked the magenta areas to alpha 0)



Amend the object FPE file to point to the entiy_cube.fx shader. List the diffuse (_d) texture as normal.

Test in GameGuru.

Should have the cubemap reflection as below:


You must be on the private beta to utilize this at the moment.
All others see Lee's post above please.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 11th Feb 2017 09:40
thanks PirateMyke

here is a plugin for GIMP if you want to export layers out as separate files as it's a pain trying to do it manually e.g. separate skybox images
http://registry.gimp.org/node/28268

This is for if you want to make your own GameGuru skyboxes and put the images into the skybox folder along with a spec and .X file
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 11th Feb 2017 17:18
Nice new feature. Pity I'll never take advantage of it

Must say though, the Skull demo was a bad example, I've never seen a Skull that reflects stuff like that ever, even in a game Apart from crystal ones (I recommend avoiding those). Should have been a vase or something.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 11th Feb 2017 17:33
Preben is working more on these and will have a mirrored effect also. When they are good to go, Lee will put them with the updated public preview beta.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 12th Feb 2017 02:13 Edited at: 12th Feb 2017 02:13
Cube map of the default 'clear' sky attached. Perhaps not the best one as largely featureless for reflections

Cheers.

Attachments

Login to view attachments
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 12th Feb 2017 09:01 Edited at: 12th Feb 2017 12:21
it would be great to have realtime reflection like the mirror test in Black Mod Ice (FPSC), where the mirror used is a dynamic entity and the FPI script attached just uses a parameter reflection = 1 to turn the mirror effect on using full shader effects.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: SegAutoWelder, Entity+Weapon Welder, FPEtoBAT

Attachments

Login to view attachments
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 12th Feb 2017 10:13 Edited at: 12th Feb 2017 10:27
ok, so for anyone not sure of how to get the "As Cube Map" option to show in Gimp. Each skybox file needs to be named accordingly i.e. negative x.dds, negative y.dds etc. See attached pic. you can then load all files in one go as layers and save out as a cubemap.



Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: SegAutoWelder, Entity+Weapon Welder, FPEtoBAT

Attachments

Login to view attachments
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 12th Feb 2017 12:13
I'm still not quite sure about how GG intends to focus on the cubemap theme.
Mike gives some useful tips about (ty Mike ), althought I've some questions about, such as, for the naming convention, I must understand that the B, D, R files must be negative, whereas the F, U, L files must be positive?

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Mouaa
User Banned
Posted: 12th Feb 2017 12:17
I think GG will get a cubemap generator someday, you place a probe object on your level , press a bake button and you got a cubemap reflecting your game environment, no more need to manually make ones.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 13th Feb 2017 11:29
Yes indeed, dynamic generation and real-time cube maps are on the cards, but my next update was not intended to focus on this. You want AI, and AI is where I am right now. The reason you are seeing it at all is that our resident community miracle worker Preben is kindly helping round off a few rough edges to the GameGuru shaders, and for the small price of adding cube map loading, he would then do all the horrible stuff like demonstrating how it should really be used
PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

Ertlov
GameGuru BOTB Developer
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Australia
Posted: 13th Feb 2017 13:21
Quote: " The reason you are seeing it at all is that our resident community miracle worker Preben is kindly helping round off a few rough edges to the GameGuru shaders, and for the small price of adding cube map loading, he would then do all the horrible stuff like demonstrating how it should really be use"


And we worship both of you for that!
AMD FX 8Core @ 4GHZ - 16 GB DDR4 - 2xRadeon7950 - Windows 7 Ultimate
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 13th Feb 2017 18:36
Looks good but who gets the nightmare job of adding cube map textures to all reflective entities?
Julian - increasingly disillusioned and jaded
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 13th Feb 2017 19:36
Quote: "Looks good but who gets the nightmare job of adding cube map textures to all reflective entities?"

If your referring to stock assets .... Probably no one .... It wont happen
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
TGPEG
Game Guru Backer
17
Years of Service
User Offline
Joined: 28th Dec 2006
Location: Bristol, United Kingdom
Posted: 13th Feb 2017 22:17
I'm dead impressed with this - thanks very much to Preben!
I'm not sure cube map textures would be appropriate for all entities. Although it's true that everything in the physical world reflects to some degree or another, in most cases it's so subtle as to be pointless.
I'm certainly very excited to get my hands on the shader. I've got my London store front to build.
lordjulian
10
Years of Service
User Offline
Joined: 10th Jan 2014
Location:
Posted: 5th Mar 2017 22:38
So, this will only be relevant for assets released after cube mapping is implemented (unless we convert the old ones ourselves)? That leaves a lot of would-be-shiny objects.
Julian - increasingly disillusioned and jaded
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 6th Mar 2017 00:42
Yes, Lots of old media could be updated. Looking thru my store stuff to find ones that will look better with it. One would still need to make your own cube maps for your level depending on your scene and lighting.

So it depends on how much detail you are willing to add to your stuff being used.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Login to post a reply

Server time is: 2024-11-24 15:31:30
Your offset time is: 2024-11-24 15:31:30