{"id":2330,"date":"2018-01-04T00:01:14","date_gmt":"2018-01-04T00:01:14","guid":{"rendered":"http:\/\/spaceengine.org\/?p=2330"},"modified":"2018-01-03T23:36:23","modified_gmt":"2018-01-03T23:36:23","slug":"custom-models-for-asteroids","status":"publish","type":"post","link":"https:\/\/spaceengine.org\/news\/blog180104\/","title":{"rendered":"Custom 3D models for asteroids"},"content":{"rendered":"<p>The <a href=\"http:\/\/spaceengine.org\/news\/blog170516\/\" target=\"_blank\">new feature<\/a> - static (uncontrollable) ships, space stations and planetary bases - are handled by SE as a fake \"satellites\" with a custom 3D models. They uses a Keplerian orbits as a normal planets or moons do, or a static position relative to the parent body, but are rendered by a ship model instead of a ball with an adaptive terrain mesh. But the same mechanism can be used to render asteroids with a custom 3D model instead of a <a href=\"http:\/\/spaceengine.org\/manual\/making-addons\/planet-textures\/\" rel=\"noopener\" target=\"_blank\">cubemap elevation maps<\/a>, needed to create a planetary body. In this case object is displayed in SE interface as a normal asteroid of dwarf moon, but its model is replaced with a custom \"ship\" model.<\/p>\n<p>This is recently discovered interstellar asteroid <a href=\"https:\/\/en.wikipedia.org\/wiki\/\u02bbOumuamua\" rel=\"noopener\" target=\"_blank\">1I \/ `Oumuamua<\/a>:<\/p>\n<div id=\"attachment_2334\" style=\"width: 1034px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/spaceengine.org\/media\/2017\/12\/scr01145.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2334\" src=\"https:\/\/spaceengine.org\/media\/2017\/12\/scr01145-1024x543.jpg\" alt=\"\" width=\"1024\" height=\"543\" class=\"size-large wp-image-2334\" srcset=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01145-1024x543.jpg 1024w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01145-300x159.jpg 300w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01145-768x407.jpg 768w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01145-700x371.jpg 700w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01145.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><p id=\"caption-attachment-2334\" class=\"wp-caption-text\">Oumuamua at its closest approach to the Earth<\/p><\/div>\n<p>The model is the same as in the <a href=\"https:\/\/www.eso.org\/public\/usa\/news\/eso1737\/?lang\" rel=\"noopener\" target=\"_blank\">ESO press release<\/a>. It was gently given to me by its author Luis Cal\u00e7ada. The model has very big polycount and no textures, so it needs some improvement.<\/p>\n<div id=\"attachment_2331\" style=\"width: 1034px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/spaceengine.org\/media\/2017\/12\/scr01142.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2331\" src=\"https:\/\/spaceengine.org\/media\/2017\/12\/scr01142-1024x543.jpg\" alt=\"\" width=\"1024\" height=\"543\" class=\"size-large wp-image-2331\" srcset=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01142-1024x543.jpg 1024w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01142-300x159.jpg 300w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01142-768x407.jpg 768w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01142-700x371.jpg 700w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01142.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><p id=\"caption-attachment-2331\" class=\"wp-caption-text\">Oumuamua orbit and position <s>today<\/s> on 28 Dec 2017, when I made this screenshot<\/p><\/div>\n<div id=\"attachment_2333\" style=\"width: 1034px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/spaceengine.org\/media\/2017\/12\/scr01144.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2333\" src=\"https:\/\/spaceengine.org\/media\/2017\/12\/scr01144-1024x543.jpg\" alt=\"\" width=\"1024\" height=\"543\" class=\"size-large wp-image-2333\" srcset=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01144-1024x543.jpg 1024w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01144-300x159.jpg 300w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01144-768x407.jpg 768w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01144-700x371.jpg 700w, https:\/\/spaceengine.org\/wp-content\/uploads\/2017\/12\/scr01144.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><p id=\"caption-attachment-2333\" class=\"wp-caption-text\">View from its perspective <s>today<\/s> on 28 Dec 2017, when I made this screenshot<\/p><\/div>\n<p>This is <a href=\"https:\/\/en.wikipedia.org\/wiki\/67P\/Churyumov\u2013Gerasimenko\" rel=\"noopener\" target=\"_blank\">67P \/ Churyumov\u2013Gerasimenko<\/a> comet. Model is not very good, and also has no textures. I have to find a better one.<\/p>\n<p><a href=\"http:\/\/spaceengine.org\/media\/2018\/01\/scr01147.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/spaceengine.org\/media\/2018\/01\/scr01147-1024x543.jpg\" alt=\"\" width=\"1024\" height=\"543\" class=\"alignnone size-large wp-image-2349\" srcset=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2018\/01\/scr01147-1024x543.jpg 1024w, https:\/\/spaceengine.org\/wp-content\/uploads\/2018\/01\/scr01147-300x159.jpg 300w, https:\/\/spaceengine.org\/wp-content\/uploads\/2018\/01\/scr01147-768x407.jpg 768w, https:\/\/spaceengine.org\/wp-content\/uploads\/2018\/01\/scr01147-700x371.jpg 700w, https:\/\/spaceengine.org\/wp-content\/uploads\/2018\/01\/scr01147.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>You may add \u02bbOumuamua to SE 0.980\/0.980e by this script (name the file Oumuamua.sc and save it to data\/catalogs\/planets). Of course, in 0.980 Oumuamua will be rendered as a procedurally generated asteroid model.<\/p>\n<div class=\"se_code\" style=\"border: 1px inset; max-height: 200px; overflow: auto; height: 200px;\">\n\/\/ First detected interstellar object<br \/>\nAsteroid\t\"Oumuamua\/'Oumuamua\/1I|2017 U1\/1I|2017 U1 ('Oumuamua)\"<br \/>\n{<\/p>\n<div class=\"codepaddingleft\">ParentBody  \"Sol\"<\/p>\n<p>\/\/ This will work in 0.990<br \/>\n\/\/Model       \"planets\/Asteroids\/Oumuamua.sss\"<\/p>\n<p>DiscMethod  \"Imaging\"<br \/>\nDiscDate    \"2017.10.19\"<\/p>\n<p>Radius      0.115<br \/>\nAbsMagn     22.08<br \/>\nAlbedoGeom  0.1<\/p>\n<p>RotationPeriod  8.1<\/p>\n<p>Orbit<br \/>\n{<\/p>\n<div class=\"codepaddingleft\">Epoch            2458059.5<br \/>\nMeanMotion       0.6802<br \/>\nSemiMajorAxis    -1.2798<br \/>\nEccentricity     1.19951<br \/>\nInclination      122.69<br \/>\nAscendingNode    24.599<br \/>\nArgOfPericenter  241.70<br \/>\nMeanAnomaly      36.425<\/div>\n<p>}<\/p><\/div>\n<p>}<\/p><\/div>\n<p>As you can see, there is only one new parameter in the script - <b>Model<\/b>, which specifies a path to the <a href=\"http:\/\/spaceengine.org\/manual\/making-addons\/creating-a-ship\/\" rel=\"noopener\" target=\"_blank\">ship scheme file<\/a> (relative to the models\/ virtual subfolder). This mean that any normal ship model can be used for asteroids, including modular SE ships. The only difference that it is saved in the models\/planets\/ folder, instead of models\/spacecraft\/. This way 'Oumuamua's model will be ignored by the Ship manager (i.e. will not be displayed there as a ready-to-use spacecraft).<\/p>\n<p>Before trying to assign a custom model to 'Oumuamua, I've experimented with a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Ellipsoid\" rel=\"noopener\" target=\"_blank\">triaxial elliposoid<\/a> shape for planets. So far planets and stars in SE are oblate spheroids, i.e. flattened spheres. Their oblateness controlled by the <b>Oblateness<\/b> parameter in script and editor. There were no way to make a prolate (egg-like) shapes. Now I've changed oblateness a vector, i.e. now one can specify something like <b>Oblateness (1.0, 0.6, 0.8)<\/b>. So it's possible to make a prolate shapes, like in <a href=\"https:\/\/en.wikipedia.org\/wiki\/Contact_binary\" rel=\"noopener\" target=\"_blank\">close binary<\/a> stars, and also a triaxial ellipsoid shapes. This is needed for objects like <a href=\"https:\/\/en.wikipedia.org\/wiki\/Haumea\" rel=\"noopener\" target=\"_blank\">Haumea<\/a>, <a href=\"https:\/\/en.wikipedia.org\/wiki\/20000_Varuna\" rel=\"noopener\" target=\"_blank\">Varuna<\/a> and even Mimas (almost all \"spherical\" satellites are triaxial ellipsoids).<\/p>\n<div id=\"attachment_2351\" style=\"width: 1034px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/spaceengine.org\/media\/2018\/01\/scr01146.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2351\" src=\"https:\/\/spaceengine.org\/media\/2018\/01\/scr01146-1024x543.jpg\" alt=\"\" width=\"1024\" height=\"543\" class=\"size-large wp-image-2351\" srcset=\"https:\/\/spaceengine.org\/wp-content\/uploads\/2018\/01\/scr01146-1024x543.jpg 1024w, https:\/\/spaceengine.org\/wp-content\/uploads\/2018\/01\/scr01146-300x159.jpg 300w, https:\/\/spaceengine.org\/wp-content\/uploads\/2018\/01\/scr01146-768x407.jpg 768w, https:\/\/spaceengine.org\/wp-content\/uploads\/2018\/01\/scr01146-700x371.jpg 700w, https:\/\/spaceengine.org\/wp-content\/uploads\/2018\/01\/scr01146.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><p id=\"caption-attachment-2351\" class=\"wp-caption-text\">Dwarf planet Haumea has an odd shape, and... rings!<\/p><\/div>\n<p>A three-component <b>Oblateness<\/b> is not a very convenient way to describe a shape, so I've added a new parameter <b>Dimensions (x, y, z)<\/b>, used to describe sizes (diameters) of an object by its three primary axes. You may sometimes see such descriptions in Wikipedia articles. For example, Haumea dimensions are 2322\u2009\u00d7\u20091704\u2009\u00d7\u20091138\u2009km.<\/p>\n<p>Discuss this post on the <a href=\"http:\/\/forum.spaceengine.org\/viewtopic.php?f=6&t=31\" rel=\"noopener\" target=\"_blank\">forum<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The new feature - static (uncontrollable) ships, space stations and planetary bases - are handled by SE as a fake \"satellites\" with a custom 3D models. They uses a Keplerian orbits as a normal planets or moons do, or a static position relative to the...<\/p>\n","protected":false},"author":2,"featured_media":2332,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2330","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts\/2330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/comments?post=2330"}],"version-history":[{"count":8,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts\/2330\/revisions"}],"predecessor-version":[{"id":2357,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/posts\/2330\/revisions\/2357"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/media\/2332"}],"wp:attachment":[{"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/media?parent=2330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/categories?post=2330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spaceengine.org\/wp-json\/wp\/v2\/tags?post=2330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}