Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
jval

DOOMTREE - Procedural Generated Tree Sprites & Voxels

Recommended Posts

Holy hell man, another useful tool from you-- where are you getting your 30-hour days from? Your pace is insane!

 

Nice work as always. Being a garden-variety app/web/back end dev, I'm in awe. I could bin off sleep and live on coffee and amphetamine injections and I'd still not be as productive in the, oh, two days or so before death :)

Share this post


Link to post
1 hour ago, Martin Howe said:

Now, if it could be ported to ZScript ... :)

 

Do you mean replacing the DECORATE script with ZScript or recreate the entire random generation algorithm with ZScript?

Share this post


Link to post
4 hours ago, jval said:

Do you mean replacing the DECORATE script with ZScript or recreate the entire random generation algorithm with ZScript?

I meant porting the algorithm to ZScript; I was only thinking random population of trees at level start, but after writing it, this would mean trees (or other plants) that grow as time progresses! That would be an awesome idea. I was only half serious, as I haven't looked at the code yet and ZScript does have some limitations.

Share this post


Link to post
23 minutes ago, Martin Howe said:

I meant porting the algorithm to ZScript; I was only thinking random population of trees at level start, but after writing it, this would mean trees (or other plants) that grow as time progresses! That would be an awesome idea. I was only half serious, as I haven't looked at the code yet and ZScript does have some limitations.

 

Are you interesting for Tree sprites or models? The algorithm actually makes 3d models, DOOMTREE has an extra step to create the sprites.

Does ZScript support DLL function calls? I have encapsulated the algorithm in a DLL for the DelphiDoom OpenGL example in which random tree models are actually rendered by the DLL code. The example is static but it can be converted to dynamic with little effort.

If you find Pascal difficult, the algorithm can be found in other languages:

C++ -> https://github.com/jarikomppa/proctree

JavaScript -> https://github.com/supereggbert/proctree.js/

 

Share this post


Link to post

Does this software GENERATES new tree graphics? If yes - you are genious. How about creating a procedural generator for VOXEL trees or at least bushes, with configurable ammount of empty spaces in each layer to make the bushes and trees look a but pransparent here and there?

Share this post


Link to post
17 hours ago, jval said:

If you find Pascal difficult, the algorithm can be found in other languages:

C++ -> https://github.com/jarikomppa/proctree

Oddly enough, I do, but only because I haven't used it for years; for me it is nostalgia, as it was the main teaching language in university when I was there (Cardiff, 1985-88); in fact, I wrote my first doom launcher in Turbo Pascal and had to convert some chunks of DeuTex into Pascal to get sprite/flat append working :) Nowadays I use C or C# for desktop and ZScript & ACS for ZDoom.

Share this post


Link to post

Used jval's DD_Terrain to make the terrain and added some trees in with DoomTree:

test0001.png.9ed1364b1a665a0f265657105c5fdb81.png

Haven't used WadPaint on this yet.. The flat grassy spots closest the the player will have some WadPaint stuff eventually.

Plan to have some creek side area back in there on some of the flat area/swimmable.. 

Is totally WIP atm.

btw, the sky is just Doom2's default sky with inverted color. ;) ~ it's likely how they made the sky to begin with heh.

 

Edited by Mr.Rocket

Share this post


Link to post
19 hours ago, Mr.Rocket said:

btw, the sky is just Doom2's default sky with inverted color. ;) ~ it's likely how they made the sky to begin with heh.

It actually isn't, the origin of Doom 2's first sky texture is an actual photograph of a beach that was then scaled down to fit inside Doom 2.

Share this post


Link to post

So the sky was brown/tan at the beach that day?

I don't think so.. 

 

What I was saying was that I inverted the color, which made the sky blue.

So that's what I was saying, likely they inverted the color, from blue to brown/tan.

(This was of course after they took a picture of the sky!) :D

Edited by Mr.Rocket

Share this post


Link to post
7 hours ago, Mr.Rocket said:

So the sky was brown/tan at the beach that day?

I don't think so.. 

 

What I was saying was that I inverted the color, which made the sky blue.

So that's what I was saying, likely they inverted the color, from blue to brown/tan.

(This was of course after they took a picture of the sky!) :D

Here is the original photo that Doom 2's RSKY1 was made from, with the original texture overlaid on the same location it was taken from.

You aren't wrong about them taking a picture of the sky, but it definitely wasn't a blue sky.

1X4UQ2f.jpg

Share this post


Link to post

Ah! I see, apologies for not looking into the history of the sky. ;)

I assumed it would have been blue to begin with as it looks rather natural after inverting the color.

Thanks for the info!

 

Share this post


Link to post
On 2/22/2021 at 11:49 PM, GRAU said:

How about creating a procedural generator for VOXEL trees or at least bushes, with configurable ammount of empty spaces in each layer to make the bushes and trees look a but pransparent here and there?

 

Here it is, version 1.0.2.17 with voxel export support. (File/Export/Voxel menu item)

 

Voxel types supported:

  • Slab6 vox files
  • DelphiDoom ddvox files

 

Downloads

Executable: https://sourceforge.net/projects/doom-tree/files/DOOMTREE_1.0/DOOMTREE_1.0.2.17_bin.zip/download

Source code: https://sourceforge.net/projects/doom-tree/files/DOOMTREE_1.0/DOOMTREE_1.0.2.17_src.zip/download

 

The Export Voxel dialog:

exportvoxel.png

 

Inside the game:

Delphi-Doom.png

Exported voxel opened in the SLab6 editor:

Spoiler

SLAB6.png

 

 

 

