Skip to content

Commit 75ce88b

Browse files
committed
feat: adding waxholm78
- Memory *still* fails!! It's something else about the rat atlases that is causing the problems, the 78 atlas is much smaller than the Allen atlas. Could be that the Texture3D objects are too complex? Or could be something about the meshes being larger?
1 parent f1cfaba commit 75ce88b

File tree

4 files changed

+50
-17
lines changed

4 files changed

+50
-17
lines changed

Assets/Scenes/TrajectoryPlanner.unity

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RenderSettings:
3838
m_ReflectionIntensity: 1
3939
m_CustomReflection: {fileID: 0}
4040
m_Sun: {fileID: 0}
41-
m_IndirectSpecularColor: {r: 0.44824904, g: 0.49827605, b: 0.5755831, a: 1}
41+
m_IndirectSpecularColor: {r: 0.44912726, g: 0.49919963, b: 0.5757154, a: 1}
4242
m_UseRadianceAmbientProbe: 0
4343
--- !u!157 &3
4444
LightmapSettings:
@@ -2874,10 +2874,12 @@ MonoBehaviour:
28742874
_atlasNames:
28752875
- allen_mouse_25um
28762876
- whs_sd_rat_39um
2877+
- whs_sd_rat_78um
28772878
_atlasMappings:
28782879
- Mouse CCF (25um)
28792880
- Rat Waxholm (39um)
2880-
_allowedOnWebGL: 0100
2881+
- Rat Waxholm (78um)
2882+
_allowedOnWebGL: 010001
28812883
_transformDropdown: {fileID: 611159662}
28822884
--- !u!1001 &341190943874437988
28832885
PrefabInstance:

Assets/Scripts/Pinpoint/TrajectoryPlannerManager.cs

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -180,25 +180,52 @@ public async void Startup()
180180
}
181181
Settings.ReferenceCoord = referenceAtlas.AtlasSpace.ReferenceCoord;
182182

183-
// there is only one default set right now, tbd if we want to add others (beryl/cosmos/etc)
184-
var nodeTask = _atlasManager.LoadDefaultAreas("");
185183

186-
referenceAtlas.LoadAnnotations();
187-
referenceAtlas.LoadAnnotationTexture();
184+
// [TODO REMOVE THIS CODE WHEN ADDRESSABLES GETS REBUILT
185+
if (Settings.AtlasName.Equals("whs_sd_rat_78um"))
186+
{
187+
var areaIDs = new int[] { 1034, 1096, 1084, 1038, 1081, 1097, 1048, 1057, 1061, 1055, 1059, 1069, 1056, 1065, 1072, 1020, 1047, 58, 1044, 74, 1046, 56, 1045, 75, 1043 };
188+
foreach (int areaID in areaIDs)
189+
{
190+
OntologyNode node = BrainAtlasManager.ActiveReferenceAtlas.Ontology.ID2Node(areaID);
191+
192+
// Load all models
193+
var nodeTask = node.LoadMesh(OntologyNode.OntologyNodeSide.Full);
188194

189-
await Task.WhenAll(new Task[] { referenceAtlas.AnnotationsTask, referenceAtlas.AnnotationTextureTask, nodeTask});
195+
await nodeTask;
190196

191-
foreach (var node in nodeTask.Result)
197+
node.SetVisibility(true, OntologyNode.OntologyNodeSide.Full);
198+
node.SetMaterial(BrainAtlasManager.BrainRegionMaterials["transparent-unlit"], OntologyNode.OntologyNodeSide.Full);
199+
node.ResetColor();
200+
node.SetShaderProperty("_Alpha", 0.25f, OntologyNode.OntologyNodeSide.Full);
201+
_pinpointAtlasManager.DefaultNodes.Add(node);
202+
}
203+
}
204+
else
192205
{
193-
node.SetVisibility(true, OntologyNode.OntologyNodeSide.Full);
194-
node.SetVisibility(false, OntologyNode.OntologyNodeSide.Left);
195-
node.SetVisibility(false, OntologyNode.OntologyNodeSide.Right);
196-
node.SetMaterial(BrainAtlasManager.BrainRegionMaterials["transparent-unlit"]);
197-
node.ResetColor();
198-
node.SetShaderProperty("_Alpha", 0.25f, OntologyNode.OntologyNodeSide.Full);
199-
_pinpointAtlasManager.DefaultNodes.Add(node);
206+
// there is only one default set right now, tbd if we want to add others (beryl/cosmos/etc)
207+
var nodeTask = _atlasManager.LoadDefaultAreas("");
208+
209+
await nodeTask;
210+
211+
foreach (var node in nodeTask.Result)
212+
{
213+
node.SetVisibility(true, OntologyNode.OntologyNodeSide.Full);
214+
node.SetVisibility(false, OntologyNode.OntologyNodeSide.Left);
215+
node.SetVisibility(false, OntologyNode.OntologyNodeSide.Right);
216+
node.SetMaterial(BrainAtlasManager.BrainRegionMaterials["transparent-unlit"]);
217+
node.ResetColor();
218+
node.SetShaderProperty("_Alpha", 0.25f, OntologyNode.OntologyNodeSide.Full);
219+
_pinpointAtlasManager.DefaultNodes.Add(node);
220+
}
200221
}
201222

223+
referenceAtlas.LoadAnnotations();
224+
referenceAtlas.LoadAnnotationTexture();
225+
226+
await Task.WhenAll(new Task[] { referenceAtlas.AnnotationsTask, referenceAtlas.AnnotationTextureTask});
227+
228+
202229
// Now that the areas are loaded we can also set the BLDistance values
203230
SetBLUI();
204231

Assets/UniversalRenderPipelineAsset.asset

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ MonoBehaviour:
104104
m_PrefilterDBufferMRT1: 1
105105
m_PrefilterDBufferMRT2: 1
106106
m_PrefilterDBufferMRT3: 1
107+
m_PrefilterSoftShadowsQualityLow: 1
108+
m_PrefilterSoftShadowsQualityMedium: 1
109+
m_PrefilterSoftShadowsQualityHigh: 1
110+
m_PrefilterSoftShadows: 0
107111
m_PrefilterScreenCoord: 1
108112
m_PrefilterNativeRenderPass: 1
109113
m_ShaderVariantLogLevel: 0

Packages/packages-lock.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,14 @@
223223
"depth": 0,
224224
"source": "git",
225225
"dependencies": {},
226-
"hash": "fc064767fda32b093549649d6b38c12e5008d6dd"
226+
"hash": "2371e91a1be3649cf070837f2248e8328e3ed977"
227227
},
228228
"vbl.urchin": {
229229
"version": "https://github.com/VirtualBrainLab/Urchin.git?path=/UnityClient/Packages/vbl.urchin",
230230
"depth": 0,
231231
"source": "git",
232232
"dependencies": {},
233-
"hash": "519062778b0b9d242835146c04485b87259f2a3f"
233+
"hash": "f12ec151d3730d220ced7350dca8b6f3d170a4d1"
234234
},
235235
"com.unity.modules.ai": {
236236
"version": "1.0.0",

0 commit comments

Comments
 (0)