Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
caves fully made out of hmps #64562
02/17/06 13:18
02/17/06 13:18
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
hi all,
many of you searched for a method to make caves using terrains, but they failed with the ceiling. "hmp file format is a simplified mdl format, and to turn hmps, you must make them mdls first", was the main answer. but there is a better, faster way. i cannot believe i am the first one who thought of that... surely i am not.

look, this is a shot from the floor to the ceiling:

i know it is just an ugly test level... but look: both terrains are hmp files, the lower one has nothing applied, the upper one uses a simple effect -->
that is all the code:
Code:

texture entSkin1;

technique vegetation
{
pass p0
{
Texture[0]=<entSkin1>;
ZWriteEnable=True;
CullMode=None; // CCW when sigle sided polys, or None when double sided polys

ColorArg1[0]=Texture;
ColorOp[0]=Modulate2X;
ColorArg2[0]=Diffuse;
}
}



no more need to make it an mdl.

Re: caves fully made out of hmps [Re: broozar] #64563
02/17/06 13:31
02/17/06 13:31
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
better use CW or CCW in that case. none takes up twice the performance


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: caves fully made out of hmps [Re: ello] #64564
02/17/06 13:34
02/17/06 13:34
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
yeah, but thatīs the trick ^^ you can use both sides of the terrain, for the ground of the world AND ceilig for the cave together! so you donīt need 2 hmps, which would, in my opinion, slow the game down too... it was just an idea.

Re: caves fully made out of hmps [Re: broozar] #64565
02/17/06 13:38
02/17/06 13:38
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
oh, in that case you are right;) but. you shouldnt use the same texture for floor and ceiling. thus better use two passes, one with cw the other with ccw and use different effects/textures


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: caves fully made out of hmps [Re: ello] #64566
02/17/06 14:04
02/17/06 14:04
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
yeah ^^ thatīs a cool idea! gonna try it.

[edit] here is it, have fun

Code:

texture entSkin1;
texture entSkin2;

technique vegetation
{
pass p0
{
Texture[0]=<entSkin1>;
ZWriteEnable=True;
CullMode=CCW; //

ColorArg1[0]=Texture;
ColorOp[0]=Modulate2X;
ColorArg2[0]=Diffuse;
}

pass p1{
Texture[1]=<entSkin2>;
ZWriteEnable=True;
CullMode=CW;

ColorArg1[1]=Texture;
ColorOp[1]=Modulate2X;
ColorArg2[1]=Diffuse;
}
}



Last edited by DaBro0zar; 02/17/06 14:26.
Re: caves fully made out of hmps [Re: broozar] #64567
02/17/06 16:36
02/17/06 16:36
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
That's even slower 'cause u use two passes.

ello meant you should use two different effects (one using CW and one CCW) for floor and ceiling.


Follow me on twitter
Re: caves fully made out of hmps [Re: mk_1] #64568
02/17/06 16:46
02/17/06 16:46
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
he said "thus better use two passes".
separating the code in two is no deal- i just wanted to post it because i often read the request for an upside-down terrain. and, i learned sth. myself...

surely, in a game, iīd use two terrains, one with cw and one ccw, as you suggested, because it is unprobable that iīll have to move transitionlessly from outdoor to a cave area.

Re: caves fully made out of hmps [Re: broozar] #64569
02/17/06 19:30
02/17/06 19:30
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Did you make a cave in a level with this method? Normally, there occure several difficulties until a new solution like this fits with the purposes of a level!

Walls with smearing textures at the walls comes to my mind when I think of terrains as caves!

Re: caves fully made out of hmps [Re: Pappenheimer] #64570
02/17/06 19:52
02/17/06 19:52
Joined: Jan 2005
Posts: 567
Sweden
Gafgar Offline
Developer
Gafgar  Offline
Developer

Joined: Jan 2005
Posts: 567
Sweden
why not use a model and polygon collision? ^^
Then you can have one model for both the parts .. and have a mother seam between them ^^


__________________________________________________ / Gafgar The Goblin... http://www.Goblinsoftware.tk/
Re: caves fully made out of hmps [Re: Gafgar] #64571
02/18/06 18:39
02/18/06 18:39
Joined: May 2005
Posts: 961
Bremen, Germany
tuschcarsten Offline
User
tuschcarsten  Offline
User

Joined: May 2005
Posts: 961
Bremen, Germany
Polygon collision is very buggy in A6....
..I don#t like it yet... it has to be improved much..



...but cool Idea


Bit Happens!
Page 1 of 2 1 2

Moderated by  adoado, checkbutton, mk_1, Perro 

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