PDA

View Full Version : Space environment creator by kryton9



kryton9
05-03-2007, 13:04
Galaxy Nebula Star Creator.

File no longer Exists, sorry.

Shortcut Keys to know:
Esc (the escape key) - to exit the program
Spacebar - to bring the toolbox panel to the front
S - takes a screenshot and saves it in the Screenshots folder in the application's directory.
You need to click on the screen outside of the toolbox panel then press S.
Then you can use Spacebar to bring the toolbox panel back to the front.

Enjoy!

Michael Hartlef
05-03-2007, 13:22
:o :o :o

KEnt, I can only say this is freaking AWESOME ! You have something commin there.

Great showoff and nice voice on the presentation.

Btw. you sound like you are 28,maybe 30. The picture I know of you looks like
someone in the 50's maybe end of 40's. How old are you?

Anyway, GREAT job. Get this thing ready, I love it alleady!!!!

Michael


P.S.: Suggestion, it would be awesome if you can have external pictures in it, on layers. This way it would be great to compose stuff even more. Another suggestion are effects like glowing, blur, etc.

kryton9
05-03-2007, 13:37
Thanks Mike glad you are excited by it. I am 50 years old. Thanks, everyone says I sound younger. That is because I am just a big kid. I still feel excited about things as when I was younger, just don't have the energy as much as I used to or can't multitask like I used to. Thanks though, nice to know at least the voice is young sounding :)

Your ideas are really good, but will be beyond my level at the moment. I figure the image created with the maker then can be used by the user in their favorite editing software for effects as you mention. If I ever made a commercial package of it or version, then those ideas you mentioned would be a must for sure.

I am going to order a graphics tablet, this and our game project will be a good excuse for me to get one. I always wanted one and I could see where having something like that would really help with my galaxy and nebula working. Although it is fun to go nuts with the mouse too :)

Thanks for watching and feedback and suggestions. I am sure once I have a version in your hands you will come up with many more ideas. I am flooded with them every day when I play with it. Can think of lots to add to it.

I can see where having a good image library will be something to work on soon. I might just release the alpha version, even now it is more than useable for our game project, and then maybe study up on my c++ more and then look into learning how to work with libraries like freeimage. Maybe that is something all of us can work on too. It will be nice to have support for jpg, png etc.

I don't know how having let' say a transparency supporting file format like png will effect tbgl? Will it allow for glass for example in our game?

ErosOlmi
05-03-2007, 15:46
What about opening a new specific thread for this new project.
It seems so awesome it merit a specific forum! But I want to see what come out next posts.

Ciao
Eros

Petr Schreiber
05-03-2007, 17:46
kryton,

you ... you ... you ... < error - expression not found :) >

This is looking so great, and the controls are so intuitive.
Great, great work, this really deserves a new thread !


Thanks,
Petr

P.S. About transparency format - TGA over here :D I will show you sample soon.
PNG would be better in terms of size, but I will show the trick on currently supported TGA :)

kryton9
05-03-2007, 22:07
Glad you guys are excited by the project. Thanks it gives me energy to wake up and really get back into it today!!

TGA is a very nice format. Supported by many programs. So it will be neat to see what new tricks tbgl can do with transparency power. It will help to give ideas on how to do things for our projects.

Petr, it would be really nice when you have some time to make a tutorial video about using the bone system in m15. The reason Mike and I can then think about animating our models for the story version (if cinematic) or at least be able to set poses for them if we go the comic book story presentation. Thanks.

I will finish the version I have now without adding more layers to galaxies, nebulas and all the other zillion ideas that occur while working with it like speed buttons for now. I figure this will be a good enough alpha release and those can all be planned additions for future releases.

Thanks again for the energy guys!!

kryton9
05-03-2007, 23:15
New vid, Mike's glow request was in there, sort of... forgot to show that in yesterday's vid.

link no longer works.

ErosOlmi
06-03-2007, 09:04
Ken,

you work is so fantastic.
I've created this board for users tools but if you already have a name for this "present", let me know and I will make a dedicated board with you as moderator so you can sticky some messages with latest application info and attach.

Please continue here discussion on this tool.

Ciao
Eros

