Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 857 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
car environment reflection #349969
12/12/10 20:30
12/12/10 20:30
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
Does anyone know about a shader for a car surface which uses skycube to reflect?


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: car environment reflection [Re: painkiller] #350251
12/14/10 20:33
12/14/10 20:33
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
Julz wrote such a shader for his own game but there is not pre-defined one.

Re: car environment reflection [Re: Hummel] #350256
12/14/10 20:59
12/14/10 20:59
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
Finally I used the cube environment mapping shader from AUM 59, maybe it isn't the best shader for this, but it does the trick laugh






3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: car environment reflection [Re: painkiller] #350362
12/15/10 17:05
12/15/10 17:05
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Bro, can you please upload it some where? Or send me it by e-mail laugh Thank you.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: car environment reflection [Re: 3run] #350370
12/15/10 18:01
12/15/10 18:01
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
you mean the shader code?


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: car environment reflection [Re: painkiller] #350401
12/15/10 20:36
12/15/10 20:36
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Yes bro, if it is not hard for you to do laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: car environment reflection [Re: 3run] #350408
12/15/10 21:13
12/15/10 21:13
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
It isn't neccesary to upload it, I can copy it here:

Code:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Include this script in your project. Make sure to use the same name for your sky cube bitmap and for the bmp_envcube 
// definition from below. Place any model in your level and attach it the action named "cubic_map". That's all.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

BMAP* bmp_envcube = "t_sunrise_sky+6.tga";

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function mtl_envmirror_view()
{
	mat_set(mtl.matrix, matViewInv);
	mtl.matrix41 = 0;
	mtl.matrix42 = 0;
	mtl.matrix43 = 0;
	mat_scale(mtl.matrix, 1, -1, 1);
}

function mtl_envmirror_init()
{
	bmap_to_cubemap(mtl.skin1);
	mtl.event = mtl_envmirror_view;
	/*mtl.flags=*/set(mtl,ENABLE_VIEW);
}

MATERIAL* mtl_envmirror = // environment cube
{
	skin1 = bmp_envcube;
	event = mtl_envmirror_init;
	effect = "
	texture mtlSkin1;
	texture entSkin1;
	matrix matMtl;
	technique envcube
	{
		pass p0
		{
			AddressU[0] = Clamp; // don't wrap around edges
			AddressV[0] = Clamp;
			TexCoordIndex[0] = CameraSpaceReflectionVector;
			TextureTransformFlags[0] = Count3;
			TextureTransform[0] = <matMtl>; // transform camera space back to world space
			Texture[0] = <mtlSkin1>;
			ColorArg1[0] = Texture;
			ColorArg2[0] = Diffuse;
			ColorOp[0] = Modulate2x;
			Texture[1] = <entSkin1>;
			TextureFactor = 0xC0FFFFFF;
			ColorArg1[1] = Texture;
			ColorArg2[1] = Current;
			ColorOp[1] = BlendFactorAlpha; // blend by 75% (= oxC0)
		}
	}
	//technique fallback { pass p0 { } } // empty fallback causes normal rendering without effect
	";
}

action cubic_map()
{
	my.material = mtl_envmirror;
}




3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: car environment reflection [Re: painkiller] #350485
12/16/10 14:30
12/16/10 14:30
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Thank you a lot laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: car environment reflection [Re: 3run] #350682
12/18/10 08:15
12/18/10 08:15
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Why use that old shader? The integrated shader looks better.

Re: car environment reflection [Re: Tobias] #360645
02/25/11 18:42
02/25/11 18:42
Joined: Jul 2004
Posts: 1,710
MMike Offline
Serious User
MMike  Offline
Serious User

Joined: Jul 2004
Posts: 1,710
real time reflections would be better.. is this possible already?

Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1