Exported voxel opened in DD_VOXEL editor:

Spoiler

DD-voxel.png

 

 

Share this post


Link to post

I love this so much! I searched for all sorts of tree sprites for quite a while and then stumbled on Ptree last month. I liked Ptree a lot and have progressed quite a bit with my big forest level. But this.... just wow! Thank you for making this! Please never stop creating cool software like this!

Share this post


Link to post
5 hours ago, Peccatum Mihzamiz said:

Please never stop creating cool software like this!

i think we'll need a straitjacket to stop him. and i don't think we have one.

Share this post


Link to post

Fantastic work! I look forward to seeing the kind of things people come up with when combining this and the Terrain Generator (even more so if a procedural rock generator is added to the mix at some point)  :)

Share this post


Link to post

Inspired by how well the new rock generator works with OTEX source textures, I decided to try an OTEX tree using OTEX wood textures for the trunk and OTEX vine textures for the twigs.  Again I'm pretty impressed with the results:

Spoiler

treeotex1.png.88a916ff18aae28c5b5e63e7d50ffc0d.png

I get the impression that for better results though the OTEX textures need to be edited to create transparent/black areas around the edges.

 

Edit: done!

Spoiler

treeotex2.png.cc1104e4d4fb8881fa06e9ac7dfacffa.png

 

Edited by ENEMY!!!

Share this post


Link to post
On 2/25/2021 at 7:42 PM, jval said:

 

OH, man, you are genious! Thius tool could save tinns of time in some of my projects. Can i use generated with this software voxels in my tc for (Q/L)ZDoom?

Actually i thought to use sprite trees or may be some sector+texture combinations for large, high trees in the woods. But this thing looks far more interesting. The only question is HOW MUCH PERFORMANCe I WILL LOSE with such big voxels. But abyway i could use it for some small bushes for example.

Share this post


Link to post
4 hours ago, GRAU said:

 

OH, man, you are genious! Thius tool could save tinns of time in some of my projects. Can i use generated with this software voxels in my tc for (Q/L)ZDoom?

Actually i thought to use sprite trees or may be some sector+texture combinations for large, high trees in the woods. But this thing looks far more interesting. The only question is HOW MUCH PERFORMANCe I WILL LOSE with such big voxels. But abyway i could use it for some small bushes for example.

 

Thanks @GRAU. The voxels can be exported in vox format and then you must manually convert them with slab6 to kvx in order to use it with ZDoom family ports. 

In the screenshot the voxels are 256x256x256 in size. In case of performance loss you can choose to export as 128x128x128 or lower and use scale. The performance depends mostly on close to the camera voxels (far voxels use mip-mapping and occupy small amount of pixels in screen to worry about), so unless you put dozens of them in front of the player view, or make a distant forest with hundreds of them, there shouldn't be any problem.

Share this post


Link to post

i allready have done some tests. It is not ideal - trees are alway very aymetric on nearly anny settings and seed. but it is still easier to enerate something i would nmore or less like and then - to postprocess it manually like i have done with one tree today))) Yes - when i did put over 30 trees in front of player i got heavy fps drop but it still a reliable thing, i just will use half-resolution and put less trees somewhere in the streets will look very nice!

 

Screenshot-Doom-20210306-210640.png
 

Spoiler

 

Screenshot-Doom-20210306-205954.png Screenshot-Doom-20210306-210000.png Screenshot-Doom-20210306-210004.png

 

 

Edited by GRAU

Share this post


Link to post

But i found a thing i need. May you give an advanced option when exporting to voxel -an ability to choose the .pal file (game palette) so i could create trees allready in my special palette, and not in doom one. And a question - can i load textures with 32bit colordepth for twigs and trunc?

Another export option that can be really usefull - export to .md2 nodel and it's special composite skin file.

Share this post


Link to post
1 hour ago, GRAU said:

But i found a thing i need. May you give an advanced option when exporting to voxel -an ability to choose the .pal file (game palette) so i could create trees allready in my special palette, and not in doom one.

 

Done!

 

Version 1.0.3.18 (20210306)

 

This is a small update to allow to use custom palette for exported slab6 voxels.

 

Downloads:

Executable: https://sourceforge.net/projects/doom-tree/files/DOOMTREE_1.0/DOOMTREE_1.0.3.18_bin.zip/download

Source code: https://sourceforge.net/projects/doom-tree/files/DOOMTREE_1.0/DOOMTREE_1.0.3.18_src.zip/download

 

This is the new look of the Export Voxel dialog, in which you can specify an external palette to use. In order to be able to select a palette you must choose to save as slab6 vox format (DelphiDoom's ddvox format is true color) and select the "Custom" radio item from the "Palette" radiogroup.

 

For convenience, DOOMTREE will remember the last used palette every time you run the application.

If you select "Custom" palette but you forgot to specify the filename, then the defaulf Doom palette will be used.

 

Note: The palette must be in the Doom palette format.

 

image.png.61ab3e4575ae7ec09d37f1873da3f365.png

 

 

1 hour ago, GRAU said:

And a question - can i load textures with 32bit colordepth for twigs and trunc?

 

Yes, of course, you can use jpg, bmp, png and tga images with any color depth. In fact, the tga format support is limited to only 24 & 32 bit uncompressed files.

 

1 hour ago, GRAU said:

Another export option that can be really usefull - export to .md2 nodel and it's special composite skin file.

There are some limitations and technical problems for that:

  • It needs 2 md2 models to export the whole model (twig & trunc). The 2 textures can not be combined to one.
  • Does md2 allows for transparent textures (needed for twig) ?

 

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×