Petr Schreiber
06-03-2007, 10:41
Very nice !,

I like the glow :)
Thanks a lot for the video


Petr

P.S. kryton, m15 posing is easy ... relatively :).
Using layer defined bones it is simplier, but it fits only things like robots/rigid bodies.
Using classic bounding box way is quite ok, but sometimes it is hard to define bones this way.
Maybe it would be easier if you could me pass sample model of character when ready and I could show it on it ?

Michael Hartlef
06-03-2007, 12:40
Hi Kent, thanks for releasing it in that stage, I'm looking forward to some freetime at home to give it a run.



Petr, it would be really nice when you have some time to make a tutorial video about using the bone system in m15. The reason Mike and I can then think about animating our models for the story version (if cinematic) or at least be able to set poses for them if we go the comic book story presentation. Thanks.


I think I got the initial picture wrong then. By Cinematics I thought about rendering little movies
inside 3D packages with high poly models. Or by comic book I thought about rendered pictures.

Well, if you guys want to go Kent's way, then we would definately need an editor for creating these cutscenes/actionscripts.

Features could be:

1) Load models (of course :) )
2) set lights and cameras
3) Particle emitters
4) Create paths that then can be used for models, lights, cameras, particles
5) Timeline editor functionality
6) Sound support
7) Ability in TBGL to do voice syncing with audio
8) Save and load playback script
9) Animate the scene content by hand, scripts or and playback model animation (once TBGL supports it)
etc etc.

Also we would need the ability to load a such scene and the created actionscript and then play it back.
If think that could be Kent's next task, after he is done with the Galaxy creator.

Michael

kryton9
06-03-2007, 13:22
Hi Guys, thanks for the posts! And Eros thanks for the new area for Galaxy Nebula Star Creator.
I know the program is more of a space environment. I also tried to "cash" in on the vista hype
with the name Space Vista Designer.... but my first name and what I had used, was still my favorite.
It doesn't seem as daunting or professional sounding and more like a fun toy.

I spent the whole day and night drawing and redrawing maps. I got good with the mouse that is for sure.
I priced out Wacom tablets, the nice ones are not cheap, so I decided to mouse my way through :)

I am happy to report Alpha Version 1.7 is ready.

While clicking endlessly making stars and then blurring and then clicking... it occured to me that I can design
the dll much better using OOP. I didn't really use classes other than what Delphi makes for you. I will tinker with
tests, to see if I can make classes that will make it easier to add new ideas and components in the future.
If those tests work, then this will be the last of this versions development path.
If the tests fail, then well back to good old reliable that it is, it will be foundation for more work.

Two things to know when using the program. Escape to exit and Alt+Tab to bring the toolbox panel to the front.
AND of course, have lots of fun!!!

Many more features are planned to come and things to make it even easier to do common tasks.
Instead of an empty screen, I did setup a nice scene and so you can start tinkering with it right away.

I am using Galaxies as sort of the light, glow and also its own nebula galaxy (using the color adjusters for it). Nebulae
can just be that or nice combined with Galaxies. I tried to draw maps for both that could be mixed and matched to
give lots and lots of combos. Scaling, rotating, positioning and color adjusting the options seem endless.

Well enjoy and thanks for the inspiration and energy you guys give me daily!!
edited: the latest files links are in the first post of this thread
http://community.thinbasic.com/index.php?topic=626.msg3506#msg3506

kryton9
06-03-2007, 13:26
I think I got the initial picture wrong then. By Cinematics I thought about rendering little movies
inside 3D packages with high poly models. Or by comic book I thought about rendered pictures.

Mike, that is what I was thinking too, that is as you thought right above in the quote.

I thought if we knew how to bone the models in m15, we can design our models with that in mind. Shuttle Hatches opening,
Robots moving. Just we could think about maybe making key components in parts to be used if and when we need it.

I guess once we flesh out the story more we can decide what needs detail and what doesn't.

It would be nice to do all you listed in your list. Maybe sometime in the future.

