Is this possible: Making a 3D cube

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
cokeman118
Posts: 13
Joined: Mon Oct 09, 2006 13:39

Is this possible: Making a 3D cube

Post by cokeman118 »

I have been trying to make a cube that has beveled edges on the bottom and top to give it more of a "rounded" look. I've been trying this for a day now, and can't seem to do this, so I'm wondering if this is even possible. I'm pretty new at the 3D floors/slope stuff and still learning so bear with me.

Here is what I tried so far:

I made a room and put in my my "cube" sector. I made a 3D floor to be 8 units above to floor and a hight of 32 units. I tried to create another 3D floor sector below the main sector with a floor of 8 and ceiling of 8. This seemed to work fine...when testing the level it just looked like a solid cube.

Ok, so now I want the ceiling of the bottom sector that is 8 units to slope inward toward the base of the cube. This is the part I cannot figure out. I tried to slope the ceiling of the dummy sector but this didn't work. This is the part I don't understand. I can picture it in my mind, but I'm not sure if I'm using the slope/3d floor functions correctly, or if there is an entirely different way to do this.

What I really wanted to do is create a chair with different slopes in it, so I thought of a rhombus design. I figured I could make 3 square sectors all adjacent to one another. The middle sector would be 32 units tall. The sector to the left would slope up to the 32, and the sector on the far right would slope inward toward the base. Of course this is the part I couldn't figure out. It seems you can make the floor of the left sector slope upward to the top of the middle sector, but how would you get the ceiling of the far right sector to slope backward toward the floor?? The only way I could think of to get the ceiling to slope back was with a 3D floor sector with the ceiling at 32 units, and the floor at 0. Then use a line number 181 to slope the ceiling away.

I'm sure this probably sounds confusing, but I'm really getting frustrated with this. If anyone can help me with this, tell me if it's possible, or what I'm doing wrong I would appreciate it! I've seen many different complex structures made with slopes and 3d floors, so I'm sure it's possible....I'm just not getting it.

I figured I'd start with this rhombus design because that is what I was originally going for, but is the beveled cube a posibility or not? I figured I'd try to do it with the game engine, vs doing a 3D model...and it sounded simple enough for the game to handle so I thought I'd try it.

Here is a link to a cube design I was trying to make:
http://en.wikibooks.org/wiki/Image:Blen ... ease_2.png

Thanks!
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

OK, give me 5 minutes and I'll try and whip up an example. Complex 3D shapes are a PitA, especially when you start doing diagonal stuff. It's all to do with how you align the control sectors. If you're familiar with blender, you'd be easier and quicker making a model.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

OK, here you go. I think you are looking for something like this. See how many tags and control sectors I used for this "simple" structure? If you can, I really suggest that you use a model instead.

[edit]Dammit 15 minutes, not 5. :P [/edit]
Attachments
slopedbox.zip
(2.57 KiB) Downloaded 91 times
cokeman118
Posts: 13
Joined: Mon Oct 09, 2006 13:39

Post by cokeman118 »

Yes, that is exactly what I'm looking for!! I'll have to go though and examine everything you did...

I may looking into modeling, I've just learned about blender, so that is another thing I might have to figure out how to use:)


15 minutes eh?? Pretty good, considering it took me a day and I still couldn't figure it out. I don't know why, but the slopes seem confusing to me, that is why I'm spending so much time trying to figure out how they work, playing with the settings, and trial and error. I put off doom editing for a while because I wanted to use these features and couldn't never put them to use like I wanted. I'm trying again, so hopefully It will sink in and make sense, and I'll actaully start to make a level that I've been wanting to make :D

One other thing I was thinking...would it be possible to make the sides translucent, and put objects inside of the box? I'm not worried about them being accessable, like weapons, ammo, etc...just more or less for show. I've played around with translucent textures, and have tried some levels that made some pretty convincing "glass" that I thought was cool, just with making the textures translucent.

Thanks again for your help!! Their might be hope for me yet :)
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Translucent 3D sectors are possible (just change the parameter on the 3D floor lines that is currently at 255 to a lower value to increase how see through they are). However, you can't have a translucent sloped 3D floor. They have to be drawn fully opaque.
cokeman118
Posts: 13
Joined: Mon Oct 09, 2006 13:39

Post by cokeman118 »

Enjay wrote: However, you can't have a translucent sloped 3D floor. They have to be drawn fully opaque.
How would you go about doing this?
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

cokeman118 wrote:
Enjay wrote: However, you can't have a translucent sloped 3D floor. They have to be drawn fully opaque.
How would you go about doing this?
Ummm, not sure that I understand the question in as much as you quoted me saying that something can't be done then you asked how would you go about doing it. :? :lol:

To be clear: Normal vertical/horizontal (ie flat, normal Doom shape) 3D floors can be translucent. You adjust how translucent they are by the argument on the 3D floor line that is set to 255 on all the lines in the example I posted. The lower the value, the more see-through it is. 255 is fully opaque (non-see through).

Sloped 3D floors can only be fully opaque. They cannot be translucent.
DoomerMrT
Posts: 91
Joined: Thu Aug 09, 2007 19:07

Post by DoomerMrT »

Next time I should ask you to make a protoss pylon for me :lol: amazing work with that example! Sloped 3Ds always confused me :? I should learn them for real.
Locked

Return to “GZDoom”