Voxels?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47994
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Voxels?

Post by Graf Zahl »

Depends on which axis. You can't turn it upside down but the other directions would be doable.

Note that this only applies to software rendering though. With a hardware renderer which has to polygonize the voxel it would be doable to rotate around any vector you like, just like any other model.
User avatar
phi108
Posts: 976
Joined: Sat Dec 01, 2007 6:28 pm

Re: Voxels?

Post by phi108 »

In DECORATE, I gave a bunch of items a_look and a see state with a_facetarget, to see what voxels are like when always facing you like sprites. But these are all 90 degrees off, facing sideways. Shouldn't the front view of the voxel correspond to the original sprite?
Having an option to have voxels always face you probably defeats most of the purpose of voxels, though you can at least see the top details of the model.

EDIT: I forgot to say I renamed all voxel lumps for no spinning, so that I could try this.

EDIT: I think a hack that I can use to have then face me is to use a_setangle(angle+/-90) right after a_facetarget is used

DECORATE code for anyone to see
Spoiler:
EDIT: So maybe 2 more voxel options could be desireable:
-Always face player
-face a random angle on creation, with no spinning
User avatar
Project Dark Fox
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Twitch ID: ProjectDarkFox
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA

Re: Voxels?

Post by Project Dark Fox »

If it is always facing you, you may as well just use a one-rotation sprite. :|
User avatar
Mr.Rocket
Posts: 102
Joined: Mon Dec 26, 2005 1:50 am

Re: Voxels?

Post by Mr.Rocket »

Now if we only had a sprite to voxel generator..
Someone needs to make all these monster *animations. :mrgreen:
User avatar
Project Dark Fox
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Twitch ID: ProjectDarkFox
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA

Re: Voxels?

Post by Project Dark Fox »

Mr.Rocket wrote:Now if we only had a sprite to voxel generator..
Someone needs to make all these monster *animations. :mrgreen:
NOOOO. Voxel monsters would truly look bad.
User avatar
Spleen
Posts: 497
Joined: Fri Nov 28, 2008 7:07 pm

Re: Voxels?

Post by Spleen »

Project Dark Fox wrote:If it is always facing you, you may as well just use a one-rotation sprite. :|
What if you want to make it always face you horizontally but not vertically? That is, you can look at the top of the object if you climb on a ledge and look down, but you won't be able to look at the back of the object. This is useful to prevent sprites from looking flat when you look at them from above, without making them face in weird directions because of the angle the actor has (for example, a statue in front of a wall might face towards the wall).
User avatar
phi108
Posts: 976
Joined: Sat Dec 01, 2007 6:28 pm

Re: Voxels?

Post by phi108 »

Yeah, the evil eye or other items, even the keycards(for better visibility) in vanilla maps are expected to always face you as sprites. But in a project that has new maps and voxels, the mapper could consider the facing angle and set actor angles, to make static voxels look correct.

Anyway, I hacked the actors to spin 90 degrees to face me, with
See:
YKEY A 0 a_facetarget
YKEY A 1 a_setangle(angle+90)
loop

It looks pretty good, though I decided the more narrow voxels (clip, stimpack, rocketammo, candle, column, cell) didn't particularly need to face the player, so I gave them a random facing angle:

Spawn:
TNT1 A 0
CLIP A 0 a_setangle(random(-180,180))
CLIP A -1
stop

But random angle voxels can look a bit messy in a room full of them.
And considering the shading, it would probably be best for the rocketammo, candle, and column to always face the same angle.
User avatar
Mr.Rocket
Posts: 102
Joined: Mon Dec 26, 2005 1:50 am

Re: Voxels?

Post by Mr.Rocket »

Project Dark Fox wrote:NOOOO. Voxel monsters would truly look bad.
Well I'd imagine they could be, but I'v never seen one so I'm not sure.
I figure they would look like the sprites other than being 3d, like the voxel weapon and items etc.
User avatar
Nash
 
 
Posts: 17283
Joined: Mon Oct 27, 2003 12:07 am
Twitch ID: nashmuhandes
Github ID: nashmuhandes
Location: Kuala Lumpur, Malaysia

Re: Voxels?

Post by Nash »

I was wondering if voxels for the HUD weapons would be possible or even make any sense? MODELDEF already allows models in the HUD...
User avatar
phi108
Posts: 976
Joined: Sat Dec 01, 2007 6:28 pm

Re: Voxels?

Post by phi108 »

I posted a hack shotgun voxel weapon in the WTHAYWOn thread. for use with the shotgun pickup voxel. It uses a_spawnitemex to spawn a shotgun actor offset from the player. It does animate surprisingly well and at 35 fps, but no muzzle flash or hands.
http://forum.zdoom.org/viewtopic.php?f= ... 80#p528972

Definitely not a proper implementation though.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47994
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Voxels?

Post by Graf Zahl »

Nash wrote:I was wondering if voxels for the HUD weapons would be possible or even make any sense? MODELDEF already allows models in the HUD...

In GZDoom, certainly. All the code is already there to handle them. In ZDoom it's up to Randy but he didn't sound too enthusiastic last time.
User avatar
Chris
Posts: 2841
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan Support

Re: Voxels?

Post by Chris »

Voxel HUD weapons could be pretty nice, particularly as they move around the screen (you'd get automatic depth scaling, and perspective shift.. the barrel of the gun will shrink appropriately as it goes into the distance, and moving the gun to the left side can show different parts of it than the right side, etc; no more worrying about if the sprite looks like it's facing at the right angle). Of course, it would depend on someone making them.
User avatar
Salad Viking
Posts: 752
Joined: Tue Apr 20, 2010 8:58 pm
Location: In high orbit

Re: Voxels?

Post by Salad Viking »

Will voxel models be able to be scaled like regular models can in software? And, once again, will we see voxel brightmaps?
User avatar
DooMAD
Posts: 44
Joined: Fri Dec 30, 2005 5:13 pm
Location: UK

Re: Voxels?

Post by DooMAD »

And just when you thought we hadn't given ourselves enough to do...

Switches, bitches!
Spoiler:
Updated zdoom_vox.zip yet again. Cheers to Exl for the DECORATE and VOXELDEF work.
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand

Re: Voxels?

Post by edward850 »

DooMAD wrote:Switches, bitches!
Inconceivable!

Return to “General”