kryton9
06-03-2007, 13:32
P.S. kryton, m15 posing is easy ... relatively Smiley.
Using layer defined bones it is simplier, but it fits only things like robots/rigid bodies.
Using classic bounding box way is quite ok, but sometimes it is hard to define bones this way.
Maybe it would be easier if you could me pass sample model of character when ready and I could show it on it ?

Petr, I was thinking at this stage for the ships, robots etc. Maybe the ship when coming into a landing bay can fold its wings,
the cockpit hatch could open, cargo doors could open etc. It would be neat to know how we could animate those, wether with bones or with coding. Just thinking about it now.

I will get back to redoing my ships. Now that we can see them in the game it will be easier to work to get the look we want!

kryton9
06-03-2007, 14:08
Just made a backdrop with GNSC and put it in the game.

Just press printscreen in the program. Escape to exit, go to paint and paste. Save as bmp. go into photo editor and resize the image to 512x512 and save the bmp to the texture folder overwriting:
k9 space 01.bmp in the Textures\instant action level 01 folder to use your own custom background :)

Can't wait to see what you guys come up with.

Petr Schreiber
06-03-2007, 20:13
Hi kryton,

congratulations ! this is very, very good tool.
I like the controls and the output a lot !

Few ideas:
* SPACE to bring back the dialog instead of alt-tabing
* REM out console as it is not used now

It is really very good tool, I am having a great fun with it !
The screenshot looks very nice !

Regarding animations, I will create new thread for it.


Bye and THANKS,
Petr

kryton9
06-03-2007, 21:58
Good suggestions Petr, Thanks. Glad you liked it.

Michael Hartlef
06-03-2007, 22:01
Very very good job Kent, now let's make some suggestions. ;D No, I know you have plenty ideas and I will wait and see what will you implement. Really great job. Just a question, can you explain the 4 color values again, please?

kryton9
06-03-2007, 23:55
Glad you liked it Mike.

About the color values: Before you do any rotations to the map, the colors correspond to the vertex number of the quad the map is applied to.

So:
color 1 is top left corner
color 2 is top right corner
color 3 is bottom right corner
color 4 is bottom left corner

I just think like color 1 and color 3 are opposite corners
color 2 and color 4 are opposite corner colors. The reason is once you apply rotations it gets confusing.
But when you change the color and see where it effects the map, then you know ok I am on color 1, so to change to opposite
corner color I change color 3.

Update: I made the small tweaks Petr had requested, as they were good and easy to do.
The update contains the latest thinBasic script, the latest dll and a new empty folder screenshots.

Spacebar will bring the toolbox panel to the front now.
S will take a screenshot and save into the screenshot folder.
For now I am naming the files InstantActionBackground00x.bmp. These files will need to be resized to 512 x 512 to look right in the game.

I decided for now to get this project working just enough to use for our game development. I am going to scale back on my stand alone version of it, in fact put it on hold, so I can get back to working on the game.

I thought of a quick way to do many of the things I wanted to add, without doing it in the program for now.
A very quick work around.

Complex Scenes:
Step 1 - Make your galaxy and or nebula.
Don't have any stars or just put stars where the nebula galaxy are.
Save screenshot.

Step 2 - Now bring in the stars the way you like with the galaxy nebula.
Now fade out the galaxy nebula and have only the stars.
Take a screen shot.
Step 2 is only done once for the project.

Step - 3 Repeat Step 1 for each galaxy nebula you would like to add. Step 2 is not repeated.

Now go into The Gimp or Photoshop and assemble the screenshots into a complex scene.
You can scale, position rotate all the screenshots in those applications and make a master scene and then save
to 512 x512. I figure since we have to go in there anyways to resize the images we might as well use those apps
powers with our tool to get what we want :)
If this sounds complicated let me know I can make a video tutorial.

Attached: complex scene made in about 15 minutes with the steps outlined above :)

edited: the latest updates are in the first post.
http://community.thinbasic.com/index.php?topic=626.msg3506#msg3506

ErosOlmi
07-03-2007, 08:57
Ken,

the more I use your Module the more my mouth remain open with an "oooooooooooooh" sound coming out.
Really fantastic job. In future I hope to be able to add more power to User Interface module in order to be able to create so complex window full of gadgets.

Little tip in your source code. Not to ditribute an empty directory add the following before taking the screenshots:


