Talk:ArtProjects/OpenAdv

From PixieWiki

Jump to: navigation, search

Let's speak

Contents

[edit] Pixie logo

I need Pixie logo. Please share logo with ~800x600 resolution and transparent background in png or svg file format.

Thanks to Okan. Now I have logo with 2184x808 resoulution. --AkhIL 23:34, 31 May 2006 (BST)

[edit] Caustic from car's chrome

How to make caustic from car chrome? Can you make simple example like sphere on plane with nice caustc effect? good ring example --AkhIL 17:25, 20 May 2006 (BST)

Ok. Now I know how to make caustic...

Image:AI_test_caustic_viewport.jpg Image:AI_test_caustic.jpg

--AkhIL 18:58, 22 May 2006 (BST)

The above jpg seems to be broken. Can you re-upload? Probably you want to use photons for caustics, I'll see if I can dig up an example. --Geohar 21:26, 22 May 2006 (BST)

Done! This example uses photon maps. Photon mapping is realy fast. But I have no cntrol for reflection. For example I have two surfaces. First is chrome and second is carpaint. For chrome I can use "chrome" model. But what about carpaint? It shines less then chome and have color. I kmow only one slolve for this problem - it is making two maps and then filtering one of them. Phton shaders will be nice in this situation.

[edit] About Pixie

Here's the modified patch which will be rolled out in the next release:

--- ../../../Pixie.1.6.3/src/openexr/openexr.cpp	2006-04-23 00:36:40.000000000 +0100
+++ openexr.cpp	2006-05-22 19:51:57.000000000 +0100
@@ -104,7 +104,19 @@
 						}
 					}
 					
-					// Get the gamma params (are these needed)
+					// Get the gamma params and quantization
+					if ((tmp = (float *) findParameter("quantize",FLOAT_PARAMETER,4))) {
+						// Needed to range-shift data even when writing as float/half
+						qzero			=	tmp[0];
+						qone			=	tmp[1];
+						qmin			=	tmp[2];
+						qmax			=	tmp[3];
+					}
+					
+					if ((tmp = (float *) findParameter("dither",FLOAT_PARAMETER,1))) {
+						qamp			=	tmp[0];
+					}
+					
 					if ((tmp = (float *) findParameter("gamma",FLOAT_PARAMETER,1))) {
 						gamma			=	tmp[0];
 					}

Problem with SegFault fixed by removing -fno-rtti and -fno-exceptions CFLAGS now I use CFLAGS="-O3 -fstrict-aliasing -funroll-loops -ffast-math -fomit-frame-pointer -mcpu=athlon-xp -march=athlon-xp -pipe"

Now I can continue. --AkhIL 23:48, 18 May 2006 (BST)

The patch doesn't work. Was the intention to comment out the quantization? If so, that's not the right thing to do, you should simply disable quantization on the Display line by passing "quantize [0 0 0 0]" after the other Display parameters. Maybe I'm misunderstanding the patch - I read it like it was removing the comments, but they are not present since 1.5.6, and then they were a #if. If infact it's adding the comments, then check which version of that file you have. Cheers --Geohar 08:08, 19 May 2006 (BST)

Excuse me for bad patch. I've just learn how to use diff utilite.

Problem was because I used:

Quantize "rgba" 0 0 0 0

instead of:

Display .... "quantize" "[0 0 0 0]"

Thanks for info! --AkhIL 00:49, 20 May 2006 (BST)

Strange. But with Display .... "quantize" "[0 0 0 0]" I have same blank image. --AkhIL 14:43, 20 May 2006 (BST)

Can you send a rib / shaders. I'll take a look? --Geohar 12:45, 21 May 2006 (BST)

In thes scene every exr which I got is blank Media:AI_problem_openexr.zip --AkhIL 00:21, 22 May 2006 (BST)

I've modified the patch above to fix the issue. --Geohar 21:23, 22 May 2006 (BST)

Thanks!!! I'll try it today! --AkhIL 01:30, 23 May 2006 (BST)

I propose one more pach.

--- openexr.cpp.0       2006-05-28 08:52:43.000000000 +0800
+++ openexr.cpp 2006-05-28 09:02:25.000000000 +0800
@@ -215,10 +215,16 @@
 
                                        // gold-standard quantizes unless you disable, is it really needed?
                                        // Apply the quantization if applicable
