Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Create an city with Sketchup models

Discussion in 'General Discussion' started by raulgordan86, Dec 26, 2022.

  1. raulgordan86

    raulgordan86

    Joined:
    Jun 13, 2019
    Posts:
    4
    Hello all,
    I want to create a city with existing sketchup models as you can see in picture bellow.
    upload_2022-12-26_10-14-20.png

    I just want to walk nothing more.
    What are the steps to do this?I want to have minimum 50 FPS.
    Thanks
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,594
    Depending how complex each building is, I would export larger individual buildings, or complex of buildings as separate OBJ files.

    Make top down render and save it as image.

    In Unity place that image on a plane, in top down view.
    Import obj models.
    Place models into respective places.
    Import basics walking script.
    You may want to look for it in asset store. There are free ones.

    Optionally, you may want to add basics colliders to objects, so you can not walk them through.
     
  3. raulgordan86

    raulgordan86

    Joined:
    Jun 13, 2019
    Posts:
    4
    @Antypodish
    Hello
    The models looks like this,are very complex with hd texture.
    I am plan to insert 100 or more.It is a hard work?
    Is hard to optimize this?
    upload_2022-12-26_18-44-56.png
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,594
    This model is considered very low poly.
    In Unity you could generate more optimized version for LODs.
    But I wouldn't worry about it.
    You may consider implementing camera culling instead.
    Specially, if you want just walk the city, on the ground level.
    Also, performance and requirements depends on the target hardware, on which such scene need to run.

    You need to consider importing model with textures.
    But you may want to do research on your own on that.
    Here is an example search engine query.
    https://duckduckgo.com/?q=sketchup+to+unity+with+textures&atb=v314-1&ia=web

    You may also want to search, if there is some automation process, for exporting multiple models.
     
  5. raulgordan86

    raulgordan86

    Joined:
    Jun 13, 2019
    Posts:
    4
    @Antypodish
    Thanks for the answer. I already import the model in Unity with texture and material.
    The problem is i have only 20 FPS with one building.
    I have a pretty good PC,Gpu Nvidia 2070 Super,processor Ryzen7 3700x, 32 GB of ram and 2 tera SSD.
     
  6. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    9,801
    That shouldn't be happening. Can you show us the profiler window?
     
  7. raulgordan86

    raulgordan86

    Joined:
    Jun 13, 2019
    Posts:
    4
    The models are complex like Coloseum.
    I think there are to many faces.
    Can be done something with this kind of models?
    How can i optimize if i want to insert more than 50 models like this?
    I can get 60 FPS?
    upload_2023-1-7_19-25-12.png
     
  8. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,594
    Generate LODs
     
  9. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,890
    If the roof tiles are components, you can make a simpler one inside, then add a LODGroup in unity to switch between them. Every component will require this.
     
  10. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,650
    50+ coloseums ?, not going to happen. Do you realize the count of verts/tris for this model?. Look at your export results...1,155,999 faces, with 37 materials. I dare you to put 3 of those in your scene, fps/ms will slow to a crawl.

    To optimize that asset, you would have to LOD, decimate (reduce tris/verts), atlas/combine textures, and alot more to get it even close to useable. Ever hear the phrase "bit off more than i can chew"?. It applies... Your job is to prove me wrong...
     
  11. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,382
    How close are you able to view the model in game? If you're looking top-down like that, you should retopologize the model. You could probably make a model that will look almost identical with just a few hundred vertices, one texture, and one normal map.
     
    warthos3399 likes this.
  12. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,594
    OP mentioned walking.
    So that means streat view angle. Hence very up close.
     
  13. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,382
    If you're going around in a close-up perspective (like first-person or something) there are a lot of other things you can do. For example, if the player is walking around at ground level then you can make the upper parts of the building significantly less detailed than the lower parts. The player is not going to be able to look at the high parts up-close unless they can fly.

    Also you can make the inside and outside of the buildings separate meshes. You can't see the outside from the inside and you can't see the inside from the outside, so there's no need to ever render both. In fact, if you're inside the Colosseum, you won't be able to see any of the other 49 buildings at all, so no need to render them.
     
    warthos3399 likes this.
  14. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,650
    Im not sure using Sketchup models is the best choice, as no LODs, too many materials, and too many faces. But you can LOD them, reduce textures, and reduce tris/verts. Another thing that helps is camera settings, how far the camera can see and render.

    Theres assets on the store to do these things (auto LOD, atlas makers, and reducers for tris/verts), some are free and some are not. Have you tried looking around other modeling sites to see if you can find lower poly buildings, or buildings better suited for your project?. Ill have a look around and see if i can find anything...

    Example: https://assetstore.unity.com/packages/3d/environments/historic/ancient-colosseum-01-184861 Check this one out, 4 textures, and only 6519 poly, and it looks good. Theres a ton of roman era buildings on the asset store, and alot more on other sites...
     
    Last edited: Jan 9, 2023
  15. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,594
    Also, maybe Unreal and nanite like tech could help to tackle the problem?
     
  16. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,886
    Sketchup is absolutely not made for this sort of realtime 3d stuff. At minimum you have to completely retopologise models. Try sticking them through something like Simplygon and see what comes out the other end as a quick solution. But really you need an artist to retopo these to make them vaguely usable, as what you have is effectively CAD amount of data compared to realtime 3D amount of data.

    Alternatively, you could stick these into unreal using Nanite with little difficulty (just make sure NOT to use Lumen as itll kill your framerate)
     
  17. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,148
    They are very accurate looking models, at least the Colosseum which other assets are no comparison to. A fun project!
    But yeah Unity does not give you all the tools to easily optimise such models for real-time and there is much to learn without a technical artist around. The unity mobile (because heavy optimisation needed) e-books or the graphics forum are resources that will help. Poly reduction, Lods, material count reduction, check overdraw etc. etc.