## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• Aug 15 21:14
Twinklebear commented #539
• Aug 15 21:12
Twinklebear commented #539
• Aug 13 16:47
chenrui333 opened #539
• Aug 08 16:20
• Aug 08 16:20
• Aug 08 15:52
• Aug 08 15:51
• Aug 08 09:26
johguenther commented #538
• Aug 08 07:12
• Aug 03 11:48

johguenther on devel

Merge branch 'release-2.10.x' Bump version Use an atexit handler to shutdo… and 13 more (compare)

• Jul 28 10:27
paulmelis commented #380
• Jul 26 12:28
paulmelis opened #537
• Jul 26 09:03
paulmelis commented #532
• Jul 25 15:01
johguenther commented #536
• Jul 25 09:59
paulmelis commented #536
• Jul 25 09:59
paulmelis commented #536
• Jul 25 09:50
johguenther commented #536
• Jul 25 08:28
paulmelis opened #536
• Jul 22 16:18
BruceCherniak commented #535
• Jul 22 15:18
paulmelis edited #535
Xavier
ok !
Jefferson Amstutz
@jeffamstutz
Xavier
Done, feel free to send feedback about the code, the organization, things I shouldn't do/should do
Jefferson Amstutz
@jeffamstutz
having a look now
will do :)
Xavier
Awesome ! Thanks again ! There is a cmake file
Jefferson Amstutz
@jeffamstutz
one easy suggestion right of the bat is to strongly consider the C++ wrappers for v2.0+
Xavier
My silly questions about moving/hiding objects would make more sense I hope :)
Jefferson Amstutz
@jeffamstutz
they are much more a "first class citizen" this time around
Xavier
This is what I had but most of the examples I found were in C so I switched back to C
Jefferson Amstutz
@jeffamstutz
yeah, I like the idea of supporting "visible/hidden" features, just want to make sure it plays well with everything else (like we now support world-level arbitrary clipping geometries)
Xavier
That would be great !
Jefferson Amstutz
@jeffamstutz
any chance you could catch the crash in a debugger?
debugging by reading code can be tough sometimes, haha
Xavier
I am not so good with gdb but let me try :)
Jefferson Amstutz
@jeffamstutz
I actually like lldb, which you can use with:
lldb -- [normal command line]
then r to run it
and bt to get a backtrace when it segfaults
and q to quit
Xavier
Does it work on Windows ?
Jefferson Amstutz
@jeffamstutz
ah, I'm almost purely a linux user
so I don't know
Xavier
I am looking for a way to get parameters from an ospray::cpp:Instance for example. How can I get the xfm ? I tried inst.xfm(), inst.getParam<AffineSpace3f>("xfm")
Jefferson Amstutz
@jeffamstutz
OSPRay's parameters are unidirectional: we do not support getting arbitrary parameters which were set
the only exception is querying for a bounding box, as that is something OSPRay computes (and the app may need to know exactly what OSPRay's bounds are)
but all parameters come from the app
so the app is expected to remember values it wants to access at another time
Xavier
Alright ! I have another issue, when I move objects by setting the xfm, I have some segfaults.
Could it be that the xfm I set is incorrect ?
Jefferson Amstutz
@jeffamstutz
are you committing the world too?
or just the instance?
Xavier
both
Jefferson Amstutz
@jeffamstutz
unfortunately spatial updates to the world require extra commits, something we want to address in a future version
ok
that's good
all you are doing is setting the xfm parameter on an instance, recommit the instance and world?
Xavier
yes
and reseting accumulation buffer
Xavier
I am trying to enable DOF for a perspective camera. All I need to do is set the "apertureRadius" and "focusDistance" parameter to enable DOF, right ?
twitt
@TWITTM
Hi there, just a beginner question: I the context of setting the backgroundColor, I realized that it should be given in linear space. So 1st question : Are all colors expected to be in linear space? And 2nd is there a C/C++ Api function which converts a gamma corrected value to linear space ?
Xavier
Hi @TWITTM, indeed I think all colors are in linear space and the conversion from gamma to linear is really easy to compute: powf(gamma.r, 2.2f) if gamma.r is in [0, 1] range.
twitt
@TWITTM
Hey @Xavier, thanx, I found out, that in the example project, where you can change the background via color picker ,did it wrong, so it would be good to clearify this fact that the colors are expected in linear space in the documentation. As there is an other fomula to compute the srgba_to_linear conversation - it would be good to add these functions to the API.
Xavier
twitt
@TWITTM
There are already functions in the OSPRay but just missed to export them as being part of the API definition. As they can even been changed by a define wether the use the functions you mention from will Usher or just the simple pow(x,2,2). Lets see I might update my Pull Request with extending the API with those conversion functions.
twitt
@TWITTM
Sorry, I need assistance,. The function that should be exported ( srgba_to_linear ) is in ospray\math\vec.ih but I'm lost in finding a way to make them accessible in the API , and could not find the right spot and naming either .
Jefferson Amstutz
@jeffamstutz
OSPRay tries to hide its implementation details, such as internal vec math ISPC code, so the public OSPRay API is intentionally keeping this away from applications
tone mapping and/or framebuffer formats encode color space conversions in the frame itself
you can also do things with libraries that display your frame, such as using OpenGL to do SRGB color conversion on display (i.e. of a full screen quad containing of the rendered OSPRay frame buffer)
twitt
@TWITTM
@jeffamstutz Could you check my pull request #433. Defining the colorspace by OSP_TYPE similar to Texture2D could be a solution. As I'm not to deep in the project I can't tell if there are to many side effects - by adding new types.