POVMAN

POV-Ray stuff from a part time POVver. Are you a POVMAN?

Thursday, April 27, 2006

SOTW Light Surprise

OK so I have up to three area lights randomly rotated around the Space Ship. Last night I change the random seed value, havn't done that for a few renders, and suddenly all the light sources are on the far side of Space Ship.

The nearside of is not lit. I realised what had happend about 10 rows into the render and was about to stop it rendering...

... when I had to let the dog out. So I come back and the render is finshed. WOW! Fantstic effect, all of the structures on the Ships surface are back lit with no forward detail shown.

The moral of the story, I guess, is dont stop renders that you can leave. The result might be unexpectedly good.

Tuesday, April 25, 2006

SOTW Continues

Man Oh Man. I've discovered that completely random textures are resulting in awful, terrible, in fact rubbish results, when applied to space ships. I think I'm goige to have to come up with a few set "finish" statements, a few patterns, and a few pigments and randomly apply these.

It seems to be a case of expectation. What you expect to see on a spaceship effects your interpretation. So the Yellow and Purple leopard pigment with stretched agate normal is out, and the slick gray cells pattern is in.

Thursday, April 20, 2006

SOTW Continues

The SOTW project is going on. Huge props and thanks to the guys on the POV-Ray news groups who pointed me at the Reorient_Trans function which can be found in one of the standard includes.

I needed the function to position various Widgets on the Hull surface. I was using the Trace function to fire rays at the hull from random directions which was giving me the location of the hull-ray intersection. So I was able to translate my Widgets to the location.

Unfortunatley my Widgets where not rotated perpendicular to the hull surface and the result was awful!

The simple wonderfull answer was to use the fourth parameter on the trace function, store this into a variable and then pass it to the Reorient_Trans function, which gave me the rotation I needed.

Thanks you guys!

Wednesday, April 19, 2006

A Dirty Wall

Not a real tutorial but a guide, or something like that.

Anyway the sad thing is that the medium of Blogging has not caught up with POV-Ray SDL formatting I like to use ( lots of tabs ) so sadly all my nicely laid out code has had to be compressed and streamlined to fit on the blog. Sad.

The code below shows the process I followed recently when I wanted to make the bottom of a wall, dirty. You know, when all the splash and muck splats along the bottom of a wall.

This scene shows the basic stages of texturing the wall. If you render the scene as is, then change the value allocated to "stage" from 1 to 2 and render again you'll see what change I made. You change the value of thru the range 1 to 9, as I've included 9 main stages in building the texture. I've included comments in the code so that you can see what I've changed and why.

#include "colors.inc"

camera{location <0,1.2,-5>look_at<0,1,0>}
light_source {<-50,100,-50>color White}
background { color <0.25,0.35,0.80> }
plane {y, -1 pigment{color rgb <0.7,0.5,0.3>}}
#declare stage = 1; //change from 1 through 9


// basic brick texture to start with
#if(stage=1)
#declare wallTexture = texture {pigment {brick}};
#end


// shrink the brick pattern as its too big
#if(stage=2)
#declare wallTexture = texture {pigment {brick scale .2}};
#end


// add in the second texture that will be the mud/dirt
#if(stage=3)
#declare wallTexture = texture {pigment {brick scale .2}}
texture {pigment {marble // parralel lines of colour
pigment_map {
[0 Clear] // transparent
[1 Black] // muddy color}}};
#end


#if(stage=4)
#declare wallTexture = texture {pigment {brick scale .2}}
texture {
pigment {
marble rotate <0,0,90>// rotate pattern so it lines up with floor
pigment_map {[0 Clear][1 Black]}}};
#end


#if(stage=5)
#declare wallTexture = texture {pigment {brick scale .2}}
texture {pigment {
marble rotate <0,0,90>
scale 5 // enlarge the pattern
pigment_map {[0 Clear][1 Black]}}};
#end


#if(stage=6)
#declare wallTexture = texture {pigment {brick scale .2}}
texture {
pigment {
marble
rotate <0,0,90>
scale 5
translate <0,1.4,0> //translate the pattern so densest part is on the floor
pigment_map {
[0 Clear]
[1 Black]}}};
#end


#if(stage=7)
#declare wallTexture = texture {pigment {brick scale .2}}
texture {
pigment {
marble
rotate <0,0,90>
scale 5
translate <0,1.4,0>
pigment_map {
[0 Clear]
[.6 Clear]// extend Clear area
[.9 Black] // extend the solid part
[1 Black]}}};
#end


#if(stage=8)
#declare wallTexture = texture {pigment {brick scale .2}}
texture {
pigment {
marble
rotate <0,0,90>
scale 5
translate <0,1.4,0>
warp{turbulence <0,.5,0> } // turbulate the pattern
pigment_map {
[0 Clear]
[.6 Clear]
[.9 Black]
[1 Black]}}};
#end


#if(stage=9)
#declare wallTexture = texture {pigment {brick scale .2}}
texture {
pigment {
marble
rotate <0,0,90>
scale 5
translate <0,1.4,0>
warp{turbulence <0,.5,0> }
warp{turbulence <1,0,1> } // additional turbulence 'cos I had to tinker
pigment_map {
[0 Clear]
[.6 Clear]
[.9 Black]
[1 Black]}}};
#end

box {<-2,-1,0>,<2,2,.1>texture { wallTexture }}

Wednesday, April 12, 2006

SOTW Current Project

Well I've just started a new project. I'm calling it Spaceship Of The Week. I'm taking my lead from the now classic Landscape Of The Week that was flying around the Message Boards a few months back.

The LOTW was a set of macros that took a random seed value and produced a random landscape, complete with sky, trees and rocks. The end results were fantastic.

I recently knocked up a sci-fi "Lodge ship" which used random features to decorate a cylinder, including windows, lights, radio masts, and misc' blocks of unknown purpose. Each of these items was crafted to my specific needs in this case. But I was inspired to see what I could do with it.

So I started with an SDL file called "SOTW". This includes a light, camer a couple of standard includes.

Next I created another include that I've called SOTWSpace. This returns a huge hollow sphere populated with a random selection from the "stars.inc" include that comes with POV-Ray, I intend to add a few more options to this file later.

Next I created another include called "SOTWHull" which returns a random basic shape for the ships hull. This is what I'm working on at the moment. So far it selectes a random primative, which it then rotated, scaled and sheared a random number of times.

Sadly the results so far are far from good. I keep getting shapes that are too thin for my liking. I need to modifiy the weighting of the random transformations to prevent it returning extreems.

I could justify the extreem hull shapes by saying anying it viable without atmosphere, but you know, some things just dont look right. even when they are.

I've a long way to go yet, I'll try and kep you "Posted". Any suggestions for this set of macros will be gladly read...

Monday, April 10, 2006

Tip 18

This ones a no-brainer to old POVers but it's something I did this weekend and I thought I mention it here.

I was rendering a scene with many chess pawns in it but wanted one to stand out. I didn't want to change the scene lighting by spotlighting the pawn in question. Instead I used a simple and sometimes subtle ambient setting on the pawn in question.

All of the other pawns had an ambient of zero, but I gave this pawn an ambient of 0.2 .

The result was slight "enhancing" of the one pawn. Not too much, not too obvious, but enough to draw the eye, which is what I wanted.

Tuesday, April 04, 2006

Oh the frustration...

Ok, so I'm doing a space ship. Its a large space ship, so I want to give it a focal point. Fine, no problem. Suddenly the Starfield background stars disapear. Perhaps I'm not destined. Oh hang on. Maybe if I build a CSG lens in front of the camera I can get the same effect without all of the star loss...

Should have studied optics at college.