Jump to content
Korean Random

Рендеринг моделей на сайте в браузере. Как?


Recommended Posts

Всех приветствую! Поиск не принёс результатов.

 

Задача: отображать модели танков в браузере на сайте, чтобы можно было крутить, вертеть + отображать толщину брони, приведенную броню и тд.

Подобным никогда не занимался. Весь мой опыт с 3D заключался когда-то в школе делал карты для контры в Valve Hammer Editor. То есть имею очень общие представления.

 

ИИ советуют конвертировать модельки в glTF формат и рендерить с помощью Three.js.

 

Насколько этот совет правильный? Какие еще варианты есть?

 

Всем спасибо за внимание.

Link to comment
Short link
Share on other sites

The simplest option is to use Three.js. A more complicated option is to use Babylon.js. An even more complex option is to use some kind of solution based on WASM.

 

I recommend looking at (inspect with dev tools) how this is implemented on websites like https://gamemodels3d.com/games/worldoftanks/vehicles/c18 and https://armor.wotinspector.com/en/mirtankov/13825-62/. The former uses Three.js, and the latter uses something intricate based on WASM, compiled from C++ using Emscripten. If you just need to rotate tank models, there's no need for such a complex solution.

 

The choice of format depends on what you want to display. In general, glTF is a very good choice.

Edited by Bazooka
  • Upvote 1
Link to comment
Short link
Share on other sites

Thanks a lot!

What about sites like these:

- https://tanks.gg/tank/su-76i/model

- https://tomato.gg/tanks/60TP-3473/EU?

- https://3d.skill4ltu.eu/Pl15_60TP_Lewandowskiego

 

They support turret rotation and gun movement.

But last two are more interesting, they show penetration chance in real time, depending on the angle while you rotate the model.

 

Looks like they're using something more advanced, than glTF + Three.js. Do you know anything about those websites?

Link to comment
Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...