Starter food for virtuaLight tips section

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Starter food for virtuaLight tips section // Archive: Tech Forum

1  |  

Post by Leif // May 6, 2007, 6:42pm

Leif
Total Posts: 276
pic
You can incorporate shapes in render by editing a text file and including it in the virtuaout reflectance shader.


The following text is saved as vltest.vs:

Shape [

ImplicitSurface(-exp(-x*x-y*y-z*z)+(exp(-x*x*4-z*z*4)+exp(-y*y*4-z*z*4)+exp(-x*x*4-y*y*4))*0.5+0.175)

Bound((-1,-1,-1), (1,1,1))

]

and then an object is painted with this material. That is enough to bring it into the render.

(The shape is copied from an example file that is included in the free VirtuaLight package.)


Compare the following two screenshots, the first is showing before render, the second is after render with virtualight. Notice the extra object, which is the shape written in the include file.

(You can also see the shape in the material preview render.)

5776

5777


This is just a very quick example.

Post by Leif // May 6, 2007, 7:18pm

Leif
Total Posts: 276
pic
A mandelbrot height map

Declare primitive = Shader [ PlainSurface [ Color '.96, .8, .69' Kd 0.85 Ks(0.25,'1,1,1') Kr 0.1 BlinnSpecularBRDF 10 ] ]


Shape [

PlanarHeightField("e:\mandelbrot.tga", SmoothNormal)

Scale(10, 0.02, 10)

primitive

]

5778

Post by Burnart // May 6, 2007, 8:07pm

Burnart
Total Posts: 839
pic
Good on you Leif - that Mandelbrot render is wild. Must give it a try.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn