workflow with big scenes and images

General discussion about the R.U.B.E editor
Post Reply
sysex
Posts: 6
Joined: Sun Oct 25, 2015 1:20 am

workflow with big scenes and images

Post by sysex »

hi !

I'm pondering on how one would best edit the fixtures for big scenes in RUBE.

What I want to do in short:
- support high res, I decided to take one world unit to be 100px
- levels can be really big sized, like 100 meters width and 40m height (and much bigger)

1. Before RUBE editing
To avoid loading a image of size 100000 * 4000 px I decided to use Tiled http://www.mapeditor.org/ which I've used before to edit the collison shapes.
But I want to use the neat tracing from RUBE so I..
- ..drew the tiles together in Tiled
- ..exported the level from the tiled editor as PNG-image
in order to trace the exported Image with RUBE for the fixtures, the Images will be rendered separately with a map renderer lateron.
Here is how the Image looked like after exporting from tiled (its just a test, doesn't look nice).
Because of the fat size I didn't include it straight here, so click on the link if you like to take a look:
http://picpaste.com/testLevel-Ruv6pigw.png

2. Rube editing
In Rube I..
- .. dropped the image on the scene
- .. put a Sampler around it and traced it
- ..used the edit-mode 'e' of the sampler to adjust control points
- .. ignored the platforms for this sampler beacause of the 1 path per sampler limit
Here is like the result looks like (its not very accurate made its just a test)
Image

3. Loading and rendering the Scene in Game Framework
Working with the TiledMapRenderer and Rube works good in the above example so that I can use a B2D world with the RUBE designed Fixtures and f.i. can jump with a player around the scene but now new questions arise: how to handle all the other paths in the export fixture-wise?

This is what I'd like to ask you.

- Would you either put another sampler on top of the existing one in order to make fixtures for e.g. the platforms and all other possible other objects? Would you use one sampler per platform?

- How can I disable images from being exported (thus the ones which I use for building the fixtures)

- Would you extract all other content of the level-picture and make each platform an object in order to import them to the scene from other rube files?

- I'd like to find out which would be a good workflow. All of the options above seem to be cumbersome and maybe I'm missing someting.

BTW RUBE sometimes crashed on me when I clicked 'edge refresh' -> 'refresh now' button (Win7, current build of RUBE). Probably because of the image size?

I'm curious how would you do it?

thanks David
Last edited by sysex on Sun Oct 25, 2015 12:58 pm, edited 1 time in total.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: workflow with big scenes and images

Post by iforce2d »

If you find yourself needing an image with dimensions of 10000 pixels I think you're probably doing something wrong. Since you made the scene in tiled using tiles, isn't it just the same image repeated? Can't you put the same image repeated in RUBE too?
sysex
Posts: 6
Joined: Sun Oct 25, 2015 1:20 am

Re: workflow with big scenes and images

Post by sysex »

Thanks for the response. Maybe I didn't explain my issue undertandable, sorry. But because you are the RUBE-Master I'm really curious how you'd do it or what would be your suggestions.
My issue is not with the image itself, it just explained why I have to use a Tiled editor in the first place (efficient asset handling, optimized renderers available, reusable graphic elements etc.), instead of arranging everything in RUBE. In RUBE I want to edit the fixtures of all the obstacles, hills platform etc. . There my problem starts and I'm looking for a good way to handle a lot paths based on a big picture.
If you find yourself needing an image with dimensions of 10000 pixels I think you're probably doing something wrong.
Actually I meant the size of my testlevel I'm talkling about. One worldUnit is 100px, f.i. if I want to be a level with a total of 100meters (aka units) It'll be 100*100 = 10000 px. I need RUBE to load the image to autotrace edges in order to make fixtures so my game entites can collide with.

I put 2 links to images in the original post. If you take them in consideration in respect of the questions below '3.', how would you handle it? Maybe I'm missiong something totaly obvious? Thanks
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: workflow with big scenes and images

Post by iforce2d »

I don't understand the need for using Tiled in the first place. One of the main strengths of RUBE is that you are not stuck with a boring grid of square things, because you can arrange your images/fixtures however you like.

The way I would approach it is to arrange everything in RUBE to begin with, ie.
- place images in the scene (individual pieces, not a massive single image)
- draw fixtures around the images (or use autotrace if that is feasible)

hmm... I'm not sure there is much more to it than that actually. Attaching the images to the same body as the fixture will let you move and scale them together.
largescene.png
largescene.png (107.2 KiB) Viewed 19998 times
To answer your individual questions though (and I'll include those from your mail):
- Would you either put another sampler on top of the existing one in order to make fixtures for e.g. the platforms and all other possible other objects? Would you use one sampler per platform?
Samplers don't detect other samplers, so putting one 'over the top' of another will do the same as the first one. To make make fixtures for platforms I would probably add vertices to a fixture manually, or if there was really a huge amount of detail I might use a sampler to autotrace it first, and then make adjustments. Yes, one sampler per platform I guess, if you're using samplers.
- How can I disable images from being exported (thus the ones which I use for building the fixtures)
1. Add a boolean custom property to the image class called something like 'export'
2. Use property export filter script to exclude images that have the custom property set to true, eg.
bool shouldExportItem( image i ) {
return i.getCustomBool('export');
}
You can find more info about that in the built-in help under "Exporting scenes" -> "Filtering exported properties" and in this video.
- Would you extract all other content of the level-picture and make each platform an object in order to import them to the scene from other rube files?
If the platforms will all be the same, they would be a good candidate to be used as objects.
1) ..what would be the easiest way to get paths around each of the "closed entities" (f.i. each platform sole rock, cloud etc.) . Of course I can draw polygons for each of them for the fixture shape, but probably I missed an autotrace feature?
Not sure why you are asking about this after mentioning that you have tried tracing with samplers. The naming is a bit different, but you could consider the tracing of samplers to be an 'auto-trace'. To be honest though, the auto-trace is unlikely to produce good shapes for use in a game without further adjustment. I have yet to come across a situation where there were so many vertices that an auto-trace would be much of a time-saver. The main reason samplers were given a tracing feature is that other physics editors have it and occasionally people asked about it. It was actually very low in the feature voting.
2) How can I disable the image for JSON-Export? I need the image just for drawing the fixtures. Afterwards I use a Tiled map renderer in libGdx, because it saves a lot of resources. Also its better if one wants to change someting afterwards if the level is build from tiles.
As above.
3) RUBE crashes a lot when I click Edge refrsh refresh now on the Level image. The image is very large dimension wise but not in size. The capacity is 1.33 MB but the its 10000 * 4000 px (mostly transparent, where no tile is drawn).
Sorry about that, it sounds like a bug. Is it possible to provide that image for me to check with?
4) Unrelated but still a usage question: When I have f.i. 2 Bodies in rube and I first select one of them to edit properties and want to edit the properties of the second one I have to click somewhere and then on the 2nd body. If I click straight on the second body the properties are not showing. This can get annoing if a lot instances are on the screen. This is also true for the other types, e.g. Fixture, Samplers etc. . Do I miss a setting or doing something else wrong?
Can we clarify "the properties are not showing"... do you mean:
- the properties panel is not visible
- the properties panel is empty
- the contents of the properties panel remains showing the properties of the previous selection
sysex
Posts: 6
Joined: Sun Oct 25, 2015 1:20 am

