Jump to content

Boston

Community Members
  • Posts

    30
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Boston

  1. On 12/10/2022 at 1:24 PM, guerringuerrin said:

    Hey, @Stan`, I'm trying to use the addon you made. It seems like the mesh is imported well but I get this error and no texture is being shown.

    Hey, I'm having the same problem

    I'm using compiled version 1.3.12

    pls help,

    Boston

  2. Today I have started reading through the code, trying to figure out how to export 2d isometric sprites based on the 3d models of actors used in 0 A.D

    My app will look much like the Actor Viewer tool in Atlas.

    Unfortunately I don't know anything, like how create a new "build target" in Pyrogenesis / Atlas and open a new window...

    What do you think?

    Boston

  3. I implemented this code in Object.cpp:

                if (m_ViewerToggle3d == true) {
                    p->m_ScenarioEditor.GetToolManager().GetCurrentTool()->OnCommand(_T("Set 3d"), NULL);
                } else {
                    p->m_ScenarioEditor.GetToolManager().GetCurrentTool()->OnCommand(_T("Set 2d"), NULL);
                }

    I believe this is the "correct" solution.

    I've read that the best place to download the latest source is on SVN but I've also read that you have transitioned to hosting the latest source on GitHub, so which is it?

    Boston

  4. I'd like to split ActorViewerTool.cpp into header and source and include ActorViewerTool.h in Object.cpp

    That would create a new dependency, so would I have to much around with Premake?

    I'm not sure what to do with lines 94 to 169 of ActorViewerTool.cpp, any advice?

    I'll soon be ready to submit a patch to Phabricator. What is the best place to download the current source for modifying and creating a patch?

    Boston.

  5. I was able to implement

    POST_MESSAGE(SetViewParamF, (AtlasMessage::eRenderView::ACTOR, L"Set 2d scale", obj->m_Distance / 5));

    instead of

    POST_MESSAGE(SetViewParamI, (AtlasMessage::eRenderView::ACTOR, L"Set 2d scale", obj->m_Distance / 5));

    for smoother scrolling.

    I need to implement

    POST_MESSAGE(SetViewParamB, (ActorViewerTool, L"Set Toggle 3d", m_Toggle3d));

    Then everything else should fall into place

    Boston

    • Like 2
  6. I can share data between:

    source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ActorViewerTool.cpp

    and:

    source/tools/atlas/GameInterface/View.cpp

    fairly easily by declaring global variables in ActorViewerTool.cpp (and I know this is an ugly hack)

    But

    1. I cannot figure out how to trigger a call to ActorViewerTool::PostLookAt() from View.cpp, to update the display after modifying parameters.
    2. I cannot figure out how to trigger a call to camera.SetOrthoProjection(-2.f, -512.f, XXX); from ActorViewerTool.cpp (in order to change the scale of the image by clicking and dragging on it)

     

     

    • Like 2
  7. I cant get the orthographic camera to work.

    Does anyone have code that works with the orthographic camera?

    Delenda Est, the mod for 0 A.D, uses a perspective camera with a narrow field of view.

    With a narrow field of view you have to place the camera further away to achieve the same level of "zoom"

    If the distance from the camera is too far, details like shadows are no longer drawn.

    Will look into fixing this, tomorrow.

    Boston

    • Like 1
  8. 11 hours ago, vladislavbelov said:

    We have a separate method to set an ortho projection (a classic isometric view is a special case of an orthographic projection).

    I've seen that. I do plan on using it in future, but setting a narrow field of view meant making less changes to the code.

    I have a question. If I do use this to create a bunch of 2d animations, how do I distribute them under the terms of the creative commons licence? 

  9. I am attempting to add a button to the Actor Viewer that will toggle between 2d and 3d projection:

    camera.SetPerspectiveProjection(2.f, 512.f, DEGTORAD(20.f));

    found in source/tools/atlas/GameInterface/View.cpp

    sets the Field Of View, IE how strongly things are effected by perspective.

     

    float m_Distance;

    found on line 38 of source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ActorViewerTool.cpp

    sets the distance from the object being viewed to the camera, IE how large the object appears on screen.

     

    I want to modify both of these at the same time, but I can't for the life of me find a way to send data from source/tools/atlas/GameInterface/View.cpp to source/tools/atlas/AtlasUI/ScenarioEditor/Tools/ActorViewerTool.cpp

     

    Any advice would be appreciated.

    Boston.

     

    • Like 3
×
×
  • Create New...