IF DIR_EXISTS(APP_SOURCEPATH+"ScreenShots\") = 0 then DIR_MAKEALL(APP_SOURCEPATH+"ScreenShots\")


DIR_MakeAll (http://www.thinbasic.com/public/products/thinBasic/help/html/dir_makeall.htm) is a powerful function that automatically creates the full passed path.
In this case you can also use DIR_Make (http://www.thinbasic.com/public/products/thinBasic/help/html/dir_make.htm) if you prefer.

Ciao
Eros

kryton9
07-03-2007, 12:36
Eros, thanks so much for the wonderful comments!!

Also thanks very much for that tip about the directory and making when needed. It will definitely be put in right away!!! Thanks will make the code that much better for sure.

added later: script updated and is in the first post. Thanks again.

Petr, Eros, Mike and Roberto
I address to all of you because I think we need to put our heads together on this one and come up with a great solution.
On the same note about the bmp files and what all is happening...
Here is a thought I had and wondered where in the workflow we are missing the parts to make all of this happen fully.

First here is the way I think everything is working at the moment:
We load a bmp file with for example: tbgl_loadtexture "\textures\k9Stars00.bmp",x, %tbgl_tex_mipmap
This wonderful command is opening and loading up a bmp file and getting it ready to be used as a texture.
I am not sure at this point of how it is being stored.
Is it stored as a bmp or as something special to make it a texture in a buffer somewhere?

The we draw our objects, effects and everything that is tbgl and it is being drawn to what I assume is a back buffer.
Then when we say tbgl_drawframe
It flips the back buffer to the front buffer and then the back buffer is free again to be drawn too.

Now when tbgl_SaveScreenShot is used it takes obviously that information on the front buffer and saves it out as a bmp.
Does this mean everything is stored in the buffer as a bmp or is there a conversion taking place?

What would be neat is to be able to draw to the screen as we are and instead of saving a screenshot save it to texture memory as if we had loaded a bmp file and also scale it down to 512 x 512 at the same size.

The reason for asking this. Think about it, we just distribute a few bmp's that will be the core engine maps, as I have in the galaxy maker. But with those few maps and code we could generate infinite amount of maps. No need for hundreds of bmp files. In Fact I am thinking of writing an output file as Petr has done for the ship models, these would be background text files and could generate the backgrounds on the fly via code without having to load a bmp for each background.
This would be a very powerful asset as we could use this method for all sorts of texture creation to be used everywhere. Worlds, planets, walls, floors, terrain and on and on. Then we could just add little bmp files less than 64x64 for details, like signs, or logos to items.

The other thing is something Mike had brought up. That is being able to play media files. Since this ties into tbgl and thinBasic and requires some hard core coding, it will require us all to come up with a way.

I looked NeHe's lesson 35 as Mike mentioned. I got it to work in both C++ and Delphi, well I downloaded the already made projects, but still sometimes those projects don't work :)
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=35
I am able to open avi files, but not wmv files. I found wmv's to be the best because they are still great in quality but small size usually 10 to 1 sometimes even greater compression. Divx and Xvid are good, but wmv is supported in windows by default so no need to worry about codecs being on someone's computer.

In DarkBasic Pro I am able to use wmv files as textures, it plays the sound as well as the video on any object used as a texture. This is really a powerful tool. And one we should have in our tool box. I know it is possible as it is done in DarkBasic Pro and it plays wmv files.

So with the 2 ideas and these were sort of touched upon in other posts, but I think we all need to get together and figure out a solution.
Since Eros and Roberto know WIN API inside and out, Mike and Petr know more than I do. But I know it can be done. I have been digging and can taste the honey, but can't reach it. I will be glad to do any task to make these happen. I just need guidance and direction. I think you guys are in a position to know how and where these features should be placed and used within the language.

Hope we can get a good start on these, the sooner they are in our toolbox the sooner we can design and use them.

Petr Schreiber
07-03-2007, 13:51
Hi kryton,

tons of interesting ideas :)
I must go out from home now again, but I hope to produce some more valuable reply later today.


Thanks,
Petr

Michael Hartlef
07-03-2007, 14:33
I would bet some serious amount of cash that DarkBasic uses DirectShow for handling wmv files, so with OPENGL it is out of question I guess.

kryton9
07-03-2007, 14:40
Mike, NeHe's lesson is with openGL. It is confusing to me for sure. I am sure with all of us thinking about it we can come up with solutions.

Petrcan't wait to read about your thoughts later tonight then.

Michael Hartlef
07-03-2007, 15:28
I know Kent. DarkBasic uses DirectX and there DirectShow. DirectShow does the dirty work for you, once the filters are all in place. For OpenGL something like this doesn't exist, at least to my knowledge.

Petr Schreiber
07-03-2007, 21:34
Hi Kent,

Mike is right, I think DirectX, as a child of MS, has easier access to WMV.

You are right about the double buffered perception of TBGL, it really works this way.
But - to make screenshot I use relatively dirty API way, which is not connected directly to OpenGL.

Your idea with memory bitmap is quite realizable I think - using render-to-texture mechanism. It is already in TBGL but not documented as I am not sure of some issues whcih may occur. I must study more about it.

I will have a look at the NeHe source again, there was some assembly coding if I remember it correctly.

I am sorry I am so much brief today,
thanks a lot,
Petr

ErosOlmi
07-03-2007, 23:32
Worth to have a look at http://www.imagemagick.org/script/index.php

kryton9
08-03-2007, 01:34
Eros, Roberto, Petr and Mike, if you have any ideas how we can task out some research for these matters let us know here.

Freeimage and Magick will be useful for file conversion and maybe some effects, but the texture to and from memory will be a neat trick and make all future type of graphics development really different and useful.

The wmv file as texture is doable, just need to figure out best route. So any direction will be appreciated.

added later: just found this. It says directshow and opengl are doable. So I will keep tinkering with it.
http://www.toymaker.info/Games/html/main_window_video.html#A1

I think I found the killer article, but it is complex for me to grasp it all. I will read my way through about a 100 times or whatever it takes, but could one you more knowledgable say, yes this is the ticket. If I know it is the right road, I will stick to it till I get it working. But if you can see a flaw and how it would not work, I don't want to waste endless days on it. Thanks.
http://lurkertech.com/lg/dmbuffer/video_as_texture.html

Michael Hartlef
08-03-2007, 07:50
Cool, thanks Kent for the research. This will help very much :)