Re: workflow with big scenes and images

Post by sysex »

Thank you for the detailed answers!

Maybe I should really do all the level design in RUBE. I thought that's more efficient to have a tile set which is one big PNG where I reference only regions instead of loading for each different entity a new Image? On the other hand I think your right that its cool to no be
stuck with a boring grid of square things, because you can arrange your images/fixtures however you like
Think I have to try a big level just with RUBE and see how it works for me. I guess all my other questions related to building fixtures for a big level stem from being not used to the RUBE editing style. I have to force myself not to think in tiles ;)
Sorry about that, it sounds like a bug. Is it possible to provide that image for me to check with?
Regarding the edge detection / crash thing I'll send you a mail with the image attached.
Can we clarify "the properties are not showing"... do you mean:
- the properties panel is not visible
- the properties panel is empty
- the contents of the properties panel remains showing the properties of the previous selection
Yes we can ;) Its the 2nd one "the properties panel is empty". I have to click anywhere first and afterwards re-select the instance to make the properties appear.
Maybe these screenshots give a better explanation:
Image
(if the images is not shown here's the URL: http://picpaste.com/rubeSelectionIssue_1-zy9UyuKB.jpg )
Image
(if the images is not shown here's the URL: http://picpaste.com/rubeSelectionIssue_2-o8a4Ow6e.jpg )
Image
(if the images is not shown here's the URL: http://picpaste.com/rubeSelectionIssue_3-7SWdofcl.jpg )
I have to do this for all RUBE types (Fixtures, Samplers etc..).
I hope I'm doing something wrong because this can make editing scenes with a lot Instances very cumbersome.

Thank you for looking into this. As I'm new to RUBE I want to find out how it fits best into my workflow in order to avoid to change too much over and over when I'm setting up my levels etc. .
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: workflow with big scenes and images

Post by iforce2d »

About the properties not showing problem, yes this is a bug that seems to have appeared in recent versions. Unfortunately I just moved countries and my main development computer is still shipping, so I can't fix it very soon.

Some work-arounds might be:
- do alt+tab to another program and back
- do undo then redo
- adjust the size of any of the docking panels that the properties
that will affect the properties panel

Any of these actions should trigger the function that redraws the properties panel contents.
sysex
Posts: 6
Joined: Sun Oct 25, 2015 1:20 am

Re: workflow with big scenes and images

Post by sysex »

hi,
Some work-arounds might be:
- do alt+tab to another program and back
- do undo then redo
- adjust the size of any of the docking panels that the properties
that will affect the properties panel
No, its not totally showing no properties. There is just the extra step one has to do. You might want to take a look at the screen shots I attached. Looks like a gui state thing, like nothing has to be selected in order to select something else. One has to click somewhere next to an RUBE type in order to cancel the current selection and than one can select something else.

Its no show stopper but if one want to design a big level in Rube with lots of images, bodies, fixtures etc. this can get annoying.

Thanks and good luck with the safe arrival of your dev machine ;)
Post Reply