Skip to content

Commit 3c87e36

Browse files
committed
Code markdown cleanup
Signed-off-by: AMZN-Gene <[email protected]>
1 parent c3b722f commit 3c87e36

File tree

1 file changed

+80
-135
lines changed

1 file changed

+80
-135
lines changed

rfcs/RFC Feature - USD in the Scene Pipeline.md

Lines changed: 80 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,10 @@ Required O3DE Knowledge
7979
* Familiarity with O3DE Assimp integration.
8080
* [o3de/Code/Tools/SceneAPI/SDKWrapper/AssImpSceneWrapper.cpp at bbc8fa583c34186a9c3ede51b2d6254701c4afca · o3de/o3de (github.com)](https://github.com/o3de/o3de/blob/bbc8fa583c34186a9c3ede51b2d6254701c4afca/Code/Tools/SceneAPI/SDKWrapper/AssImpSceneWrapper.cpp#L91)
8181
* Note: You can debug AssetBuilder.exe by enabling --debug and providing USD asset path. (Must have AssetProcessor.exe running)
82-
83-
[?](#)
84-
85-
`--project-path=``"D:/prj/o3de/AutomatedTesting"` `--debug` `"D:\prj\o3de\AutomatedTesting\Assets\asset.usd"` `--platform pc --tags dx12 --project-name AutomatedTesting --project-cache-path` `"D:\prj\o3de\AutomatedTesting\Cache"`
86-
82+
83+
```
84+
--project-path="D:/prj/o3de/AutomatedTesting" --debug "D:\prj\o3de\AutomatedTesting\Assets\asset.usd" --platform pc --tags dx12 --project-name AutomatedTesting --project-cache-path "D:\prj\o3de\AutomatedTesting\Cache"
85+
```
8786
8887
USD Terminology
8988
---------------
@@ -111,22 +110,16 @@ USD Basics
111110
### Basic USD file
112111
113112
This usda file represents a stage that defines two prims: A transform named "hello" and a sphere child of that transform named "world".
114-
115-
[?](#)
116-
117-
`#usda 1.0`
118-
119-
`def Xform` `"hello"`
120-
121-
`{`
122-
123-
`def Sphere` `"world"`
124-
125-
`{`
126-
127-
`}`
128-
129-
`}`
113+
```
114+
#usda 1.0
115+
116+
def Xform "hello"
117+
{
118+
def Sphere "world"
119+
{
120+
}
121+
}
122+
```
130123
131124
Visual representation of this file:
132125
@@ -138,74 +131,47 @@ This pair of usda files, from [https://graphics.pixar.com/usd/release/tut\_refer
138131
139132
_Below: RefExample.usda references HelloWorld.usda and overrides world's color._
140133
141-
HelloWorld.usda
142-
143-
[?](#)
144-
145-
`#usda 1.0`
146-
147-
`(`
148-
149-
`defaultPrim =` `"hello"`
150-
151-
`)`
152-
153-
`def Xform` `"hello"`
154-
155-
`{`
156-
157-
`double3 xformOp:translate = (4, 5, 6)`
158-
159-
`uniform token[] xformOpOrder = [``"xformOp:translate"``]`
160-
161-
`def Sphere` `"world"`
162-
163-
`{`
164-
165-
`float3[] extent = [(-2, -2, -2), (2, 2, 2)]`
166-
167-
`color3f[] primvars:displayColor = [(0, 0, 1)]`
168-
169-
`double` `radius = 2`
170-
171-
`}`
172-
173-
`}`
174-
134+
_HelloWorld.usda_
175135
```
176-
RefExample.usda
136+
#usda 1.0
137+
(
138+
defaultPrim = "hello"
139+
)
140+
141+
def Xform "hello"
142+
{
143+
double3 xformOp:translate = (4, 5, 6)
144+
uniform token[] xformOpOrder = ["xformOp:translate"]
145+
146+
def Sphere "world"
147+
{
148+
float3[] extent = [(-2, -2, -2), (2, 2, 2)]
149+
color3f[] primvars:displayColor = [(0, 0, 1)]
150+
double radius = 2
151+
}
152+
}
177153
```
178154
179-
[?](#)
180-
181-
`#usda 1.0`
182-
183-
`over` `"refSphere2"` `(`
184-
185-
`prepend references = @./HelloWorld.usda@`
186-
187-
`)`
188-
189-
`{`
190-
191-
`over` `"world"`
192-
193-
`{`
194-
195-
`color3f[] primvars:displayColor = [(1, 0, 0)]`
196-
197-
`}`
198-
199-
`}`
200-
155+
_RefExample.usda_
156+
```
157+
#usda 1.0
158+
over "refSphere2" (
159+
prepend references = @./HelloWorld.usda@)
160+
{
161+
over "world"
162+
{
163+
color3f[] primvars:displayColor = [(1, 0, 0)]
164+
}
165+
}
166+
```
201167
202168
203169
### Beyond the Basics
204170
205171
I recommend reading through the USD tutorials here [https://graphics.pixar.com/usd/release/tut\_usd\_tutorials.html](https://graphics.pixar.com/usd/release/tut_usd_tutorials.html), and experimenting in Blender and Nvidia USD Composer with creating or importing scenes and exporting to usda format files.
206172
207173
Note: Blender does not support references:
208-
_    "Like the USD exporter, the importer does not yet handle more advanced USD concepts, such as layers and references." [Universal Scene Description - Blender 4.2 Manual](https://docs.blender.org/manual/en/latest/files/import_export/usd.html)_
174+
_"Like the USD exporter, the importer does not yet handle more advanced USD concepts, such as layers and references." [Universal Scene Description - Blender 4.2 Manual](https://docs.blender.org/manual/en/latest/files/import_export/usd.html)_
209175
210176
Digital content creation (DCC) tools which takes advantage of USD references are Nvidia Isaac Sim, Nvidia USD Composer, and Pixar tooling.  
211177
@@ -271,25 +237,22 @@ For example, the _suzanne.usdc_ geometry file will be processed correctly and ge
271237
272238
_usdObj-001.usda which references a separate suzanne.usd geometry file._
273239
274-
[?](#)
275-
276-
`def Mesh` `"suzanne"` `(`
277-
278-
`prepend references = @suzanne.usdc@</Suzanne/Suzanne>`
279-
280-
`)`
281-
282-
`{}`
283-
240+
```
241+
def Mesh "suzanne" (
242+
prepend references = @suzanne.usdc@</Suzanne/Suzanne>
243+
)
244+
{}
245+
```
284246
285247
286248
[![](@todo_image)suzanne.usdc](@todo_image) [![](@todo_image)usdObj-001.usda](@todo_image)
287249
288250
![](@todo_image)
289251
290-
[?](#)
291252
292-
`Warning | The builder (Scene Builder) has not indicated it handled outputting product dependencies` `for` `file Assets/usdObj-001.usda.  This is a programmer error.`
253+
```
254+
Warning | The builder (Scene Builder) has not indicated it handled outputting product dependencies for file Assets/usdObj-001.usda.  This is a programmer error.
255+
```
293256
294257
Phase 2 enables referencing...
295258
@@ -313,7 +276,6 @@ Current: FBX Scene File to O3DE Entity
313276
314277
[
315278
316-
Embed Link Embed Link to Hipchat, Jira, Confluence
317279
318280
](#)
319281
@@ -323,36 +285,24 @@ While ultimately the same O3DE entity hierarchy is produced, notice how unlike b
323285
324286
_Car.usd_
325287
326-
[?](#)
327-
328-
`def Xform` `"Xform"`
329-
330-
`{`
331-
332-
`def Mesh` `"carbody"` `(`
333-
334-
`prepend references = @carbody.usdc@</carbody>){}`
335-
336-
`def Mesh` `"tire_1"` `(`
337-
338-
`prepend references = @tire.obj@){`
339-
340-
`double3 xformOp:translate = (1, 0, 0)`
341-
342-
`}`
343-
344-
`def Mesh` `"tire_2"` `(`
345-
346-
`prepend references = @tire.obj@){`
347-
348-
`double3 xformOp:translate = (0, 1, 0)`
349-
350-
`}`
351-
352-
`...`
353-
354-
`}`
355-
288+
```
289+
def Xform "Xform"
290+
{
291+
def Mesh "carbody" (
292+
prepend references = @carbody.usdc@</carbody>){}
293+
294+
def Mesh "tire_1" (
295+
prepend references = @tire.obj@){
296+
double3 xformOp:translate = (1, 0, 0)
297+
}
298+
299+
def Mesh "tire_2" (
300+
prepend references = @tire.obj@){
301+
double3 xformOp:translate = (0, 1, 0)
302+
}
303+
...
304+
}
305+
```
356306
357307
358308
Phase 1 w/ References
@@ -365,7 +315,6 @@ Phase 1 w/ References
365315
366316
[
367317
368-
Embed Link Embed Link to Hipchat, Jira, Confluence
369318
370319
](#)
371320
@@ -383,19 +332,16 @@ Embed Link Embed Link to Hipchat, Jira, Confluence
383332
1. [Load USD as a Layer](https://github.com/lighttransport/tinyusdz/blob/83b4ebc90761e60444e55611238fff6cfb6a62c9/examples/tusdcat/main.cc#L149)
384333
2. [Do compositions (it also returns a layer)](https://github.com/lighttransport/tinyusdz/blob/83b4ebc90761e60444e55611238fff6cfb6a62c9/examples/tusdcat/main.cc#L212)
385334
3. Then [construct Stage from Layer](https://github.com/lighttransport/tinyusdz/blob/910c5740008377976a559c4ff1680292475abc85/src/composition.hh#L210) 
386-
387-
[?](#)
388-
389-
`bool` `LayerToStage(``const` `Layer &layer, Stage *stage`
335+
336+
```
337+
bool LayerToStage(const Layer &layer, Stage *stage
338+
```
390339
391340
4. Then call `tinyusdz::tydra::ListPrims `
392-
393-
[?](#)
394-
395-
`std::map<std::string,` `const` `tinyusdz::GeomMesh*> meshmap;`
396-
397-
`tinyusdz::tydra::ListPrims(stage, meshmap);`
398-
341+
```
342+
std::map<std::string, const tinyusdz::GeomMesh*> meshmap;
343+
tinyusdz::tydra::ListPrims(stage, meshmap);
344+
```
399345
Note: USD can reference other USDs or geometry from other file types (example: obj). As long as the file type is supported by Assimp, we can load this geom and add it to the final flattened Assimp scene.
400346
401347
@@ -412,7 +358,6 @@ Embed Link Embed Link to Hipchat, Jira, Confluence
412358
413359
[
414360
415-
Embed Link Embed Link to Hipchat, Jira, Confluence
416361
417362
](#)
418363

0 commit comments

Comments
 (0)