Background image to Tiles - libgdx

I'm using tiled map editor and libgdx to create a game, I have a vector based image that was included in the package I bought for my sprites, when I use the image in tiledmap editor the game does not run so I thought that the best think to do was to create a tile set based off my image, which I did in Photoshop, I used the slice tool saved it for web as png and ended up with 890 tiles each one 168 by 168 but when I put even 1 single tile of my new set in my game it does not run and when I take it off it does run.
How do I convert my image in a tile set which can be used in tiled map editor to be used with libgdx?

Related

Trying to render 2d image inside the forge viewer with 3d model

My current use case is to align a 2d image to a 3d model inside the forge viewer allowing zoom as well as panning functionalities. I have tried the following implementations -
Adding the 2d image as an overlay scene on the forge viewer but the problem there is that I can't position the model on the image precisely even though i have tried translating, rotating and scaling the model programatically.
Loading two different viewers on top of each other and then using viewer.getState() and viewer.restoreState() to sync the state between the two viewers on Autodesk.Viewing.CAMERA_CHANGE_EVENT.
Placing the image inside the HTML beneath the forge viewer and then disabling the pointer events on the viewer and using Javascript to zoom both the viewer and the image in sync. But the problem there is that the measure tool doesn't seem to work right.
What am i missing?
I assume that you simply want to insert a 2D raster image into the viewer scene. That can certainly be done using the 1st approach you suggested. Use an overlay scene or the SceneBuilder extension to add a custom three.js mesh into the scene, and then apply your image as a texture to the mesh.
Regarding the placement of the mesh in the viewer scene, that really depends on your use case and the type of models you're working with. For example, if you wanted to place the image under the 3D model (perhaps the picture contains some satellite imagery), you could find the bounding box of the model using the viewer APIs (viewer.model.getBoundingBox()), and place the three.js object with your image at the bottom side of it.

Load a 360 panorama image in forge viewer

How do I load a 360 image viewer using forge viewer. One approach I tried was by creating a sphere with image as texture and add it to the overlay scene. Using this, I was able to load a 360 image but I'm getting rendering issues (in some specific views sphere is getting culled).
Check out the skybox sample here and see that fits the bill for you ...

Which web framework or library to use for displaying PNG images and basic shapes on them on a web page with unique url per image?

I would like to create a webpage that displays one image at a time with shapes and annotations shown over it. Each image should have a unique URL address in the address bar.
I have a set of images as PNGs. For each image there is a set of shapes (rectangles, polylines - as pairs of x,y coordinates in pixels) and annotations (location on the image x, y in pixels and a short text as string) to be displayed over it.
When user loads the unique url for an image they should see it with shapes displayed on top of it and annotation markers shown as circles. When user presses a button labeled „next“ the page loads the next PNG with its corresponding shapes and annotations. User can click on an annotation marker and a text balloon should open to show the text for the annotation.
How to approach developing this? I am asking since I don’t have an overview of web app frameworks or the current best practices for databases and graphic formats for online content.
I have experience in programming - Python, datascience, Procedural geometry, Unity for game development (C#), Lua - but not for the web.
I can do a WebGL app using Unity to do what i want and link it to a MySQL database but it feels like shooting a fly with bazooka. Maybe there is an easier, simpler way. Any advice or tips would be appreciated.
The best tip, I think, is in one of the tags of your question: canvas.
Images can be drawn onto it, as well as shapes. To handle your markers you could compare the coordinates of a click on the canvas to the coordinates of your markers (see this post for further info on getting the click coordinates). The annotation balloons could be realised by hiding or showing a simple <div> on click.
As for web app frameworks, depending on how fancy it should be you could do it "by hand" in native html and css, or use something with nice predefined components, like Bootstrap.
Depending on where you will be hosting this webpage, you will, or will not have to worry about the backend/server. There are numerous hosting providers available that provide user-friendly admin panels.

Big TiledMap shows black tiles with Cocos Creator

I have made a big TiledMap with Tiled tool. The map is 50x500 tiles. Each tile is 48x48 pixel.
I use "Camera" technique to follow the player on the map.
However I can see only 70% of tiles. Other tiles on the map appears black.
Is the number of tiles rendered by Cocos Creator limited?
Do I need to split the map into multiple parts?
Thanks

Libgdx tile map drawing wrong tiles

I'm trying to make a tile map in libgdx. I have made all the tile images and used TexturePacker2 to pack them. When I load the game, it is rendering the map but using the wrong tiles. It appears to be using column first indexing while Tiled Map Editor is using row first.
For example, my packed tile image is a 5x5 grid. I used the tile at the 3rd row, 5th column (saves as 15) in the editor and then libgdx has used the tile at the 5th row, 3rd column.
What am i doing wrong?
The indexes in the packfile we all wrong. I'm not sure why they were wrong but I manually corrected them so that the tile in the top left was index: 0 and to the right of that was 1 and so on up to 24 in the bottom right.
My map draws correctly now.