Coder Social home page Coder Social logo

teamwisp / wispformaya Goto Github PK

View Code? Open in Web Editor NEW
29.0 8.0 3.0 74.82 MB

Bringing real-time ray-tracing to the Maya viewport using the Wisp real-time ray-tracing library.

License: Apache License 2.0

CMake 1.47% Batchfile 0.79% C++ 52.46% HLSL 45.26% AMPL 0.02%
cpp viewport renderer maya autodesk plugin raytracing rtx cpp17 wisp

wispformaya's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wispformaya's Issues

Lights are not updated

Describe the bug
Lights are not updating. color does not change

To Reproduce
Steps to reproduce the behavior:

  1. add a light
  2. changes its properties

Material parser needs improvements

Description
The material parser works fine but needs to be re-worked a lot. During development, I came across some new features from the Maya API that might make the system faster and easier to maintain.

A document about the current system and improvements for it, will be linked within the span of 2 weeks from now.

Easier popup spawning

Make a class or structure to easily spawn a popup in Maya. This will be useful to make the user be aware of unsupported and/or unstable features.

For example, when the user is running on the Fallback layer, we're pretty sure that it will crash. So, we'll pop up a message that the hybrid rendering feature is not supported on their machine.

Plug-in crashes on non-existing textures

Describe the bug
When the plug-in imports a model and a texture path that goes to a non-existing texture, the plug-in crashes saying it's can't find the texture.

To Reproduce
Steps to reproduce the behavior:

  1. Open WispForMaya viewport
  2. Import a model with incorrect texture paths.
  3. Experience the crash

Expected behavior
The plug-in just shouldn't load a texture and fall back on a default value.

System

  • OS: Windows 10
  • Maya 2018
  • Maya version / update 2018.6
  • Graphics card GTX 1050
  • RAM 16GB

Support for all Arnold shaders

It would be nice to have support for every Arnold shader available. It should be fairly trivial to add this to Wisp. My estimation is that this should only be a one / two day task at most.

Force update when necessary

Related to:
Sometimes the mesh loaded into Wisp doesn't update corresponding to the representation in the default Maya viewport. Consistent issue when using bevel on a mesh. It's NOT because the viewport is a frame behind. Moving the camera doesn't fix it.

Solution:
Force a mesh update in the Maya plugin every time a vertex update is detected (or any other useful update). Don't update it every render frame, as you don't want to update all vertices every frame (especially when there are millions of vertices.

Mesh bevel operation updates

The bevel operation works, but only once. So it's impossible to gradually increase/decrease the radius and number of segments of the bevel.

Ghost models after deleting combined mesh

Ghost models appear again.

To Reproduce

  1. Intersect two or more meshes
  2. Delete the new intersected mesh

Expected behavior
Don't have models anymore

System (please complete the following information):

  • OS: Windows 10
  • Maya 2018.6
  • Graphics card: GTX 1050
  • RAM 16GB]

Hybrid rendering pipeline does not resize correctly

Describe the bug
When using the hybrid rendering pipeline, resizing appears to be broken. The screen stays 1280x720 pixels no matter what.

To Reproduce
Steps to reproduce the behavior:

  1. Open Maya.
  2. Load Wisp.
  3. Switch to the Wisp viewport renderer.
  4. Resize the viewport window.

Expected behavior
I expect the viewport to resize just like the deferred renderer does.

Memory leaks

Describe the bug
There's a few minor memory leaks regarding Qt and general destructors.

To Reproduce
Checkout feature_fix_memleak_2 in WispRenderer.
Launch Maya; attach VS; take capture of allocations.
Load plugin; unload plugin; take capture of allocations.

Expected behavior
Should clean up; but leaks ~30 MB CPU.

Screenshots
System (please complete the following information):
N.A.

Additional context
This thread will include all findings of memory leaks.

Maya shut-down fails

While the Wisp renderer can get initialized and destroyed properly via the plug-in, there is an edge case. If the user decides to shut-down Maya without unloading the plug-in, Maya will fail to completely shut-down.

A small window pops up and the editor becomes unresponsive.

Maya does seem to save files just fine, so did not break at all. It is purely the shut-down phase.
maya_shutdown_bug

Emissive weight is lagging behind

Describe the bug
changing emissive weight lags. to have the correct value show another value has to be selected
Related to #130

Expected behavior
when changing value material should update correctly.

Copy GPU resource to RAM

