Upgrade to Pro — share decks privately, control downloads, hide ads and more …

gocon-2022-spring_sponsor-session.pdf

 gocon-2022-spring_sponsor-session.pdf

9e32efa81b675ecd55c166fb7b0a1890?s=128

Cluster Inc.

April 27, 2022
Tweet

More Decks by Cluster Inc.

Other Decks in Technology

Transcript

  1. ϝλόʔεΛࢧ͑Δٕज़ ʙUGCʹᷓΕΔ3DۭؒͷϦΞϧλΠϜ௨৴Λࢧ͑ΔGoʙ Ϋϥελʔגࣜձࣾ thara 2022-04-23 Go Conference 2022 Spring (Online)

  2. Cluster, Inc. All Rights Reserved. ࣗݾ঺հ 2 thara • Tomochika

    Hara (ݪ ஌Ѫ) • Ѫ஌ݝࡏॅϦϞʔτϫʔΧʔ • ૒ࢠͷ෕ • झຯ • NESΤϛϡϨʔλ࣮૷ @zetta1985
  3. Cluster, Inc. All Rights Reserved. ϝλόʔεϓϥοτϑΥʔϜ cluster ͱ͸ 3

  4. Cluster, Inc. All Rights Reserved. ϝλόʔεϓϥοτϑΥʔϜ cluster ͱ͸ 4

  5. Cluster, Inc. All Rights Reserved. ϝλόʔεϓϥοτϑΥʔϜ cluster ͱ͸ 5

  6. Cluster, Inc. All Rights Reserved. ࠓ೔࿩͢͜ͱ 6 • ϝλόʔεΛߏ੒͢Δཁૉٕज़ •

    ϝλόʔεϓϥοτϑΥʔϜͷόοΫΤϯυͱGo • room serverͷมભͱ಺෦ΞʔΩςΫνϟ
  7. ϝλόʔεΛߏ੒͢Δཁૉٕज़

  8. Cluster, Inc. All Rights Reserved. ϝλόʔεΛߏ੒͢Δཁૉٕज़ 8 3࣍ݩͷԾ૝ۭؒ UGC ΤίγεςϜ

  9. Cluster, Inc. All Rights Reserved. 3࣍ݩͷԾ૝ۭؒ 9 • Unity3d •

    ϦΞϧλΠϜಉظ • Ξόλʔͷ࢟੎৘ใ • ϘΠενϟοτ • ϞϊͷҐஔɾ޲͖
  10. Cluster, Inc. All Rights Reserved. UGC ( = User Generated

    Contents) 10 • Ξόλʔ • ϫʔϧυ • Ϋϥϑτ
  11. Cluster, Inc. All Rights Reserved. ΤίγεςϜ 11 • ΞϓϦ಺௨՟ •

    UGCͷചങ • Πϕϯτνέοτ • ΠϕϯτͰͷ౤͛મ
  12. ϝλόʔεϓϥοτϑΥʔϜͷόοΫΤϯυͱGo

  13. Cluster, Inc. All Rights Reserved. શମߏ੒ 13

  14. Cluster, Inc. All Rights Reserved. શମߏ੒ 14 6($ ΤίγεςϜ ࣍ݩͷԾ૝ۭؒ

  15. Cluster, Inc. All Rights Reserved. APIαʔόʔ 15 The Go gopher

    was designed by Renée French. • Ϣʔβʔೝূ • ϑϨϯυ • UGC؅ཧ • ೖࣨ؅ཧ • ܾࡁ
  16. Cluster, Inc. All Rights Reserved. UGCύΠϓϥΠϯ 16 The Go gopher

    was designed by Renée French. • VRM, glTF • reduction • native texture
  17. Cluster, Inc. All Rights Reserved. glTF 17 • JSONʹΑΔ3DϞσϧ΍γʔϯΛදݱ͢ΔσʔλϑΥʔϚοτ •

    ૬ޓӡ༻ɾ༰ྔɾϥϯλΠϜॲཧͷޮ཰Խ • ʮ3Dʹ͓͚ΔJPEGʯ IUUQTHJUIVCDPN,ISPOPT(SPVQHM5'CMPCNBJOTQFDJ fi DBUJPO fi HVSFTHM5'@3(#@+VOFTWH
  18. Cluster, Inc. All Rights Reserved. VRM 18 • ϓϥοτϑΥʔϜඇґଘͷ3DΞόλʔϑΝΠϧϑΥʔϚοτ •

    glTF-2.0Λϕʔεʹ͍ͯ͠Δ • ώϡʔϚϊΠυɾඪ४ͷإૢ࡞ɾҰਓশࢹ఺࠶ݱɾϥΠηϯε IUUQTWSNEFW
  19. Cluster, Inc. All Rights Reserved. VRMΛGoͰѻ͏ 19 https://github.com/qmuntal/gltf ΛϕʔεʹVRMʹରԠ type

    VRMExtension struct{ ... } func init() { gltf.RegisterExtension("VRM", func(data []byte) (interface{}, error) { var vrm VRMExtensio n err := json.Unmarshal(data, vrm ) return vrm, er r } ) } func DecodeVRM(raw []byte) (*gltf.Document, *VRMExtension, error) { var doc gltf.Documen t if err := gltf.NewDecoder(bytes.NewReader(raw)).Decode(&doc); err != nil { // error handling } return &doc, doc.Extensions["VRM"].(*VRMExtension), nil }
  20. Cluster, Inc. All Rights Reserved. reduction/GPU native texture 20 func

    (c *converter) bufferViewImage ( src *gltf.Document, index uint32, dst *gltf.Document) (uint32, string, error) { bv := src.BufferViews[index ] buf, err := modeler.ReadBufferView(src, bv ) if err != nil { // error handling } // reduction & GPU native texture encoding converted, mimeType, err := converter.Convert(buf ) if err != nil { // error handling } newIndex := modeler.WriteBufferView(dst, gltf.TargetNone, converted ) return newIndex, mimeType, nil }
  21. Cluster, Inc. All Rights Reserved. room server 21 The Go

    gopher was designed by Renée French.
  22. room serverͷมભͱ಺෦ΞʔΩςΫνϟ

  23. Cluster, Inc. All Rights Reserved. pubsubͷΈ (room serverҎલ) 23 •

    ۭؒಉظͰ͋Ε͹͜ΕͰे෼ • message΁ͷׯব͸Ͱ͖ͳ͍ • = ࣮ݱͰ͖Δػೳʹ੍ݶ
  24. Cluster, Inc. All Rights Reserved. pubsubͷΈ (room server) 24 •

    ୯ʹMQTTΛ͠Ό΂Δ͚ͩͷ Go੡TCPαʔόʔ • hack͢ΔͨΊͷԼ஍
  25. Cluster, Inc. All Rights Reserved. Actor 25 • client͝ͱͷॲཧ͕Մೳʹ •

    messageͷfiltering • LOD • Ξόλʔ࢟੎৘ใ • ϘΠε
  26. Cluster, Inc. All Rights Reserved. Actor 26

  27. Cluster, Inc. All Rights Reserved. Actor + global state 27

    • globalͳঢ়ଶΛߋ৽Մೳʹ • ϫʔϧυΫϥϑτ • = ஔ͍ͨϞϊͷӬଓԽ
  28. Cluster, Inc. All Rights Reserved. Actor + global state 28

  29. Cluster, Inc. All Rights Reserved. Next…? 29 • ͍ͩͿ໰୊΁ͷཧղ͕ਐΜͩ •

    ൚༻తͳ݁߹͔ΒɺΑΓҙຯ Λ࣋ͬͨߏ଄΁ • ߋͳΔ௨৴ྔ࡟ݮ • UDPϕʔεͷಠࣗϓϩτίϧ
  30. ·ͱΊ

  31. Cluster, Inc. All Rights Reserved. ·ͱΊ 31 • ϝλόʔεΛߏ੒͢Δཁૉٕज़ •

    3࣍ݩͷԾ૝ۭؒ • UGC • ΤίγεςϜ • clusterͰ͸ͦͷόοΫΤϯυΛ Go Ͱ࣮ݱͯ͠·͢
  32. IUUQTSFDSVJUDMVTUFSNVFOHJOFFS

  33. Thanks for Listening