Announcement

Collapse
No announcement yet.

geometry filter plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • geometry filter plugin

    Dear All!

    I'm new to V-Ray, and searching for a solution. What I would like to do is during rendering process the scene geometry, extract data from it, and after render I would like to read a depth buffer of the rendering to further process my data, and finally write it to disk (it will be used by the compositor). I also need the transformation and camera parameters during processing.

    Can it be done with v-ray plugins?
    Can I get a callback whenever a polygonal mesh geometry is passed to the renderer?
    Can I get a callback when rendering is finished and can I read back the depth (or other) values of the fragments?
    What kind of plugins and examples should I have a deep lookat?

    Thanks in advance!

  • #2
    Mind you i am not really a developer. Just some thoughts. I am not sure where you are heading, so just some wild guesswork.

    From the things you need i would guess a renderelement would be able to give you what you want. Camera position is available via the shadecontext if i recall right.
    As said i am not sure what you are after, but you can get the Node corresponding to the currently shaded fragment from within the renderelement, which naturally also gives you
    direct access to all GBuffer elements. Why do you need to access them after rendering is finished if you don't mind the question ?

    For the record there is also a difference between VRaySpecific Max plugins and pure VRayPlugins.

    Regards,
    Thorsten

    Comment


    • #3
      The simplest way is to write a script that outputs the camera transformation for every frame, then render your rgb with a Zdepth render element, you can then do some simple math to calculate the position of each rendered pixel in relation to the camera in world space, by taking the camera transformation and multiplying this by the distance value of the zdepth pixel.

      Or are you seeking what is more looking like Deep Pixel Compositing, in which case that's slightly different.
      Maxscript made easy....
      davewortley.wordpress.com
      Follow me here:
      facebook.com/MaxMadeEasy

      If you don't MaxScript, then have a look at my blog and learn how easy and powerful it can be.

      Comment


      • #4
        Thanks for the reply!
        To be more exact:
        I'm making an NPR tool including contours and hatching lines. The main idea is to extract information from the triangle meshes, given the vertex positions and normals, we compute curvatures and other properties, and extract curve control points, which will be rendered later with the compositor, so we save them for each frame. Of course we need camera properties: view and projection transformation to extract these curves. Information from the g-buffer is needed for z-testing and object id testing the curves before save. So for this tool we don't really need rendering, only the geometry and camera that is sent to the renderer, it is only an option to link this processing with depth and object id rendering, but we could also suppose that these images are already rendered (if there is a good way using max and vray to find out what is the name of the depth image and load it easily, I only need raw pixel data).
        We could also write a max plugin, but we should hande if a v-ray geometry is used

        Comment


        • #5
          You could do this for regular meshes. Such a plugin doesn't even need to be specifically targeted for V-Ray, the regular 3ds Max rendering SDK is sufficient for this.

          There are two problems though. The first is that V-Ray supports camera distortion, spherical cameras and so on. This may be irrelevant if you don't plan to support such features, but it may cause the lines not to match an actual render of the scene.

          The other problem is with geometry that is generated at render time, like displacement, proxies, fur etc. Again, this may be irrelevant if you don't need to support such features, but it may limit the scope of application for your plugin.

          Best regards,
          Vlado
          I only act like I know everything, Rogers.

          Comment


          • #6
            The second problem is what I'm worried about.. proxies and geometry scatter tools for vray are need to be supported. What can I do in these cases?

            Comment

            Working...
            X