Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, Akow, 7th_zorro), 756 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Realtime shader with shoing texture od a car #387215
11/15/11 20:14
11/15/11 20:14
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
Hi Community does someone have a realtime +texture visible shader like in most race games i really need this.
Thanks for reading this post!
WFG Progger laugh


asking is the best Way to get help laugh laugh laugh
Re: Realtime shader with shoing texture od a car [Re: Progger] #387221
11/15/11 21:11
11/15/11 21:11
Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
Roel Offline
Senior Member
Roel  Offline
Senior Member

Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
I might be wrong, but an effect that might help is the
Cubic_Enviroment_Shading_Shader
it uses a cubemap for reflections, which can be a sky cube.
these reflections, however aren't realtime(which gives rendering speed in return).


Check out the throwing game here: The throwing game
Re: Realtime shader with shoing texture od a car [Re: Roel] #387226
11/15/11 22:08
11/15/11 22:08
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
Yeah, if you use what he just showed you, and every few frames render surrounding views to the cube map. wink

Re: Realtime shader with shoing texture od a car [Re: lostclimate] #387228
11/15/11 22:17
11/15/11 22:17
Joined: Apr 2007
Posts: 141
Germany
Timothy Offline
Member
Timothy  Offline
Member

Joined: Apr 2007
Posts: 141
Germany
I made this, maybe you have to change some things:

http://www.opserver.de/ubb7/ubbthreads.p...true#Post375716

Re: Realtime shader with shoing texture od a car [Re: Timothy] #387229
11/15/11 22:40
11/15/11 22:40
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
@roel and lostclimate
ill take a look
@Timothy i saw this by searching but dont know how to also show the texture.i want a textured car with real time.Like in F1 2011
there is a texture and it is also reflecting
I also tried to make the view transparent timothy but i failed^^
Can you help me with that ?
Thanks for reading again laugh
And i really need your help.
ANd also thanks for answering me laugh
WFG PRogger laugh


asking is the best Way to get help laugh laugh laugh
Re: Realtime shader with shoing texture od a car [Re: Progger] #387248
11/16/11 07:49
11/16/11 07:49
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
i cant get it work frown is there some tutorial for it i tried to use it but the car gets white no reflection at all.Do i need a normal map or something to get it work?
MFG Progger laugh


asking is the best Way to get help laugh laugh laugh
Re: Realtime shader with shoing texture od a car [Re: Progger] #387276
11/16/11 13:45
11/16/11 13:45
Joined: Apr 2007
Posts: 141
Germany
Timothy Offline
Member
Timothy  Offline
Member

Joined: Apr 2007
Posts: 141
Germany
Well the main part of the code is that you get a realtime rendered cubemap. So you have to use a shader that uses both, the texture of the car and the cubemap.

The code works like this:
There is a camera always at the same position as the reflecting object (in this case the car). The camera changes its direction all the time to combine the different angles and renders them on a cubemap.

My code only generates this dynamic cubemap. In the example I used a simple shader from Slins collection. It uses just one cubemap which is rendered on the model.
So in your case you have to use a different shader (Environment Mapping) which also supports texture blending and that uses a cubemap (generated by the code).

I hope you understand crazy

Edit: I think I saw such a shader in one of the AUMs.



Last edited by Timothy; 11/16/11 13:46.
Re: Realtime shader with shoing texture od a car [Re: Timothy] #387280
11/16/11 14:26
11/16/11 14:26
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
@Timothy thank you very much i completly forgot to look in the aums.I remember that shader with the cola thing with the enviroment shader on it.So ill look in the aums laugh
Thanks for helping laugh
WFG Progger laugh


asking is the best Way to get help laugh laugh laugh
Re: Realtime shader with shoing texture od a car [Re: Progger] #387282
11/16/11 17:09
11/16/11 17:09
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
Im totally cofused it would be very nice if someone could explain me how it works
I converted it to lite-c no error at all
but when i use it only the texture of the car gets brighter nothing more frown
I really need you help!!!!!!
THanks for helping laugh
PS:WOuld be nice if someone could upload a working code in lite-c
with an example cube or something

Here is the shader iam using:
Code:
BMAP* bmp_envcube = "skycube1+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;
	set(my,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
	";
}



WFG Progger

Last edited by Progger; 11/16/11 17:36.

asking is the best Way to get help laugh laugh laugh
Re: Realtime shader with shoing texture od a car [Re: Progger] #387285
11/16/11 18:45
11/16/11 18:45
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
Sorry for tripple post here is a screenshot

with Shader:


without Shader:


WFG Progger laugh

Last edited by Progger; 11/16/11 18:53.

asking is the best Way to get help laugh laugh laugh

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