3rd Party Models/Media Chat / Reflective Entities

Author
Message
TazMan
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 20th Jan 2011
Location: Worldwide Web
Posted: 1st Mar 2017 12:25
So how do we use this new cube mapping to create reflective surfaces on our entities then, as shown on the Teapot.
HP Pavilion Laptop - AMD A8-4555M APU with Radeon(tm) HD Graphics - 1.6GHz, 8GB Memory, Windows 10 Home, 64-bit Operating System.

I've got something to say - It's better to burn out than fade away.
geistschatten
12
Years of Service
User Offline
Joined: 10th Apr 2012
Playing: GameGuru
Posted: 1st Mar 2017 12:52 Edited at: 1st Mar 2017 13:02
Add a new texture with your model called [MAIN TEXTURE]_CUBE.dds and then change the shader in the FPE to entity_cube.fx instead of entity_basic.fx

So if your model was using the primary texture of Teapot_D.dds then the cubemap would be Teapot_CUBE.dds

A good start is just to copy the cubemap texture from the Shiny Skull in the Scenery folder. That's how I accomplished this... https://forum.game-guru.com/thread/217360?page=2#msg2573622

Edit: Should be entity_cube.fx, I fixed it above and had said cube_basic.fx because I was thinking of the beta.
TazMan
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 20th Jan 2011
Location: Worldwide Web
Posted: 2nd Mar 2017 11:09
Thanks for the advice, that worked great but I thought that it was going to reflect the world around it.
HP Pavilion Laptop - AMD A8-4555M APU with Radeon(tm) HD Graphics - 1.6GHz, 8GB Memory, Windows 10 Home, 64-bit Operating System.

I've got something to say - It's better to burn out than fade away.
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 2nd Mar 2017 12:53
Cube mapping is faked with this method. You can take screen captures of the environment from 6 directions Top, bottom, forward, behind, left and right, Make them into a cubemap and then apply that map to your model.

We do not have real time reflections at this time.
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.

TazMan
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 20th Jan 2011
Location: Worldwide Web
Posted: 2nd Mar 2017 15:24
OK thanks for the info, I will probably use this method for some stuff and make changes when and if we get real time reflections.

I think I know what entity_cubealpha.fx does but what is entity_cubeambience.fx used for. ??
HP Pavilion Laptop - AMD A8-4555M APU with Radeon(tm) HD Graphics - 1.6GHz, 8GB Memory, Windows 10 Home, 64-bit Operating System.

I've got something to say - It's better to burn out than fade away.
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 2nd Mar 2017 19:03
in the firts lines he can defining a constant or defining a parameterized macro, have not idea how he does certainly.

#include "entity_basic.fx" -- #include is a environment variable, so he can being adding the contents of the file specified by #include "entity_basic.fx" to the source program.
The quotes ("") indicate that the preprocessor looks first, at the directory containing the primary source file.

So I think perhaps it is not to be use directly by us, at least as shader, despite their ext, it is like settings.fx file. Just my though

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
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 2nd Mar 2017 19:41 Edited at: 2nd Mar 2017 19:41
Use the new cube shaders in your FPE file.

The shaders have defines, and includes in them pointing to module codes of shaders.Example:
#define USECUBEMAPPING
#include "entity_basic.fx"

The above statements do this. Call technique USECUBEMAPPING in this shader. entity_basic.fx
I am sure there is a bit more to it then this, but if you use these shaders below in your fpe file Then the right process will be sorted out by the Game Guru engine.

entity_cube.fx
entity_cubealpha.fx
entity_cubeambience.fx
Quote: "
cube_basic.fx or entity_cube.fx , will mix in evenly diffuse and cube reflection. transparency is supported , so this one will be great for floors with little reflections.

cube2_basic.fx or entity_cubealpha.fx, will mix in cube reflection based on alpha , lower alpha means more cube reflection, this one will work out of the box on default media that have glass/windows and mix this in using the same texture, so your windows will get reflection but not areas with no alpha. this also support transparency. So you could lay a transparent plane above your “road” to simulate a puddle, and it would look like water

cube3_basic.fx or entity_cubeambience.fx , will allow you to make really reflecting object like metal/mirrors … it also support cube reflection using the alpha as a reflection mask , so if you put 255 in the alpha you get a mirror only cube reflection is displayed, if you put 0 in alpha only diffuse is displayed. using 128 in alpha will mix evenly. This could be used to make a “wet” look , if you have a road texture you could set the alpha to around 80 and your road will get some cube reflection and the surface will look wet. this one don’t allow transparency as the alpha is used as a cube reflection mask.
"


All referenced in this post. (Please read all the last page of this thread for better understanding.)

https://forum.game-guru.com/thread/217310?page=2#msg2572768

Alpha channel goes into the specular texture _S.dds and save as dxt5 compression.

As always you can email me your files to test if you are having troubles.
myke1net@hotmail.com
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: 3rd Mar 2017 20:51
If you're wanting to reflect the environment (sky) and are using sky boxes not the new domes you can use the six sky bank textures to create the cube map and this gives a very convincing fake real time reflection per sky type.

Cheers.
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 4th Mar 2017 07:39
https://forum.game-guru.com/thread/217589#msg2574018

Example and working files for a mirror.

Free for commercial and private use.
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-22 02:39:25
Your offset time is: 2024-11-22 02:39:25