The renderer does not output anything, the texture data has to be copied to RAM to access it in Maya.
Just saving it to a file should work for now, as it will confirm that the renderer is, in fact, rendering.

Importing models must happen in Maya Viewport

Describe the bug
The textures are not properly loaded when importing models and the Wisp renderer is active in a viewport. To properly load these textures, import the model when the Wisp renderer is not active in any viewport (it can already be loaded though).

To Reproduce
Steps to reproduce the behavior:

  1. Load Wisp renderer
  2. Open Wisp renderer in the Maya viewport
  3. Import a model
  4. See black textures

Expected behavior
The proper textures and proper change callbacks.
To reproduce expected behavior:

  1. Load Wisp renderer
  2. Import a model
  3. Open Textured View
  4. Open Wisp renderer in the Maya viewport
  5. See textures

Screenshots
Screenshot from Gyazo

Wiki pages

Create a wiki to help new users to get started with this repository.
Topics could include, but are not limited to:

  • Debugging.
  • Setting up the development environment.
  • Installing the plug-in.
  • FAQ.

Combining meshes/boolean functions leave ghost models

Description

Combining multiple meshes leaves ghost models in the Wisp viewport. To understand why this happens it is important to know what goes on behind the scenes. All connections that are made and broken when combining 2 meshes (Cylinder and Torus) are shown here(also shown in screenshots).

From this data, we can see that meshes are being disconnected from the original Mesh-node and connected to a PolyUnite-node in an inputPoly-array. This seemingly contains all meshes that are combined.
We can conclude from this that meshes are not deleted, but disconnected. Because of this, the mesh parser doesn't get a callback that a mesh is deleted and keeps the meshes in-memory. However, there is a new mesh created which is the combined mesh.

So, a new mesh is created and no meshes are deleted from the scene, leaving a ghost model as all control of the 'old' Mesh-nodes is lost.

TLDR

No meshes are deleted, just disconnected. This causes Maya to not trigger a 'mesh removed'-callback. The control is lost since 'transform update'-callbacks were bound to the Mesh-node which is not connected anymore. This leaves ghost models.

To Reproduce

  1. Create two (or more) meshes
  2. Select both of them in the hierarchy or viewport
  3. Go to Mesh -> Combine
  4. Move the combined mesh

Expected behavior

The two transform nodes should be moving one of the combined meshes and there should be only one copy of the combined meshes left.

Screenshots

Combining meshes

Combining meshes - connection results
Combining meshes - connection results

Connections before combining two meshes
Connections before combining two meshes

Connections after combining two meshes
Connections after combining two meshes

Boolean function intersection

Intersecting two meshes - connection results
Intersecting two meshes - connection results

Connections before intersecting two meshes
Connections before intersecting two meshes

Connections after intersecting two meshes
Connections after intersecting two meshes

Additional context

There are a couple of ways to approach this issue. One of them is to just ignore the new mesh and make sure to keep control of the combine meshes individually. Just use the new (combined) mesh its transform as a parent of these two meshes, so the transformations will still be aligned with Maya's default viewport. However, this is pretty much a hack and I'm assuming there are more issues that require fixes like this. So that'll be just a hack, upon hack, upon hack, etc.

The best thing to do is probably reworking the model parser/manager a bit. You basically need it to support grouping as that is what combining does.

Namespace style does not conform to the style-guide

From the style-guide:

Don’t do

void my_namespace::my_nested_namespace::MyClass::MyFunction()
{
}

Instead do:

namespace my_namespace::my_nested_namespace
{
	
    void MyClass::MyFunction()
    {
    }

} /* my_namespace::my_nested_namespace */

Model translation does not take parent-child relationship into account

Describe the bug
When moving a child object, the transform does not get updated correctly. I suspect this is because we do not use the parent transform while calculating the object position.

To Reproduce
Steps to reproduce the behavior:

  1. Open Maya and load a model with a somewhat complex hierarchy.
  2. Move one of the child objects around.
  3. Check the location of the Maya overlay, it's misaligned now.

Expected behavior
I would expect the model to keep stay lined up with the overlay.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10 x64
  • Version: Maya 2019

Colours of materials are lagging behind

Describe the bug
When selecting a colour is will not change to that colour unless another colour is picked.less noticeable if the color wheel is used.

Expected behavior
When colour is chosen material should update to that colour.

Parse texture memory from Maya

The Maya plug-in currently loads textures twice by requesting Wisp to load them.

To reduce memory usage, eliminate loading the texture by ourselves and just use the existing Maya texture data directly. This is essentially just a matter of dumping the texture data into a Wisp buffer.

