Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SofaSphFluid] Add sprite-based point render #1194

Merged
merged 7 commits into from Oct 25, 2019

Conversation

@fredroy
Copy link
Contributor

fredroy commented Oct 21, 2019

Implementation of http://developer.download.nvidia.com/presentations/2010/gdc/Direct3D_Effects.pdf

ezgif-6-9b93f0eae158

Allows nice (?) renders without relying on surface reconstruction etc.
In this SPH simulation (10k particules) , the rendering takes <1% of the resources.

Also tweak a bit the default Z planes with QGLViewer (it has a weird behavior with narrow BBox scenes)


This PR:

  • builds with SUCCESS for all platforms on the CI.
  • does not generate new warnings.
  • does not generate new unit test failures.
  • does not generate new scene test failures.
  • does not break API compatibility.
  • is more than 1 week old (or has fast-merge label).

Reviewers will merge only if all these checks are true.

@fredroy

This comment has been minimized.

Copy link
Contributor Author

fredroy commented Oct 21, 2019

[ci-build][with-all-tests]

@damienmarchal

This comment has been minimized.

Copy link
Contributor

damienmarchal commented Oct 21, 2019

camera()->setZNearCoefficient(0.001);
camera()->setZClippingCoefficient(5);
camera()->setZNearCoefficient(0.005);
camera()->setZClippingCoefficient(2);

This comment has been minimized.

Copy link
@epernod

epernod Oct 22, 2019

Contributor

better parameters?

This comment has been minimized.

Copy link
@fredroy

fredroy Oct 22, 2019

Author Contributor

I just set the default parameters from QGLViewer documentation. (and the previous ones was messing up my scene :p )

@epernod

This comment has been minimized.

Copy link
Contributor

epernod commented Oct 22, 2019

Very cool, I just tested it.

  • But I see it is not possible to put black background?
  • The fluid is not visible in front of another VisualModel, is it due to ZBuffer?
@fredroy

This comment has been minimized.

Copy link
Contributor Author

fredroy commented Oct 22, 2019

Those issues could be fixed when the OglFluidModel will be a VisualManager or something like that, to do multitexturing with the current FrameBuffer in Sofa.
This rendering is mostly a Proof of Concept so I shall upgrade it when I have time in the future ;)
Or if it is deemed necessary...

@hugtalbot

This comment has been minimized.

Copy link
Contributor

hugtalbot commented Oct 22, 2019

It should definitely be proposed as an award Fred :)

@fredroy fredroy force-pushed the fredroy:add_rendersph branch from b7c7718 to 2760685 Oct 24, 2019
@epernod

This comment has been minimized.

Copy link
Contributor

epernod commented Oct 24, 2019

ezgif com-crop

Tested with the last changes in ParticleSource and ParticleSink ;)

@epernod epernod merged commit 55c4930 into sofa-framework:master Oct 25, 2019
7 checks passed
7 checks passed
Dashboard Builds triggered.
Details
[with-regression-tests] Triggered in latest build.
Details
[with-scene-tests] Triggered in latest build.
Details
centos_clang-5_options Build OK. FIXME: 1 unit, 1 scene, 2 regressions
Details
mac_clang-3.5_options Build OK. FIXME: 2 units, 2 scenes, 2 regressions
Details
ubuntu_gcc-5.4_options Build OK. FIXME: 4 units, 1 scene, 1 regression
Details
windows7_VS-2015_options_amd64 Build OK. FIXME: 4 units, 2 scenes, 0 regression
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.