+                                       if (qone != 0 ) {
+                                               for (i=0;i<numChannels;i++) {
+                                                       data[i]                 =       qzero + (qone - qzero)*data[i];
+                                               }
+                                       }
+
                                        if (qmax > 0) {
                                                for (i=0;i<numChannels;i++) {
                                                        float   dither  =       qamp*(2*(rand() / (float) RAND_MAX)-1);
-                                                       data[i]                 =       qzero + (qone - qzero)*data[i] + dither;
+                                                       data[i]                 =       data[i] + dither;
                                                        if (data[i] < qmin)                     data[i] =       qmin;
                                                        else if (data[i] > qmax)        data[i] =       qmax;
                                                }


with this pach pixie does "quantize" [0.5 1 0 0] as well.--AkhIL 02:15, 28 May 2006 (BST)

[edit] We're working on uniform primvars issue

You noted that we need to fix pixie so that all primvars correctly intepolate to shader parameters. We're working on that. I've also fixed DelayedReadArchive parsing. Let me know if you need that fix. --Geohar 18:04, 1 May 2006 (BST)

[edit] RenderMan / L-Systems

You may want to consider K-3D, which is GPL, is explicitly designed to work with RenderMan engines, and includes an L-System plugin. Tshead 19:06, 1 May 2006 (BST)

I saw K-3D L-System. Any chance to automate K-3D via Python to get trees without launching GUI? --AkhIL 22:19, 1 May 2006 (BST)

Yes, we do this often for our regression tests - in a nutshell, you pass a command-line parameter to use a special "Null" user interface, then point K-3D to a script stored in the filesystem, or pass the script source via stdin. A script would be able to instantiate the L-System plugin, modify its properties, and collect the output. Tshead 22:10, 3 May 2006 (BST)

Can you give some examples? --AkhIL 22:36, 5 May 2006 (BST)

Yes, here's a bare-minimum script that generates an L-System, adjusts some parameters, and renders it using Pixie:

#python

import k3d

doc = k3d.application.new_document()

# Create an L-System node ...
lsystem = doc.new_node("LSystemParser")
lsystem.name = "test"
lsystem.file = k3d.share_path + "/lsystem/airhorse.ls"

# Instantiate it so it's visible ...
instance = doc.new_node("MeshInstance")
doc.set_dependency(instance.get_property("input_mesh"), lsystem.get_property("output_mesh"))

# Create a camera for viewing ...
camera = doc.new_node("Camera")

# Offset the camera from the origin so we can see our geometry ...
transform = doc.new_node("FrozenTransformation")
transform.matrix = k3d.translate3(0, 0, -5)
doc.set_dependency(camera.get_property("input_matrix"), transform.get_property("output_matrix"))

# Create a time source (mandatory for rendering) ...
time = doc.new_node("TimeSource")
time.name = "TimeSource"

# Create a render engine using Pixie and render ...
render_engine = doc.new_node("RenderManEngine")
render_engine.render_engine = "pixie"
render_engine.render_camera_preview(camera)

And here's a command-line that kicks it off without any UI:

$ k3d --ui none --script /path/to/script.py

Tshead 03:29, 10 May 2006 (BST)

I have problem with this script:

ildar@artstation sandbox $ k3d --ui none --script lgen.py           
ERROR: Unknown attribute: render_camera_preview
Traceback (most recent call last):
  File "<string>", line 31, in ?
AttributeError: Unknown attribute: render_camera_preview
WARNING: The following unknown command-line options will be ignored: --tutorials /usr/share/k3d/tutorials 

--AkhIL 06:45, 14 May 2006 (BST)

Forgot to mention - you need the version in CVS for this script to work, or wait a few days for the next formal release. Tshead 07:07, 15 May 2006 (BST)

[edit] BoogyMan for Blender, Blender to RenderMan exporter and shader generator

I've written more Python code for constructing shaders bricks and .sl code generation, this is prototype yet, but already work. Now I'm working on new design document.

BoogyMan has not very powerfull, but fast exporter. Faster than Ribber in 6 - 10 times, and has no dependency on CGKit and something other, except Blender and full Python distribution.

Image:Boogyman.png

May be it will be helpful for this project? --Qew 03:17, 7 May 2006 (BST)