3D model blocking?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
ExtremeMachine
Posts: 58
Joined: Sun Aug 26, 2007 18:16

3D model blocking?

Post by ExtremeMachine »

Hey !

I recently started to add 3d models to gzdoom, and loving it! Only one problem i meet this faar is the blocking.

Only settings i know how to change the objects block is by heigh, and radius.

Code: Select all

Actor   DUMP   30511 
{ 
   Tag      "container" 
   Radius      90 
   Height      100
   +solid
   States 
   { 
      Spawn: 
      POSS A 8 
      loop 
   } 
}
Here is the resualt:

Here the model looks Ok, the back and sides of the container is blocked and u can't move into it cause the raidius fits with the model.

1_29.png (1.0 MB)

Here the radius dont fit into the model as the Container has more "lenght" that way than the other ways, the container is not a square (? i rlly suck at explaining just ask and i try to make it more clear)

Image

I wonder if there is any setting or parameter u can add or change to make 3models blocking just where the 3dmodel actually is.


[/quote]
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

No, you can't. GZDoom's collision detection code is still using the same basic methods of Doom and I don't plan to change that.
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

The only way you can really do this is either making the actor solid, or building impassible lines around the model.
ExtremeMachine
Posts: 58
Joined: Sun Aug 26, 2007 18:16

Post by ExtremeMachine »

it would be imba if it could be changed :P, think many would appreciate that.

Anyway thanks for the answer!
ExtremeMachine
Posts: 58
Joined: Sun Aug 26, 2007 18:16

Post by ExtremeMachine »

wildweasel wrote:The only way you can really do this is either making the actor solid, or building impassible lines around the model.
set impassible lines around the model would cause that u can't step on the model when u above it.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

I often build an invisible 3D floor the same size as the model and use that for blocking. That is good because you can step on/off/under it and it blocks shots in the same way a solid bit of level structure does too. You can also use that for other effects (eg, if I allocate a clanky footstep sounds to the floor of the 3D sector using the terrain lump, I can make a metal looking model (eg a car) make a clanking noise when you jump on it.

If I just want to make a long and thin model behave like a normal decoration, I put 3D bridge objects inside the model.
ExtremeMachine
Posts: 58
Joined: Sun Aug 26, 2007 18:16

Post by ExtremeMachine »

Enjay wrote:I often build an invisible 3D floor the same size as the model and use that for blocking. That is good because you can step on/off/under it and it blocks shots in the same way a solid bit of level structure does too. You can also use that for other effects (eg, if I allocate a clanky footstep sounds to the floor of the 3D sector using the terrain lump, I can make a metal looking model (eg a car) make a clanking noise when you jump on it.

If I just want to make a long and thin model behave like a normal decoration, I put 3D bridge objects inside the model.
okey, that sounds possible, but still alot more jobb. If you got a more complicated structure of a model it will be hard to build it's structure with 3d floors.. many floors. But it's sure a way to do it.

If someone could inplant that function code that makes the models solid mass would be awesome!
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

ExtremeMachine wrote:okey, that sounds possible, but still alot more jobb.
It can be a little complicated, but once you get into the swing of it, you can do it pretty quickly and you get a feel for the right sizes to set things at so you get it right quite quickly. I've done tanks, trains, cars, forklift trucks, space ships etc etc.

If it's a complicated structure, I put the model in place, then build the 3D floors using, say, 160 translucency. That way, I can go into the game and see how the model and 3D floors match up. Once I have got it as close as I want, I set the 3D floors to be totally transparent.

On thing to watch, if you place the model in a very small sector, and the model itself is quite big, you can end up with the model seeming to disappear from certain angles. The trick is to make sure that the sector where the model actor is placed is visible whenever the model should be. I sometimes do this by making a small hole sector in the middle of the 3D floor model then change the line references for that sector to be the same as the sector surrounding the model. Then I place the model in the hole and because the surrounding sector is always visible when the model is, the model never vanishes.
ExtremeMachine
Posts: 58
Joined: Sun Aug 26, 2007 18:16

Post by ExtremeMachine »

Enjay wrote:
ExtremeMachine wrote:okey, that sounds possible, but still alot more jobb.
It can be a little complicated, but once you get into the swing of it, you can do it pretty quickly and you get a feel for the right sizes to set things at so you get it right quite quickly. I've done tanks, trains, cars, forklift trucks, space ships etc etc.

If it's a complicated structure, I put the model in place, then build the 3D floors using, say, 160 translucency. That way, I can go into the game and see how the model and 3D floors match up. Once I have got it as close as I want, I set the 3D floors to be totally transparent.

On thing to watch, if you place the model in a very small sector, and the model itself is quite big, you can end up with the model seeming to disappear from certain angles. The trick is to make sure that the sector where the model actor is placed is visible whenever the model should be. I sometimes do this by making a small hole sector in the middle of the 3D floor model then change the line references for that sector to be the same as the sector surrounding the model. Then I place the model in the hole and because the surrounding sector is always visible when the model is, the model never vanishes.
thanks for the help, helped me alot :D
Locked

Return to “GZDoom”