View previous topic - View next topic |
Author |
Message |
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Mon Sep 21, 2009 8:57 am Post subject: |
[quote] |
|
Mattias Gustavsson wrote: | Oh, still too early to tell - I'm doing render test, post-processing and number crunching still.
|
Mattias, can you suggest tools for automated masking/cutting and cropping of images? On Unix I remember the NetPBM tool chain, and ImageMagick, the latter also exists for Windows, I believe. What do you use, and what would you suggest?
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
|
Back to top |
|
|
Mattias Gustavsson Mage
Joined: 10 Nov 2007 Posts: 457 Location: Royal Leamington Spa, UK
|
Posted: Mon Sep 21, 2009 10:10 am Post subject: |
[quote] |
|
I use photoshop to edit images- there's really nothing that is as good, of what I've tried, so for me it's worth the cost (though I'm still on version 7, and I don't think I'll upgrade soon - not as long as I'm a student :P)
But as for cropping images and such, I don't do any of that manually when I make my games - for example, when I've rendered an animation from poser, I might end up with 20 png files which are 800x600, with just a small sprite in the center of it. This I can pass directly to my Pixie image converter, which goes through and crops all images as tightly as possible (and stores the offset of the crop), converts to 256 colors and stores semitransparent and opaque pixels in two separate RLE-stream. This is done for all images of the animation, and it is all saved out to a single animation file.
When I draw it in-engine, it acts just like drawing the full 800x600 image (as the offset has been stored), so it is easy to just set sprite origin to what would make sense for the big source image, and still have things working even though all the frames are cropped to different sizes.
It's a setup which works really nice for me, helps speed things up. For example, when I'm making UI buttons, I just position them where I want them on the screen in photoshop, and leave most of the image blank. And just use it as a sprite I position at 0,0, and the button ends up in the right place without having to fiddle with positions in code... _________________ www.mattiasgustavsson.com - My blog
www.rivtind.com - My Fantasy world and isometric RPG engine
www.pixieuniversity.com - Software 2D Game Engine
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Mon Sep 21, 2009 10:53 am Post subject: |
[quote] |
|
O_O that is really freaking awesome man.
I just might have to lift that design out of Pixie and see how it works and how I can implement something similar in my stuff...
No wonder you can create such fanfuckingtastic stuff...your engine does the hard work for you! :D _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Mon Sep 21, 2009 11:53 am Post subject: |
[quote] |
|
Mattias Gustavsson wrote: | I
But as for cropping images and such, I don't do any of that manually when I make my games - for example, when I've rendered an animation from poser, I might end up with 20 png files ... This I can pass directly to my Pixie image converter, which goes through and crops all images as tightly as possible (and stores the offset of the crop) |
I often got this problem, too, that's actually why I was asking. I'll have a masking step in between, due to the way I create the images, but I think I'll use your idea too, and build the "mask - convert transparency - crop" steps into a little tool. Code for that I have from older projects.
Thank you for the hint! The best ideas are usually also the simplest :)
|
|
Back to top |
|
|
Mattias Gustavsson Mage
Joined: 10 Nov 2007 Posts: 457 Location: Royal Leamington Spa, UK
|
Posted: Mon Sep 21, 2009 7:33 pm Post subject: |
[quote] |
|
It's easy to get sidetracked by tools, to invest too much time so you end up with only tools and no games. But some tools are just so useful and saves so much time that it's worth it in the long run. The first version of my image stuff was just part of my image class - it would crop and convert directly from the source TGA files each time the game was run. So my image converter is just a command line tool so that I can drop images on it and get the converted data saved out (which makes for much faster loading. I think the loading is pretty damn fast in my games, btw :P). So it is possible to make tools which are both simple and powerful, and those tools are the one to focus on, I think.
@Hajo: what's your "masking" step for? _________________ www.mattiasgustavsson.com - My blog
www.rivtind.com - My Fantasy world and isometric RPG engine
www.pixieuniversity.com - Software 2D Game Engine
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Mon Sep 21, 2009 9:46 pm Post subject: |
[quote] |
|
Mattias Gustavsson wrote: |
@Hajo: what's your "masking" step for? |
My raytracer anti-aliases objects with the background. The masking step is to get proper edges for such raytraced objects. The mask is the object in black, rendered without anti-aliasing. After the mask, I render the scene with anti-aliasing and use the mask to cut the object cleanly from the background.
For an older project of mine I was needing 4 views of each object, and I did the rendering and masking step manually. Now I have a little tool, too, that can do the masking step and the cropping automatically, and soon I'll have a script to render mask and scene automatically, and call the tool to cut the final images automatically, too. Very handy :) I feel a bit stupid for not having done that earlier, but until your message today my head was thinking in a wrong direction. The explanation how your pixie engine handles sprites triggered the right ideas. I had most code already, so making the tool was a matter of 30 minutes, and it definitely will save a multiple of those very soon.
Thanks again for the hint!
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Thu Dec 24, 2009 9:58 pm Post subject: |
[quote] |
|
I first wanted to post this over here, but the forum was down for a while, so I posted it over there:
http://rampantgames.com/community/viewtopic.php?t=808
I hope you're not angry, Mattias, since you had the idea first. But I finally couldn't resist to try if I can get it working ... Dungeon Master was always one of games that had impressed me most, and now I have my very own version of it :) No game yet, just the display framework, but if feels like a big step for me.
Thanks for the hints Mattias, how to render and postprocess the images!
Also thanks to the one who repaired the forum earlier today!
|
|
Back to top |
|
|
Mattias Gustavsson Mage
Joined: 10 Nov 2007 Posts: 457 Location: Royal Leamington Spa, UK
|
Posted: Mon Jan 04, 2010 7:11 pm Post subject: |
[quote] |
|
Hajo wrote: | I hope you're not angry, Mattias, since you had the idea first. |
I'm definitely not angry - it is very much inspiring to see your progress on this (my project is on hold at the moment).
And I don't think you could say that I had the idea first - all I set out to do was more or less clone the existing old games :D
_________________ www.mattiasgustavsson.com - My blog
www.rivtind.com - My Fantasy world and isometric RPG engine
www.pixieuniversity.com - Software 2D Game Engine
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Mon Jan 04, 2010 10:00 pm Post subject: |
[quote] |
|
Your graphics are still so much better :) All the decoration items add so much flavour, and even then, the quality of each piece is amazing. I'll watch and learn, and some day I can do that, too :P
But most of all I want to say, I'm happy to read from you again. Your blog seemed to end somewhen in autumn, and on all the forums you seemed so silent. Good to know you are still alive :)
|
|
Back to top |
|
|
Mattias Gustavsson Mage
Joined: 10 Nov 2007 Posts: 457 Location: Royal Leamington Spa, UK
|
|
Back to top |
|
|
RampantCoyote Demon Hunter
Joined: 16 May 2006 Posts: 546 Location: Salt Lake City, Utah
|
Posted: Thu Jan 07, 2010 10:05 pm Post subject: |
[quote] |
|
I'm more than happy to have the two of you guys feed on each other's progress. That's awesome.
I'm still at work, so I can't try the link out until tonight. But I'm thrilled by what both of you are doing! _________________ Tales of the Rampant Coyote - Old-School Game Developer talks Indie Games, RPGs, and the Games Biz
|
|
Back to top |
|
|
Verious Mage
Joined: 06 Jan 2004 Posts: 409 Location: Online
|
Posted: Fri Jan 08, 2010 2:25 am Post subject: |
[quote] |
|
Hajo, I tried your demo, it looks like you are making excellent progress. The only issue I ran into was in large rooms where the walls weren't visible, it was difficult to tell if I was moving.
Mattias, the demo ran very smoothly on my Dell Mini 9 netbook. The only thing that seems a little unusual is when you stand on the same tile as a table and turn left or right, you still see the table, but from a different angle.
I'm looking forward to seeing both projects developed further.
|
|
Back to top |
|
|
RampantCoyote Demon Hunter
Joined: 16 May 2006 Posts: 546 Location: Salt Lake City, Utah
|
Posted: Fri Jan 08, 2010 4:24 am Post subject: |
[quote] |
|
Mattias - I was really impressed with your demo. I'm not sure whether I like the transition as you move or not - at first blush, it was very smooth and cool, but I wonder if it would get irritating after a while.
And I tried out Hajo's stuff earlier and already commented on it.
Good stuff from both of ya! _________________ Tales of the Rampant Coyote - Old-School Game Developer talks Indie Games, RPGs, and the Games Biz
|
|
Back to top |
|
|
Hajo Demon Hunter
Joined: 30 Sep 2003 Posts: 779 Location: Between chair and keyboard.
|
Posted: Fri Jan 08, 2010 9:20 pm Post subject: |
[quote] |
|
Verious, thank you for the feedback! Good to know that the demo runs. Java used to be tricky in the past, and I had projects perform very badly on some peoples PCs. So I've got 4 positive reports now, that gives me confidence that Java is good for this.
I hope for an inspiring co-existence of these projects. It's good to share ideas, watch each others progress and help with suggestions. Well, at least I hope I can help, so far Mattias definitely is in the lead on both, technology and game design.
Mattias, your demo works nicely on my old PC. I like the transition effect, it gives a nice idea of movement, even in places where the environment doesn't give hints.
I think for my own project I will rely on a set of alternating floor and wall textures which should hint movement, even in big, open areas.
Funny that the demo is about the size of mine, but you have more content packed in there :)
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|