I have created a 3D occupancy map to model a region where I want to test some path planning algorithms for an autonomous robot. I have created a 3D map along with obstacles, but my requirement is to add 3D model (eg, human,car,tree etc anything) to my map.
The example is difficult to understand. Can somebody help me in adding some model.
Note: I have made these buildings but i want to add some sort of models (like humans, tree,car etc)
Also can we add png,or gif to our map?
GIF of a Car
My 3D map
I have created a 3D map along with obstacles, but my requirement is to add 3D model (eg, human,car,tree etc anything) to my map.
Related
I'm trying to create an experience where I have a couple of detailed 3D models of buildings on the map with extruded building footprints of neighboring buildings via a vector tile source. The 3D models would be the main focus point and the extruded footprints would be for reference. One challenge I'm running into is that I have a global building footprint layer and it has a footprint for the 3D buildings which doesn't match up perfectly. Additionally, when extruded, it ends up merging/overlapping the nice 3D models.
I'd like to be able to hide the individual footprints that overlap the 3D models. My original thought was to grab the bounding box of the 3D model and then use the new within style expression, but it looks like this will only filter points and lines, not polygons. The building footprint polygons have no unique information in them that I could use to filter on.
I know I could monitor map movements and query the rendered features and manually detect intersecting polygons, but since there is no unique property on the footprint, I can't filter or use feature state.
Any ideas of how to efficiently avoid rendering individual polygons in a specific area that come in from a vector tile source?
It is a common issue that the buildings layer in Mapbox Streets don't contain any unique attributes to allow filtering or rendering differently.
The best solution is usually to source a different buildings layer, and in this case, remove those redundant buildings in pre-processing.
I can think of one rather crazy workaround that might work here, although the performance may be poor.
Add the building layer with very low opacity, of type fill, essentially invisible. (Maybe invisible would work.) Call your main source buildings`.
Create a secondary building source of type geojson, and a secondary fill-extrusion layer. Call this source buildings-copy.
On map move or moveend, use querySourceFeatures to obtain a copy of all buildings.
Process this copy using Turf to remove the buildings you don't want, and call setData to set the copy as the data for buildings-copy.
You may need to do some clever caching to get reasonable performance.
I'm trying to make an augmented reality application about chemistry using Vuforia and Unity3D. I will physically have a big image of periodic table of elements and some small spherical objects, and I don't know how to determine which element is covered by the sphere when I put it on the periodic table. Does anyone have an idea or has done this already? I will next associate that chemical element with the sphere.
I think your best bet would be to try and track not only the position of the printed periodic table as Vuforia image target, but also the position of the 'small spherical objects' as Vuforia model targets. Whether or not that would work depends on the exact characteristics of those spherical objects and to which degree they are suitable for tracking as model targets. Otherwise consider replacing the spherical objects with alternative objects possibly with trackable stickers on them.
I'm trying to create an interactive world map like in Europa Universalis IV or Crusader Kings II using Unity3D. These two games create the map using an existing image (like this https://i.imgur.com/y2gtX2N.png). I have never done something like this before and I'm really confused on which is the best approach/technique to use.
What I need is an idea on how to show the map and be able to select every single province taken from the image.
My method would require you to provide each region as an individual sprite.
1) Add all sprites to the scene and form the world map (SpriteRenderer or UI.Image).
2) Make a Component that handles interaction, and add it to each World Map Part GameObject.
Implement the following interfaces to it, and specify the logic accordingly:
3) Add the Polygon Collider 2D Component to each World Map Part GameObject.
4) Add the Physics Raycaster 2D Component to your Camera.
If you choose to use UI.Image (which I do not recommend), you can skip steps 3 and 4, and instead set alphaHitTestMinimumThreshold to 1 on your World Map Part Component's Awake().
I would like to create a texture map for a 3D car model I have. I am not sure where to start. I thought maybe I could unwrap the 3D object to a 2D image and then use this as an outline to draw my texture. Is this possible, or is there a simpler solution?
Thank you in advance!
I would like to create a texture map for a 3D car model I have. I am not sure where to start
What you are asking about is called UV mapping.
"UV mapping is the 3D modeling process of projecting a 2D image to a 3D model's surface for texture mapping."
Source: https://en.wikipedia.org/wiki/UV_mapping
UV mapping is normally done when creating the model in 3d modelling software, although there may be assets in Unity able to do the same. To my knowledge Unity is not able to directly UV map.
You can however, change the texture of an object inside Unity as well as assign objects various colours and materials.
maybe I could unwrap the 3D object to a 2D image and then use this as an outline to draw my texture
To my knowledge you need 3d modelling software to do so, but yes, it is possible.
You can try to change it through scripting, but I'd recommend looking into 3d modelling software instead as I believe that if it is possible it will be bothersome.
3D modelling software I know of:
Blender - Free
Maya - Licensed
3DS Max - Licensed
This question is (mostly) game engine independent but I have been unable to find a good answer.
I'm creating a turn-based tile game in 3D space using Unity. The levels will have slopes, occasional non-planar geometry, depressions, tunnels, stairs etc. Each level is static/handcrafted so tiles should never move. I need a good way to keep track of tile-specific variables for static levels and i'd like to verify if my approaches make sense.
My ideas are:
Create 2 Meshes - 1 is the complex game world, the second is a reference mesh overlay that will have minimal geometry; it will not be rendered and will only be used for the tiles. I would then Overlay the two and use the 2nd mesh as a grid reference.
Hard-code the tiles for each level. While tedious it will work as a brute force approach. I would, however, like to avoid this since it's not very easy to deal with visually.
Workaround approach - Convert the 3d to 2D textures and only use 1 mesh.
"Project" a plane down onto the level and record height/slope to minimize complexity. Also not ideal.
Create individual tile objects for each tile manually (non-rendered). Easiest solution i could think of.
Now for the Unity3D specific question:
Does unity allow selecting and assigning individual Verts/Triangles/Squares of a mesh and adding componenets, scripts, or variables to those selections; for example, selecting 1 square in the 10x10 unity plane and telling unity the square of that plane now has a new boolean attached to it? This question mostly refers to idea #1 above, where i would use a reference mesh for positional and variable information that were directly assigned to the mesh. I have a feeling that if i do choose to have a reference mesh, i'd need to have the tiles be individual objects, snap them in place using the reference, then attach relevant scripts to those tiles.
I have found a ton of excellent resources (like http://www-cs-students.stanford.edu/~amitp/gameprog.html) on tile generation (mostly procedural), i'm a bit stuck on the basics due to being new to unity and im not looking for procedural design.