├── .gitattributes ├── .gitignore ├── Assembly-CSharp.csproj.DotSettings ├── Assets ├── Plugins.meta ├── Plugins │ ├── Editor.meta │ └── Editor │ │ ├── JetBrains.meta │ │ └── JetBrains │ │ ├── JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll │ │ └── JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll.meta ├── Rockgen.meta └── Rockgen │ ├── Demo.meta │ ├── Demo │ ├── RockGen.Unity.Demo.asmdef │ ├── RockGen.Unity.Demo.asmdef.meta │ ├── Scripting Sample.meta │ ├── Scripting Sample │ │ ├── Rock Fountain.unity │ │ ├── Rock Fountain.unity.meta │ │ ├── Rock OS.mat │ │ ├── Rock OS.mat.meta │ │ ├── RockFountain.cs │ │ └── RockFountain.cs.meta │ ├── Web Generator.meta │ └── Web Generator │ │ ├── CalibrationScene.meta │ │ ├── CalibrationScene │ │ ├── Model.meta │ │ ├── Model │ │ │ ├── CalibrationScaleRGB.fbx │ │ │ └── CalibrationScaleRGB.fbx.meta │ │ ├── Prefabs.meta │ │ ├── Prefabs │ │ │ ├── CalibrationScales.prefab │ │ │ ├── CalibrationScales.prefab.meta │ │ │ ├── SceneElements.prefab │ │ │ └── SceneElements.prefab.meta │ │ ├── SceneMaterials.meta │ │ ├── SceneMaterials │ │ │ ├── CalibrationFloor.mat │ │ │ ├── CalibrationFloor.mat.meta │ │ │ ├── CalibrationRGBScale.mat │ │ │ └── CalibrationRGBScale.mat.meta │ │ ├── SceneTextures.meta │ │ ├── SceneTextures │ │ │ ├── CailbrationRGBScaleDiffuse.tif │ │ │ ├── CailbrationRGBScaleDiffuse.tif.meta │ │ │ ├── CalibrationFloorDiffuse.tif │ │ │ ├── CalibrationFloorDiffuse.tif.meta │ │ │ ├── CalibrationFloorNormals.tif │ │ │ ├── CalibrationFloorNormals.tif.meta │ │ │ ├── CalibrationFloorSpecularGloss.tif │ │ │ └── CalibrationFloorSpecularGloss.tif.meta │ │ ├── Skyboxes.meta │ │ └── Skyboxes │ │ │ ├── EveningReflection.hdr │ │ │ ├── EveningReflection.hdr.meta │ │ │ ├── EveningReflection.mat │ │ │ └── EveningReflection.mat.meta │ │ ├── DragOrbit.cs │ │ ├── DragOrbit.cs.meta │ │ ├── FrameTime.cs │ │ ├── FrameTime.cs.meta │ │ ├── RockBehavior.cs │ │ ├── RockBehavior.cs.meta │ │ ├── RockGeneratorGUIRuntime.cs │ │ ├── RockGeneratorGUIRuntime.cs.meta │ │ ├── VizMeshNormal.cs │ │ ├── VizMeshNormal.cs.meta │ │ ├── Web Generator.unity │ │ └── Web Generator.unity.meta │ ├── Editor.meta │ ├── Editor │ ├── RockGeneratorWindow.cs │ └── RockGeneratorWindow.cs.meta │ ├── LICENSE.txt.meta │ ├── Plugins.meta │ ├── Plugins │ ├── JSHelper.jslib │ ├── JSHelper.jslib.meta │ ├── MeshDecimator.dll │ ├── MeshDecimator.dll.meta │ ├── MeshDecimator.xml │ └── MeshDecimator.xml.meta │ ├── Resources.meta │ ├── Resources │ ├── Rock.mat │ ├── Rock.mat.meta │ ├── Triplanar.shader │ └── Triplanar.shader.meta │ ├── Scripts.meta │ ├── Scripts │ ├── GUI.meta │ ├── GUI │ │ ├── GUIChangedScope.cs │ │ ├── GUIChangedScope.cs.meta │ │ ├── RockGeneratorGUI.cs │ │ └── RockGeneratorGUI.cs.meta │ ├── RockGen.Unity.asmdef │ ├── RockGen.Unity.asmdef.meta │ ├── RockGen.meta │ ├── RockGen │ │ ├── Matrix4x4.cs │ │ ├── Matrix4x4.cs.meta │ │ ├── RockGen.asmdef │ │ ├── RockGen.asmdef.meta │ │ ├── RockGenerationSettings.cs │ │ ├── RockGenerationSettings.cs.meta │ │ ├── RockGenerator.cs │ │ ├── RockGenerator.cs.meta │ │ ├── SphereCubeGenerator.cs │ │ ├── SphereCubeGenerator.cs.meta │ │ ├── Vector.cs │ │ ├── Vector.cs.meta │ │ ├── VoronoiGrid.cs │ │ ├── VoronoiGrid.cs.meta │ │ ├── VoronoiGridSettings.cs │ │ ├── VoronoiGridSettings.cs.meta │ │ ├── WaveFrontObjExporter.cs │ │ └── WaveFrontObjExporter.cs.meta │ ├── Utiliies.meta │ └── Utiliies │ │ ├── Convert.cs │ │ ├── Convert.cs.meta │ │ ├── FileSaver.cs │ │ └── FileSaver.cs.meta │ ├── Textures.meta │ └── Textures │ ├── TexturesCom_Rock_CliffVolcanic_512_albedo.tif │ ├── TexturesCom_Rock_CliffVolcanic_512_albedo.tif.meta │ ├── TexturesCom_Rock_CliffVolcanic_512_ao.tif │ ├── TexturesCom_Rock_CliffVolcanic_512_ao.tif.meta │ ├── TexturesCom_Rock_CliffVolcanic_512_normal.tif │ ├── TexturesCom_Rock_CliffVolcanic_512_normal.tif.meta │ ├── TexturesCom_Rock_CliffVolcanic_512_roughness.tif │ └── TexturesCom_Rock_CliffVolcanic_512_roughness.tif.meta ├── LICENSE.txt ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset └── VFXManager.asset └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | *.tga filter=lfs diff=lfs merge=lfs -text 2 | *.fbx filter=lfs diff=lfs merge=lfs -text 3 | *.png filter=lfs diff=lfs merge=lfs -text 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/unity,rider,intellij,visualstudio,visualstudiocode 3 | 4 | ### Intellij ### 5 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 6 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 7 | 8 | # User-specific stuff 9 | .idea/**/workspace.xml 10 | .idea/**/tasks.xml 11 | .idea/**/usage.statistics.xml 12 | .idea/**/dictionaries 13 | .idea/**/shelf 14 | 15 | # Generated files 16 | .idea/**/contentModel.xml 17 | 18 | # Sensitive or high-churn files 19 | .idea/**/dataSources/ 20 | .idea/**/dataSources.ids 21 | .idea/**/dataSources.local.xml 22 | .idea/**/sqlDataSources.xml 23 | .idea/**/dynamic.xml 24 | .idea/**/uiDesigner.xml 25 | .idea/**/dbnavigator.xml 26 | 27 | # Gradle 28 | .idea/**/gradle.xml 29 | .idea/**/libraries 30 | 31 | # Gradle and Maven with auto-import 32 | # When using Gradle or Maven with auto-import, you should exclude module files, 33 | # since they will be recreated, and may cause churn. Uncomment if using 34 | # auto-import. 35 | # .idea/modules.xml 36 | # .idea/*.iml 37 | # .idea/modules 38 | 39 | # CMake 40 | cmake-build-*/ 41 | 42 | # Mongo Explorer plugin 43 | .idea/**/mongoSettings.xml 44 | 45 | # File-based project format 46 | *.iws 47 | 48 | # IntelliJ 49 | out/ 50 | 51 | # mpeltonen/sbt-idea plugin 52 | .idea_modules/ 53 | 54 | # JIRA plugin 55 | atlassian-ide-plugin.xml 56 | 57 | # Cursive Clojure plugin 58 | .idea/replstate.xml 59 | 60 | # Crashlytics plugin (for Android Studio and IntelliJ) 61 | com_crashlytics_export_strings.xml 62 | crashlytics.properties 63 | crashlytics-build.properties 64 | fabric.properties 65 | 66 | # Editor-based Rest Client 67 | .idea/httpRequests 68 | 69 | # Android studio 3.1+ serialized cache file 70 | .idea/caches/build_file_checksums.ser 71 | 72 | ### Intellij Patch ### 73 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 74 | 75 | # *.iml 76 | # modules.xml 77 | # .idea/misc.xml 78 | # *.ipr 79 | 80 | # Sonarlint plugin 81 | .idea/sonarlint 82 | 83 | ### Rider ### 84 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 85 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 86 | 87 | # User-specific stuff 88 | 89 | # Generated files 90 | 91 | # Sensitive or high-churn files 92 | 93 | # Gradle 94 | 95 | # Gradle and Maven with auto-import 96 | # When using Gradle or Maven with auto-import, you should exclude module files, 97 | # since they will be recreated, and may cause churn. Uncomment if using 98 | # auto-import. 99 | # .idea/modules.xml 100 | # .idea/*.iml 101 | # .idea/modules 102 | 103 | # CMake 104 | 105 | # Mongo Explorer plugin 106 | 107 | # File-based project format 108 | 109 | # IntelliJ 110 | 111 | # mpeltonen/sbt-idea plugin 112 | 113 | # JIRA plugin 114 | 115 | # Cursive Clojure plugin 116 | 117 | # Crashlytics plugin (for Android Studio and IntelliJ) 118 | 119 | # Editor-based Rest Client 120 | 121 | # Android studio 3.1+ serialized cache file 122 | 123 | ### Unity ### 124 | [Ll]ibrary/ 125 | [Tt]emp/ 126 | [Oo]bj/ 127 | [Bb]uild/ 128 | [Bb]uilds/ 129 | Assets/AssetStoreTools* 130 | 131 | # Visual Studio cache directory 132 | .vs/ 133 | 134 | # Autogenerated VS/MD/Consulo solution and project files 135 | ExportedObj/ 136 | .consulo/ 137 | *.csproj 138 | *.unityproj 139 | *.sln 140 | *.suo 141 | *.tmp 142 | *.user 143 | *.userprefs 144 | *.pidb 145 | *.booproj 146 | *.svd 147 | *.pdb 148 | *.opendb 149 | 150 | # Unity3D generated meta files 151 | *.pidb.meta 152 | *.pdb.meta 153 | 154 | # Unity3D Generated File On Crash Reports 155 | sysinfo.txt 156 | 157 | # Builds 158 | *.apk 159 | #*.unitypackage 160 | 161 | ### VisualStudioCode ### 162 | .vscode/* 163 | !.vscode/settings.json 164 | !.vscode/tasks.json 165 | !.vscode/launch.json 166 | !.vscode/extensions.json 167 | 168 | ### VisualStudio ### 169 | ## Ignore Visual Studio temporary files, build results, and 170 | ## files generated by popular Visual Studio add-ons. 171 | ## 172 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 173 | 174 | # User-specific files 175 | *.userosscache 176 | *.sln.docstates 177 | 178 | # User-specific files (MonoDevelop/Xamarin Studio) 179 | 180 | # Build results 181 | [Dd]ebug/ 182 | [Dd]ebugPublic/ 183 | [Rr]elease/ 184 | [Rr]eleases/ 185 | x64/ 186 | x86/ 187 | bld/ 188 | [Bb]in/ 189 | [Ll]og/ 190 | 191 | # Visual Studio 2015/2017 cache/options directory 192 | # Uncomment if you have tasks that create the project's static files in wwwroot 193 | #wwwroot/ 194 | 195 | # Visual Studio 2017 auto generated files 196 | Generated\ Files/ 197 | 198 | # MSTest test Results 199 | [Tt]est[Rr]esult*/ 200 | [Bb]uild[Ll]og.* 201 | 202 | # NUNIT 203 | *.VisualState.xml 204 | TestResult.xml 205 | 206 | # Build Results of an ATL Project 207 | [Dd]ebugPS/ 208 | [Rr]eleasePS/ 209 | dlldata.c 210 | 211 | # Benchmark Results 212 | BenchmarkDotNet.Artifacts/ 213 | 214 | # .NET Core 215 | project.lock.json 216 | project.fragment.lock.json 217 | artifacts/ 218 | 219 | # StyleCop 220 | StyleCopReport.xml 221 | 222 | # Files built by Visual Studio 223 | *_i.c 224 | *_p.c 225 | *_h.h 226 | *.ilk 227 | *.obj 228 | *.iobj 229 | *.pch 230 | *.ipdb 231 | *.pgc 232 | *.pgd 233 | *.rsp 234 | *.sbr 235 | *.tlb 236 | *.tli 237 | *.tlh 238 | *.tmp_proj 239 | *_wpftmp.csproj 240 | *.log 241 | *.vspscc 242 | *.vssscc 243 | .builds 244 | *.svclog 245 | *.scc 246 | 247 | # Chutzpah Test files 248 | _Chutzpah* 249 | 250 | # Visual C++ cache files 251 | ipch/ 252 | *.aps 253 | *.ncb 254 | *.opensdf 255 | *.sdf 256 | *.cachefile 257 | *.VC.db 258 | *.VC.VC.opendb 259 | 260 | # Visual Studio profiler 261 | *.psess 262 | *.vsp 263 | *.vspx 264 | *.sap 265 | 266 | # Visual Studio Trace Files 267 | *.e2e 268 | 269 | # TFS 2012 Local Workspace 270 | $tf/ 271 | 272 | # Guidance Automation Toolkit 273 | *.gpState 274 | 275 | # ReSharper is a .NET coding add-in 276 | _ReSharper*/ 277 | *.[Rr]e[Ss]harper 278 | *.DotSettings.user 279 | 280 | # JustCode is a .NET coding add-in 281 | .JustCode 282 | 283 | # TeamCity is a build add-in 284 | _TeamCity* 285 | 286 | # DotCover is a Code Coverage Tool 287 | *.dotCover 288 | 289 | # AxoCover is a Code Coverage Tool 290 | .axoCover/* 291 | !.axoCover/settings.json 292 | 293 | # Visual Studio code coverage results 294 | *.coverage 295 | *.coveragexml 296 | 297 | # NCrunch 298 | _NCrunch_* 299 | .*crunch*.local.xml 300 | nCrunchTemp_* 301 | 302 | # MightyMoose 303 | *.mm.* 304 | AutoTest.Net/ 305 | 306 | # Web workbench (sass) 307 | .sass-cache/ 308 | 309 | # Installshield output folder 310 | [Ee]xpress/ 311 | 312 | # DocProject is a documentation generator add-in 313 | DocProject/buildhelp/ 314 | DocProject/Help/*.HxT 315 | DocProject/Help/*.HxC 316 | DocProject/Help/*.hhc 317 | DocProject/Help/*.hhk 318 | DocProject/Help/*.hhp 319 | DocProject/Help/Html2 320 | DocProject/Help/html 321 | 322 | # Click-Once directory 323 | publish/ 324 | 325 | # Publish Web Output 326 | *.[Pp]ublish.xml 327 | *.azurePubxml 328 | # Note: Comment the next line if you want to checkin your web deploy settings, 329 | # but database connection strings (with potential passwords) will be unencrypted 330 | *.pubxml 331 | *.publishproj 332 | 333 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 334 | # checkin your Azure Web App publish settings, but sensitive information contained 335 | # in these scripts will be unencrypted 336 | PublishScripts/ 337 | 338 | # NuGet Packages 339 | *.nupkg 340 | # The packages folder can be ignored because of Package Restore 341 | **/[Pp]ackages/* 342 | # except build/, which is used as an MSBuild target. 343 | !**/[Pp]ackages/build/ 344 | # Uncomment if necessary however generally it will be regenerated when needed 345 | #!**/[Pp]ackages/repositories.config 346 | # NuGet v3's project.json files produces more ignorable files 347 | *.nuget.props 348 | *.nuget.targets 349 | 350 | # Microsoft Azure Build Output 351 | csx/ 352 | *.build.csdef 353 | 354 | # Microsoft Azure Emulator 355 | ecf/ 356 | rcf/ 357 | 358 | # Windows Store app package directories and files 359 | AppPackages/ 360 | BundleArtifacts/ 361 | Package.StoreAssociation.xml 362 | _pkginfo.txt 363 | *.appx 364 | 365 | # Visual Studio cache files 366 | # files ending in .cache can be ignored 367 | *.[Cc]ache 368 | # but keep track of directories ending in .cache 369 | !*.[Cc]ache/ 370 | 371 | # Others 372 | ClientBin/ 373 | ~$* 374 | *~ 375 | *.dbmdl 376 | *.dbproj.schemaview 377 | *.jfm 378 | *.pfx 379 | *.publishsettings 380 | orleans.codegen.cs 381 | 382 | # Including strong name files can present a security risk 383 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 384 | #*.snk 385 | 386 | # Since there are multiple workflows, uncomment next line to ignore bower_components 387 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 388 | #bower_components/ 389 | 390 | # RIA/Silverlight projects 391 | Generated_Code/ 392 | 393 | # Backup & report files from converting an old project file 394 | # to a newer Visual Studio version. Backup files are not needed, 395 | # because we have git ;-) 396 | _UpgradeReport_Files/ 397 | Backup*/ 398 | UpgradeLog*.XML 399 | UpgradeLog*.htm 400 | ServiceFabricBackup/ 401 | *.rptproj.bak 402 | 403 | # SQL Server files 404 | *.mdf 405 | *.ldf 406 | *.ndf 407 | 408 | # Business Intelligence projects 409 | *.rdl.data 410 | *.bim.layout 411 | *.bim_*.settings 412 | *.rptproj.rsuser 413 | 414 | # Microsoft Fakes 415 | FakesAssemblies/ 416 | 417 | # GhostDoc plugin setting file 418 | *.GhostDoc.xml 419 | 420 | # Node.js Tools for Visual Studio 421 | .ntvs_analysis.dat 422 | node_modules/ 423 | 424 | # Visual Studio 6 build log 425 | *.plg 426 | 427 | # Visual Studio 6 workspace options file 428 | *.opt 429 | 430 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 431 | *.vbw 432 | 433 | # Visual Studio LightSwitch build output 434 | **/*.HTMLClient/GeneratedArtifacts 435 | **/*.DesktopClient/GeneratedArtifacts 436 | **/*.DesktopClient/ModelManifest.xml 437 | **/*.Server/GeneratedArtifacts 438 | **/*.Server/ModelManifest.xml 439 | _Pvt_Extensions 440 | 441 | # Paket dependency manager 442 | .paket/paket.exe 443 | paket-files/ 444 | 445 | # FAKE - F# Make 446 | .fake/ 447 | 448 | # JetBrains Rider 449 | .idea/ 450 | *.sln.iml 451 | 452 | # CodeRush personal settings 453 | .cr/personal 454 | 455 | # Python Tools for Visual Studio (PTVS) 456 | __pycache__/ 457 | *.pyc 458 | 459 | # Cake - Uncomment if you are using it 460 | # tools/** 461 | # !tools/packages.config 462 | 463 | # Tabs Studio 464 | *.tss 465 | 466 | # Telerik's JustMock configuration file 467 | *.jmconfig 468 | 469 | # BizTalk build output 470 | *.btp.cs 471 | *.btm.cs 472 | *.odx.cs 473 | *.xsd.cs 474 | 475 | # OpenCover UI analysis results 476 | OpenCover/ 477 | 478 | # Azure Stream Analytics local run output 479 | ASALocalRun/ 480 | 481 | # MSBuild Binary and Structured Log 482 | *.binlog 483 | 484 | # NVidia Nsight GPU debugger configuration file 485 | *.nvuser 486 | 487 | # MFractors (Xamarin productivity tool) working folder 488 | .mfractor/ 489 | 490 | # Local History for Visual Studio 491 | .localhistory/ 492 | 493 | 494 | # End of https://www.gitignore.io/api/unity,rider,intellij,visualstudio,visualstudiocode 495 | 496 | !Packages/* 497 | Assets/Ultimate Game Tools/ 498 | Assets/Ultimate Game Tools.meta 499 | Assets/CLC/ 500 | Assets/CLC.meta 501 | -------------------------------------------------------------------------------- /Assembly-CSharp.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d53c9e5035cf98d4bbfb2cd9ce9293c2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb6b4134e243f75449a18b1afe971fc7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/Editor/JetBrains.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 767e20f8b45df8d4497c4fa1e86c6176 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeLocTai/rock-generator/f93afeaf323accbdbb08c83f05714f0765fd0814/Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll -------------------------------------------------------------------------------- /Assets/Plugins/Editor/JetBrains/JetBrains.Rider.Unity.Editor.Plugin.Repacked.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acd254ce1ac487e45b0c111b6a7d09e5 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 1 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Assets/Rockgen.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2c87852bf07fc249846b9966dbd84cc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7c8667873e75b24f83f880632b3a7f8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/RockGen.Unity.Demo.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RockGen.Unity.Demo", 3 | "references": [ 4 | "RockGen", 5 | "RockGen.Unity" 6 | ], 7 | "optionalUnityReferences": [], 8 | "includePlatforms": [], 9 | "excludePlatforms": [], 10 | "allowUnsafeCode": false, 11 | "overrideReferences": false, 12 | "precompiledReferences": [], 13 | "autoReferenced": true, 14 | "defineConstraints": [] 15 | } -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/RockGen.Unity.Demo.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b122250c8331644095ce05785ca0e17 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Scripting Sample.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd7a7692109f09a429764014ec62c4f8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Scripting Sample/Rock Fountain.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 0 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 1 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 500 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &70988483 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 70988485} 124 | - component: {fileID: 70988484} 125 | m_Layer: 0 126 | m_Name: Directional Light 127 | m_TagString: Untagged 128 | m_Icon: {fileID: 0} 129 | m_NavMeshLayer: 0 130 | m_StaticEditorFlags: 0 131 | m_IsActive: 1 132 | --- !u!108 &70988484 133 | Light: 134 | m_ObjectHideFlags: 0 135 | m_CorrespondingSourceObject: {fileID: 0} 136 | m_PrefabInstance: {fileID: 0} 137 | m_PrefabAsset: {fileID: 0} 138 | m_GameObject: {fileID: 70988483} 139 | m_Enabled: 1 140 | serializedVersion: 8 141 | m_Type: 1 142 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 143 | m_Intensity: 1 144 | m_Range: 10 145 | m_SpotAngle: 30 146 | m_CookieSize: 10 147 | m_Shadows: 148 | m_Type: 2 149 | m_Resolution: -1 150 | m_CustomResolution: -1 151 | m_Strength: 1 152 | m_Bias: 0.05 153 | m_NormalBias: 0.4 154 | m_NearPlane: 0.2 155 | m_Cookie: {fileID: 0} 156 | m_DrawHalo: 0 157 | m_Flare: {fileID: 0} 158 | m_RenderMode: 0 159 | m_CullingMask: 160 | serializedVersion: 2 161 | m_Bits: 4294967295 162 | m_Lightmapping: 4 163 | m_LightShadowCasterMode: 0 164 | m_AreaSize: {x: 1, y: 1} 165 | m_BounceIntensity: 1 166 | m_ColorTemperature: 6570 167 | m_UseColorTemperature: 0 168 | m_ShadowRadius: 0 169 | m_ShadowAngle: 0 170 | --- !u!4 &70988485 171 | Transform: 172 | m_ObjectHideFlags: 0 173 | m_CorrespondingSourceObject: {fileID: 0} 174 | m_PrefabInstance: {fileID: 0} 175 | m_PrefabAsset: {fileID: 0} 176 | m_GameObject: {fileID: 70988483} 177 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 178 | m_LocalPosition: {x: 0, y: 3, z: 0} 179 | m_LocalScale: {x: 1, y: 1, z: 1} 180 | m_Children: [] 181 | m_Father: {fileID: 0} 182 | m_RootOrder: 1 183 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 184 | --- !u!1 &873743552 185 | GameObject: 186 | m_ObjectHideFlags: 0 187 | m_CorrespondingSourceObject: {fileID: 0} 188 | m_PrefabInstance: {fileID: 0} 189 | m_PrefabAsset: {fileID: 0} 190 | serializedVersion: 6 191 | m_Component: 192 | - component: {fileID: 873743558} 193 | - component: {fileID: 873743557} 194 | - component: {fileID: 873743556} 195 | - component: {fileID: 873743553} 196 | - component: {fileID: 873743554} 197 | m_Layer: 0 198 | m_Name: Rock Prefab 199 | m_TagString: Untagged 200 | m_Icon: {fileID: 0} 201 | m_NavMeshLayer: 0 202 | m_StaticEditorFlags: 0 203 | m_IsActive: 1 204 | --- !u!64 &873743553 205 | MeshCollider: 206 | m_ObjectHideFlags: 0 207 | m_CorrespondingSourceObject: {fileID: 0} 208 | m_PrefabInstance: {fileID: 0} 209 | m_PrefabAsset: {fileID: 0} 210 | m_GameObject: {fileID: 873743552} 211 | m_Material: {fileID: 0} 212 | m_IsTrigger: 0 213 | m_Enabled: 1 214 | serializedVersion: 3 215 | m_Convex: 1 216 | m_CookingOptions: 2 217 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 218 | --- !u!54 &873743554 219 | Rigidbody: 220 | m_ObjectHideFlags: 0 221 | m_CorrespondingSourceObject: {fileID: 0} 222 | m_PrefabInstance: {fileID: 0} 223 | m_PrefabAsset: {fileID: 0} 224 | m_GameObject: {fileID: 873743552} 225 | serializedVersion: 2 226 | m_Mass: 1 227 | m_Drag: 0 228 | m_AngularDrag: 0.05 229 | m_UseGravity: 1 230 | m_IsKinematic: 0 231 | m_Interpolate: 0 232 | m_Constraints: 0 233 | m_CollisionDetection: 0 234 | --- !u!23 &873743556 235 | MeshRenderer: 236 | m_ObjectHideFlags: 0 237 | m_CorrespondingSourceObject: {fileID: 0} 238 | m_PrefabInstance: {fileID: 0} 239 | m_PrefabAsset: {fileID: 0} 240 | m_GameObject: {fileID: 873743552} 241 | m_Enabled: 1 242 | m_CastShadows: 1 243 | m_ReceiveShadows: 1 244 | m_DynamicOccludee: 1 245 | m_MotionVectors: 1 246 | m_LightProbeUsage: 1 247 | m_ReflectionProbeUsage: 1 248 | m_RenderingLayerMask: 1 249 | m_RendererPriority: 0 250 | m_Materials: 251 | - {fileID: 2100000, guid: 48333a65e2fcf854dbe747f398c38436, type: 2} 252 | m_StaticBatchInfo: 253 | firstSubMesh: 0 254 | subMeshCount: 0 255 | m_StaticBatchRoot: {fileID: 0} 256 | m_ProbeAnchor: {fileID: 0} 257 | m_LightProbeVolumeOverride: {fileID: 0} 258 | m_ScaleInLightmap: 1 259 | m_PreserveUVs: 0 260 | m_IgnoreNormalsForChartDetection: 0 261 | m_ImportantGI: 0 262 | m_StitchLightmapSeams: 0 263 | m_SelectedEditorRenderState: 3 264 | m_MinimumChartSize: 4 265 | m_AutoUVMaxDistance: 0.5 266 | m_AutoUVMaxAngle: 89 267 | m_LightmapParameters: {fileID: 0} 268 | m_SortingLayerID: 0 269 | m_SortingLayer: 0 270 | m_SortingOrder: 0 271 | --- !u!33 &873743557 272 | MeshFilter: 273 | m_ObjectHideFlags: 0 274 | m_CorrespondingSourceObject: {fileID: 0} 275 | m_PrefabInstance: {fileID: 0} 276 | m_PrefabAsset: {fileID: 0} 277 | m_GameObject: {fileID: 873743552} 278 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 279 | --- !u!4 &873743558 280 | Transform: 281 | m_ObjectHideFlags: 0 282 | m_CorrespondingSourceObject: {fileID: 0} 283 | m_PrefabInstance: {fileID: 0} 284 | m_PrefabAsset: {fileID: 0} 285 | m_GameObject: {fileID: 873743552} 286 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 287 | m_LocalPosition: {x: 0, y: 0, z: 0} 288 | m_LocalScale: {x: 1, y: 1, z: 1} 289 | m_Children: [] 290 | m_Father: {fileID: 935666371} 291 | m_RootOrder: 0 292 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 293 | --- !u!1 &889839717 294 | GameObject: 295 | m_ObjectHideFlags: 0 296 | m_CorrespondingSourceObject: {fileID: 0} 297 | m_PrefabInstance: {fileID: 0} 298 | m_PrefabAsset: {fileID: 0} 299 | serializedVersion: 6 300 | m_Component: 301 | - component: {fileID: 889839721} 302 | - component: {fileID: 889839720} 303 | - component: {fileID: 889839719} 304 | - component: {fileID: 889839718} 305 | m_Layer: 0 306 | m_Name: Plane 307 | m_TagString: Untagged 308 | m_Icon: {fileID: 0} 309 | m_NavMeshLayer: 0 310 | m_StaticEditorFlags: 4294967295 311 | m_IsActive: 1 312 | --- !u!64 &889839718 313 | MeshCollider: 314 | m_ObjectHideFlags: 0 315 | m_CorrespondingSourceObject: {fileID: 0} 316 | m_PrefabInstance: {fileID: 0} 317 | m_PrefabAsset: {fileID: 0} 318 | m_GameObject: {fileID: 889839717} 319 | m_Material: {fileID: 0} 320 | m_IsTrigger: 0 321 | m_Enabled: 1 322 | serializedVersion: 3 323 | m_Convex: 0 324 | m_CookingOptions: 14 325 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 326 | --- !u!23 &889839719 327 | MeshRenderer: 328 | m_ObjectHideFlags: 0 329 | m_CorrespondingSourceObject: {fileID: 0} 330 | m_PrefabInstance: {fileID: 0} 331 | m_PrefabAsset: {fileID: 0} 332 | m_GameObject: {fileID: 889839717} 333 | m_Enabled: 1 334 | m_CastShadows: 1 335 | m_ReceiveShadows: 1 336 | m_DynamicOccludee: 1 337 | m_MotionVectors: 1 338 | m_LightProbeUsage: 1 339 | m_ReflectionProbeUsage: 1 340 | m_RenderingLayerMask: 1 341 | m_RendererPriority: 0 342 | m_Materials: 343 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 344 | m_StaticBatchInfo: 345 | firstSubMesh: 0 346 | subMeshCount: 0 347 | m_StaticBatchRoot: {fileID: 0} 348 | m_ProbeAnchor: {fileID: 0} 349 | m_LightProbeVolumeOverride: {fileID: 0} 350 | m_ScaleInLightmap: 1 351 | m_PreserveUVs: 0 352 | m_IgnoreNormalsForChartDetection: 0 353 | m_ImportantGI: 0 354 | m_StitchLightmapSeams: 0 355 | m_SelectedEditorRenderState: 3 356 | m_MinimumChartSize: 4 357 | m_AutoUVMaxDistance: 0.5 358 | m_AutoUVMaxAngle: 89 359 | m_LightmapParameters: {fileID: 0} 360 | m_SortingLayerID: 0 361 | m_SortingLayer: 0 362 | m_SortingOrder: 0 363 | --- !u!33 &889839720 364 | MeshFilter: 365 | m_ObjectHideFlags: 0 366 | m_CorrespondingSourceObject: {fileID: 0} 367 | m_PrefabInstance: {fileID: 0} 368 | m_PrefabAsset: {fileID: 0} 369 | m_GameObject: {fileID: 889839717} 370 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 371 | --- !u!4 &889839721 372 | Transform: 373 | m_ObjectHideFlags: 0 374 | m_CorrespondingSourceObject: {fileID: 0} 375 | m_PrefabInstance: {fileID: 0} 376 | m_PrefabAsset: {fileID: 0} 377 | m_GameObject: {fileID: 889839717} 378 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 379 | m_LocalPosition: {x: 0, y: 0, z: 0} 380 | m_LocalScale: {x: 1, y: 1, z: 1} 381 | m_Children: [] 382 | m_Father: {fileID: 0} 383 | m_RootOrder: 3 384 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 385 | --- !u!1 &935666370 386 | GameObject: 387 | m_ObjectHideFlags: 0 388 | m_CorrespondingSourceObject: {fileID: 0} 389 | m_PrefabInstance: {fileID: 0} 390 | m_PrefabAsset: {fileID: 0} 391 | serializedVersion: 6 392 | m_Component: 393 | - component: {fileID: 935666371} 394 | - component: {fileID: 935666372} 395 | m_Layer: 0 396 | m_Name: Rock Fountain 397 | m_TagString: Untagged 398 | m_Icon: {fileID: 0} 399 | m_NavMeshLayer: 0 400 | m_StaticEditorFlags: 0 401 | m_IsActive: 1 402 | --- !u!4 &935666371 403 | Transform: 404 | m_ObjectHideFlags: 0 405 | m_CorrespondingSourceObject: {fileID: 0} 406 | m_PrefabInstance: {fileID: 0} 407 | m_PrefabAsset: {fileID: 0} 408 | m_GameObject: {fileID: 935666370} 409 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 410 | m_LocalPosition: {x: 0, y: 1, z: 0} 411 | m_LocalScale: {x: 1, y: 1, z: 1} 412 | m_Children: 413 | - {fileID: 873743558} 414 | m_Father: {fileID: 0} 415 | m_RootOrder: 2 416 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 417 | --- !u!114 &935666372 418 | MonoBehaviour: 419 | m_ObjectHideFlags: 0 420 | m_CorrespondingSourceObject: {fileID: 0} 421 | m_PrefabInstance: {fileID: 0} 422 | m_PrefabAsset: {fileID: 0} 423 | m_GameObject: {fileID: 935666370} 424 | m_Enabled: 1 425 | m_EditorHideFlags: 0 426 | m_Script: {fileID: 11500000, guid: f21ac714000264d4488208b83ae06a91, type: 3} 427 | m_Name: 428 | m_EditorClassIdentifier: 429 | prefab: {fileID: 873743552} 430 | --- !u!1 &1702360044 431 | GameObject: 432 | m_ObjectHideFlags: 0 433 | m_CorrespondingSourceObject: {fileID: 0} 434 | m_PrefabInstance: {fileID: 0} 435 | m_PrefabAsset: {fileID: 0} 436 | serializedVersion: 6 437 | m_Component: 438 | - component: {fileID: 1702360047} 439 | - component: {fileID: 1702360046} 440 | - component: {fileID: 1702360045} 441 | m_Layer: 0 442 | m_Name: Main Camera 443 | m_TagString: MainCamera 444 | m_Icon: {fileID: 0} 445 | m_NavMeshLayer: 0 446 | m_StaticEditorFlags: 0 447 | m_IsActive: 1 448 | --- !u!81 &1702360045 449 | AudioListener: 450 | m_ObjectHideFlags: 0 451 | m_CorrespondingSourceObject: {fileID: 0} 452 | m_PrefabInstance: {fileID: 0} 453 | m_PrefabAsset: {fileID: 0} 454 | m_GameObject: {fileID: 1702360044} 455 | m_Enabled: 1 456 | --- !u!20 &1702360046 457 | Camera: 458 | m_ObjectHideFlags: 0 459 | m_CorrespondingSourceObject: {fileID: 0} 460 | m_PrefabInstance: {fileID: 0} 461 | m_PrefabAsset: {fileID: 0} 462 | m_GameObject: {fileID: 1702360044} 463 | m_Enabled: 1 464 | serializedVersion: 2 465 | m_ClearFlags: 1 466 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 467 | m_projectionMatrixMode: 1 468 | m_SensorSize: {x: 36, y: 24} 469 | m_LensShift: {x: 0, y: 0} 470 | m_GateFitMode: 2 471 | m_FocalLength: 50 472 | m_NormalizedViewPortRect: 473 | serializedVersion: 2 474 | x: 0 475 | y: 0 476 | width: 1 477 | height: 1 478 | near clip plane: 0.3 479 | far clip plane: 1000 480 | field of view: 60 481 | orthographic: 0 482 | orthographic size: 5 483 | m_Depth: -1 484 | m_CullingMask: 485 | serializedVersion: 2 486 | m_Bits: 4294967295 487 | m_RenderingPath: -1 488 | m_TargetTexture: {fileID: 0} 489 | m_TargetDisplay: 0 490 | m_TargetEye: 3 491 | m_HDR: 1 492 | m_AllowMSAA: 1 493 | m_AllowDynamicResolution: 0 494 | m_ForceIntoRT: 0 495 | m_OcclusionCulling: 1 496 | m_StereoConvergence: 10 497 | m_StereoSeparation: 0.022 498 | --- !u!4 &1702360047 499 | Transform: 500 | m_ObjectHideFlags: 0 501 | m_CorrespondingSourceObject: {fileID: 0} 502 | m_PrefabInstance: {fileID: 0} 503 | m_PrefabAsset: {fileID: 0} 504 | m_GameObject: {fileID: 1702360044} 505 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 506 | m_LocalPosition: {x: 0, y: 2.02, z: -8.97} 507 | m_LocalScale: {x: 1, y: 1, z: 1} 508 | m_Children: [] 509 | m_Father: {fileID: 0} 510 | m_RootOrder: 0 511 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 512 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Scripting Sample/Rock Fountain.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 387eda590895b3641add9bee7b558289 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Scripting Sample/Rock OS.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Rock OS 11 | m_Shader: {fileID: 4800000, guid: 9eca40c80638f764eb94a9786d8d1d8a, type: 3} 12 | m_ShaderKeywords: OBJECT_SPACE _EMISSION 13 | m_LightmapFlags: 0 14 | m_EnableInstancingVariants: 1 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 2800000, guid: 1d8673aad6705f643b43121ccd7889bf, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _Displace: 39 | m_Texture: {fileID: 2800000, guid: 1af988e51574fe74fb499c6422278ca2, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _DisplacementTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _EmissionMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MainTex: 51 | m_Texture: {fileID: 2800000, guid: 6405b98efc144274fa7758d16774df80, type: 3} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _OcclusionMap: 59 | m_Texture: {fileID: 2800000, guid: 96896937c6558d5479d54571cf504727, type: 3} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _ParallaxMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _RoughnessMap: 67 | m_Texture: {fileID: 2800000, guid: 4247d2c0128619b4ba1da800b724bc6a, type: 3} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - _BlendOp: 0 72 | - _BumpScale: 1 73 | - _CameraFadingEnabled: 0 74 | - _CameraFarFadeDistance: 2 75 | - _CameraNearFadeDistance: 1 76 | - _ColorMode: 0 77 | - _Cull: 2 78 | - _Cutoff: 0.5 79 | - _DetailNormalMapScale: 1 80 | - _Displace_Scale: 0.03 81 | - _DistortionBlend: 0.5 82 | - _DistortionEnabled: 0 83 | - _DistortionStrength: 1 84 | - _DistortionStrengthScaled: 0 85 | - _DstBlend: 0 86 | - _EmissionEnabled: 0 87 | - _FlipbookMode: 0 88 | - _GlossMapScale: 1 89 | - _Glossiness: 0.128 90 | - _GlossyReflections: 1 91 | - _LightingEnabled: 1 92 | - _MaxDisplacement: 1 93 | - _Metallic: 0 94 | - _Mode: 0 95 | - _OcclusionStrength: 1 96 | - _Parallax: 0.0481 97 | - _Roughness: 1 98 | - _Sharpness: 64 99 | - _Smoothness: 0 100 | - _SmoothnessTextureChannel: 0 101 | - _SoftParticlesEnabled: 0 102 | - _SoftParticlesFarFadeDistance: 1 103 | - _SoftParticlesNearFadeDistance: 0 104 | - _SpecularHighlights: 1 105 | - _SrcBlend: 1 106 | - _USE_OBJECT_SPACE: 1 107 | - _UVSec: 0 108 | - _ZWrite: 1 109 | m_Colors: 110 | - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0} 111 | - _Color: {r: 1, g: 1, b: 1, a: 1} 112 | - _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0} 113 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 114 | - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0} 115 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Scripting Sample/Rock OS.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48333a65e2fcf854dbe747f398c38436 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Scripting Sample/RockFountain.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace RockGen.Unity.Demo 4 | { 5 | public class RockFountain : MonoBehaviour 6 | { 7 | public GameObject prefab; 8 | 9 | RockGenerator generator; 10 | 11 | void Start() 12 | { 13 | var settings = new RockGenerationSettings { 14 | GridSettings = new VoronoiGridSettings { 15 | Size = 5, 16 | Randomness = .75f 17 | }, 18 | StockDensity = 8, 19 | TargetTriangleCount = 220, 20 | Distortion = .5f, 21 | PatternSize = 1.35f, 22 | Transform = Convert.FromUnityMatrix(UnityEngine.Matrix4x4.TRS(new Vector3(2, 2, 2), 23 | Quaternion.identity, 24 | Vector3.one)) 25 | }; 26 | 27 | generator = new RockGenerator {Settings = settings}; 28 | } 29 | 30 | Mesh CreateRandomRock() 31 | { 32 | // Copy existing settings 33 | var settings = new RockGenerationSettings(generator.Settings); 34 | 35 | // Modify rock shape 36 | UnityEngine.Matrix4x4 rockTransform = UnityEngine.Matrix4x4.TRS( 37 | new Vector3(2, 2, 2), 38 | Random.rotation, 39 | new Vector3(Random.Range(.5f, 1.5f), 40 | Random.Range(.5f, 1.5f), 41 | Random.Range(.5f, 1.5f)) 42 | ); 43 | settings.Transform = Convert.FromUnityMatrix(rockTransform); 44 | 45 | // Apply settings. Generator will optimize generation base on which settings was changed. 46 | generator.Settings = settings; 47 | 48 | // Generator do not use Unity's types, so it can be used outside of Unity 49 | // Notable different are: Matrix4x4, Mesh 50 | return Convert.ToUnityMesh(generator.MakeRock()); 51 | } 52 | 53 | void Update() 54 | { 55 | if (!Input.GetMouseButton(0)) 56 | return; 57 | 58 | var mesh = CreateRandomRock(); 59 | 60 | var rock = Instantiate(prefab, transform.position, Quaternion.identity); 61 | rock.GetComponent().sharedMesh = mesh; 62 | rock.GetComponent().sharedMesh = mesh; 63 | Destroy(rock, 10); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Scripting Sample/RockFountain.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f21ac714000264d4488208b83ae06a91 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55479d3230533b24b92fac7b1d0729a0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9bb09753111056c4e802fbec81f1ca88 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Model.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06be75fcdb47e414190cdbc647c5ba06 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Model/CalibrationScaleRGB.fbx: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:63bb6517546decd104f3bd99b8809bcc4bb57f3181c636bf4cd7b4f2ac6425f4 3 | size 22560 4 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Model/CalibrationScaleRGB.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 414b7da4757ec644f99c083c95b9434d 3 | ModelImporter: 4 | serializedVersion: 18 5 | fileIDToRecycleName: 6 | 100000: //RootNode 7 | 400000: //RootNode 8 | 2300000: //RootNode 9 | 3300000: //RootNode 10 | 4300000: CalibrationRGB 11 | 4300002: CalibrationRGBScale001 12 | materials: 13 | importMaterials: 1 14 | materialName: 1 15 | materialSearch: 2 16 | animations: 17 | legacyGenerateAnimations: 4 18 | bakeSimulation: 0 19 | optimizeGameObjects: 0 20 | motionNodeName: 21 | pivotNodeName: 22 | animationCompression: 1 23 | animationRotationError: .5 24 | animationPositionError: .5 25 | animationScaleError: .5 26 | animationWrapMode: 0 27 | extraExposedTransformPaths: [] 28 | clipAnimations: [] 29 | isReadable: 1 30 | meshes: 31 | lODScreenPercentages: [] 32 | globalScale: 1 33 | meshCompression: 0 34 | addColliders: 0 35 | importBlendShapes: 1 36 | swapUVChannels: 0 37 | generateSecondaryUV: 0 38 | useFileUnits: 1 39 | optimizeMeshForGPU: 1 40 | keepQuads: 0 41 | weldVertices: 1 42 | secondaryUVAngleDistortion: 8 43 | secondaryUVAreaDistortion: 15.000001 44 | secondaryUVHardAngle: 88 45 | secondaryUVPackMargin: 4 46 | useFileScale: 1 47 | tangentSpace: 48 | normalSmoothAngle: 60 49 | splitTangentsAcrossUV: 1 50 | normalImportMode: 0 51 | tangentImportMode: 1 52 | importAnimation: 1 53 | copyAvatar: 0 54 | humanDescription: 55 | human: [] 56 | skeleton: [] 57 | armTwist: .5 58 | foreArmTwist: .5 59 | upperLegTwist: .5 60 | legTwist: .5 61 | armStretch: .0500000007 62 | legStretch: .0500000007 63 | feetSpacing: 0 64 | rootMotionBoneName: 65 | lastHumanDescriptionAvatarSource: {instanceID: 0} 66 | animationType: 0 67 | additionalBone: 0 68 | userData: 69 | assetBundleName: 70 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04f76b0631de44f45a9a1865f046ef70 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Prefabs/CalibrationScales.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &100004 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 400004} 12 | m_Layer: 11 13 | m_Name: CalibrationScales 14 | m_TagString: Untagged 15 | m_Icon: {fileID: 0} 16 | m_NavMeshLayer: 0 17 | m_StaticEditorFlags: 0 18 | m_IsActive: 1 19 | --- !u!4 &400004 20 | Transform: 21 | m_ObjectHideFlags: 0 22 | m_CorrespondingSourceObject: {fileID: 0} 23 | m_PrefabInstance: {fileID: 0} 24 | m_PrefabAsset: {fileID: 0} 25 | m_GameObject: {fileID: 100004} 26 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 27 | m_LocalPosition: {x: 0, y: 0, z: 0} 28 | m_LocalScale: {x: 1, y: 1, z: 1} 29 | m_Children: 30 | - {fileID: 400006} 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!1 &100006 35 | GameObject: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | serializedVersion: 6 41 | m_Component: 42 | - component: {fileID: 400006} 43 | - component: {fileID: 3300004} 44 | - component: {fileID: 2300004} 45 | m_Layer: 11 46 | m_Name: CalibrationScaleRGB 47 | m_TagString: Untagged 48 | m_Icon: {fileID: 0} 49 | m_NavMeshLayer: 0 50 | m_StaticEditorFlags: 0 51 | m_IsActive: 1 52 | --- !u!4 &400006 53 | Transform: 54 | m_ObjectHideFlags: 0 55 | m_CorrespondingSourceObject: {fileID: 0} 56 | m_PrefabInstance: {fileID: 0} 57 | m_PrefabAsset: {fileID: 0} 58 | m_GameObject: {fileID: 100006} 59 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 60 | m_LocalPosition: {x: 0, y: 0.001, z: 0} 61 | m_LocalScale: {x: 1, y: 1, z: 1} 62 | m_Children: [] 63 | m_Father: {fileID: 400004} 64 | m_RootOrder: 0 65 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 66 | --- !u!33 &3300004 67 | MeshFilter: 68 | m_ObjectHideFlags: 0 69 | m_CorrespondingSourceObject: {fileID: 0} 70 | m_PrefabInstance: {fileID: 0} 71 | m_PrefabAsset: {fileID: 0} 72 | m_GameObject: {fileID: 100006} 73 | m_Mesh: {fileID: 4300002, guid: 414b7da4757ec644f99c083c95b9434d, type: 3} 74 | --- !u!23 &2300004 75 | MeshRenderer: 76 | m_ObjectHideFlags: 0 77 | m_CorrespondingSourceObject: {fileID: 0} 78 | m_PrefabInstance: {fileID: 0} 79 | m_PrefabAsset: {fileID: 0} 80 | m_GameObject: {fileID: 100006} 81 | m_Enabled: 1 82 | m_CastShadows: 1 83 | m_ReceiveShadows: 1 84 | m_DynamicOccludee: 1 85 | m_MotionVectors: 1 86 | m_LightProbeUsage: 1 87 | m_ReflectionProbeUsage: 1 88 | m_RenderingLayerMask: 1 89 | m_RendererPriority: 0 90 | m_Materials: 91 | - {fileID: 2100000, guid: 9cda93786dd278643a8e5b38a1440c18, type: 2} 92 | m_StaticBatchInfo: 93 | firstSubMesh: 0 94 | subMeshCount: 0 95 | m_StaticBatchRoot: {fileID: 0} 96 | m_ProbeAnchor: {fileID: 0} 97 | m_LightProbeVolumeOverride: {fileID: 0} 98 | m_ScaleInLightmap: 1 99 | m_PreserveUVs: 0 100 | m_IgnoreNormalsForChartDetection: 0 101 | m_ImportantGI: 0 102 | m_StitchLightmapSeams: 0 103 | m_SelectedEditorRenderState: 3 104 | m_MinimumChartSize: 4 105 | m_AutoUVMaxDistance: 0.5 106 | m_AutoUVMaxAngle: 89 107 | m_LightmapParameters: {fileID: 0} 108 | m_SortingLayerID: 0 109 | m_SortingLayer: 0 110 | m_SortingOrder: 0 111 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Prefabs/CalibrationScales.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc07b2a3ab0f97147ad301272dd22002 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Prefabs/SceneElements.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &100000 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 400000} 12 | - component: {fileID: 3300000} 13 | - component: {fileID: 6400000} 14 | - component: {fileID: 2300000} 15 | m_Layer: 0 16 | m_Name: CalibrationWallRight 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &400000 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 100000} 29 | m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5000001, w: 0.49999994} 30 | m_LocalPosition: {x: -2.5, y: 2.5, z: 0} 31 | m_LocalScale: {x: 0.5, y: 1, z: 0.49999997} 32 | m_Children: [] 33 | m_Father: {fileID: 400004} 34 | m_RootOrder: 2 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!33 &3300000 37 | MeshFilter: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 100000} 43 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 44 | --- !u!64 &6400000 45 | MeshCollider: 46 | m_ObjectHideFlags: 0 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInstance: {fileID: 0} 49 | m_PrefabAsset: {fileID: 0} 50 | m_GameObject: {fileID: 100000} 51 | m_Material: {fileID: 0} 52 | m_IsTrigger: 0 53 | m_Enabled: 1 54 | serializedVersion: 3 55 | m_Convex: 0 56 | m_CookingOptions: 14 57 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 58 | --- !u!23 &2300000 59 | MeshRenderer: 60 | m_ObjectHideFlags: 0 61 | m_CorrespondingSourceObject: {fileID: 0} 62 | m_PrefabInstance: {fileID: 0} 63 | m_PrefabAsset: {fileID: 0} 64 | m_GameObject: {fileID: 100000} 65 | m_Enabled: 1 66 | m_CastShadows: 1 67 | m_ReceiveShadows: 1 68 | m_DynamicOccludee: 1 69 | m_MotionVectors: 1 70 | m_LightProbeUsage: 1 71 | m_ReflectionProbeUsage: 0 72 | m_RenderingLayerMask: 1 73 | m_RendererPriority: 0 74 | m_Materials: 75 | - {fileID: 2100000, guid: d681c1d72c3c16149abd2f0f25ca628c, type: 2} 76 | m_StaticBatchInfo: 77 | firstSubMesh: 0 78 | subMeshCount: 0 79 | m_StaticBatchRoot: {fileID: 0} 80 | m_ProbeAnchor: {fileID: 0} 81 | m_LightProbeVolumeOverride: {fileID: 0} 82 | m_ScaleInLightmap: 1 83 | m_PreserveUVs: 0 84 | m_IgnoreNormalsForChartDetection: 0 85 | m_ImportantGI: 0 86 | m_StitchLightmapSeams: 0 87 | m_SelectedEditorRenderState: 3 88 | m_MinimumChartSize: 4 89 | m_AutoUVMaxDistance: 0.5 90 | m_AutoUVMaxAngle: 89 91 | m_LightmapParameters: {fileID: 0} 92 | m_SortingLayerID: 0 93 | m_SortingLayer: 0 94 | m_SortingOrder: 0 95 | --- !u!1 &100002 96 | GameObject: 97 | m_ObjectHideFlags: 0 98 | m_CorrespondingSourceObject: {fileID: 0} 99 | m_PrefabInstance: {fileID: 0} 100 | m_PrefabAsset: {fileID: 0} 101 | serializedVersion: 6 102 | m_Component: 103 | - component: {fileID: 400002} 104 | - component: {fileID: 3300002} 105 | - component: {fileID: 6400002} 106 | - component: {fileID: 2300002} 107 | m_Layer: 0 108 | m_Name: CalibrationWallLeft 109 | m_TagString: Untagged 110 | m_Icon: {fileID: 0} 111 | m_NavMeshLayer: 0 112 | m_StaticEditorFlags: 0 113 | m_IsActive: 1 114 | --- !u!4 &400002 115 | Transform: 116 | m_ObjectHideFlags: 0 117 | m_CorrespondingSourceObject: {fileID: 0} 118 | m_PrefabInstance: {fileID: 0} 119 | m_PrefabAsset: {fileID: 0} 120 | m_GameObject: {fileID: 100002} 121 | m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067} 122 | m_LocalPosition: {x: 0, y: 2.5, z: -2.5} 123 | m_LocalScale: {x: 0.5, y: 1, z: 0.5} 124 | m_Children: [] 125 | m_Father: {fileID: 400004} 126 | m_RootOrder: 1 127 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 128 | --- !u!33 &3300002 129 | MeshFilter: 130 | m_ObjectHideFlags: 0 131 | m_CorrespondingSourceObject: {fileID: 0} 132 | m_PrefabInstance: {fileID: 0} 133 | m_PrefabAsset: {fileID: 0} 134 | m_GameObject: {fileID: 100002} 135 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 136 | --- !u!64 &6400002 137 | MeshCollider: 138 | m_ObjectHideFlags: 0 139 | m_CorrespondingSourceObject: {fileID: 0} 140 | m_PrefabInstance: {fileID: 0} 141 | m_PrefabAsset: {fileID: 0} 142 | m_GameObject: {fileID: 100002} 143 | m_Material: {fileID: 0} 144 | m_IsTrigger: 0 145 | m_Enabled: 1 146 | serializedVersion: 3 147 | m_Convex: 0 148 | m_CookingOptions: 14 149 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 150 | --- !u!23 &2300002 151 | MeshRenderer: 152 | m_ObjectHideFlags: 0 153 | m_CorrespondingSourceObject: {fileID: 0} 154 | m_PrefabInstance: {fileID: 0} 155 | m_PrefabAsset: {fileID: 0} 156 | m_GameObject: {fileID: 100002} 157 | m_Enabled: 1 158 | m_CastShadows: 1 159 | m_ReceiveShadows: 1 160 | m_DynamicOccludee: 1 161 | m_MotionVectors: 1 162 | m_LightProbeUsage: 1 163 | m_ReflectionProbeUsage: 0 164 | m_RenderingLayerMask: 1 165 | m_RendererPriority: 0 166 | m_Materials: 167 | - {fileID: 2100000, guid: d681c1d72c3c16149abd2f0f25ca628c, type: 2} 168 | m_StaticBatchInfo: 169 | firstSubMesh: 0 170 | subMeshCount: 0 171 | m_StaticBatchRoot: {fileID: 0} 172 | m_ProbeAnchor: {fileID: 0} 173 | m_LightProbeVolumeOverride: {fileID: 0} 174 | m_ScaleInLightmap: 1 175 | m_PreserveUVs: 0 176 | m_IgnoreNormalsForChartDetection: 0 177 | m_ImportantGI: 0 178 | m_StitchLightmapSeams: 0 179 | m_SelectedEditorRenderState: 3 180 | m_MinimumChartSize: 4 181 | m_AutoUVMaxDistance: 0.5 182 | m_AutoUVMaxAngle: 89 183 | m_LightmapParameters: {fileID: 0} 184 | m_SortingLayerID: 0 185 | m_SortingLayer: 0 186 | m_SortingOrder: 0 187 | --- !u!1 &100004 188 | GameObject: 189 | m_ObjectHideFlags: 0 190 | m_CorrespondingSourceObject: {fileID: 0} 191 | m_PrefabInstance: {fileID: 0} 192 | m_PrefabAsset: {fileID: 0} 193 | serializedVersion: 6 194 | m_Component: 195 | - component: {fileID: 400004} 196 | m_Layer: 0 197 | m_Name: SceneElements 198 | m_TagString: Untagged 199 | m_Icon: {fileID: 0} 200 | m_NavMeshLayer: 0 201 | m_StaticEditorFlags: 0 202 | m_IsActive: 1 203 | --- !u!4 &400004 204 | Transform: 205 | m_ObjectHideFlags: 0 206 | m_CorrespondingSourceObject: {fileID: 0} 207 | m_PrefabInstance: {fileID: 0} 208 | m_PrefabAsset: {fileID: 0} 209 | m_GameObject: {fileID: 100004} 210 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 211 | m_LocalPosition: {x: 0, y: 0, z: 0} 212 | m_LocalScale: {x: 1, y: 1, z: 1} 213 | m_Children: 214 | - {fileID: 400006} 215 | - {fileID: 400002} 216 | - {fileID: 400000} 217 | m_Father: {fileID: 0} 218 | m_RootOrder: 0 219 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 220 | --- !u!1 &100006 221 | GameObject: 222 | m_ObjectHideFlags: 0 223 | m_CorrespondingSourceObject: {fileID: 0} 224 | m_PrefabInstance: {fileID: 0} 225 | m_PrefabAsset: {fileID: 0} 226 | serializedVersion: 6 227 | m_Component: 228 | - component: {fileID: 400006} 229 | - component: {fileID: 3300004} 230 | - component: {fileID: 6400004} 231 | - component: {fileID: 2300004} 232 | m_Layer: 0 233 | m_Name: CalibrationFloor 234 | m_TagString: Untagged 235 | m_Icon: {fileID: 0} 236 | m_NavMeshLayer: 0 237 | m_StaticEditorFlags: 0 238 | m_IsActive: 1 239 | --- !u!4 &400006 240 | Transform: 241 | m_ObjectHideFlags: 0 242 | m_CorrespondingSourceObject: {fileID: 0} 243 | m_PrefabInstance: {fileID: 0} 244 | m_PrefabAsset: {fileID: 0} 245 | m_GameObject: {fileID: 100006} 246 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 247 | m_LocalPosition: {x: 0, y: 0, z: 0} 248 | m_LocalScale: {x: 0.5, y: 1, z: 0.5} 249 | m_Children: [] 250 | m_Father: {fileID: 400004} 251 | m_RootOrder: 0 252 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 253 | --- !u!33 &3300004 254 | MeshFilter: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | m_GameObject: {fileID: 100006} 260 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 261 | --- !u!64 &6400004 262 | MeshCollider: 263 | m_ObjectHideFlags: 0 264 | m_CorrespondingSourceObject: {fileID: 0} 265 | m_PrefabInstance: {fileID: 0} 266 | m_PrefabAsset: {fileID: 0} 267 | m_GameObject: {fileID: 100006} 268 | m_Material: {fileID: 0} 269 | m_IsTrigger: 0 270 | m_Enabled: 1 271 | serializedVersion: 3 272 | m_Convex: 0 273 | m_CookingOptions: 14 274 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 275 | --- !u!23 &2300004 276 | MeshRenderer: 277 | m_ObjectHideFlags: 0 278 | m_CorrespondingSourceObject: {fileID: 0} 279 | m_PrefabInstance: {fileID: 0} 280 | m_PrefabAsset: {fileID: 0} 281 | m_GameObject: {fileID: 100006} 282 | m_Enabled: 1 283 | m_CastShadows: 1 284 | m_ReceiveShadows: 1 285 | m_DynamicOccludee: 1 286 | m_MotionVectors: 1 287 | m_LightProbeUsage: 1 288 | m_ReflectionProbeUsage: 0 289 | m_RenderingLayerMask: 1 290 | m_RendererPriority: 0 291 | m_Materials: 292 | - {fileID: 2100000, guid: d681c1d72c3c16149abd2f0f25ca628c, type: 2} 293 | m_StaticBatchInfo: 294 | firstSubMesh: 0 295 | subMeshCount: 0 296 | m_StaticBatchRoot: {fileID: 0} 297 | m_ProbeAnchor: {fileID: 0} 298 | m_LightProbeVolumeOverride: {fileID: 0} 299 | m_ScaleInLightmap: 1 300 | m_PreserveUVs: 0 301 | m_IgnoreNormalsForChartDetection: 0 302 | m_ImportantGI: 0 303 | m_StitchLightmapSeams: 0 304 | m_SelectedEditorRenderState: 3 305 | m_MinimumChartSize: 4 306 | m_AutoUVMaxDistance: 0.5 307 | m_AutoUVMaxAngle: 89 308 | m_LightmapParameters: {fileID: 0} 309 | m_SortingLayerID: 0 310 | m_SortingLayer: 0 311 | m_SortingOrder: 0 312 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Prefabs/SceneElements.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3244c08ab4d16f45b564401c17e84d4 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneMaterials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d89d43aab94d0dc4291abeeb18851432 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneMaterials/CalibrationFloor.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: CalibrationFloor 11 | m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _DETAIL_MULX2 _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME 13 | _NORMALMAP _SPECGLOSSMAP _UVSEC_UV1 14 | m_LightmapFlags: 4 15 | m_EnableInstancingVariants: 0 16 | m_DoubleSidedGI: 0 17 | m_CustomRenderQueue: -1 18 | stringTagMap: {} 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 10, y: 10} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 2800000, guid: 768fa469bdce74c4984c44cbb180b832, type: 3} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 2800000, guid: ca7ba913502c8bb44a66350131805326, type: 3} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _Occlusion: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _OcclusionMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _ParallaxMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _SpecGlossMap: 60 | m_Texture: {fileID: 2800000, guid: 6185fa454db669040887c980e20126fe, type: 3} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | m_Floats: 64 | - _AlphaTestRef: 0.5 65 | - _BumpScale: 1 66 | - _Cutoff: 0.5 67 | - _DetailNormalMapScale: 1 68 | - _DstBlend: 0 69 | - _EmissionScaleUI: 1 70 | - _GlossMapScale: 1 71 | - _Glossiness: 0.35 72 | - _GlossyReflections: 1 73 | - _Lightmapping: 1 74 | - _Mode: 0 75 | - _OcclusionStrength: 1 76 | - _Parallax: 0.02 77 | - _SmoothnessTextureChannel: 0 78 | - _SpecularHighlights: 1 79 | - _SrcBlend: 1 80 | - _UVSec: 0 81 | - _ZWrite: 1 82 | m_Colors: 83 | - _Color: {r: 1, g: 1, b: 1, a: 1} 84 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0.99999994} 85 | - _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1} 86 | - _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1} 87 | - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 88 | - _SpecularColor: {r: 0.11764706, g: 0.11764706, b: 0.11764706, a: 1} 89 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneMaterials/CalibrationFloor.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d681c1d72c3c16149abd2f0f25ca628c 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneMaterials/CalibrationRGBScale.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: CalibrationRGBScale 11 | m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _UVSEC_UV1 13 | m_LightmapFlags: 5 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 2800000, guid: 4c91c938176a28e44b22f5398fd5184f, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _Occlusion: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _ParallaxMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _SpecGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _AlphaTestRef: 0.5 60 | - _BumpScale: 1 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _EmissionScaleUI: 1 64 | - _Glossiness: 0 65 | - _Lightmapping: 1 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SrcBlend: 1 70 | - _UVSec: 0 71 | - _ZWrite: 1 72 | m_Colors: 73 | - _Color: {r: 1, g: 1, b: 1, a: 1} 74 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0.99999994} 75 | - _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1} 76 | - _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1} 77 | - _SpecularColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneMaterials/CalibrationRGBScale.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9cda93786dd278643a8e5b38a1440c18 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c3aaf057d431d24e8e984539bed3e74 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CailbrationRGBScaleDiffuse.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeLocTai/rock-generator/f93afeaf323accbdbb08c83f05714f0765fd0814/Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CailbrationRGBScaleDiffuse.tif -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CailbrationRGBScaleDiffuse.tif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c91c938176a28e44b22f5398fd5184f 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: -1 31 | maxTextureSize: 1024 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: 3 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 64 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 64 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 64 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 64 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CalibrationFloorDiffuse.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeLocTai/rock-generator/f93afeaf323accbdbb08c83f05714f0765fd0814/Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CalibrationFloorDiffuse.tif -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CalibrationFloorDiffuse.tif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca7ba913502c8bb44a66350131805326 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: -1 31 | maxTextureSize: 4096 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: 3 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 512 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 512 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 512 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 512 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CalibrationFloorNormals.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeLocTai/rock-generator/f93afeaf323accbdbb08c83f05714f0765fd0814/Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CalibrationFloorNormals.tif -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CalibrationFloorNormals.tif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 768fa469bdce74c4984c44cbb180b832 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 1 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 1 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: -1 31 | maxTextureSize: 512 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 2 35 | aniso: 3 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 1 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 256 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 256 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 256 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 256 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CalibrationFloorSpecularGloss.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeLocTai/rock-generator/f93afeaf323accbdbb08c83f05714f0765fd0814/Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CalibrationFloorSpecularGloss.tif -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/SceneTextures/CalibrationFloorSpecularGloss.tif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6185fa454db669040887c980e20126fe 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: -1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: 3 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 256 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 256 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 256 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 256 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Skyboxes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 034ebc452a861634f9bc38d20b139fd9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Skyboxes/EveningReflection.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeLocTai/rock-generator/f93afeaf323accbdbb08c83f05714f0765fd0814/Assets/Rockgen/Demo/Web Generator/CalibrationScene/Skyboxes/EveningReflection.hdr -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Skyboxes/EveningReflection.hdr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7bed68887a07e34394d4191b3081359 3 | TextureImporter: 4 | fileIDToRecycleName: 5 | 8900000: generatedCubemap 6 | externalObjects: {} 7 | serializedVersion: 9 8 | mipmaps: 9 | mipMapMode: 1 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | streamingMipmaps: 0 26 | streamingMipmapsPriority: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 2 30 | seamlessCubemap: 1 31 | textureFormat: -1 32 | maxTextureSize: 1024 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 2 36 | aniso: 1 37 | mipBias: -100 38 | wrapU: 1 39 | wrapV: 1 40 | wrapW: 1 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 0 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 0 56 | textureShape: 2 57 | singleChannelComponent: 0 58 | maxTextureSizeSet: 0 59 | compressionQualitySet: 0 60 | textureFormatSet: 0 61 | platformSettings: 62 | - serializedVersion: 2 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 128 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | - serializedVersion: 2 74 | buildTarget: Standalone 75 | maxTextureSize: 128 76 | resizeAlgorithm: 0 77 | textureFormat: -1 78 | textureCompression: 1 79 | compressionQuality: 50 80 | crunchedCompression: 0 81 | allowsAlphaSplitting: 0 82 | overridden: 0 83 | androidETC2FallbackOverride: 0 84 | - serializedVersion: 2 85 | buildTarget: Android 86 | maxTextureSize: 128 87 | resizeAlgorithm: 0 88 | textureFormat: -1 89 | textureCompression: 1 90 | compressionQuality: 50 91 | crunchedCompression: 0 92 | allowsAlphaSplitting: 0 93 | overridden: 0 94 | androidETC2FallbackOverride: 0 95 | - serializedVersion: 2 96 | buildTarget: WebGL 97 | maxTextureSize: 128 98 | resizeAlgorithm: 0 99 | textureFormat: -1 100 | textureCompression: 1 101 | compressionQuality: 50 102 | crunchedCompression: 0 103 | allowsAlphaSplitting: 0 104 | overridden: 0 105 | androidETC2FallbackOverride: 0 106 | spriteSheet: 107 | serializedVersion: 2 108 | sprites: [] 109 | outline: [] 110 | physicsShape: [] 111 | bones: [] 112 | spriteID: 113 | vertices: [] 114 | indices: 115 | edges: [] 116 | weights: [] 117 | spritePackingTag: 118 | pSDRemoveMatte: 0 119 | pSDShowRemoveMatteOption: 0 120 | userData: 121 | assetBundleName: 122 | assetBundleVariant: 123 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Skyboxes/EveningReflection.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: EveningReflection 11 | m_Shader: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _MAPPING_LATITUDE_LONGITUDE_LAYOUT _SUNDISK_HIGH_QUALITY 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BackTex: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _BumpMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailAlbedoMap: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailMask: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailNormalMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _DownTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _EmissionMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _FrontTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _LeftTex: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _MainTex: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _MetallicGlossMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _OcclusionMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | - _ParallaxMap: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | - _RightTex: 75 | m_Texture: {fileID: 0} 76 | m_Scale: {x: 1, y: 1} 77 | m_Offset: {x: 0, y: 0} 78 | - _Tex: 79 | m_Texture: {fileID: 8900000, guid: a7bed68887a07e34394d4191b3081359, type: 3} 80 | m_Scale: {x: 1, y: 1} 81 | m_Offset: {x: 0, y: 0} 82 | - _UpTex: 83 | m_Texture: {fileID: 0} 84 | m_Scale: {x: 1, y: 1} 85 | m_Offset: {x: 0, y: 0} 86 | m_Floats: 87 | - _AtmosphereThickness: 1 88 | - _BumpScale: 1 89 | - _Cutoff: 0.5 90 | - _DetailNormalMapScale: 1 91 | - _DstBlend: 0 92 | - _Exposure: 1 93 | - _GlossMapScale: 1 94 | - _Glossiness: 0.5 95 | - _GlossyReflections: 1 96 | - _ImageType: 0 97 | - _Layout: 0 98 | - _Mapping: 1 99 | - _Metallic: 0 100 | - _MirrorOnBack: 0 101 | - _Mode: 0 102 | - _OcclusionStrength: 1 103 | - _Parallax: 0.02 104 | - _Rotation: 0 105 | - _SmoothnessTextureChannel: 0 106 | - _SpecularHighlights: 1 107 | - _SrcBlend: 1 108 | - _SunDisk: 2 109 | - _SunSize: 0.04 110 | - _SunSizeConvergence: 5 111 | - _UVSec: 0 112 | - _ZWrite: 1 113 | m_Colors: 114 | - _Color: {r: 1, g: 1, b: 1, a: 1} 115 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 116 | - _GroundColor: {r: 0.369, g: 0.349, b: 0.341, a: 1} 117 | - _SkyTint: {r: 0.5, g: 0.5, b: 0.5, a: 1} 118 | - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 119 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/CalibrationScene/Skyboxes/EveningReflection.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 507a91f1dcc513745837d259f58dee43 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/DragOrbit.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace RockGen.Unity.Demo 4 | { 5 | public class DragOrbit : MonoBehaviour 6 | { 7 | public Transform target; 8 | public float xSpeed = 20.0f; 9 | public float ySpeed = 20.0f; 10 | public float scrollSpeed = 5f; 11 | public float yMinLimit = -90f; 12 | public float yMaxLimit = 90f; 13 | public float distanceMin = 10f; 14 | public float distanceMax = 10f; 15 | 16 | float rotationYAxis = 0.0f; 17 | float rotationXAxis = 0.0f; 18 | float distance = 2.0f; 19 | 20 | // Use this for initialization 21 | void Start() 22 | { 23 | Vector3 angles = transform.eulerAngles; 24 | rotationYAxis = angles.y; 25 | rotationXAxis = angles.x; 26 | 27 | distance = Vector3.Distance(transform.position, target.transform.position); 28 | } 29 | 30 | void LateUpdate() 31 | { 32 | if (GUIUtility.hotControl != 0) return; 33 | 34 | if (Input.GetMouseButton(0)) 35 | { 36 | rotationYAxis += xSpeed * distance * Input.GetAxis("Mouse X"); 37 | rotationXAxis -= ySpeed * distance * Input.GetAxis("Mouse Y"); 38 | rotationXAxis = ClampAngle(rotationXAxis, yMinLimit, yMaxLimit); 39 | } 40 | 41 | Quaternion rotation = Quaternion.Euler(rotationXAxis, rotationYAxis, 0); 42 | 43 | distance = Mathf.Clamp(distance - Input.GetAxis("Mouse ScrollWheel") * scrollSpeed, distanceMin, distanceMax); 44 | 45 | Vector3 negDistance = new Vector3(0.0f, 0.0f, -distance); 46 | Vector3 position = rotation * negDistance + target.position; 47 | 48 | transform.rotation = rotation; 49 | transform.position = position; 50 | } 51 | 52 | public static float ClampAngle(float angle, float min, float max) 53 | { 54 | if (angle < -360F) 55 | angle += 360F; 56 | if (angle > 360F) 57 | angle -= 360F; 58 | return Mathf.Clamp(angle, min, max); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/DragOrbit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 881b321e7c0467a4d9b2307dac7a91b8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/FrameTime.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Text; 6 | using UnityEngine; 7 | using UnityEngine.UI; 8 | 9 | namespace RockGen.Unity.Demo 10 | { 11 | [RequireComponent(typeof(Text))] 12 | public class FrameTime : MonoBehaviour 13 | { 14 | public static FrameTime Instance { get; private set; } 15 | 16 | readonly Dictionary jobs = new Dictionary(); 17 | readonly StringBuilder sb = new StringBuilder(); 18 | readonly Stopwatch stopwatch = new Stopwatch(); 19 | 20 | Text text; 21 | 22 | void Awake() 23 | { 24 | if (Instance == null) 25 | Instance = this; 26 | else 27 | Destroy(this); 28 | } 29 | 30 | void Start() 31 | { 32 | text = GetComponent(); 33 | } 34 | 35 | public void StartWork(string name) 36 | { 37 | jobs.Add(name, 0); 38 | stopwatch.Restart(); 39 | } 40 | 41 | public void EndWork(string name) 42 | { 43 | stopwatch.Stop(); 44 | jobs[name] = stopwatch.Elapsed.TotalMilliseconds; 45 | } 46 | 47 | int MaxNameLength; 48 | 49 | void Update() 50 | { 51 | sb.Clear(); 52 | 53 | sb.AppendLine("Frame Time (ms):"); 54 | AppendTime("Total", Time.deltaTime); 55 | 56 | MaxNameLength = jobs.Select(j => j.Key).Append("Total").Max(n => n.Length) + 2; 57 | foreach (var job in jobs) 58 | { 59 | AppendTime(job.Key, job.Value); 60 | } 61 | 62 | jobs.Clear(); 63 | 64 | text.text = sb.ToString(); 65 | } 66 | 67 | void AppendTime(string name, double duration) 68 | { 69 | sb.Append(name); 70 | sb.Append(": "); 71 | sb.AppendLine(duration.ToString("F2").PadLeft(MaxNameLength)); 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/FrameTime.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73e96a06e2fc4f1fb3f5b2e64dca7e75 3 | timeCreated: 1586845122 -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/RockBehavior.cs: -------------------------------------------------------------------------------- 1 | using MeshDecimator.Math; 2 | using UnityEngine; 3 | using Vector3 = UnityEngine.Vector3; 4 | 5 | namespace RockGen.Unity.Demo 6 | { 7 | // Mostly for debugging. 8 | public class RockBehavior : MonoBehaviour 9 | { 10 | [Header("Debug")] 11 | public bool debug; 12 | 13 | public Color debugColor = Color.white; 14 | 15 | internal RockGenerator generator; 16 | MeshFilter meshFilter; 17 | 18 | void OnEnable() 19 | { 20 | meshFilter = GetComponent(); 21 | generator = new RockGenerator(); 22 | 23 | generator.foundNearest += OnSettingsOnfoundNearest; 24 | } 25 | 26 | void OnSettingsOnfoundNearest(Vector3d vertex, Vector3d normal, Vector3d nearest) 27 | { 28 | if (debug) 29 | { 30 | var vert = new Vector3((float) vertex.x, (float) vertex.y, (float) vertex.z); 31 | var norm = new Vector3((float) normal.x, (float) normal.y, (float) normal.z); 32 | var near = new Vector3((float) nearest.x, (float) nearest.y, (float) nearest.z); 33 | Debug.DrawLine(vert, near, debugColor); 34 | Debug.DrawRay(vert, norm * .2f, Color.green); 35 | } 36 | } 37 | 38 | internal void UpdateMesh() 39 | { 40 | FrameTime.Instance.StartWork("Gen"); 41 | meshFilter.mesh = Convert.ToUnityMesh(generator.MakeRock()); 42 | FrameTime.Instance.EndWork("Gen"); 43 | } 44 | 45 | void OnDrawGizmos() 46 | { 47 | if (!debug) return; 48 | if (generator == null) return; 49 | 50 | foreach (var point in generator.Grid.points) 51 | { 52 | Gizmos.DrawSphere(ToUV3(point), .03f); 53 | } 54 | 55 | for (var z = 1; z < generator.Settings.GridSettings.Size; z++) 56 | for (var y = 1; y < generator.Settings.GridSettings.Size; y++) 57 | for (var x = 1; x < generator.Settings.GridSettings.Size; x++) 58 | { 59 | Gizmos.DrawLine(ToUV3(generator.Grid.points[x - 1, y, z]), ToUV3(generator.Grid.points[x, y, z])); 60 | Gizmos.DrawLine(ToUV3(generator.Grid.points[x, y - 1, z]), ToUV3(generator.Grid.points[x, y, z])); 61 | Gizmos.DrawLine(ToUV3(generator.Grid.points[x, y, z - 1]), ToUV3(generator.Grid.points[x, y, z])); 62 | } 63 | } 64 | 65 | Vector3 ToUV3(Vector3d v) 66 | { 67 | return new Vector3((float) v.x, (float) v.y, (float) v.z); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/RockBehavior.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef3dd27ee4e54b45becacfad988e4a9a 3 | timeCreated: 1585984439 -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/RockGeneratorGUIRuntime.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace RockGen.Unity.Demo 4 | { 5 | public class RockGeneratorGUIRuntime : MonoBehaviour 6 | { 7 | private readonly RockGenerationSettings defaultSettings = new RockGenerationSettings { 8 | GridSettings = new VoronoiGridSettings { 9 | Size = 10, 10 | Randomness = .75f 11 | }, 12 | StockDensity = 16, 13 | TargetTriangleCount = 2000, 14 | Distortion = .5f, 15 | PatternSize = 1.35f, 16 | Transform = Convert.FromUnityMatrix(UnityEngine.Matrix4x4.TRS(new Vector3(2.5f, 2.5f, 2.5f), 17 | Quaternion.identity, 18 | Vector3.one)) 19 | }; 20 | 21 | 22 | RockBehavior rock; 23 | Mesh mesh; 24 | GUIStyle bgStyle; 25 | 26 | void Start() 27 | { 28 | rock = FindObjectOfType(); 29 | 30 | rock.generator.Settings = defaultSettings; 31 | rock.UpdateMesh(); 32 | 33 | 34 | var bgTex = new Texture2D(1, 1); 35 | bgTex.SetPixel(0, 0, new Color(.15f, .15f, .15f, .95f)); 36 | bgTex.Apply(); 37 | bgStyle = new GUIStyle { 38 | normal = { 39 | background = bgTex 40 | }, 41 | padding = new RectOffset(8, 8, 8, 8), 42 | fixedWidth = 360, 43 | stretchHeight = false, 44 | }; 45 | } 46 | 47 | void OnGUI() 48 | { 49 | if (rock == null || rock.generator == null) return; 50 | 51 | GUILayout.BeginVertical(bgStyle); 52 | 53 | if (RockGeneratorGUI.OnGUI(rock.generator)) 54 | { 55 | rock.UpdateMesh(); 56 | } 57 | 58 | GUILayout.EndVertical(); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/RockGeneratorGUIRuntime.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3f339b6cbb39f9448d2c5d1b5b047e9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/VizMeshNormal.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace RockGen.Unity.Demo 4 | { 5 | public class VizMeshNormal : MonoBehaviour 6 | { 7 | MeshFilter mf; 8 | 9 | void OnEnable() 10 | { 11 | mf = GetComponent(); 12 | } 13 | 14 | void OnDrawGizmosSelected() 15 | { 16 | if (!enabled) return; 17 | if (!mf) return; 18 | 19 | var m = mf.mesh; 20 | var v = m.vertices; 21 | var n = m.normals; 22 | 23 | for (var i = 0; i < v.Length; i++) 24 | { 25 | Gizmos.DrawRay(transform.TransformPoint(v[i]), 26 | transform.TransformDirection(n[i]) * .2f); 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/VizMeshNormal.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 035e5a4363d94ce6abd8e8c09fa1ec61 3 | timeCreated: 1586160149 -------------------------------------------------------------------------------- /Assets/Rockgen/Demo/Web Generator/Web Generator.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93a7788f38c1e6247b14e17bee6e57a9 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Rockgen/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9aa40b41e70b274e9857060f6b589b3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Editor/RockGeneratorWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace RockGen.Unity 5 | { 6 | public class RockGeneratorWindow : EditorWindow 7 | { 8 | private readonly RockGenerationSettings defaultSettings = new RockGenerationSettings { 9 | GridSettings = new VoronoiGridSettings { 10 | Size = 10, 11 | Randomness = .75f 12 | }, 13 | StockDensity = 8, 14 | TargetTriangleCount = 220, 15 | Distortion = .5f, 16 | PatternSize = 1.35f, 17 | Transform = Convert.FromUnityMatrix(UnityEngine.Matrix4x4.TRS(new Vector3(2.5f, 2.5f, 2.5f), 18 | Quaternion.identity, 19 | Vector3.one)) 20 | }; 21 | 22 | static Texture2D backgroundTexture; 23 | 24 | [MenuItem("Tools/Rock Generator")] 25 | private static void ShowWindow() 26 | { 27 | var window = GetWindow(); 28 | window.titleContent = new GUIContent("Rock Generator"); 29 | window.Show(); 30 | } 31 | 32 | RockGenerator generator; 33 | MeshDecimator.Mesh mesh; 34 | 35 | GameObject previewObj; 36 | MeshFilter previewMeshFilter; 37 | Editor previewEditor; 38 | GUIStyle previewBackground; 39 | 40 | void Initialize() 41 | { 42 | RockGeneratorGUI.fileExported += HandleFileExported; 43 | 44 | generator = new RockGenerator {Settings = defaultSettings}; 45 | previewObj = new GameObject {hideFlags = HideFlags.HideAndDontSave}; 46 | previewMeshFilter = previewObj.AddComponent(); 47 | 48 | var renderer = previewObj.AddComponent(); 49 | renderer.material = Resources.Load("Rock"); 50 | 51 | previewObj.SetActive(false); 52 | 53 | backgroundTexture = new Texture2D(1, 1); 54 | backgroundTexture.SetPixel(0, 0, new Color(.5f, .5f, .5f)); 55 | backgroundTexture.Apply(); 56 | previewBackground = new GUIStyle {normal = {background = backgroundTexture}}; 57 | 58 | CreateMesh(); 59 | } 60 | 61 | ~RockGeneratorWindow() 62 | { 63 | RockGeneratorGUI.fileExported -= HandleFileExported; 64 | DestroyImmediate(previewObj); 65 | DestroyImmediate(previewEditor); 66 | } 67 | 68 | static void HandleFileExported(string path) 69 | { 70 | AssetDatabase.Refresh(); 71 | } 72 | 73 | void CreateMesh() 74 | { 75 | mesh = generator.MakeRock(); 76 | 77 | previewMeshFilter.mesh = Convert.ToUnityMesh(mesh); 78 | 79 | if (previewEditor) 80 | DestroyImmediate(previewEditor); 81 | 82 | previewEditor = Editor.CreateEditor(previewObj); 83 | } 84 | 85 | private void OnGUI() 86 | { 87 | if (generator == null) Initialize(); 88 | 89 | if (RockGeneratorGUI.OnGUI(generator)) 90 | CreateMesh(); 91 | 92 | previewObj.SetActive(true); 93 | previewEditor.OnInteractivePreviewGUI(GUILayoutUtility.GetRect(200, 200), previewBackground); 94 | previewObj.SetActive(false); 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /Assets/Rockgen/Editor/RockGeneratorWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f9a9c37cc5aa7148853dfc0aa02b385 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/LICENSE.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c9694c553f75614683f58fb0d516ef1 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Rockgen/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 644af9d0580b90f42a7c0897705ba431 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Plugins/JSHelper.jslib: -------------------------------------------------------------------------------- 1 | mergeInto(LibraryManager.library, { 2 | TriggerDownloadTextFile: function (pData, pFilename) { 3 | var data = Pointer_stringify(pData) 4 | var filename = Pointer_stringify(pFilename) 5 | 6 | var file = new Blob([data], { type: 'text/plain' }); 7 | var a = document.createElement("a"), 8 | url = URL.createObjectURL(file); 9 | a.href = url; 10 | a.download = filename; 11 | document.body.appendChild(a); 12 | a.click(); 13 | setTimeout(function () { 14 | document.body.removeChild(a); 15 | window.URL.revokeObjectURL(url); 16 | }, 0); 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /Assets/Rockgen/Plugins/JSHelper.jslib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d925a431fcf1fcf4b9afec4e6c2f5111 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Facebook: WebGL 27 | second: 28 | enabled: 1 29 | settings: {} 30 | - first: 31 | WebGL: WebGL 32 | second: 33 | enabled: 1 34 | settings: {} 35 | userData: 36 | assetBundleName: 37 | assetBundleVariant: 38 | -------------------------------------------------------------------------------- /Assets/Rockgen/Plugins/MeshDecimator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeLocTai/rock-generator/f93afeaf323accbdbb08c83f05714f0765fd0814/Assets/Rockgen/Plugins/MeshDecimator.dll -------------------------------------------------------------------------------- /Assets/Rockgen/Plugins/MeshDecimator.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 619e774e404797240b5a58438e9359e1 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Assets/Rockgen/Plugins/MeshDecimator.xml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c166fa814092c5c499b11b6ffabbdba8 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Rockgen/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbfd9fddb8177654db38a04079c12656 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Resources/Rock.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Rock 11 | m_Shader: {fileID: 4800000, guid: 9eca40c80638f764eb94a9786d8d1d8a, type: 3} 12 | m_ShaderKeywords: _EMISSION 13 | m_LightmapFlags: 0 14 | m_EnableInstancingVariants: 1 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 2800000, guid: 1d8673aad6705f643b43121ccd7889bf, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _Displace: 39 | m_Texture: {fileID: 2800000, guid: 1af988e51574fe74fb499c6422278ca2, type: 3} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _DisplacementTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _EmissionMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MainTex: 51 | m_Texture: {fileID: 2800000, guid: 6405b98efc144274fa7758d16774df80, type: 3} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _OcclusionMap: 59 | m_Texture: {fileID: 2800000, guid: 96896937c6558d5479d54571cf504727, type: 3} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _ParallaxMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _RoughnessMap: 67 | m_Texture: {fileID: 2800000, guid: 4247d2c0128619b4ba1da800b724bc6a, type: 3} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - _BlendOp: 0 72 | - _BumpScale: 1 73 | - _CameraFadingEnabled: 0 74 | - _CameraFarFadeDistance: 2 75 | - _CameraNearFadeDistance: 1 76 | - _ColorMode: 0 77 | - _Cull: 2 78 | - _Cutoff: 0.5 79 | - _DetailNormalMapScale: 1 80 | - _Displace_Scale: 0.03 81 | - _DistortionBlend: 0.5 82 | - _DistortionEnabled: 0 83 | - _DistortionStrength: 1 84 | - _DistortionStrengthScaled: 0 85 | - _DstBlend: 0 86 | - _EmissionEnabled: 0 87 | - _FlipbookMode: 0 88 | - _GlossMapScale: 1 89 | - _Glossiness: 0.128 90 | - _GlossyReflections: 1 91 | - _LightingEnabled: 1 92 | - _MaxDisplacement: 1 93 | - _Metallic: 0 94 | - _Mode: 0 95 | - _OcclusionStrength: 1 96 | - _Parallax: 0.0481 97 | - _Roughness: 1 98 | - _Sharpness: 64 99 | - _Smoothness: 0 100 | - _SmoothnessTextureChannel: 0 101 | - _SoftParticlesEnabled: 0 102 | - _SoftParticlesFarFadeDistance: 1 103 | - _SoftParticlesNearFadeDistance: 0 104 | - _SpecularHighlights: 1 105 | - _SrcBlend: 1 106 | - _UVSec: 0 107 | - _ZWrite: 1 108 | m_Colors: 109 | - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0} 110 | - _Color: {r: 1, g: 1, b: 1, a: 1} 111 | - _ColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0} 112 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 113 | - _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0} 114 | -------------------------------------------------------------------------------- /Assets/Rockgen/Resources/Rock.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 907cf6e0f1844c743aa53a42ea33fa75 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Resources/Triplanar.shader: -------------------------------------------------------------------------------- 1 | // Adaptation of 2 | // Normal Mapping for a Triplanar Shader - Ben Golus 2017 3 | // Unity Surface Shader example shader 4 | 5 | // Implements correct triplanar normals in a Surface Shader with out computing or passing additional information from the 6 | // vertex shader. 7 | 8 | Shader "Triplanar/Surface Shader (RNM)" { 9 | Properties { 10 | _MainTex ("Albedo (RGB)", 2D) = "white" {} 11 | [NoScaleOffset][Normal] _BumpMap("Normal Map", 2D) = "bump" {} 12 | _Roughness("Roughness", Range(0, 1)) = 0.5 13 | [NoScaleOffset] _RoughnessMap("Roughness Map", 2D) = "white" {} 14 | [Gamma] _Metallic("Metallic", Range(0, 1)) = 0 15 | [NoScaleOffset] _OcclusionMap("Occlusion", 2D) = "white" {} 16 | _OcclusionStrength("Strength", Range(0.0, 1.0)) = 1.0 17 | } 18 | SubShader { 19 | Tags { "RenderType"="Opaque" } 20 | LOD 200 21 | 22 | CGPROGRAM 23 | // Physically based Standard lighting model, and enable shadows on all light types 24 | #pragma surface surf Standard fullforwardshadows 25 | 26 | // Use shader model 3.0 target, to get nicer looking lighting 27 | #pragma target 3.0 28 | 29 | #include "UnityStandardUtils.cginc" 30 | 31 | // flip UVs horizontally to correct for back side projection 32 | #define TRIPLANAR_CORRECT_PROJECTED_U 33 | 34 | // offset UVs to prevent obvious mirroring 35 | // #define TRIPLANAR_UV_OFFSET 36 | 37 | // Reoriented Normal Mapping 38 | // http://blog.selfshadow.com/publications/blending-in-detail/ 39 | // Altered to take normals (-1 to 1 ranges) rather than unsigned normal maps (0 to 1 ranges) 40 | half3 blend_rnm(half3 n1, half3 n2) 41 | { 42 | n1.z += 1; 43 | n2.xy = -n2.xy; 44 | 45 | return n1 * dot(n1, n2) / n1.z - n2; 46 | } 47 | 48 | sampler2D _MainTex; 49 | float4 _MainTex_ST; 50 | 51 | sampler2D _BumpMap; 52 | sampler2D _OcclusionMap; 53 | sampler2D _RoughnessMap; 54 | 55 | half _Roughness; 56 | half _Metallic; 57 | 58 | half _OcclusionStrength; 59 | 60 | struct Input { 61 | float3 worldPos; 62 | float3 worldNormal; 63 | INTERNAL_DATA 64 | }; 65 | 66 | float3 WorldToTangentNormalVector(Input IN, float3 normal) { 67 | float3 t2w0 = WorldNormalVector(IN, float3(1,0,0)); 68 | float3 t2w1 = WorldNormalVector(IN, float3(0,1,0)); 69 | float3 t2w2 = WorldNormalVector(IN, float3(0,0,1)); 70 | float3x3 t2w = float3x3(t2w0, t2w1, t2w2); 71 | return normalize(mul(t2w, normal)); 72 | } 73 | 74 | void surf (Input IN, inout SurfaceOutputStandard o) { 75 | // work around bug where IN.worldNormal is always (0,0,0)! 76 | IN.worldNormal = WorldNormalVector(IN, float3(0,0,1)); 77 | 78 | // calculate triplanar blend 79 | half3 triblend = saturate(pow(IN.worldNormal, 4)); 80 | triblend /= max(dot(triblend, half3(1,1,1)), 0.0001); 81 | 82 | // calculate triplanar uvs 83 | // applying texture scale and offset values ala TRANSFORM_TEX macro 84 | float2 uvX = IN.worldPos.zy * _MainTex_ST.xy + _MainTex_ST.zy; 85 | float2 uvY = IN.worldPos.xz * _MainTex_ST.xy + _MainTex_ST.zy; 86 | float2 uvZ = IN.worldPos.xy * _MainTex_ST.xy + _MainTex_ST.zy; 87 | 88 | // offset UVs to prevent obvious mirroring 89 | #if defined(TRIPLANAR_UV_OFFSET) 90 | uvY += 0.33; 91 | uvZ += 0.67; 92 | #endif 93 | 94 | // minor optimization of sign(). prevents return value of 0 95 | half3 axisSign = IN.worldNormal < 0 ? -1 : 1; 96 | 97 | // flip UVs horizontally to correct for back side projection 98 | #if defined(TRIPLANAR_CORRECT_PROJECTED_U) 99 | uvX.x *= axisSign.x; 100 | uvY.x *= axisSign.y; 101 | uvZ.x *= -axisSign.z; 102 | #endif 103 | 104 | // albedo textures 105 | fixed4 colX = tex2D(_MainTex, uvX); 106 | fixed4 colY = tex2D(_MainTex, uvY); 107 | fixed4 colZ = tex2D(_MainTex, uvZ); 108 | fixed4 col = colX * triblend.x + colY * triblend.y + colZ * triblend.z; 109 | 110 | // roughness textures 111 | half roughX = tex2D(_RoughnessMap, uvX).r; 112 | half roughY = tex2D(_RoughnessMap, uvY).r; 113 | half roughZ = tex2D(_RoughnessMap, uvZ).r; 114 | half rough = LerpOneTo(roughX * triblend.x + roughY * triblend.y + roughZ * triblend.z, _OcclusionStrength) * _Roughness; 115 | 116 | // occlusion textures 117 | half occX = tex2D(_OcclusionMap, uvX).g; 118 | half occY = tex2D(_OcclusionMap, uvY).g; 119 | half occZ = tex2D(_OcclusionMap, uvZ).g; 120 | half occ = LerpOneTo(occX * triblend.x + occY * triblend.y + occZ * triblend.z, _OcclusionStrength); 121 | 122 | // tangent space normal maps 123 | half3 tnormalX = UnpackNormal(tex2D(_BumpMap, uvX)); 124 | half3 tnormalY = UnpackNormal(tex2D(_BumpMap, uvY)); 125 | half3 tnormalZ = UnpackNormal(tex2D(_BumpMap, uvZ)); 126 | 127 | // flip normal maps' x axis to account for flipped UVs 128 | #if defined(TRIPLANAR_CORRECT_PROJECTED_U) 129 | tnormalX.x *= axisSign.x; 130 | tnormalY.x *= axisSign.y; 131 | tnormalZ.x *= -axisSign.z; 132 | #endif 133 | 134 | half3 absVertNormal = abs(IN.worldNormal); 135 | 136 | // swizzle world normals to match tangent space and apply reoriented normal mapping blend 137 | tnormalX = blend_rnm(half3(IN.worldNormal.zy, absVertNormal.x), tnormalX); 138 | tnormalY = blend_rnm(half3(IN.worldNormal.xz, absVertNormal.y), tnormalY); 139 | tnormalZ = blend_rnm(half3(IN.worldNormal.xy, absVertNormal.z), tnormalZ); 140 | 141 | // apply world space sign to tangent space Z 142 | tnormalX.z *= axisSign.x; 143 | tnormalY.z *= axisSign.y; 144 | tnormalZ.z *= axisSign.z; 145 | 146 | // sizzle tangent normals to match world normal and blend together 147 | half3 worldNormal = normalize( 148 | tnormalX.zyx * triblend.x + 149 | tnormalY.xzy * triblend.y + 150 | tnormalZ.xyz * triblend.z 151 | ); 152 | 153 | // set surface ouput properties 154 | o.Albedo = col.rgb; 155 | o.Metallic = _Metallic; 156 | o.Smoothness = 1 - rough; 157 | o.Occlusion = occ; 158 | 159 | // convert world space normals into tangent normals 160 | o.Normal = WorldToTangentNormalVector(IN, worldNormal); 161 | } 162 | ENDCG 163 | } 164 | FallBack "Diffuse" 165 | } 166 | -------------------------------------------------------------------------------- /Assets/Rockgen/Resources/Triplanar.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9eca40c80638f764eb94a9786d8d1d8a 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e85cf473acfea404f8571bbad1392570 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/GUI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34b6c359372500541aac9d99feb2eea3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/GUI/GUIChangedScope.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace RockGen.Unity { 5 | public class GUIChangedScope : IDisposable 6 | { 7 | readonly bool wasChanged; 8 | 9 | public GUIChangedScope() 10 | { 11 | wasChanged = GUI.changed; 12 | GUI.changed = false; 13 | } 14 | 15 | public void Dispose() 16 | { 17 | GUI.changed |= wasChanged; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/GUI/GUIChangedScope.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 245cc6676a8b42b48987226943b6f63a 3 | timeCreated: 1587286914 -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/GUI/RockGeneratorGUI.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Text.RegularExpressions; 4 | using Rockgen.Unity; 5 | using UnityEngine; 6 | using static UnityEngine.GUILayout; 7 | using Random = UnityEngine.Random; 8 | 9 | namespace RockGen.Unity 10 | { 11 | public static class RockGeneratorGUI 12 | { 13 | static readonly int MAX_LABEL_WIDTH; 14 | static readonly int CHARACTER_WIDTH; 15 | 16 | static readonly Vector3 DEFAULT_POS = new Vector3(2.5f, 2.5f, 2.5f); 17 | 18 | static RockGeneratorGUI() 19 | { 20 | CHARACTER_WIDTH = 7; 21 | 22 | var settings = new RockGenerationSettings(); 23 | 24 | MAX_LABEL_WIDTH = new[] { 25 | nameof(settings.StockDensity), 26 | nameof(settings.TargetTriangleCount), 27 | nameof(settings.Distortion), 28 | }.Max(n => n.Length) * CHARACTER_WIDTH; 29 | } 30 | 31 | public static event Action fileExported; 32 | 33 | static Quaternion rotation = Quaternion.identity; 34 | 35 | public static bool OnGUI(RockGenerator generator) 36 | { 37 | var groupStyle = GUI.skin.box; 38 | var newSettings = new RockGenerationSettings(generator.Settings); 39 | 40 | using (var vs = new VerticalScope(groupStyle)) 41 | { 42 | newSettings.StockDensity = SettingSlider(nameof(newSettings.StockDensity), 43 | newSettings.StockDensity, 2, 16, "N1"); 44 | newSettings.TargetTriangleCount = Mathf.RoundToInt( 45 | SettingSlider(nameof(newSettings.TargetTriangleCount), 46 | newSettings.TargetTriangleCount, 50, 2000, 47 | "N0", 48 | logScale: true 49 | ) 50 | ); 51 | } 52 | 53 | using (var vs = new VerticalScope(groupStyle)) 54 | { 55 | using (var gcs = new GUIChangedScope()) 56 | { 57 | var Uniformity = Mathf.Clamp01(1 - newSettings.GridSettings.Randomness); 58 | Uniformity = SettingSlider(nameof(Uniformity), Uniformity, 0, 1); 59 | 60 | if (GUI.changed) 61 | { 62 | newSettings.GridSettings = new VoronoiGridSettings(newSettings.GridSettings) { 63 | Randomness = 1 - Uniformity 64 | }; 65 | } 66 | } 67 | 68 | newSettings.Distortion = SettingSlider(nameof(newSettings.Distortion), 69 | newSettings.Distortion, -1, 1); 70 | newSettings.PatternSize = SettingSlider(nameof(newSettings.PatternSize), 71 | newSettings.PatternSize, .5f, 2.5f); 72 | } 73 | 74 | using (var vs = new VerticalScope(groupStyle)) 75 | using (var gcs = new GUIChangedScope()) 76 | { 77 | var scale = newSettings.Scale; 78 | Label("Shape:"); 79 | var newX = SettingSlider("X", Mathf.Clamp((float) scale.X, .5f, 2), 0.5f, 2); 80 | var newY = SettingSlider("Y", Mathf.Clamp((float) scale.Y, .5f, 2), 0.5f, 2); 81 | var newZ = (float) scale.Z; 82 | 83 | if (GUI.changed) 84 | { 85 | var m = UnityEngine.Matrix4x4.TRS(DEFAULT_POS, 86 | rotation, 87 | new Vector3(newX, newY, newZ)); 88 | newSettings.Transform = Convert.FromUnityMatrix(m); 89 | } 90 | } 91 | 92 | if (Button("Make Rock")) 93 | { 94 | var newGridSettings = new VoronoiGridSettings(newSettings.GridSettings); 95 | newGridSettings.Randomness += 1e-6f; 96 | 97 | newSettings.Transform = Convert.FromUnityMatrix( 98 | UnityEngine.Matrix4x4.TRS(DEFAULT_POS + Random.insideUnitSphere, 99 | rotation = Random.rotation, 100 | Convert.ToVector3(newSettings.Scale)) 101 | ); 102 | 103 | newSettings.GridSettings = newGridSettings; 104 | } 105 | 106 | var settingsChanged = GUI.changed; 107 | if (settingsChanged) 108 | generator.Settings = newSettings; 109 | 110 | if (Button("Save this one")) 111 | { 112 | var path = FileSaver.SaveMesh(generator.LatestMesh, "rock"); 113 | OnFileExported(path); 114 | } 115 | 116 | return settingsChanged; 117 | } 118 | 119 | static float SettingSlider(string varName, 120 | float value, float min, float max, 121 | string format = "N", 122 | bool autoLabel = true, 123 | bool logScale = false) 124 | { 125 | BeginHorizontal(); 126 | if (autoLabel) 127 | { 128 | var label = Regex.Replace(varName, @"([A-Z]+?)", " $1"); 129 | Label(label, MaxWidth(MAX_LABEL_WIDTH)); 130 | } 131 | 132 | if (logScale) 133 | { 134 | value = Mathf.Log(value); 135 | min = Mathf.Log(min); 136 | max = Mathf.Log(max); 137 | } 138 | 139 | float newVal = HorizontalSlider(value, min, max, ExpandWidth(true)); 140 | 141 | if (logScale) 142 | { 143 | newVal = Mathf.Exp(newVal); 144 | } 145 | 146 | Label(newVal.ToString(format), Width(5 * CHARACTER_WIDTH)); 147 | EndHorizontal(); 148 | return newVal; 149 | } 150 | 151 | static void OnFileExported(string path) 152 | { 153 | fileExported?.Invoke(path); 154 | } 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/GUI/RockGeneratorGUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a95882b568348fa42858c2f7eafb53e6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen.Unity.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RockGen.Unity", 3 | "references": [ 4 | "RockGen" 5 | ], 6 | "optionalUnityReferences": [], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [] 14 | } -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen.Unity.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 367bcf293072f524482fbf1830fe7fbb 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d2e5f3aea269cf4aa8b93772ee51813 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/Matrix4x4.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MeshDecimator.Math; 3 | 4 | namespace RockGen 5 | { 6 | // Subset of System.Numerics.Matrix4x4 7 | public struct Matrix4x4 8 | { 9 | /// The first element of the first row. 10 | public float M11 { get; set; } 11 | 12 | /// The second element of the first row. 13 | public float M12 { get; set; } 14 | 15 | /// The third element of the first row. 16 | public float M13 { get; set; } 17 | 18 | /// The fourth element of the first row. 19 | public float M14 { get; set; } 20 | 21 | /// The first element of the second row. 22 | public float M21 { get; set; } 23 | 24 | /// The second element of the second row. 25 | public float M22 { get; set; } 26 | 27 | /// The third element of the second row. 28 | public float M23 { get; set; } 29 | 30 | /// The fourth element of the second row. 31 | public float M24 { get; set; } 32 | 33 | /// The first element of the third row. 34 | public float M31 { get; set; } 35 | 36 | /// The second element of the third row. 37 | public float M32 { get; set; } 38 | 39 | /// The third element of the third row. 40 | public float M33 { get; set; } 41 | 42 | /// The fourth element of the third row. 43 | public float M34 { get; set; } 44 | 45 | /// The first element of the fourth row. 46 | public float M41 { get; set; } 47 | 48 | /// The second element of the fourth row. 49 | public float M42 { get; set; } 50 | 51 | /// The third element of the fourth row. 52 | public float M43 { get; set; } 53 | 54 | /// The fourth element of the fourth row. 55 | public float M44 { get; set; } 56 | 57 | private static readonly Matrix4x4 _identity = new Matrix4x4 58 | ( 59 | 1f, 0f, 0f, 0f, 60 | 0f, 1f, 0f, 0f, 61 | 0f, 0f, 1f, 0f, 62 | 0f, 0f, 0f, 1f 63 | ); 64 | 65 | /// 66 | /// Returns the multiplicative identity matrix. 67 | /// 68 | public static Matrix4x4 Identity 69 | { 70 | get { return _identity; } 71 | } 72 | 73 | /// 74 | /// Constructs a Matrix4x4 from the given components. 75 | /// 76 | public Matrix4x4(float m11, float m12, float m13, float m14, 77 | float m21, float m22, float m23, float m24, 78 | float m31, float m32, float m33, float m34, 79 | float m41, float m42, float m43, float m44) 80 | { 81 | this.M11 = m11; 82 | this.M12 = m12; 83 | this.M13 = m13; 84 | this.M14 = m14; 85 | 86 | this.M21 = m21; 87 | this.M22 = m22; 88 | this.M23 = m23; 89 | this.M24 = m24; 90 | 91 | this.M31 = m31; 92 | this.M32 = m32; 93 | this.M33 = m33; 94 | this.M34 = m34; 95 | 96 | this.M41 = m41; 97 | this.M42 = m42; 98 | this.M43 = m43; 99 | this.M44 = m44; 100 | } 101 | 102 | /// 103 | /// Attempts to calculate the inverse of the given matrix. If successful, result will contain the inverted matrix. 104 | /// 105 | /// The source matrix to invert. 106 | /// If successful, contains the inverted matrix. 107 | /// True if the source matrix could be inverted; False otherwise. 108 | public static bool Invert(Matrix4x4 matrix, out Matrix4x4 result) 109 | { 110 | // -1 111 | // If you have matrix M, inverse Matrix M can compute 112 | // 113 | // -1 1 114 | // M = --------- A 115 | // det(M) 116 | // 117 | // A is adjugate (adjoint) of M, where, 118 | // 119 | // T 120 | // A = C 121 | // 122 | // C is Cofactor matrix of M, where, 123 | // i + j 124 | // C = (-1) * det(M ) 125 | // ij ij 126 | // 127 | // [ a b c d ] 128 | // M = [ e f g h ] 129 | // [ i j k l ] 130 | // [ m n o p ] 131 | // 132 | // First Row 133 | // 2 | f g h | 134 | // C = (-1) | j k l | = + ( f ( kp - lo ) - g ( jp - ln ) + h ( jo - kn ) ) 135 | // 11 | n o p | 136 | // 137 | // 3 | e g h | 138 | // C = (-1) | i k l | = - ( e ( kp - lo ) - g ( ip - lm ) + h ( io - km ) ) 139 | // 12 | m o p | 140 | // 141 | // 4 | e f h | 142 | // C = (-1) | i j l | = + ( e ( jp - ln ) - f ( ip - lm ) + h ( in - jm ) ) 143 | // 13 | m n p | 144 | // 145 | // 5 | e f g | 146 | // C = (-1) | i j k | = - ( e ( jo - kn ) - f ( io - km ) + g ( in - jm ) ) 147 | // 14 | m n o | 148 | // 149 | // Second Row 150 | // 3 | b c d | 151 | // C = (-1) | j k l | = - ( b ( kp - lo ) - c ( jp - ln ) + d ( jo - kn ) ) 152 | // 21 | n o p | 153 | // 154 | // 4 | a c d | 155 | // C = (-1) | i k l | = + ( a ( kp - lo ) - c ( ip - lm ) + d ( io - km ) ) 156 | // 22 | m o p | 157 | // 158 | // 5 | a b d | 159 | // C = (-1) | i j l | = - ( a ( jp - ln ) - b ( ip - lm ) + d ( in - jm ) ) 160 | // 23 | m n p | 161 | // 162 | // 6 | a b c | 163 | // C = (-1) | i j k | = + ( a ( jo - kn ) - b ( io - km ) + c ( in - jm ) ) 164 | // 24 | m n o | 165 | // 166 | // Third Row 167 | // 4 | b c d | 168 | // C = (-1) | f g h | = + ( b ( gp - ho ) - c ( fp - hn ) + d ( fo - gn ) ) 169 | // 31 | n o p | 170 | // 171 | // 5 | a c d | 172 | // C = (-1) | e g h | = - ( a ( gp - ho ) - c ( ep - hm ) + d ( eo - gm ) ) 173 | // 32 | m o p | 174 | // 175 | // 6 | a b d | 176 | // C = (-1) | e f h | = + ( a ( fp - hn ) - b ( ep - hm ) + d ( en - fm ) ) 177 | // 33 | m n p | 178 | // 179 | // 7 | a b c | 180 | // C = (-1) | e f g | = - ( a ( fo - gn ) - b ( eo - gm ) + c ( en - fm ) ) 181 | // 34 | m n o | 182 | // 183 | // Fourth Row 184 | // 5 | b c d | 185 | // C = (-1) | f g h | = - ( b ( gl - hk ) - c ( fl - hj ) + d ( fk - gj ) ) 186 | // 41 | j k l | 187 | // 188 | // 6 | a c d | 189 | // C = (-1) | e g h | = + ( a ( gl - hk ) - c ( el - hi ) + d ( ek - gi ) ) 190 | // 42 | i k l | 191 | // 192 | // 7 | a b d | 193 | // C = (-1) | e f h | = - ( a ( fl - hj ) - b ( el - hi ) + d ( ej - fi ) ) 194 | // 43 | i j l | 195 | // 196 | // 8 | a b c | 197 | // C = (-1) | e f g | = + ( a ( fk - gj ) - b ( ek - gi ) + c ( ej - fi ) ) 198 | // 44 | i j k | 199 | // 200 | // Cost of operation 201 | // 53 adds, 104 muls, and 1 div. 202 | float a = matrix.M11, b = matrix.M12, c = matrix.M13, d = matrix.M14; 203 | float e = matrix.M21, f = matrix.M22, g = matrix.M23, h = matrix.M24; 204 | float i = matrix.M31, j = matrix.M32, k = matrix.M33, l = matrix.M34; 205 | float m = matrix.M41, n = matrix.M42, o = matrix.M43, p = matrix.M44; 206 | 207 | float kp_lo = k * p - l * o; 208 | float jp_ln = j * p - l * n; 209 | float jo_kn = j * o - k * n; 210 | float ip_lm = i * p - l * m; 211 | float io_km = i * o - k * m; 212 | float in_jm = i * n - j * m; 213 | 214 | float a11 = +(f * kp_lo - g * jp_ln + h * jo_kn); 215 | float a12 = -(e * kp_lo - g * ip_lm + h * io_km); 216 | float a13 = +(e * jp_ln - f * ip_lm + h * in_jm); 217 | float a14 = -(e * jo_kn - f * io_km + g * in_jm); 218 | 219 | float det = a * a11 + b * a12 + c * a13 + d * a14; 220 | 221 | if (Math.Abs(det) < float.Epsilon) 222 | { 223 | result = new Matrix4x4(float.NaN, float.NaN, float.NaN, float.NaN, 224 | float.NaN, float.NaN, float.NaN, float.NaN, 225 | float.NaN, float.NaN, float.NaN, float.NaN, 226 | float.NaN, float.NaN, float.NaN, float.NaN); 227 | return false; 228 | } 229 | 230 | float invDet = 1.0f / det; 231 | 232 | result = new Matrix4x4(); 233 | 234 | result.M11 = a11 * invDet; 235 | result.M21 = a12 * invDet; 236 | result.M31 = a13 * invDet; 237 | result.M41 = a14 * invDet; 238 | 239 | result.M12 = -(b * kp_lo - c * jp_ln + d * jo_kn) * invDet; 240 | result.M22 = +(a * kp_lo - c * ip_lm + d * io_km) * invDet; 241 | result.M32 = -(a * jp_ln - b * ip_lm + d * in_jm) * invDet; 242 | result.M42 = +(a * jo_kn - b * io_km + c * in_jm) * invDet; 243 | 244 | float gp_ho = g * p - h * o; 245 | float fp_hn = f * p - h * n; 246 | float fo_gn = f * o - g * n; 247 | float ep_hm = e * p - h * m; 248 | float eo_gm = e * o - g * m; 249 | float en_fm = e * n - f * m; 250 | 251 | result.M13 = +(b * gp_ho - c * fp_hn + d * fo_gn) * invDet; 252 | result.M23 = -(a * gp_ho - c * ep_hm + d * eo_gm) * invDet; 253 | result.M33 = +(a * fp_hn - b * ep_hm + d * en_fm) * invDet; 254 | result.M43 = -(a * fo_gn - b * eo_gm + c * en_fm) * invDet; 255 | 256 | float gl_hk = g * l - h * k; 257 | float fl_hj = f * l - h * j; 258 | float fk_gj = f * k - g * j; 259 | float el_hi = e * l - h * i; 260 | float ek_gi = e * k - g * i; 261 | float ej_fi = e * j - f * i; 262 | 263 | result.M14 = -(b * gl_hk - c * fl_hj + d * fk_gj) * invDet; 264 | result.M24 = +(a * gl_hk - c * el_hi + d * ek_gi) * invDet; 265 | result.M34 = -(a * fl_hj - b * el_hi + d * ej_fi) * invDet; 266 | result.M44 = +(a * fk_gj - b * ek_gi + c * ej_fi) * invDet; 267 | 268 | return true; 269 | } 270 | } 271 | } 272 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/Matrix4x4.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6697cc9376dc0e64f9935d79086e3792 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/RockGen.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RockGen" 3 | } 4 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/RockGen.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c9b2d6817838d348b64486b3d2d7900 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/RockGenerationSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MeshDecimator.Math; 3 | using Vector3 = MeshDecimator.Math.Vector3; 4 | 5 | namespace RockGen 6 | { 7 | public struct RockGenerationSettings 8 | { 9 | public VoronoiGridSettings GridSettings { get; set; } 10 | 11 | public Matrix4x4 Transform 12 | { 13 | get => transform; 14 | set 15 | { 16 | transform = value; 17 | 18 | Scale = new Vector(Math.Sqrt(transform.M11 * transform.M11 + 19 | transform.M21 * transform.M21 + 20 | transform.M31 * transform.M31), 21 | Math.Sqrt(transform.M12 * transform.M12 + 22 | transform.M22 * transform.M22 + 23 | transform.M32 * transform.M32), 24 | Math.Sqrt(transform.M13 * transform.M13 + 25 | transform.M23 * transform.M23 + 26 | transform.M33 * transform.M33)); 27 | } 28 | } 29 | 30 | public Vector Scale { get; private set; } 31 | 32 | public float StockDensity { get; set; } 33 | public int TargetTriangleCount { get; set; } 34 | public float Distortion { get; set; } 35 | public float PatternSize { get; set; } 36 | 37 | Matrix4x4 transform; 38 | 39 | public RockGenerationSettings(RockGenerationSettings other) : this() 40 | { 41 | Transform = other.Transform; 42 | GridSettings = other.GridSettings; 43 | Scale = other.Scale; 44 | StockDensity = other.StockDensity; 45 | TargetTriangleCount = other.TargetTriangleCount; 46 | Distortion = other.Distortion; 47 | PatternSize = other.PatternSize; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/RockGenerationSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 306008b9ffa35444198923b92592e044 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/RockGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | using MeshDecimator; 4 | using MeshDecimator.Algorithms; 5 | using MeshDecimator.Math; 6 | using RockGen.Primitive; 7 | 8 | namespace RockGen 9 | { 10 | public class RockGenerator 11 | { 12 | public RockGenerationSettings Settings 13 | { 14 | get => settings; 15 | set 16 | { 17 | if (settings.StockDensity != value.StockDensity) 18 | UpdateStockMesh(value); 19 | 20 | if (!settings.GridSettings.Equals(value.GridSettings)) 21 | MakeGrid(value.GridSettings); 22 | 23 | settings = value; 24 | } 25 | } 26 | 27 | public Mesh LatestMesh { get; private set; } 28 | 29 | // For debugging 30 | public event Action foundNearest; 31 | 32 | public VoronoiGrid Grid { get; private set; } 33 | 34 | readonly SphereCubeGenerator sphereCubeGenerator; 35 | RockGenerationSettings settings; 36 | Mesh stockMesh; 37 | 38 | public RockGenerator() 39 | { 40 | sphereCubeGenerator = new SphereCubeGenerator { 41 | Radius = .5f 42 | }; 43 | } 44 | 45 | void MakeGrid(VoronoiGridSettings gridSettings) 46 | { 47 | Grid = new VoronoiGrid(gridSettings); 48 | } 49 | 50 | public void UpdateStockMesh(RockGenerationSettings settings) 51 | { 52 | sphereCubeGenerator.NumSubDivX = (int) Math.Round(settings.StockDensity * settings.Scale.X); 53 | sphereCubeGenerator.NumSubDivY = (int) Math.Round(settings.StockDensity * settings.Scale.Y); 54 | sphereCubeGenerator.NumSubDivZ = (int) Math.Round(settings.StockDensity * settings.Scale.Z); 55 | 56 | stockMesh = sphereCubeGenerator.MakeSphere(); 57 | } 58 | 59 | public Mesh MakeRock() 60 | { 61 | var vertices = new Vector3d[stockMesh.VertexCount]; 62 | 63 | var distort = Settings.Distortion; 64 | 65 | for (var i = 0; i < vertices.Length; i++) 66 | { 67 | var worldPos = Transform(Settings.Transform, stockMesh.Vertices[i]); 68 | var worldNormal = TransformDir(Settings.Transform, stockMesh.Normals[i]); 69 | 70 | var (nearest, nearestDS) = Grid.Nearest(worldPos * Settings.PatternSize); 71 | 72 | var worldResult = worldPos + worldNormal * ((nearestDS - .5) * distort); 73 | 74 | // Keep the scale and rotation 75 | vertices[i] = worldResult - new Vector3d(Settings.Transform.M14, 76 | Settings.Transform.M24, 77 | Settings.Transform.M34); 78 | 79 | OnFoundNearest(worldResult, worldNormal, nearest); 80 | } 81 | 82 | var mesh = new Mesh( 83 | vertices, 84 | stockMesh.Indices 85 | ); 86 | 87 | var simplifier = new FastQuadricMeshSimplification(); 88 | simplifier.Initialize(mesh); 89 | simplifier.DecimateMesh(Settings.TargetTriangleCount); 90 | 91 | mesh = simplifier.ToMesh(); 92 | 93 | mesh.RecalculateNormals(); 94 | 95 | // CalcUV(mesh); 96 | 97 | LatestMesh = mesh; 98 | return mesh; 99 | } 100 | 101 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 102 | static Vector3d Transform(Matrix4x4 m, Vector3d v) 103 | { 104 | return new Vector3d( 105 | m.M11 * v.x + m.M12 * v.y + m.M13 * v.z + m.M14, 106 | m.M21 * v.x + m.M22 * v.y + m.M23 * v.z + m.M24, 107 | m.M31 * v.x + m.M32 * v.y + m.M33 * v.z + m.M34 108 | ); 109 | } 110 | 111 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 112 | static Vector3d TransformDir(Matrix4x4 m, Vector3d v) 113 | { 114 | return new Vector3d( 115 | m.M11 * v.x + m.M12 * v.y + m.M13 * v.z, 116 | m.M21 * v.x + m.M22 * v.y + m.M23 * v.z, 117 | m.M31 * v.x + m.M32 * v.y + m.M33 * v.z 118 | ).Normalized; 119 | } 120 | 121 | // void CalcUV(Mesh mesh) 122 | // { 123 | // var vertices = mesh.vertices; 124 | // var normals = mesh.normals; 125 | // var uv = new Vector2[vertices.Length]; 126 | // 127 | // var center = transform.position; 128 | // var corners = new Vector3[8]; 129 | // var cornersForward = new Vector3[8]; 130 | // grid.GetCellCorners(center, corners); 131 | // 132 | // for (var i = 0; i < corners.Length; i++) 133 | // { 134 | // cornersForward[i] = (center - corners[i]).normalized; 135 | // } 136 | // 137 | // for (int i = 0; i < vertices.Length; i++) 138 | // { 139 | // var worldPos = transform.TransformPoint(vertices[i]); 140 | // var worldNormal = transform.TransformDirection(normals[i]); 141 | // 142 | // var smallestD = float.PositiveInfinity; 143 | // var nearestIndex = 0; 144 | // 145 | // for (var j = 0; j < cornersForward.Length; j++) 146 | // { 147 | // float d = Dot(cornersForward[j], worldNormal); 148 | // 149 | // if (d < smallestD) 150 | // { 151 | // smallestD = d; 152 | // nearestIndex = j; 153 | // } 154 | // } 155 | // 156 | // var normal = cornersForward[nearestIndex]; 157 | // var projected = ProjectPointOnPlane(worldPos, corners[nearestIndex], normal); 158 | // 159 | // var tangent = Cross(normal, up); 160 | // var binormal = Cross(tangent, normal); 161 | // tangent = Cross(normal, binormal); 162 | // 163 | // Debug.DrawRay(worldPos, tangent * .1f, Color.red); 164 | // Debug.DrawRay(worldPos, binormal * .1f, Color.green); 165 | // 166 | // Debug.DrawLine(worldPos, corners[nearestIndex], Color.gray); 167 | // 168 | // uv[i] = new Vector2( 169 | // Dot(projected, tangent), 170 | // Dot(projected, binormal) 171 | // ); 172 | // } 173 | // 174 | // mesh.uv = uv; 175 | // } 176 | // 177 | // static Vector3 ProjectPointOnPlane(Vector3 point, Vector3 planeOrig, Vector3 planeNormal) 178 | // { 179 | // var v = point - planeOrig; 180 | // var dist = Dot(v, planeNormal); 181 | // return point - dist * planeNormal; 182 | // } 183 | 184 | void OnFoundNearest(Vector3d vertex, Vector3d normal, Vector3d nearest) 185 | { 186 | foundNearest?.Invoke(vertex, normal, nearest); 187 | } 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/RockGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5b2e6a2f94a98442b6b14140da06594 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/SphereCubeGenerator.cs: -------------------------------------------------------------------------------- 1 | // Generation algorithm adapted from https://catlikecoding.com/unity/tutorials/cube-sphere/ 2 | 3 | using System.Collections.Generic; 4 | using MeshDecimator; 5 | using MeshDecimator.Math; 6 | using static System.Math; 7 | 8 | namespace RockGen.Primitive 9 | { 10 | public class SphereCubeGenerator 11 | { 12 | public int NumSubDivX 13 | { 14 | get => numSubDivX; 15 | set 16 | { 17 | stateInvalidated = value != numSubDivX; 18 | numSubDivX = value; 19 | } 20 | } 21 | 22 | public int NumSubDivY 23 | { 24 | get => numSubDivY; 25 | set 26 | { 27 | stateInvalidated = value != numSubDivY; 28 | numSubDivY = value; 29 | } 30 | } 31 | 32 | public int NumSubDivZ 33 | { 34 | get => numSubDivZ; 35 | set 36 | { 37 | stateInvalidated = value != numSubDivZ; 38 | numSubDivZ = value; 39 | } 40 | } 41 | 42 | public float Radius 43 | { 44 | get => radius; 45 | set 46 | { 47 | stateInvalidated = Abs(value - radius) < 1e-4f; 48 | radius = value; 49 | } 50 | } 51 | 52 | private float radius; 53 | 54 | private int numSubDivX = -1; 55 | private int numSubDivY = -1; 56 | private int numSubDivZ = -1; 57 | 58 | int verticesCount; 59 | 60 | bool stateInvalidated = true; 61 | 62 | readonly List vertices = new List(); 63 | readonly List normals = new List(); 64 | readonly List triangles = new List(); 65 | 66 | int GetVerticesCount() 67 | { 68 | const int cornerVertices = 8; 69 | 70 | int edgeVertices = (NumSubDivX + NumSubDivY + NumSubDivZ - 3) * 4; 71 | 72 | int faceVertices = ((NumSubDivX - 1) * (NumSubDivY - 1) + 73 | (NumSubDivX - 1) * (NumSubDivZ - 1) + 74 | (NumSubDivY - 1) * (NumSubDivZ - 1)) * 2; 75 | 76 | return cornerVertices + edgeVertices + faceVertices; 77 | } 78 | 79 | private void UpdateState() 80 | { 81 | if (!stateInvalidated) return; 82 | 83 | verticesCount = GetVerticesCount(); 84 | 85 | vertices.Clear(); 86 | normals.Clear(); 87 | triangles.Clear(); 88 | 89 | CreateVertices(); 90 | CreateTriangles(); 91 | } 92 | 93 | private void CreateVertex(int x, int y, int z) 94 | { 95 | var xCoord = x * 2f / numSubDivX - 1f; 96 | var yCoord = y * 2f / numSubDivY - 1f; 97 | var zCoord = z * 2f / numSubDivZ - 1f; 98 | float xSqr = xCoord * xCoord; 99 | float ySqr = yCoord * yCoord; 100 | float zSqr = zCoord * zCoord; 101 | 102 | // https://math.stackexchange.com/questions/118760/can-someone-please-explain-the-cube-to-sphere-mapping-formula-to-me 103 | Vector3d normal = new Vector3d( 104 | xCoord * Sqrt(1f - ySqr / 2f - zSqr / 2f + ySqr * zSqr / 3f), 105 | yCoord * Sqrt(1f - xSqr / 2f - zSqr / 2f + xSqr * zSqr / 3f), 106 | zCoord * Sqrt(1f - xSqr / 2f - ySqr / 2f + xSqr * ySqr / 3f) 107 | ); 108 | 109 | normals.Add(new Vector3(normal)); 110 | vertices.Add(normal * Radius); 111 | } 112 | 113 | void CreateVertices() 114 | { 115 | vertices.Clear(); 116 | 117 | // Walls in spiral 118 | for (int y = 0; y <= NumSubDivY; y++) 119 | { 120 | for (int x = 0; x <= NumSubDivX; x++) 121 | CreateVertex(x, y, 0); 122 | 123 | for (int z = 1; z <= NumSubDivZ; z++) 124 | CreateVertex(NumSubDivX, y, z); 125 | 126 | for (int x = NumSubDivX - 1; x >= 0; x--) 127 | CreateVertex(x, y, NumSubDivZ); 128 | 129 | for (int z = NumSubDivZ - 1; z > 0; z--) 130 | CreateVertex(0, y, z); 131 | } 132 | 133 | // Ceiling 134 | for (int z = 1; z < NumSubDivZ; z++) 135 | for (int x = 1; x < NumSubDivX; x++) 136 | CreateVertex(x, NumSubDivY, z); 137 | 138 | // Floor 139 | for (int z = 1; z < NumSubDivZ; z++) 140 | for (int x = 1; x < NumSubDivX; x++) 141 | CreateVertex(x, 0, z); 142 | } 143 | 144 | void AddQuad(int v00, int v10, int v01, int v11) 145 | { 146 | triangles.Add(v00); 147 | triangles.Add(v01); 148 | triangles.Add(v10); 149 | triangles.Add(v10); 150 | triangles.Add(v01); 151 | triangles.Add(v11); 152 | } 153 | 154 | private void CreateCeilingFace(int ring) 155 | { 156 | int v = ring * NumSubDivY; 157 | for (int x = 0; x < NumSubDivX - 1; x++, v++) 158 | AddQuad(v, v + 1, v + ring - 1, v + ring); 159 | 160 | AddQuad(v, v + 1, v + ring - 1, v + 2); 161 | 162 | int vMin = ring * (NumSubDivY + 1) - 1; 163 | int vMid = vMin + 1; 164 | int vMax = v + 2; 165 | 166 | for (int z = 1; z < NumSubDivZ - 1; z++, vMin--, vMid++, vMax++) 167 | { 168 | AddQuad(vMin, vMid, vMin - 1, vMid + NumSubDivX - 1); 169 | for (int x = 1; x < NumSubDivX - 1; x++, vMid++) 170 | AddQuad(vMid, vMid + 1, vMid + NumSubDivX - 1, vMid + NumSubDivX); 171 | 172 | AddQuad(vMid, vMax, vMid + NumSubDivX - 1, vMax + 1); 173 | } 174 | 175 | int vTop = vMin - 2; 176 | AddQuad(vMin, vMid, vTop + 1, vTop); 177 | for (int x = 1; x < NumSubDivX - 1; x++, vTop--, vMid++) 178 | AddQuad(vMid, vMid + 1, vTop, vTop - 1); 179 | 180 | AddQuad(vMid, vTop - 2, vTop, vTop - 1); 181 | } 182 | 183 | private void CreateFloorFace(int ringSize) 184 | { 185 | int vMid = verticesCount - (NumSubDivX - 1) * (NumSubDivZ - 1); 186 | AddQuad(ringSize - 1, vMid, 0, 1); 187 | int v = 1; 188 | for (int x = 1; x < NumSubDivX - 1; x++, v++, vMid++) 189 | AddQuad(vMid, vMid + 1, v, v + 1); 190 | 191 | AddQuad(vMid, v + 2, v, v + 1); 192 | 193 | int vMin = ringSize - 2; 194 | vMid -= numSubDivX - 2; 195 | int vMax = v + 2; 196 | 197 | for (int z = 1; z < numSubDivZ - 1; z++, vMin--, vMid++, vMax++) 198 | { 199 | AddQuad(vMin, vMid + numSubDivX - 1, vMin + 1, vMid); 200 | for (int x = 1; x < numSubDivX - 1; x++, vMid++) 201 | AddQuad(vMid + numSubDivX - 1, vMid + numSubDivX, vMid, vMid + 1); 202 | 203 | AddQuad(vMid + numSubDivX - 1, vMax + 1, vMid, vMax); 204 | } 205 | 206 | int vTop = vMin - 1; 207 | AddQuad(vTop + 1, vTop, vTop + 2, vMid); 208 | for (int x = 1; x < numSubDivX - 1; x++, vTop--, vMid++) 209 | AddQuad(vTop, vTop - 1, vMid, vMid + 1); 210 | 211 | AddQuad(vTop, vTop - 1, vMid, vTop - 2); 212 | } 213 | 214 | private void CreateTriangles() 215 | { 216 | triangles.Clear(); 217 | 218 | int ringSize = (NumSubDivX + NumSubDivZ) * 2; 219 | int v = 0; 220 | 221 | for (int y = 0; y < NumSubDivY; y++, v++) 222 | { 223 | for (int q = 0; q < NumSubDivZ; q++, v++) 224 | AddQuad(v, v + 1, v + ringSize, v + ringSize + 1); 225 | 226 | for (int q = 0; q < NumSubDivX; q++, v++) 227 | AddQuad(v, v + 1, v + ringSize, v + ringSize + 1); 228 | 229 | for (int q = 0; q < NumSubDivZ - 1; q++, v++) 230 | AddQuad(v, v + 1, v + ringSize, v + ringSize + 1); 231 | 232 | for (int q = 0; q < NumSubDivX; q++, v++) 233 | AddQuad(v, v + 1, v + ringSize, v + ringSize + 1); 234 | 235 | AddQuad(v, v - ringSize + 1, v + ringSize, v + 1); 236 | } 237 | 238 | CreateCeilingFace(ringSize); 239 | CreateFloorFace(ringSize); 240 | } 241 | 242 | public Mesh MakeSphere() 243 | { 244 | UpdateState(); 245 | 246 | var mesh = new Mesh(vertices.ToArray(), triangles.ToArray()) { 247 | Normals = normals.ToArray() 248 | }; 249 | 250 | return mesh; 251 | } 252 | } 253 | } 254 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/SphereCubeGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 419311f9949a1904595692868db34565 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/Vector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RockGen 4 | { 5 | public struct Vector 6 | { 7 | public double X { get; set; } 8 | public double Y { get; set; } 9 | public double Z { get; set; } 10 | 11 | public Vector(double x, double y, double z) 12 | { 13 | X = x; 14 | Y = y; 15 | Z = z; 16 | } 17 | 18 | public double GetMagnitude() 19 | { 20 | return Math.Sqrt(X * X + Y * Y + Z * Z); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/Vector.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2719192cb3f94b8da47bc2aa0dee6ae9 3 | timeCreated: 1587199167 -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/VoronoiGrid.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MeshDecimator.Math; 3 | using static System.Math; 4 | 5 | namespace RockGen 6 | { 7 | public class VoronoiGrid 8 | { 9 | readonly VoronoiGridSettings settings; 10 | readonly Random rnd; 11 | 12 | public readonly Vector3d[,,] points; 13 | 14 | public VoronoiGrid(VoronoiGridSettings settings) 15 | { 16 | this.settings = settings; 17 | rnd = new Random(); 18 | 19 | points = new Vector3d[settings.Size, settings.Size, settings.Size]; 20 | 21 | for (var z = 0; z < settings.Size; z++) 22 | for (var y = 0; y < settings.Size; y++) 23 | for (var x = 0; x < settings.Size; x++) 24 | { 25 | var cellCenter = new Vector3(x, y, z); 26 | points[x, y, z] = cellCenter + RandomDir() * (settings.Randomness / 2f); 27 | } 28 | } 29 | 30 | (int, int, int) WorldToGridCoord(Vector3d worldPos) 31 | { 32 | return (Clamp((int) Floor(worldPos.x), 0, settings.Size - 1), 33 | Clamp((int) Floor(worldPos.y), 0, settings.Size - 1), 34 | Clamp((int) Floor(worldPos.z), 0, settings.Size - 1) 35 | ); 36 | } 37 | 38 | static int Clamp(int val, int min, int max) 39 | { 40 | return Min(Max(val, min), max); 41 | } 42 | 43 | public (Vector3d, double) Nearest(Vector3d target) 44 | { 45 | var nearest = points[0, 0, 0]; 46 | var nearestD = double.PositiveInfinity; 47 | 48 | var (cellX, cellY, cellZ) = WorldToGridCoord(target); 49 | 50 | int startZ = Max(0, cellZ - 2); 51 | int startY = Max(0, cellY - 2); 52 | int startX = Max(0, cellX - 2); 53 | 54 | int endZ = Min(settings.Size, cellZ + 2); 55 | int endY = Min(settings.Size, cellY + 2); 56 | int endX = Min(settings.Size, cellX + 2); 57 | 58 | for (int z = startZ; z < endZ; z++) 59 | for (int y = startY; y < endY; y++) 60 | for (int x = startX; x < endX; x++) 61 | { 62 | var d = (points[x, y, z] - target).MagnitudeSqr; 63 | if (d < nearestD) 64 | { 65 | nearest = points[x, y, z]; 66 | nearestD = d; 67 | } 68 | } 69 | 70 | return (nearest, (nearestD)); 71 | } 72 | 73 | // public void GetCellCorners(Vector3 position, Vector3[] corners) 74 | // { 75 | // if (corners.Length != 8) throw new ArgumentException(nameof(corners) + " should be length 8"); 76 | // 77 | // var (x, y, z) = WorldToGridCoord(position); 78 | // 79 | // corners[0] = points[x, y, z]; 80 | // corners[1] = points[x + 1, y, z]; 81 | // corners[2] = points[x, y + 1, z]; 82 | // corners[3] = points[x, y, z + 1]; 83 | // corners[4] = points[x + 1, y + 1, z]; 84 | // corners[5] = points[x, y + 1, z + 1]; 85 | // corners[6] = points[x + 1, y, z + 1]; 86 | // corners[7] = points[x + 1, y + 1, z + 1]; 87 | // } 88 | 89 | Vector3d RandomDir() 90 | { 91 | // http://stackoverflow.com/questions/5408276/python-uniform-spherical-distribution 92 | var phi = rnd.NextDouble() * 2d * PI; 93 | var cosTheta = rnd.NextDouble() * 2d - 1d; 94 | var sinTheta = Sqrt(1 - cosTheta * cosTheta); 95 | var r = Pow(rnd.NextDouble(), 1 / 3d); 96 | 97 | var rSinTheta = r * sinTheta; 98 | 99 | return new Vector3d( 100 | rSinTheta * Cos(phi), 101 | rSinTheta * Sin(phi), 102 | r * cosTheta 103 | ); 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/VoronoiGrid.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9bb0a612ffd0c8d46a00558307924998 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/VoronoiGridSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RockGen 4 | { 5 | public struct VoronoiGridSettings 6 | { 7 | public int Size { get; set; } 8 | public float Randomness { get; set; } 9 | 10 | public VoronoiGridSettings(VoronoiGridSettings other) : this() 11 | { 12 | Size = other.Size; 13 | Randomness = other.Randomness; 14 | } 15 | 16 | public bool Equals(VoronoiGridSettings other) 17 | { 18 | return Size == other.Size && Randomness.Equals(other.Randomness); 19 | } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | return obj is VoronoiGridSettings other && Equals(other); 24 | } 25 | 26 | public override int GetHashCode() 27 | { 28 | unchecked 29 | { 30 | return (Size * 397) ^ Randomness.GetHashCode(); 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/VoronoiGridSettings.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 770c2bbb9c48c884aad61e34e0144627 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/WaveFrontObjExporter.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Text; 3 | using MeshDecimator; 4 | 5 | namespace RockGen.Unity 6 | { 7 | public static class WaveFrontObjExporter 8 | { 9 | public static string ToObjString(Mesh mesh) 10 | { 11 | StringBuilder sb = new StringBuilder(); 12 | 13 | // Unity use left handed coord systems 14 | // Obj use right handed 15 | for (var i = 0; i < mesh.Vertices.Length; i++) 16 | { 17 | var vertex = mesh.Vertices[i]; 18 | sb.Append("v "); 19 | sb.Append(-vertex.x); 20 | sb.Append(" "); 21 | sb.Append(vertex.y); 22 | sb.Append(" "); 23 | sb.Append(vertex.z); 24 | sb.AppendLine(); 25 | } 26 | 27 | for (var i = 0; i < mesh.Normals.Length; i++) 28 | { 29 | var normal = mesh.Normals[i]; 30 | sb.Append("vn "); 31 | sb.Append(-normal.x); 32 | sb.Append(" "); 33 | sb.Append(normal.y); 34 | sb.Append(" "); 35 | sb.Append(normal.z); 36 | sb.AppendLine(); 37 | } 38 | 39 | var indices = mesh.GetIndices(0); 40 | for (var i = 0; i < indices.Length; i += 3) 41 | { 42 | // indices is 1-indexed 43 | var (i0, i1, i2) = (indices[i + 0] + 1, 44 | indices[i + 1] + 1, 45 | indices[i + 2] + 1); 46 | sb.Append("f "); 47 | sb.Append(i1); 48 | sb.Append("//"); 49 | sb.Append(i1); 50 | sb.Append(" "); 51 | sb.Append(i0); 52 | sb.Append("//"); 53 | sb.Append(i0); 54 | sb.Append(" "); 55 | sb.Append(i2); 56 | sb.Append("//"); 57 | sb.Append(i2); 58 | sb.AppendLine(); 59 | } 60 | 61 | return sb.ToString(); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/RockGen/WaveFrontObjExporter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62c9f7cd914f4dfdb7f7b781a2899f82 3 | timeCreated: 1586934471 -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/Utiliies.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e14e9f02f4957940909c6bbb06f106b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/Utiliies/Convert.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using UnityEngine; 3 | 4 | namespace RockGen.Unity 5 | { 6 | public static class Convert 7 | { 8 | public static Vector3 ToVector3(Vector v) 9 | { 10 | return new Vector3( 11 | (float) v.X, 12 | (float) v.Y, 13 | (float) v.Z 14 | ); 15 | } 16 | 17 | public static RockGen.Matrix4x4 FromUnityMatrix(UnityEngine.Matrix4x4 m) 18 | { 19 | return new RockGen.Matrix4x4( 20 | m.m00, m.m01, m.m02, m.m03, 21 | m.m10, m.m11, m.m12, m.m13, 22 | m.m20, m.m21, m.m22, m.m23, 23 | m.m30, m.m31, m.m32, m.m33 24 | ); 25 | } 26 | 27 | public static Mesh ToUnityMesh(MeshDecimator.Mesh dmesh) 28 | { 29 | return new Mesh { 30 | vertices = dmesh.Vertices 31 | .Select(v => new Vector3((float) v.x, 32 | (float) v.y, 33 | (float) v.z)) 34 | .ToArray(), 35 | // uv = dmesh.UV1.Select(uv => new Vector2(uv.x, uv.y)).ToArray(), 36 | triangles = dmesh.GetIndices(0), 37 | normals = dmesh.Normals.Select(v => new Vector3(v.x, v.y, v.z)) 38 | .ToArray() 39 | }; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/Utiliies/Convert.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b9dd8df52786a04ba210a3038aaa5bb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/Utiliies/FileSaver.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Runtime.InteropServices; 3 | using RockGen.Unity; 4 | using UnityEngine; 5 | 6 | namespace Rockgen.Unity 7 | { 8 | public static class FileSaver 9 | { 10 | [DllImport("__Internal")] 11 | public static extern void TriggerDownloadTextFile(string data, string fileName); 12 | 13 | public static string SaveMesh(MeshDecimator.Mesh mesh, string fileName) 14 | { 15 | var fullFileName = Path.ChangeExtension(fileName, "obj"); 16 | var data = WaveFrontObjExporter.ToObjString(mesh); 17 | 18 | #if UNITY_WEBGL && !UNITY_EDITOR 19 | TriggerDownloadTextFile(data, fullFileName); 20 | return fileName; 21 | #else 22 | var path = Path.Combine(Application.dataPath, fullFileName); 23 | File.WriteAllText(path, data); 24 | 25 | return path; 26 | #endif 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Assets/Rockgen/Scripts/Utiliies/FileSaver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 544808de6d3642c68289ce56e5095825 3 | timeCreated: 1586946862 -------------------------------------------------------------------------------- /Assets/Rockgen/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b0a2b8331317c94b8b9fee9bca338c9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_albedo.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeLocTai/rock-generator/f93afeaf323accbdbb08c83f05714f0765fd0814/Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_albedo.tif -------------------------------------------------------------------------------- /Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_albedo.tif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6405b98efc144274fa7758d16774df80 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 256 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 256 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 256 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 256 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_ao.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeLocTai/rock-generator/f93afeaf323accbdbb08c83f05714f0765fd0814/Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_ao.tif -------------------------------------------------------------------------------- /Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_ao.tif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96896937c6558d5479d54571cf504727 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 256 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 256 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 256 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 256 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_normal.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeLocTai/rock-generator/f93afeaf323accbdbb08c83f05714f0765fd0814/Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_normal.tif -------------------------------------------------------------------------------- /Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_normal.tif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d8673aad6705f643b43121ccd7889bf 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 1 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 256 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 256 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 256 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 256 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_roughness.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeLocTai/rock-generator/f93afeaf323accbdbb08c83f05714f0765fd0814/Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_roughness.tif -------------------------------------------------------------------------------- /Assets/Rockgen/Textures/TexturesCom_Rock_CliffVolcanic_512_roughness.tif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4247d2c0128619b4ba1da800b724bc6a 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 10 55 | textureShape: 1 56 | singleChannelComponent: 1 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 256 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 256 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | - serializedVersion: 2 84 | buildTarget: Android 85 | maxTextureSize: 256 86 | resizeAlgorithm: 0 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | androidETC2FallbackOverride: 0 94 | - serializedVersion: 2 95 | buildTarget: WebGL 96 | maxTextureSize: 256 97 | resizeAlgorithm: 0 98 | textureFormat: -1 99 | textureCompression: 1 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | androidETC2FallbackOverride: 0 105 | spriteSheet: 106 | serializedVersion: 2 107 | sprites: [] 108 | outline: [] 109 | physicsShape: [] 110 | bones: [] 111 | spriteID: 112 | vertices: [] 113 | indices: 114 | edges: [] 115 | weights: [] 116 | spritePackingTag: 117 | pSDRemoveMatte: 0 118 | pSDShowRemoveMatteOption: 0 119 | userData: 120 | assetBundleName: 121 | assetBundleVariant: 122 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Le Loc Tai 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | 24 | MeshDecimator 25 | MIT License 26 | 27 | Copyright (c) 2017-2018 Mattias Edlund 28 | 29 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 30 | 31 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 32 | 33 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 34 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ads": "2.0.8", 4 | "com.unity.analytics": "3.2.2", 5 | "com.unity.collab-proxy": "1.2.15", 6 | "com.unity.package-manager-ui": "2.0.8", 7 | "com.unity.purchasing": "2.0.3", 8 | "com.unity.textmeshpro": "1.4.1", 9 | "com.unity.modules.ai": "1.0.0", 10 | "com.unity.modules.animation": "1.0.0", 11 | "com.unity.modules.assetbundle": "1.0.0", 12 | "com.unity.modules.audio": "1.0.0", 13 | "com.unity.modules.cloth": "1.0.0", 14 | "com.unity.modules.director": "1.0.0", 15 | "com.unity.modules.imageconversion": "1.0.0", 16 | "com.unity.modules.imgui": "1.0.0", 17 | "com.unity.modules.jsonserialize": "1.0.0", 18 | "com.unity.modules.particlesystem": "1.0.0", 19 | "com.unity.modules.physics": "1.0.0", 20 | "com.unity.modules.physics2d": "1.0.0", 21 | "com.unity.modules.screencapture": "1.0.0", 22 | "com.unity.modules.terrain": "1.0.0", 23 | "com.unity.modules.terrainphysics": "1.0.0", 24 | "com.unity.modules.tilemap": "1.0.0", 25 | "com.unity.modules.ui": "1.0.0", 26 | "com.unity.modules.uielements": "1.0.0", 27 | "com.unity.modules.umbra": "1.0.0", 28 | "com.unity.modules.unityanalytics": "1.0.0", 29 | "com.unity.modules.unitywebrequest": "1.0.0", 30 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 31 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 32 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 33 | "com.unity.modules.unitywebrequestwww": "1.0.0", 34 | "com.unity.modules.vehicles": "1.0.0", 35 | "com.unity.modules.video": "1.0.0", 36 | "com.unity.modules.vr": "1.0.0", 37 | "com.unity.modules.wind": "1.0.0", 38 | "com.unity.modules.xr": "1.0.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 8 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Rockgen/Demo/Web Generator/Web Generator.unity 10 | guid: 93a7788f38c1e6247b14e17bee6e57a9 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInPlayMode: 1 24 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 40 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 41 | m_PreloadedShaders: [] 42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 43 | type: 0} 44 | m_CustomRenderPipeline: {fileID: 0} 45 | m_TransparencySortMode: 0 46 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 47 | m_DefaultRenderingPath: 1 48 | m_DefaultMobileRenderingPath: 1 49 | m_TierSettings: [] 50 | m_LightmapStripping: 0 51 | m_FogStripping: 0 52 | m_InstancingStripping: 0 53 | m_LightmapKeepPlain: 1 54 | m_LightmapKeepDirCombined: 1 55 | m_LightmapKeepDynamicPlain: 1 56 | m_LightmapKeepDynamicDirCombined: 1 57 | m_LightmapKeepShadowMask: 1 58 | m_LightmapKeepSubtractive: 1 59 | m_FogKeepLinear: 1 60 | m_FogKeepExp: 1 61 | m_FogKeepExp2: 1 62 | m_AlbedoSwatchInfos: [] 63 | m_LightsUseLinearIntensity: 0 64 | m_LightsUseColorTemperature: 0 65 | m_LogWhenShaderIsCompiled: 0 66 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_ReuseCollisionCallbacks: 1 28 | m_AutoSyncTransforms: 0 29 | m_AlwaysShowColliders: 0 30 | m_ShowColliderSleep: 1 31 | m_ShowColliderContacts: 0 32 | m_ShowColliderAABB: 0 33 | m_ContactArrowScale: 0.2 34 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 35 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 36 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 37 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 38 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 39 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.4.15f1 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 1 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 1 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 2 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 40 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 1 164 | antiAliasing: 4 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 1 199 | antiAliasing: 4 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Nintendo 3DS: 5 222 | Nintendo Switch: 5 223 | PS4: 5 224 | PSP2: 2 225 | Standalone: 5 226 | Tizen: 2 227 | WebGL: 1 228 | WiiU: 5 229 | Windows Store Apps: 5 230 | XboxOne: 5 231 | iPhone: 2 232 | tvOS: 2 233 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - PostProcessing 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rock Generator 2 | WIP. 3 | 4 | **Demo**: http://leloctai.com/rock-generator/ 5 | 6 | Everything in the RockGen namespace should work with netstandard 2.0, outside of Unity. 7 | 8 | For use in Unity, some type conversion is required. 9 | 10 | ## Example 11 | 12 | ```c# 13 | // No default are provided at the moment 14 | // Check out the demo page to see what each setings does 15 | 16 | var settings = new RockGenerationSettings { 17 | GridSettings = new VoronoiGridSettings { 18 | Size = 5, 19 | Randomness = .75f 20 | }, 21 | StockDensity = 8, 22 | TargetTriangleCount = 220, 23 | Distortion = .5f, 24 | PatternSize = 1.35f, 25 | Transform = Convert.FromUnityMatrix(UnityEngine.Matrix4x4.TRS(new Vector3(2, 2, 2), 26 | Quaternion.identity, 27 | Vector3.one)) 28 | }; 29 | 30 | generator = new RockGenerator {Settings = settings}; 31 | 32 | GetComponent().mesh = Convert.ToUnityMesh(generator.MakeRock()); 33 | ``` 34 | 35 | Look at the Rock Fountain sample for more details. 36 | 37 | ## Dependencies 38 | 39 | - [MeshDecimator](https://github.com/Whinarn/MeshDecimator) 40 | 41 | ## TODO 42 | 43 | - Simpler work flow in Unity. 44 | - 45 | 46 | ## Sponsors 47 | 48 | Me. My free Unity assets are backed by my paid one. Check them out: 49 | 50 | - [Translucent Image - Fast blurred background UI](https://leloctai.com/asset/translucentimage/) 51 | - [True Shadow - UI Soft Shadow and Glow](https://assetstore.unity.com/packages/slug/176322?aid=1011l4nGC) 52 | --------------------------------------------------------------------------------