Code Monkey home page Code Monkey logo

vitruvio's Introduction

Vitruvio - CityEngine Plugin for Unreal Engine 5

Vitruvio is an Unreal Engine 5 (UE5) plugin which enables the use of ArcGIS CityEngine shape grammar rules in UE5 for the generation of procedural buildings. With Vitruvio, game designers or artists do not have to leave UE5 to make use of CityEngine’s procedural modeling power. The buildings stay procedural all time and artists can change the height, style and appearance of buildings easily with a parametric interface. In addition, buildings can also be generated at runtime.

As input Vitruvio requires rule packages (RPK) which are authored in CityEngine. An RPK includes assets and a CGA rule file which encodes an architectural style. The download section below provides links to the several RPKs which can be used out-of-the-box in Vitruvio.

The latest release is available in the downloads section on GitHub. Please refer to the installation guide for installation instructions. Examples can be downloaded from Vitruvio Plugin page.

City generated using Vitruvio

Documentation

External documentation:

Requirements

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing Information

Vitruvio is free for personal, educational, and non-commercial use. Commercial use requires at least one commercial license of the latest CityEngine version installed in the organization. Redistribution or web service offerings are not allowed unless expressly permitted.

Vitruvio is under the same license as the included CityEngine SDK. An exception is the Vitruvio source code (without CityEngine SDK, binaries, or object code), which is licensed under the Apache License, Version 2.0 (the “License”); you may not use this work except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

All content in the "Examples" directory/section is licensed under the APACHE 2.0 license as well.

For questions or enquiries, please contact the Esri CityEngine team ([email protected]).

vitruvio's People

Contributors

arisona avatar bneukom avatar bstegeresri avatar chr11115 avatar dalhai avatar m-marti avatar mistafunk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vitruvio's Issues

Add geometry cooking support

Currently it is not possible to save generated geometry. For some applications it might make sense to "cook" (save the generated geometry) the VitruvioActors so that they don't have to be procedurally generated anymore (eg before relasing a packaged build where no interaction with the VitruvioActor is necssary). This could save performance in such cases and also allow for proper collision mesh setup.

Tasks:

  • Add additional context menu entry to "Cook Vitruvio Actors"
  • This should generate static mesh for the generated geometry as well as instances
  • Also consider instance and material reusing
  • Add option to also immediatly replace the procedural VitruvioActors with the cooked geometry
    • Maybe it would also make sense to support the reverse (eg convert the cooked geometry back to a procedural VitruvioActor). This would require to store the attributes which were used for generation to be stored somehow

issue

I am not able to see vitruvio component drop-down list, everything else ios coming except this drop-down folder where it has all the attributes

Package Game Error

Hello,

When I try to package the game for windows I get the following error, is this error known to you and do you know how I can fix this?
UATHelper: Packaging (Windows): ERROR: Expecting to find a type to be declared in a module rules named 'Vitruvio' in UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. This type must derive from the 'ModuleRules' type defined by Unreal Build Tool. PackagingResults: Error: Expecting to find a type to be declared in a module rules named 'Vitruvio' in UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. This type must derive from the 'ModuleRules' type defined by Unreal Build Tool.

When I add the Vitruvio plugin to the plugin folder of the project I get the following error upon creating the package:

PackagingResults: Error: System.ArgumentException: An item with the same key has already been added. Key: Vitruvio

Can you add a runtime example? What is the API to generate from code instead of the editor?

The description of Vitruvio says "..for the generation of procedural buildings in the Unreal Editor or at runtime". I've seen examples of how to export from CityEngine to the Unreal Editor using Datasmith, but I haven't been able to find any examples of how to generate a city at runtime (outside the editor, after the game has been built). I'm assuming this is what is meant by "runtime"? I've seen the Python & C++ plugins so I'm assuming it has something to do with that? The jupyter notebooks with pyprt seem close - import the rule package and then generate the 3D building / tree / city.
https://github.com/Esri/pyprt-examples/blob/master/ex7_building_modeling_optimization.ipynb
This example does it in the web:
https://www.esri.com/arcgis-blog/products/city-engine/3d-gis/converting-3d-geometry-formats-made-simple-using-pyprt/
But I haven't seen an example of doing it within an Unreal game.

Specifically, I want to be able to do everything in code - so have a rule package file and then use that plus user input in the game to generate a tree or building or entire city dynamically (rather than pre-built). Is this possible and if so, is there a tutorial for the code to do this? Thanks!

Improve instance component name

Currently the name of the HierarchicalInstanceComponents looks like this.

image

Tasks:

  • Use the actual instance name as the Component name (eg. FlightHelmetInstanceComponent)

UE5.3

Hi, when the UE5.3 version will be released?

Support initial shapes with holes

Currently holes are not handled correctly when using a static mesh (with holes) as an initial shape.

