General Category > ASL Scripts

RIBRobin

(1/2) > >>

Raxx:
For a while I've been wanting to dive into ASL and learn how to make useful stuff.

For a while I've been wanting to make a .rib converter for anim8or.

So I'm finally getting something done about it...it's nowhere near finished but I've got one good part done, actual meshes export properly (big thanks to Steve's export scripts as a foundation...the ASL documentation finally makes sense!).

My plan is to make it a toolset that allows you to use the object editor as a scene editor to make very nice still renders. I'll build shape plugin scripts where you can make a camera shape, light shapes, dummy shapes, etc where you can specify different parameters like camera FOV, light types and colors, shadows, and move and rotate the camera and lights like it was a real scene and it'll export it accordingly.


I might go one-sided and make it support only the Aqsis renderer (or something else I find) since it's free and easy to install. Making it dependent on a single renderman renderer will allow me to utilize the wowee features that are specifically built for them ;) but that's way in the future.

I'm not releasing anything yet. Once I get to the stage where it'll actually become halfway useful, then I'll start releasing the stuff. I'm just posting here my updates as I go along to keep things interesting.

I know one of you ASL/programmer junkies could probably whip out something better than what I've got so far like it's nothing but you just wait and see :P

mcheccyb:
inspired by my post on CGN?

nice going so far. Looks very promising.

how will things like reflections and glass be configured?

Raxx:
Don't give yourself too much credit ;) I've been a fan of .rib rendering since the days of MarkW's standalone ManifoldLab application.

For now I'll be trying to read as much information as possible from the materials and translating that over. Then based on that I'll either let users customize attributes via attributes or generate dummy parametric shapes to handle the data.

I'm having a heck of a time with making a camera shape, a very nice learning experience for making cubes and cylinders to make a nice camera object. I keep getting inverted normals because of sloppy face creation though -_-

I have a general question...Is there something wrong with converting from int to float or using two ints in an expression to create a float, or something?

Say I have this:


--- Code: ---int $width, $height;
float $aratio;
$width = 640;
$height = 480;

$aratio = $width/$height;

--- End code ---

That should return "1.33333" but it seems to do something else entirely...when I output to console it gives me "<<int>>" and when I try using it in another expression it doesn't give me expected results. Maybe this is a basic or something where I need to convert between types so can someone point me in the right direction?

Kubajzz:
There are 2 ways to fix your problem. First, you can use float variables instead of int for width and height, but that's probably not what you want to do...

What you need is to make Anim8or evaluate your int expression as a float expression. This is what I usually do:

--- Code: ---int $width, $height;
float $aratio;
$width = 640;
$height = 480;

$aratio = $width/($height*1.0);
--- End code ---

I hope it helped... Good luck with your project!

Raxx:
Thanks! I had a feeling it'd be something like that.


The only difference in look and feel between this camera and the scene camera are the reels on top
Camera shape is done and allows you to set the width, height, FOV, near clip, and far clip and when doing so the shape updates accordingly...now I'm stalled by the fact that you can't grab parameters from parametric shapes via scripts other than plugin scripts. This should be extended to any script! I've got some tricks to bypass the problem but it makes it 2x more difficult for me :P

Navigation

[0] Message Index

[#] Next page

Go to full version