Jump to content

MrScienceOfficer

Members
  • Content count

    206
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    4

MrScienceOfficer last won the day on June 25

MrScienceOfficer had the most liked content!

Community Reputation

49 Excellent

1 Follower

About MrScienceOfficer

  • Rank
    Initiate

Personal Information

  • Name
    Tom

Recent Profile Visitors

3,599 profile views
  1. MSS_SingleOpState render shaded 'guides'

    What I would do is create an array of the positions in the state and use that to render points class PointsHandles { void draw(RE_Render* r); UT_Int32Array mySelection; UT_Vector3FArray myPoints; RE_Geometry* myReGeo = nullptr; } void PointsHandles::draw(RE_Render* r) { if (myReGeo) myReGeo = new RE_Geometry(myPoints.size()); myReGeo->createAttribute(r, "P", RE_GPU_FLOAT32, 3, myPoints.data()); myReGeo->createAttribute(r, "Sel", RE_GPU_INT32, 1, mySelection.data()); myReGeo->connectAllPrims(r, 0, RE_PRIM_POINTS); myReGeo->draw(r, 0); } that should basically work, you'll need a shader that uses the "Sel" attribute and creates some visual feedback for the user.(let me know if you need help with the shader) I would do something like sort points by collinearity with the results of the vector from mapToWorld() for the selection, that's a personal preference though (it's easy to implement and I find it very intuitive as a user as well). Then use a GU_RayIntersect to intersect with the geometry your creating loops on, and just write the positions to the parameters.
  2. MSS_SingleOpState render shaded 'guides'

    What are you intending to accomplish? If you use a valid shader for the purpose, you should be able to render anything you like. Though you may need to push the Viewer and Perspective matrices first something like this pseudocode. r->assignUniformMatrix(RE_UNIFORM_PROJECT_MATRIX, getViewportProjectionTransform()); r->assignUniformMatrix(RE_UNIFORM_VIEW_MATRIX, getViewportTransform()); I haven't tested any of that though. What I would do is create a DM_SceneRenderHook instead if you just want to render some spheres, though without knowing your intention it's hard to comment on best practice.
  3. Caching Data between cooks

    Does the SOP_WindingNumber sample not show what your looking for? A GU_Detail is a collection of attributes(like a position attribute but also for topology) so when your asking if a geometry has changed, your really asking what attributes in the GU_Detail have changed. All attributes are tracked with GA_DataId, so caching the data id of the attribute you're interested in and checking that against the incoming geometry will allow you to check for any relevant changes. The SOP_WindingNumberCache::update3D function in particular seems to show a way to do what your describing.
  4. What is a curve mesh ?

    I believe a curve mesh is a geometry made only of polygon curves. It took me a while to figure that out, but it seems the intersection nodes only don't complain when using polygon curves.
  5. VEX SIMD vs. Remove coincident primitives

    Yes, yes, yes, in general, no. When you write code in VEX (or use VOPs) you are reading attributes from the input geometry, not the geometry you are currently processing. This is the mechanism that allows VEX to run multi threaded SIMD code. Though that's just high level theory; you can't read and write to the same data from different threads haphazardly.
  6. Dot Vector in Python ?

    Why would it match (and why would you need it to?), your rounding to the .001th decimal place and testing for a tolerance to .00001th place.
  7. Dot Vector in Python ?

    def theLooper(curNode): for thePrim in curNode.geometry().prims(): primColor = thePrim.floatListAttribValue("Cd") rounded = tuple((round(total,3)) for total in primColor) print(thePrim.number()) print(primColor) print("Theese are the rounded numbers\n"+str(rounded)) #print(round(primColor,3)) dot = hou.Vector3(primColor).dot(hou.Vector3((rounded))) # closing parentheses was missing tolerance = 0.000001 if dot >= 1.0-tolerance and dot <=1.0+tolerance: print("match") else: print("no match") if curNode.geometry().findPrimAttrib("Cd"): print("yes") else: print("no") Python tends to throw a syntax error on the following line when a line doesn't complete it's statement i.e. parentheses block not closed.
  8. int primCount = detailintrinsic(concat("op:", opfullpath("../myInputedGeo")), "primitivecount"); // or just int primCount = detailintrinsic("op:../myInputedGeo", "primitivecount"); opfullpath is a VEX function (as well as an hscript function), your attempting to call the hscript version(by putting it in backticks), int primCount = detailintrinsic("op:`opfullpath("../myInputedGeo")`", "primitivecount"); either version should work though I recommend the VEX version as it's much easier to debug. Looking at your post again point #2 is correct and should work, unless I'm not seeing how it's different from my version (which works for me).
  9. defining normal direction with wrangles

    PolyFrame works well in this situation, just change the tangent to 'N'. A vex solution would look like if (@ptnum != npoints(0)-1) @N = @P - point(0, "P", @ptnum+1); else @N = point(0, "P", @ptnum-1) - @P; @N = normalize(@N); . This handles the case of the last point by inverting the vector towards the previous point.
  10. How to reset HOUDINI_DSO_PATH

    I looked at what your saying about exporting paths, I've never heard of that before. I don't believe what you did actually changed the paths in Houdini. Your path needs to be '/Users/gfx03/HDK/custom;&' you need add ';&' to tell houdini to keep searching for more paths. It's probably best to just edit the houdini.env file though.
  11. über slow

    Pinging forums.odforce.net [208.79.239.212] with 32 bytes of data: Reply from 208.79.239.212: bytes=32 time=49ms TTL=58 Reply from 208.79.239.212: bytes=32 time=43ms TTL=58 Reply from 208.79.239.212: bytes=32 time=41ms TTL=58 Reply from 208.79.239.212: bytes=32 time=45ms TTL=58 Ping statistics for 208.79.239.212: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 41ms, Maximum = 49ms, Average = 44ms It taking about ten seconds to load a page.
  12. Dot Vector in Python ?

    I recommend posting an example file showing the issue like Bonsak suggested.
  13. Dot Vector in Python ?

    https://www.programiz.com/python-programming The section entitled "Few Important Things to Remember" at the end, briefly goes that. I recommend going through other tutorials I found here, https://wiki.python.org/moin/BeginnersGuide/Programmers
  14. Dot Vector in Python ?

    Outside of the formatting issue, it looks fine. Your error isn't related to that code(unless its related to the formatting issue)
  15. VEX Based Replace File Extension

    s@file = "thing/another/geom.001.rs"; s@file = concat(join(split(s@file, '.')[:-1],'.'), ".bgeo.sc"); note the added dot joining the split.
×