Tasks:

  • Improve static mesh to initial shape conversion algorithm to also detect holes
  • Properly pass initial shape (with hole information) to PRT

Support RPK Asset reload

Currently reimporting an RPK asset does not work (for example dragging an RPK which already exists into the content browser). If an updated RPK is needed the user has to import it with a different name and update all the references.

Tasks:

  • Support reimporting Assets (via drag and drop or context menu)
    • The VitruvioComponents should automatically replace the RPK reference
    • The attributes should be kept

Add support for array attributes

Currently only scalar attributes from PRT are supported.

Tasks:

  • Add support for loading array attributes from PRT
  • Implement details customization which supports array types

Unreal Engine 5.4

I know it just came out but i really need motion matching and this plugin at the same time.

Add initial shape attribute support

Currently it is not possible to export initial shapes from CityEngine together with attributes. This could be useful if buildings should be generated exactly as they were in CityEngine. Currently we always use the default attributes which results possibly in a different generation.

Tasks

  • Support initial shape attribute
    • There might be different ways this could be solved
    • Use Datasmith together with "Asset Metadata"
    • Use Shapefiles (would also preserve edge ordering which is not possible with Datasmith)

Improve error message display

Currently if there is an error during generation (eg mismatching CGA versions) zhe errors are only displayed in the log. This can be a bit confusing as some users might not have the log open by default.

Tasks

  • If an error happens during generation, display a popup (same as "Generating models ...") with a text notifying the user that an error occurred during generation and a link to the log for more information

Fix multiple UV set support

Currently all UV sets are encoded from PRT which can lead to issues as Unreal only supports 7 UV sets at most and CGA materials potentially can have up to 10. Also the default Vitruvio material currently only uses the first UV set.

Tasks:

  • Limit the number of UV sets from PRT by excluding unnecessary UV sets (candidates are bump-map, specular-map and dirt-map uvs)
  • Add support for multiple UV sets to the default Vitruvio material (currently only the first UV set is used in the material)

Update to PRT 2.4

Tasks

  • Update the build system to download/install PRT 2.4
  • Fix issues regarding USD encoder
  • Adapt to any API changes

Avoid unpacking RPK

Unpacking RPKs can take a long time currently. As we only need images from the RPK in Unreal we can read them through PRT directly from the RPK instead. This would also solve our issue that we can not load TIF images from Unreal.

Tasks:

  • Load images from RPK through PRT
    • This would most likely also help us to get rid of the workaround for the "number of image channel detection" we currently use

Scaling of initial shape ignored when converting a static mesh to vitruvio actor

It would be great if static meshes keep their scaling when they are converted to vitruvio actor using the context menu.
Right now the shape is generated for the mesh at (1,1,1) scale even if the static mesh had a different scale before conversion. The issue is that the if the CGA rule generates different shapes based on the size of the footprint, the generated geometry will not have the right shape. Scaling the vitruvio actor doesn't solve the problem as it only scales the generated geometry but doesn't recreate it.

Support concave initial shapes

It can happen that the generated building is upside down, when applying a RPK to a concave shape and changing from static mesh to splines for further processing.

Tasks:

  • Compute the polygon orientation using a more sophisticated algorithm (There might already be something implemented in Unreal like for example in PolygonTriangulation::ComputePolygonPlane)
  • Use the orientation to properly order the vertices of the polygon

Add undo support

Improvement

Currently any change to a VitruvioActor cannot be reversed. This functionality would be very helpful when accidentally breaking anything and trying to get back to its initial stage.

Unify caching

Currently we do caching at various places (RPKs, Materials, Textures). Each cache is implemented in a similar way to support async access etc. We could extract some code into a base cache structure and reuse it for all cases.

Tasks:

  • Check what code is shared between the caches
  • Extract shared code

Crash without generated geometry

If a rule without "generated geometry" (for example only an insert eg R --> i("someModel.fbx")) is run, or the generation result is empty because the generation did not run through (eg because there was an error during generation because of mismatching CGA versions) Vitruvio crashes.

Trouble DLing 1.4

I get an unexpected error on v 1.4 when I try to extract it. I DL'd 1.3 and several of the other packages with no issues, and I turned my AV off. Seems like it must be something specific in 1.4.

image

This is not the only file that throws the error. Let me know if you need more info.

Thanks!

EDIT: I was able to DL the source and compile it with the prompt. No luck on the packaged file though.

Fix material color attribute clamping

Currently material values > 1 are not working correctly. Eg. CGA code with

set(material.color.r, 1.5)
set(material.emissive.g, 50)

don't work properly.

Tasks:

  • Make sure that the color attributes are clamped properly
  • Support values > 1 for other color attributes (eg. emissive > 50)

UE5 Compatibility

Can we expect a release of of Vitruvio that supports Unreal Engine 5?

Echoing a question that was put in UE Marketplace here.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.