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

gocon-2022-spring_sponsor-session.pdf

 gocon-2022-spring_sponsor-session.pdf

Cluster, Inc.

April 27, 2022
Tweet

More Decks by Cluster, Inc.

Other Decks in Technology

Transcript

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

    Hara (ݪ ஌Ѫ) • Ѫ஌ݝࡏॅϦϞʔτϫʔΧʔ • ૒ࢠͷ෕ • झຯ • NESΤϛϡϨʔλ࣮૷ @zetta1985
  2. Cluster, Inc. All Rights Reserved. ࠓ೔࿩͢͜ͱ 6 • ϝλόʔεΛߏ੒͢Δཁૉٕज़ •

    ϝλόʔεϓϥοτϑΥʔϜͷόοΫΤϯυͱGo • room serverͷมભͱ಺෦ΞʔΩςΫνϟ
  3. Cluster, Inc. All Rights Reserved. 3࣍ݩͷԾ૝ۭؒ 9 • Unity3d •

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

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

    UGCͷചങ • Πϕϯτνέοτ • ΠϕϯτͰͷ౤͛મ
  6. Cluster, Inc. All Rights Reserved. APIαʔόʔ 15 The Go gopher

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

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

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

    glTF-2.0Λϕʔεʹ͍ͯ͠Δ • ώϡʔϚϊΠυɾඪ४ͷإૢ࡞ɾҰਓশࢹ఺࠶ݱɾϥΠηϯε IUUQTWSNEFW
  10. 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 }
  11. 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 }
  12. Cluster, Inc. All Rights Reserved. room server 21 The Go

    gopher was designed by Renée French.
  13. Cluster, Inc. All Rights Reserved. pubsubͷΈ (room serverҎલ) 23 •

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

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

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

    • globalͳঢ়ଶΛߋ৽Մೳʹ • ϫʔϧυΫϥϑτ • = ஔ͍ͨϞϊͷӬଓԽ
  17. Cluster, Inc. All Rights Reserved. Next…? 29 • ͍ͩͿ໰୊΁ͷཧղ͕ਐΜͩ •

    ൚༻తͳ݁߹͔ΒɺΑΓҙຯ Λ࣋ͬͨߏ଄΁ • ߋͳΔ௨৴ྔ࡟ݮ • UDPϕʔεͷಠࣗϓϩτίϧ
  18. Cluster, Inc. All Rights Reserved. ·ͱΊ 31 • ϝλόʔεΛߏ੒͢Δཁૉٕज़ •

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