kryton9
08-03-2007, 12:55
THanks for looking at it Mike, let me know if it is worth pursuing or if you think it is a dead end with that article, when you have the time.

Michael Hartlef
08-03-2007, 14:20
It is worth looking into this, definately. I didn't thought that you can mix directshow with OpenGL.
At least a video playback on a window can be done by this. After reading a little into MCI yesterday,
I think it can be done with it too. Once I find time, I will look into it, right now I wanna get the
DirectInput library done (inkl. Force Feedback) and then update the Blender M15 Export Script.

kryton9
08-03-2007, 23:14
Glad it looks good Mike. I also did some reading and tested in vsc++. It seems like it will be easy to play a wmv file with it. It is just a matter of downloading the right mix of sdk's. My first attempt with windows media player 9 sdk and directx 9.0c sdk didn't work. I think I need to download a separate sdk for directshow as directx 9 no longer comes with it.

Michael Hartlef
09-03-2007, 07:55
Go for the DX8 or 7 SDK.

Michael Hartlef
04-02-2010, 23:34
Kent, the links in the first posts are dead. Any chance of putting the files up again?

kryton9
05-02-2010, 06:50
Thanks for pointing out the dead links Mike. I will need to search my backups to see if I can find it again.

kryton9
08-02-2010, 06:49
I found a backup and updated the first post with the link for download. Thanks Mike for pointing out the dead links!

http://community.thinbasic.com/index.php?topic=626.msg3506#msg3506

Michael Hartlef
08-02-2010, 06:57
Thanks man, right now i am working on an IPod Version of AstroCrusher and i want to see how the backgrounds look like in the game.

kryton9
08-02-2010, 07:04
AstroCrusher will be really great for something like the iPod Mike. I really liked the looks of the game and the cool thruster effect!