Syntopia
|
|
« Reply #30 on: August 09, 2013, 06:22:54 PM » |
|
I've noticed that animating the "Up" vector has some issues, when any one component transitions 0.0 or reaches +/-1.0 the rendering goes sideways... by that I mean it doesn't render any more at all. the GL area goes blank and nothing short of a restart will fix it, I tracked the problem down to variablewidget.cpp where Float3Widget values get normalized if they are -1 to 1, when one of them reaches 1.0 the other two snap to 0.0 causing a divide-by 0 error somewhere?, I haven't tracked it any farther than this, my fix is not to "normalize" the "Up" vector and everything seems to work smoothly.
so a question: if the max and min values of the sliders are 1 -1 is that not, in effect, already normalized?
edit: I know it's not a "unit sphere" but will a unit cube do?
I can set my 'Up' vector to any value in the UI without problems. Does this only happen when you are animating the Up-vector or also in the UI? The Up vector does not need to be normalized (it must have a length>0, though). The "3D.frag" used by most shaders will make sure the Up vector is made orthogonal to the Direction view vector and normalized after that. Notice that proper interpolation of orientations in 3D space is subtle: you cannot just interpolate the individual components of the Eye, Target, and Up vector and expect everything to be fine. Ideally, the (Target-Eye) and Up should be orthogonal at all frames - indeed, if they are parallel the shader cannot posibly construct an orthonormal basis for the camera.
|
|
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #31 on: August 09, 2013, 06:35:07 PM » |
|
I'll take this opportunity to repeat that it would be nice to additionally have a roller-ball like interface.
Virtual sphere and arcball interfaces are mostly suited for rotating objects, not for moving the camera. I don't think they are very usable for navigating a 3D world (unless there is a way to specify the pivot (rotation center)). Notice, that when pressing shift in Fragmentarium it is possible to "rotate" around origo - the rotation here follows the screen space axes, which I find to be an adequate way of rotating objects.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #32 on: August 09, 2013, 08:45:30 PM » |
|
In the variable editor, when I move any component of the up vector to +|- 1 the other two 'snap' to 0 and the one I moved will only go to -1 or +1 and not between ie:0.25 as if the step rate has been set to 2. (code from Syntopia github, unmodified, not when animating, no other Float3Widgets are affected)
The widget is created with Max == Min as a flag to normalize or not (in VariableWidget::Float3Widget), I think this is the problem, I adjusted the max/min to be -1 & +1 rather than 0 & 0 in 3D.frag and the components of the Up vector no longer 'snap' to 0 or get restricted to +1 and -1
If the components that need to be normalized are handled in the GLSL code it seems unnecessary to normalized them at the widget input level and from a GUI programming standpoint I don't think using the Max/Min widget settings as a flag is a good idea.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #33 on: August 09, 2013, 11:01:46 PM » |
|
The "Up" vector is generated from the relationship between eye and target, understood. I don't try to set the "Up" vector independently of Eye|Target when animating, rather, I save the "Up" vector generated as a result of moving the Eye|Target. The problem shows up when the camera does a roll, pitch or yaw that transitions through 0.0 or goes more than 180deg. this animation was no possible when the "Up" vector widget has Min & Max == 0 enabling normalize() in Float3Widget. http://www.fractalforums.com/index.php?topic=16765.msg64281#msg64281
|
|
|
Logged
|
|
|
|
marius
Fractal Lover
Posts: 206
|
|
« Reply #34 on: August 10, 2013, 01:38:03 AM » |
|
The "Up" vector is generated from the relationship between eye and target, understood. I don't try to set the "Up" vector independently of Eye|Target when animating, rather, I save the "Up" vector generated as a result of moving the Eye|Target. The problem shows up when the camera does a roll, pitch or yaw that transitions through 0.0 or goes more than 180deg.
You'll find that splining over the up and direction vector values individually does not play nice with rolls etc. You probably want to use quaternions and even then convert those to a representation that splines nicer (and back). I use https://code.google.com/p/boxplorer2/source/browse/trunk/interpolate.cc#177 for the latter. The other conversion routines in that file, from matrix to quat and back, are pretty specific with respect to handedness of your setup. Not sure what Fragmentarium uses.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #35 on: August 10, 2013, 02:48:23 AM » |
|
It's not a problem when "Up" Max/Min are set to 1 and -1 or when the "Up" vector is not normalized at the widget input level. I don't think it's the normalizing that causes the problem I think it's Qt widget getting Max == Min so Range == 0, not sure yet so a little more investigating is in order.
|
|
|
Logged
|
|
|
|
Roquen
Iterator
Posts: 180
|
|
« Reply #36 on: August 10, 2013, 01:45:31 PM » |
|
Virtual sphere and arcball interfaces are mostly suited for rotating objects, not for moving the camera. I don't think they are very usable for navigating a 3D world (unless there is a way to specify the pivot (rotation center)).
Notice, that when pressing shift in Fragmentarium it is possible to "rotate" around origo - the rotation here follows the screen space axes, which I find to be an adequate way of rotating objects.
Yeah I was only thinking in terms of UI and not really animating a camera. The "shift" input is adequate (although the rotation is IMHO opposite direction to my expectations) for bringing the desired surface into view. What I find troublesome is getting the desired orientation...so the equivalent be begin able to rotate about an axis straight out (or into) the screen. Of course I can get this behavior via some GLSL code so I'll stop whining on this subject. For something completely different I have a quasi-random thought: What about having the engine provide a uniform (say vec4) which the components are the i th value of a low-discrepancy sequence, say Halton, where 'i' is the subframe number. The thought is that this could be used to replace random number generation in some situations and would actually have better properties that uniform pseudo-random for some usages and zero shader overhead.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #37 on: August 14, 2013, 06:36:02 AM » |
|
I still get the following warning... Fragmentarium/GUI/VariableWidget.h: In constructor ‘Fragmentarium::GUI::SamplerWidget::SamplerWidget(Fragmentarium::GUI::FileManager*, QWidget*, QWidget*, QString, QString)’: Fragmentarium/GUI/VariableWidget.h:289:26: warning: ‘Fragmentarium::GUI::SamplerWidget::fileManager’ will be initialized after [-Wreorder] Fragmentarium/GUI/VariableWidget.h:286:21: warning: ‘QString Fragmentarium::GUI::SamplerWidget::defaultValue’ [-Wreorder] Fragmentarium/GUI/VariableWidget.cpp:570:9: warning: when initialized here [-Wreorder]
the fix is not in the order of occurrence in the implementation but in the order of occurrence in the declaration. in VariableWidget.h file, private section, move "QString defaultValue;" to be after "FileManager* fileManager;" prevents "initialized after reorder" warning. I don't know if this causes any problems, the compiler should sort it out but best to be on the safe side.
|
|
|
Logged
|
|
|
|
Alef
|
|
« Reply #38 on: August 15, 2013, 03:47:33 PM » |
|
Hi, I finally got some time to improve on Fragmentarium.
Also, if you have any frags you think should be part of the standard distribution please send them to me.
I have not quite a frag file, but maybe this could be fragmentalised. It would require brute force or NODE raytracer. It is the attempt on Infernal Grail, at least it have some features of what 3D mandelbrot could have, it have simple formula and are pretty zoomable. http://www.fractalforums.com/new-theories-and-research/few-steps-behind-perfect-3d-mandelbrot/I have lots of stuff like this in chaos pro, but this seems to be the most well grailish. http://www.chaospro.de/formulas/display.php?fileid=222And there were some guys wanting support of colour pallettes, maybe fractint map file support.
|
|
|
Logged
|
fractal catalisator
|
|
|
Alef
|
|
« Reply #39 on: August 15, 2013, 04:23:13 PM » |
|
But textures are fare better in 3D than colour pallettes + orbit traps.
|
|
|
Logged
|
fractal catalisator
|
|
|
vinz
Iterator
Posts: 154
|
|
« Reply #40 on: August 17, 2013, 06:36:04 PM » |
|
HAhaha Amaizing to see Fragmentarium growing...
|
|
|
Logged
|
|
|
|
slon_ru
Iterator
Posts: 167
|
|
« Reply #41 on: August 29, 2013, 02:43:36 PM » |
|
Hi!
NODE-Raytracer works in the preview window only. Can you help me ? Thx! br
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #42 on: August 30, 2013, 09:14:41 AM » |
|
I had a blank white screen until I changed "backbufferCounter" to "subframe" as mentioned on the opening page of this thread
|
|
« Last Edit: August 30, 2013, 09:16:41 AM by 3dickulus, Reason: clarification »
|
Logged
|
|
|
|
SCORPION
|
|
« Reply #43 on: August 30, 2013, 11:33:33 AM » |
|
Yes, I confirm, after replacing the white window disappeared and it worked, but not rendering - always after rendering a black screen. At any resolution. How to fix this problem?
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #44 on: August 30, 2013, 01:20:09 PM » |
|
in the NODE-Raytracer.frag file, change the last line in the trace routine (around line 452) from... return vec4(newc,r);
to return vec4(newc*2.0,r);
- set subframe max in Fragmentarium to 20
- select the "Progressive (subframe)" button
- select the "Play" button
you should see something render now NODE-Raytracer doesn't seem to be up to date with the current version of Fragmentarium GLSL scripts, your results may vary. double check, make sure you changed ALL of the occurrences of "backbufferCounter" to "subframe" hope this helps. edit: disclaimer = this is just a hack so you can see what's going on, it's not a fix for the problem
|
|
« Last Edit: August 30, 2013, 01:29:04 PM by 3dickulus, Reason: disclaimer »
|
Logged
|
|
|
|
|