[renamed] Depth buffer causes outline to be rendered incorrectly.

Describe the bug
The Maya viewport camera uses a different aspect ratio, fov, etc. than the Wisp camera.

To Reproduce
Steps to reproduce the behavior:

  1. Open Maya.
  2. Add a primitive.
  3. Load Wisp.
  4. Switch to the Wisp renderer.

Expected behavior
The object should match its Maya wireframe outline perfectly.

Screenshots
maya_wisp_camera_size_mismatch

Desktop (please complete the following information):

  • OS: Windows 10 64-bit
  • Maya2019

NURBS support

In Maya, there are objects called NURBS. These are not supported.

Describe the solution you'd like
Support NURBS for full Maya accessibility within WispForMaya.

Additional context
NURBS Cylinder
NURBS Cylinder: (left) Maya viewport, (right) WispForMaya

Viewport is initially black.

This is an issue with the fact that we don't have proper headless rendering support.
If we won't be able to fix this in the renderer we might want to force a extra update.

Selecting vertices reloads model

Describe the bug
when selecting vertices or faces the model gets reloaded.

Expected behavior
skip the reload if action is not changing the model

Unknown exceptions thrown when adding primitives

Describe the bug
When the Visual Studio debugger is attached to Maya with the plug-in loaded, exceptions are logged to the debug output window when adding primitives.

To Reproduce
Steps to reproduce the behavior:
0. Attach the Visual Studio debugger

  1. Go to "Windows ==> General Editors ==> Plug-in Manager"
  2. Click on "WispForMaya"
  3. Switch to the Wisp viewport
  4. Add primitive
  5. See Visual Studio output

Expected behavior
No exceptions.

Screenshots
image

System (please complete the following information):

  • OS: Windows 10
  • Maya 2019
  • Maya version / update 2019.1
  • Graphics card GTX970m
  • RAM 16GB DDR4-2666
  • CPU Intel Core i7-6700HQ
  • Screen resolution 1920x1080

Additional context
NO.

Switching framegraph crash (Fallback Layer)

Describe the bug
Wisp crashes when running Wisp on a machine that doesn't support DXR (so only supports the Fallback Layer) and switching framegraph to any framegraph that is using an Acceleration Structure.

To Reproduce
Steps to reproduce the behavior:

  1. Run Wisp
  2. Press F2 to switch framegraph
  3. Experience the crash

Expected behavior
Just switch framegraph. No crash should be involved.

Screenshots
image
Deepest error location

image
Deepest 'high level' error location

image
Callstack

System (please complete the following information):

  • OS: [e.g. Windows 95]
  • Maya [e.g. 2017, 2019, 2019]
  • Maya version / update [e.g. 2018.1, 2018.2]
  • Graphics card [e.g. GTX 470, Intel GMA 900]
  • RAM [e.g. DDR2-100MHz]
  • CPU [e.g. Intel 8080, AMD FX series]
  • Screen resolution [e.g 320x200, 800x600]

Additional context
Add any other context about the problem here.

New meshes crash Maya when they're added to an empty scene

Describe the bug
Maya crashes when an object is added after removing an object from the scene (scene has to have 0 objects in it).

To Reproduce
Steps to reproduce the behavior:

  1. Load the plug-in.
  2. Add a cube.
  3. Remove the cube.
  4. Add a cube again.

Expected behavior
Maya should not crash. It should just display the newly created mesh without any issues.

Maya freezes on empty scene with RTX

Maya 2018 freezes when loading Wisp in an empty scene.

I suspect that this may have something to do with the recent "feature_as" merge into the Wisp rendering framework.

Steps to reproduce:

  1. Open Maya.
  2. Load Wisp.
  3. Switch to the Wisp viewport.

System specifications:

  • Intel Core i5 9400F
  • GIGABYTE Geforce RTX 2060 Mini ITX
  • 16 GB DDR4-2600MHz RAM
  • Maya on SSD

Properly make use of frame index

Properly make use of the frame index in the renderer to avoid lagging behind 3 frames. As of right now, it seems like the Wisp viewport is one frame behind on Maya.

For example, it starts with a black screen even though it already rendered a frame. However, this frame is still in the back buffer and not presented to the screen. As soon as a new update is detected this frame is shown and the next frame is rendered, though, it's not presented yet.

Making use of the frame index properly fixes this issue.

Very noticeable when zooming in and out very fast.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.