IRC log for #brlcad on 20110621

00:31.27 brlcad bhinesley: rough going? :)
00:37.13 bhinesley brlcad: yeah...
00:37.30 bhinesley reading through code and trying to figure things out
02:39.23 brlcad bhinesley: have you read through the oed tutorial? if not, I would recommend it as it explains a lot of 'why' oed behaves the way it does, which mostly relates to implementation detail
02:40.05 brlcad like how a keypoint is specified (it's the right-hand side, first natural coordinate)
03:21.34 *** join/#brlcad yukonbob (~bch@S010600235a187d92.ok.shawcable.net)
03:36.43 CIA-62 BRL-CAD: 03brlcad * r45153 10/brlcad/trunk/bench/run.sh:
03:36.43 CIA-62 BRL-CAD: fix off-by-one bug where TIMEFRAME=0 was causing all testing to get skipped. it
03:36.43 CIA-62 BRL-CAD: should at least run all tests once. also fixed a bug where it was reporting
03:36.43 CIA-62 BRL-CAD: success if previous pix files were still in the run directory, even if rt
03:36.43 CIA-62 BRL-CAD: failed. now handles negative time values too (by clamping to min).
03:45.01 *** join/#brlcad yukonbob (~bch@S010600235a187d92.ok.shawcable.net)
03:53.01 CIA-62 BRL-CAD: 03brlcad * r45154 10/brlcad/trunk/ (38 files in 3 dirs): (log message trimmed)
03:53.01 CIA-62 BRL-CAD: major refactoring of the liboptical callback api to expand the function
03:53.01 CIA-62 BRL-CAD: callbacks with their respective parameters. in doing so, the headp mfuncs list
03:53.01 CIA-62 BRL-CAD: parameter was removed (only used by stack and text shaders) in favor of just
03:53.01 CIA-62 BRL-CAD: generating a new headp via optical_shader_init(). also ended up propagating a
03:53.02 CIA-62 BRL-CAD: slew of genptr_t's instead of char* and some basic constness. the stronger ansi
03:53.03 CIA-62 BRL-CAD: type checking revealed several inconsistencies that got caught up in the cleanup
04:12.56 CIA-62 BRL-CAD: 03brlcad * r45155 10/brlcad/trunk/src/ (16 files in 8 dirs): remove the antiquated msvc build files from long ago. no longer relevant with the new cmake build.
04:22.44 *** join/#brlcad IriX64 (~kvirc@bas2-sudbury98-1128565141.dsl.bell.ca)
04:30.32 CIA-62 BRL-CAD: 03brlcad * r45156 10/brlcad/trunk/src/liboptical/ (material.c sh_stack.c shade.c): add some sanity checks. make sure the callbacks aren't null before we call them. make sure other related struct dereferences aren't null as well otherwise do something else to avoid crashing.
04:30.54 *** part/#brlcad IriX64 (~kvirc@bas2-sudbury98-1128565141.dsl.bell.ca)
04:36.26 CIA-62 BRL-CAD: 03brlcad * r45157 10/brlcad/trunk/src/liboptical/sh_wood.c: remove the unnecessary wood_init() routine and respective eRT dead code sections. can init to null on decl and avoid the book-keeping and function call altogether.
04:41.13 bhinesley brlcad: yes, I've read the oed tutorial.
04:43.11 bhinesley I haven't really done anything that involves directly manipulating graphics objects, until now. It's taking a lot to understand how that works.
04:44.39 bhinesley (for me) :)
04:45.47 CIA-62 BRL-CAD: 03brlcad * r45158 10/brlcad/trunk/src/burst/Hm.h: comment cleanup and s/<control>/CONTROL/
04:48.09 CIA-62 BRL-CAD: 03bhinesley * r45159 10/brlcad/trunk/src/libged/translate.c: use struct db_full_path, not char[]
04:55.09 CIA-62 BRL-CAD: 03brlcad * r45160 10/brlcad/trunk/src/conv/ (g-xxx.c walk_example.c): don't declare UNUSED params to doxygen, just bitches about them. if you list some params, though, you should list all of them (except UNUSED ones).
04:56.07 CIA-62 BRL-CAD: 03brlcad * r45161 10/brlcad/trunk/src/libbn/axis.c: add param docs missing from a couple funcs
04:59.08 CIA-62 BRL-CAD: 03bhinesley * r45162 10/brlcad/trunk/src/libged/translate.c: fix whitespace (ws.sh)
05:52.11 *** join/#brlcad epileg (~epileg@unaffiliated/epileg)
06:43.22 *** join/#brlcad Stattrav (~Stattrav@122.167.214.98)
06:43.22 *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav)
07:20.02 *** join/#brlcad KimK (~Kim__@ip174-71-95-176.om.om.cox.net)
07:32.29 *** join/#brlcad Stattrav (~Stattrav@111.93.134.142)
07:32.29 *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav)
08:23.39 *** join/#brlcad merzo (~merzo@193.254.217.44)
08:57.51 *** join/#brlcad Stattrav (~Stattrav@122.167.214.98)
08:57.51 *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav)
09:17.30 *** join/#brlcad Stattrav (~Stattrav@111.93.134.142)
09:17.30 *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav)
10:03.41 *** join/#brlcad merzo (~merzo@193.254.217.44)
10:32.18 CIA-62 BRL-CAD: 03brlcad * r45163 10/brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c: wrap diagrams in @code/@endcode
10:38.43 CIA-62 BRL-CAD: 03brlcad * r45164 10/brlcad/trunk/src/rt/do.c: remove appearance of tags for parsing
10:41.58 CIA-62 BRL-CAD: 03brlcad * r45165 10/brlcad/trunk/src/shapes/fence.h: doxygenify comments
10:45.37 CIA-62 BRL-CAD: 03brlcad * r45166 10/brlcad/trunk/src/util/pixfade.c: remove tag appearance
10:45.54 CIA-62 BRL-CAD: 03brlcad * r45167 10/brlcad/trunk/src/vdeck/vdeck.c: wrap table in @code/@endcode
10:59.02 CIA-62 BRL-CAD: 03kunigami * r45168 10/brlcad/trunk/src/liboptical/ (6 files): moving sh_osl.c to sh_osl.cpp
11:00.16 CIA-62 BRL-CAD: 03brlcad * r45169 10/brlcad/trunk/include/bu.h: match @param variable names with the function so it knows which is which. clean up formatting on the @code/@endcode sections
11:00.38 CIA-62 BRL-CAD: 03brlcad * r45170 10/brlcad/trunk/include/wdb.h: if you're going to annotate one of the parameters, they all have to be annotated.
11:01.05 CIA-62 BRL-CAD: 03brlcad * r45171 10/brlcad/trunk/src/librt/vlist.c: document the other param
11:03.04 CIA-62 BRL-CAD: 03brlcad * r45172 10/brlcad/trunk/src/libwdb/reg.c: if you document one of them, document all of them
11:07.46 CIA-62 BRL-CAD: 03brlcad * r45173 10/brlcad/trunk/src/proc-db/surfaceintersect.cpp: function sig consistency
11:14.21 CIA-62 BRL-CAD: 03brlcad * r45174 10/brlcad/trunk/include/rtgeom.h: comment cleanup. put latex equation into a code block.
12:25.22 CIA-62 BRL-CAD: 03kunigami * r45175 10/brlcad/trunk/src/liboptical/ (CMakeLists.txt init.c osl_rt.cpp): implemented a simple mirror shader on osl_rt to make sure we can combine osl shaders with other shaders. it worked\!
12:26.59 kunigami brlcad: any news on the "struct mfuncs" support to C++?
12:30.42 CIA-62 BRL-CAD: 03starseeker * r45176 10/brlcad/trunk/src/other/CMakeLists.txt: Reorder things a bit.
12:31.09 CIA-62 BRL-CAD: 03starseeker * r45177 10/brlcad/trunk/src/ (8 files in 8 dirs): dsp files are no more, so we don't need to ignore them.
14:41.43 *** join/#brlcad crazy_imp (~mj@a89-182-132-98.net-htp.de)
14:42.18 brlcad kunigami: I just checked in all of the changes this morning
14:42.52 brlcad er, last night even .. r45154
14:43.50 brlcad so now they're properly expanded global function callbacks
14:44.54 brlcad you'll still want extern "C" linkage, but should be able to hook in your callbacks from the C++ side warning-free
15:01.30 *** join/#brlcad _psilva (~silvap@static-96-255-52-7.washdc.fios.verizon.net)
15:46.34 brlcad kunigami: you may have noticed, but larry just added a slew of comments to the testshader example, explaining everything in more detail
15:46.38 brlcad https://github.com/lgritz/OpenShadingLanguage/blob/e7673afe1c1c9467eba48e7a836904999f80a1cf/src/testshade/testshade.cpp
15:46.46 kunigami besides declaring each _setup, _render, _print and _free surrounded with extern "C", should I take any other care? The compiling goes fine, but when I try to run ./rt, it gives me undefined symbol for osl_setup
15:47.24 brlcad you declare the bu_structparse table, then add that table to init.c
15:47.43 brlcad I think I saw a recent previous commit where you removed it from init
15:48.08 kunigami I added it back already
15:48.54 brlcad there's nothing more to it other than those two steps that come to mind
15:48.58 brlcad what's the actual error?
15:49.20 kunigami ./rt: symbol lookup error: /home/kunigami/workspace/dev/bin/brlcad-bin/lib/liboptical.so.19: undefined symbol: osl_setup
15:49.41 kunigami I'll try a clean compiling here (I've been updating only from src/liboptical)
15:50.16 brlcad the function is implemented in an extern "C" block too?
15:50.40 kunigami no, but it's hidden from the C code
15:52.42 kunigami about the testrender update: great! I'll read it later! Maybe it helps me improving the current system I've been using almost like copy & paste
15:52.53 brlcad what do you mean hidden?
15:53.02 brlcad the callback functions aren't "hidden"
15:53.32 brlcad they can be HIDDEN (i.e., static), but have to be globally addressable otherwise you'll get ... a runtime error ;)
15:53.59 brlcad I'm betting it's extern "C" linkage
15:54.05 brlcad add that to the function decl
15:54.17 brlcad extern "C" int osl_setup(...) { ...
16:00.10 kunigami hmm ok! I don't know why I though that each shader was compiled as a separated unit and then dynamically linked to liboptical :P Fixing that
16:10.16 kunigami worked. thanks!
16:10.17 brlcad there is code in there that will dynamically load new shaders
16:10.38 brlcad but they'd still need to be extern "C" so the symbol names are mangled
16:16.54 CIA-62 BRL-CAD: 03178.73.220.94 07http://brlcad.org * r2932 10/wiki/MGED_CMD_saveview:
16:19.02 CIA-62 BRL-CAD: 03Sean 07http://brlcad.org * r2933 10/wiki/MGED_CMD_saveview: Reverted edits by [[Special:Contributions/178.73.220.94|178.73.220.94]] ([[User talk:178.73.220.94|Talk]]); changed back to last version by [[User:Sean|Sean]]
16:19.14 CIA-62 BRL-CAD: 03Sean 07http://brlcad.org * r0 10/wiki/Special:Log/block: blocked [[User:178.73.220.94]] with an expiry time of infinite (anonymous users only, account creation disabled): Spamming links to external sites
16:39.25 CIA-62 BRL-CAD: 03brlcad * r45178 10/brlcad/trunk/TODO: notes on benchmark suite
16:39.49 CIA-62 BRL-CAD: 03brlcad * r45179 10/brlcad/trunk/TODO: erase/erase_all merged
16:44.12 CIA-62 BRL-CAD: 03brlcad * r45180 10/brlcad/trunk/TODO: the rename will ideally have to wait until the next minor update now
16:50.53 *** join/#brlcad Stattrav (~Stattrav@117.202.27.251)
16:50.53 *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav)
17:17.25 *** join/#brlcad epileg (~epileg@unaffiliated/epileg)
17:17.33 *** join/#brlcad Stattrav (~Stattrav@117.202.27.251)
17:17.33 *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav)
17:19.51 *** join/#brlcad yukonbob (~bch@S0106002191d1591c.ok.shawcable.net)
17:31.20 *** join/#brlcad Stattrav (~Stattrav@unaffiliated/stattrav)
17:41.09 kunigami hmm I think I'm doing something wrong :P the sphere was supposed to be the osl shader http://imageshack.us/photo/my-images/16/weirdje.png/
17:47.13 kunigami I'll try adding supersampling
18:04.50 CIA-62 BRL-CAD: 03kunigami * r45181 10/brlcad/trunk/src/liboptical/ (CMakeLists.txt init.c osl-renderer.cpp sh_osl.cpp): finished porting sh_osl.c to sh_osl.cpp and added some code to integrate osl (but is not working properly)
18:49.49 brlcad kunigami: your #ifdef __cplusplus sections in sh_osl.cpp ...
18:49.57 brlcad when will they ever be false? :)
18:52.12 kunigami hmm probably not :)
18:53.49 CIA-62 BRL-CAD: 03kunigami * r45182 10/brlcad/trunk/src/liboptical/sh_osl.cpp: removed useless cplusplus macros
18:53.53 brlcad the only conditional you might consider would be a toggle on whether OSL is available or not, OSL_ENABLED or WITH_OSL or somesuch
18:54.10 brlcad but that'd only be so you could print "oops, osl not available"
18:55.32 brlcad so educate me a little bit -- how does osl shade a pixel given a hit point and normal?
18:55.44 brlcad what do you provide to osl?
18:59.42 kunigami From the testrender example, I think for each pixel we need to provide osl with object normal, incident ray and hit point -- for the most basic case
19:02.45 brlcad so then how does it shade given that info?
19:03.46 kunigami actually we also need to provide a shaderstate, which seems to contain information about which osl shader is being used
19:04.01 brlcad how might I take light source visibility into an account, for example, if I'm trying to write an osl shader
19:05.01 kunigami I think that it's done through recursion. When a ray hit a non-emitter surface, it is propagated
19:05.28 kunigami when it finally hits a emitter, it just return its color
19:05.33 brlcad how does that happen? osl didn't shoot the primary ray
19:06.59 kunigami it calculates the output direction from the incident ray and the normal, I think
19:07.33 brlcad that would imply to me that there has to be some way either to register with osl how rays are fired (e.g. register a callbackup that ends up calling rt_shootray()), or call into osl for info to know when a new ray needs to be fired to compute some shader info
19:07.57 brlcad sure, it'll know the direction, but it doesn't exactly have any logic to shoot a ray
19:09.00 brlcad otherwise, osl would also require the geometry in some format and it wouldn't be a shading library, it'd be a raytracer :)
19:09.15 kunigami In testrender this logic was implemented along the radiance function. In sh_osl I'm explict calling rt_shootray
19:10.29 CIA-62 BRL-CAD: 03brlcad * r45183 10/brlcad/trunk/src/libged/translate.c: c99-style // comments can't be used in C files, must be c89 compliant
19:11.28 brlcad i'm not familiar with testrender .. is the radiance function something written in C/C++ and provided to OSL?
19:12.28 kunigami no, radiance was a function written by the author of testrender. It's a simple intersection system to find which of the spheres of the scene was hit by the given ray
19:13.37 brlcad so in your weirdje image, which shader is on that sphere?
19:14.25 brlcad the reason I'm asking, trying to understand how we'll put this integration to use down the road
19:14.44 kunigami that's an osl shader, which should be a perfect diffuse yellow
19:15.06 brlcad I know from a high-high level what OSL is capable of, it's how it gets integrated that seems still to be a mystery
19:16.04 brlcad so perfect diffuse, it should be a shader that just needs the ray, object hit point, and surface normal
19:16.14 kunigami yes
19:16.19 brlcad so it shades based on the cosine angle, basically light coming from the camera
19:16.42 brlcad so why is the bottom of the sphere bright and the top dark then? :)
19:17.40 brlcad that also implies an another open question: how might one implement a phong shader with OSL
19:18.15 kunigami It seems it's acting like a mirror (the top of the scene is dark and the floor is bright)
19:18.43 brlcad hm, true
19:19.33 brlcad ah, your firing a ray for each hit point, aren't you -- a ray down the normal or something
19:19.53 brlcad the color it gets will be a mirror-like color
19:21.29 kunigami yes, but it's exactly the same thing I do on osl_rt and there the color is as expected
19:21.55 brlcad apparently not "exactly" the same :)
19:25.05 kunigami the difference is that in osl_rt all shaders (except the mirror) are osl ones. Probably some information is being stored in the system when a ray jumps from an object to another.
19:25.15 brlcad once you get diffuse working, I'd suggest trying to get a simplistic phong shader implemented, since that really begs questions on how the OSL API is supposed to handle secondary queries
19:28.58 brlcad you could use the cornell box example and make all objects have an osl shader
19:29.06 brlcad no sense making it more complicated than it needs to be
19:44.37 *** join/#brlcad brlcad (~sean@BZ.BZFLAG.BZ)
19:50.52 CIA-62 BRL-CAD: 03r_weiss * r45184 10/brlcad/trunk/src/libbu/list.c: Fixed a bug in function 'bu_list_reverse' within file 'list.c' of the 'libbu' library. A 'struct bu_list' was not initialized correctly causing a segmentation fault.
19:58.07 CIA-62 BRL-CAD: 03r_weiss * r45185 10/brlcad/trunk/src/librt/primitives/nmg/nmg_bool.c:
19:58.07 CIA-62 BRL-CAD: Updated function 'nmg_booltree_evaluate' within file 'nmg_bool.c'. Removed the
19:58.07 CIA-62 BRL-CAD: call to 'nmg_model_fuse' since it is not necessary here. This is called later
19:58.08 CIA-62 BRL-CAD: within function 'nmg_bool'. This change will increase the speed in which nmg
19:58.08 CIA-62 BRL-CAD: boolean operations are performed. For example, the mged command 'facetize' will
19:58.08 CIA-62 BRL-CAD: run faster.
20:13.48 CIA-62 BRL-CAD: 03r_weiss * r45186 10/brlcad/trunk/src/librt/primitives/nmg/nmg_class.c:
20:13.48 CIA-62 BRL-CAD: Updated functions 'nmg_class_pt_s', 'class_eu_vs_s' and 'class_fu_vs_s' within
20:13.48 CIA-62 BRL-CAD: file 'nmg_class.c'. The changes will increase the speed in which nmg boolean
20:13.48 CIA-62 BRL-CAD: operations are performed. For example, the mged command 'facetize' will run
20:13.48 CIA-62 BRL-CAD: faster. The change adds a compare to the shell bounding box to exclude nmg
20:13.49 CIA-62 BRL-CAD: objects (shell,face,loop,edge,vertex) as early as possible in the classification
20:13.50 CIA-62 BRL-CAD: to prevent extra processing.
20:17.12 CIA-62 BRL-CAD: 03brlcad * r45187 10/brlcad/trunk/db/ (CMakeLists.txt Makefile.am cornell.rt): add a view script for the cornell box that can be used to restore a prototypical view inside the box.
20:18.29 brlcad kunigami: that view script may be of interest -- if you run it (sh cornell.rt), it should render a typical view of the existing cornell.g model
20:18.47 CIA-62 BRL-CAD: 03r_weiss * r45188 10/brlcad/trunk/include/vmath.h:
20:18.47 CIA-62 BRL-CAD: Added macro 'V3PT_OUT_RPP_TOL' to file 'vmath.h' which tests if a vertex is
20:18.47 CIA-62 BRL-CAD: outside a bounding box by at least the distance tolerance. This macro supports
20:18.47 CIA-62 BRL-CAD: changes to functions 'nmg_class_pt_s' and 'class_eu_vs_s' within file
20:18.47 CIA-62 BRL-CAD: 'nmg_class.c'.
20:18.48 brlcad may be useful for tweaking the cornell.g model to be all osl shaders
20:18.55 brlcad for testing
20:25.17 CIA-62 BRL-CAD: 03r_weiss * r45189 10/brlcad/trunk/src/librt/primitives/nmg/nmg_pt_fu.c:
20:25.17 CIA-62 BRL-CAD: Updated function 'nmg_class_pt_lu_except' within file 'nmg_pt_fu.c'. Improved
20:25.17 CIA-62 BRL-CAD: the test against the loop bounding box by added the distance tolerance and
20:25.17 CIA-62 BRL-CAD: changed the macro so that the point must be at least the distance tolerance
20:25.17 CIA-62 BRL-CAD: outside the loop bounding box to be excluded.
20:31.03 CIA-62 BRL-CAD: 03brlcad * r45190 10/brlcad/trunk/include/bu.h: don't let BU_LIST_INIT_ZERO set the magic number to BU_LIST_HEAD_MAGIC since the pointers are still NULL. the macro is only useful as a zero-initializer.
20:31.37 kunigami brlcad: thanks! I was trying to setup that scene here without much sucess
20:33.23 CIA-62 BRL-CAD: 03brlcad * r45191 10/brlcad/trunk/NEWS:
20:33.24 CIA-62 BRL-CAD: through a variety of enhancements, richard has been making headway on improving
20:33.24 CIA-62 BRL-CAD: the performance and reliability of the nmg/bot processing code. in particular,
20:33.24 CIA-62 BRL-CAD: he has eliminated duplicative model fusing and improve topology connectivity
20:33.24 CIA-62 BRL-CAD: evaluations so objects that previously wouldn't convert can.
20:33.53 brlcad kunigami: it's a little screwy because that model uses the original cornell specification
20:34.06 brlcad with exact positioning and orientation, which doesn't match our coordinate system
20:34.39 brlcad plus you want perspective for that model since you're in such a small confined space, which isn't the default
20:36.15 brlcad someone needs to remodel the box to fix our render expectations a little bit better, and if only to toss in a sphere :)
20:39.50 ``Erik ferrofluid http://www.youtube.com/watch?v=OsW8zctD7CM
20:44.21 CIA-62 BRL-CAD: 03r_weiss * r45192 10/brlcad/trunk/src/librt/primitives/ars/ars.c:
20:44.21 CIA-62 BRL-CAD: Updated the 'rt_ars_tess' function within file 'ars.c'. This change simplifies
20:44.21 CIA-62 BRL-CAD: the 'ars' primitive geometry to improve the success of performing nmg boolean
20:44.21 CIA-62 BRL-CAD: operations with 'ars' primitives. Commands such as mged 'facetize' will have
20:44.22 CIA-62 BRL-CAD: greater success when the geometry to facetize contains 'ars' primitives.
21:05.33 CIA-62 BRL-CAD: 03128.63.32.62 07http://brlcad.org * r2934 10/wiki/Lexer_Parser: /* Parsers */ - add note pointing to lemon example
21:40.57 CIA-62 BRL-CAD: 03r_weiss * r45193 10/brlcad/trunk/src/librt/primitives/nmg/nmg_tri.c: (log message trimmed)
21:40.57 CIA-62 BRL-CAD: Fixed a bug in function 'nmg_triangulate_rm_degen_loopuse' which caused an
21:40.57 CIA-62 BRL-CAD: infinite loop when a loopuse contains a single vertexuse instead of a list of
21:40.57 CIA-62 BRL-CAD: edgeuse. The function now also kills all loopuse which contain only a single
21:40.57 CIA-62 BRL-CAD: vertexuse. The associated single vertexuse is also killed. This function
21:40.57 CIA-62 BRL-CAD: supports the new prototype function 'nmg_triangulate_fu' (nmg triangulate
21:40.58 CIA-62 BRL-CAD: faceuse). Preprocessor commands are added so these updates/additions are
21:57.34 *** join/#brlcad crazy_imp (~mj@a89-182-130-99.net-htp.de)
22:00.00 *** join/#brlcad dloman (~claymore@BZ.BZFLAG.BZ)
22:00.01 *** join/#brlcad poolio (~poolio@BZ.BZFLAG.BZ)
22:00.35 *** join/#brlcad starseeker (~starseeke@BZ.BZFLAG.BZ)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.