Archive

Posts Tagged ‘Ogre3D’

Make your virtual world bloom with Python

March 10th, 2009
Comments Off

realXtend 0.4 makes use of OGRE postprocessing system. The two screenshots below give an example of one postprocessing effect, glass. First screenshot is a vanilla one, no postprocessing. The second screenshot has the glass postprocessing effect on. To move around with glass is an artistic experience. Some other postprocessing effects are motion blur (which could be turned on after some virtual beer), and black&white.

rexnobloom
rexglass

It is easy to play with different postprocessing effects by enabling and disabling them from the postprocessing effect dialog. Find the dialog from the realXtend viewer menu: view->postprocess. Effects can be set on so that they are on concurrently with other postprocessing effects. Results are, well, interesting.

postprocesseffects

The postprocessing effects can be also turned on or off from a script. This gives many application ideas:

o motion blur could be turned on after two beers, and turned off after a time-out
o if you go underwater, there is a suitable postprocessing effect for that too, it is called, ahem… UnderWater
o RexBloom is maybe one of the most useful, it is not very strong, so it can be used almost everywhere to enhance the lights and shadows nicely

Scripts allow turning postprocessing effects on and off when the user touches an object, moves into an object, or when the avatar enters the world.

In the next example we are going to set RexBloom on when the user enters the world. We will also add a teleport right at the start, so that it is easy to define the start location inside the world. You can see the RexBloom effect int the screenshot below.

rexbloomFirst the theory, use these two lines of code inside your Python script to control postprocessing effects:

vAvatar.rexSetPostProcess(vEffectId, True)
vAvatar.rexSetPostProcess(vEffectId, False)

vEffectId is the index number of the postprocess effect, the order is the same as in the postprocess dialog at the viewer (0=motion blur, 1=RexBloom, 2=Bloom_high, etc). The second parameter: True sets the effect on, False turns it off.
Here’s an example how to turn RexBloom on:

vAvatar.rexSetPostProcess(1, True)

To help you get started, dowload the zipped script folder CTN_python_worldinfo.zip, and extract it to rexserver->ScriptEngine->PythonScript. If you have the server running, you need to say “python restart” at the console window to load the new Python files. Do that also every time after you change Python scripts.

Now you need to edit ctn_worldinfo.py from the newly created CTN folder to get the right coordinates in, and to select which posprocessing effects should be on.

The worldinfo script needs to be connected to your world object. This can be done so that you just type “ctn_worldinfo.CTNInfo” to Class Name field of an object (it can be any object in the world):

pythonscriptobject

I’d like to thank Turquoise for inspiring me to write this brief howto. Also thanks to the realXtend project team who wrote the original Python scripts to work with.

realXtend , , , ,

realXtend crossplatform viewer update

March 9th, 2009
Comments Off

KirstenLee, who is one of the realXtend project members at sourceforge, reports that he achieved a breakthrough in realXtend crossplatform viewer development.

He says that now the most parts, including OGRE rendering works with OS X and Linux. The cross platform viewer will be probably released with version number 0.45 or 0.5 when it is ready and tested. The release date is still unknown.

rexping_polypforest

The cross platform viewer is based on realXtend 0.4 viewer and the latest SL Viewer enhanced with the best patches from the community. If you are in a hurry and want to run realXtend on Linux now, take a look at this earlier post: Take Wine and view realXtend on Linux.

There is also a completely new viewer, code name rex NG, under development at realXtend, read more about it here: realXtend starts a new from-scratch viewer. Lasse Öörni hinted in the recent interview that the rendering engine for rex NG will be integrated during the summer, so there is still a long wait expected.

realXtend rearranges community presence

realXtend project opens a new realXtend-dev mailing list for the discussion of developing realXtend on http://groups.google.com/group/realxtend-dev. The new list replaces realxtend-architecture mailing list.

reallXtend also opens a new GForge installation at http://dev.realxtend.org, where the new viewer will be hosted.

The wiki has also been moved to http://wiki.realxtend.org, and will be getting a face lift in the coming weeks.

The realXtend official forum will be closed, and CyberTech News offers a community driven replacement for that. This was agreed with the realXtend program manager Antti Ilomäki.

Important note to realXtend users: there is a fix available to the 0.4 viewer, it fixes at least one critical bug that prevented some 3d model import. The fix has been avaiable for some time already, but it is not marketed anywhere (except now, here).

OpenSim, realXtend , , , , , , , , ,

realXtend viewer 0.4 tech lead interview

March 6th, 2009

Lasse Öörni was the tech lead for the realXtend viewers 0.1 – 0.4. During that time he has learnt to know SL Viewer quite well. He is technically skilled and did many almost heroic development efforts when SL Viewer was forged to realXtend Viewer.

lasse_pumpkin

Lasse is an interesting person, and he is definitely not just your ordinary code developer. I just finished the book he wrote in a month, just before the launch of realXtend 0.4. Download the book: Agents of Metal.

Agents of Metal is an action-packed, violent story wrapped with conspiracy theories and aggressive metal music. The story has feelings and emotions, even a spark of love, so it is not just a single minded shooting gallery.

Have you ever wondered where the heavy metal music came from to some of the realXtend videos? Lasse is also a one man band; he plays guitar, bass, drums and sings vocals. Rex Ping plays one of Lasse’s songs, Vision Never Dies in the earliear article Rex Ping introduces MP3 player for realXtend. You can download the whole pack of Lasse’s songs here (free for non-commercial use).

lasse_live

Lasse, what was the biggest single thing you did to rexviewer (I bet it was OGRE integration)? How do you feel about it?
Yes, integrating & getting OGRE to coexist with the SL’s renderer. I’m not totally satisfied of what I did, considering how OpenGL driver bugs seem to cause crashes on some graphics cards, but at least it was a good learning experience.

What do you have to say about SL Viewer? Does it have a future?
For its original intended purpose, I don’t have bad things to say about it, and it certainly has some nice parts of code, like the UI. Yes, I believe it has a future.

What do you think about rex NG? What is your guestimate when there could be first public alpha version ready?
We’re only starting implementation, it’s certainly exciting to see where it will go. Anything I say is just a very rough guess, but internally we’ve planned some kind of essential tasks like basic rendering to be done in the summer.

How did you fit together writing AoM and making final crunch for rexviewer 0.4 at the same time?
I always write at evening or night anyway, and actually the crunch was somewhat relaxed as material support etc. critical tasks had already been done, so it was not too hard. Distractions, like Far Cry 2, were more of a problem.

What would you do differently if you could (with rexviewers 0.1 to 0.4)?
I would avoid the dual OpenGL contexts with whatever means necessary.

Anything you would like to say to ctn readers?
Well, stay tuned for the rex NG viewer, and Agents of Metal part 2!

realXtend , , , , ,

Opensim compared to other 3D world platforms

February 20th, 2009
Comments Off

aufzeichnenDear reader,

you did maybe already notice my strong interest in the vision of 3D web and usage of 3D software in real life collaborating scenarios.

Following twitter i found this very interesting new post of cleverzebra.com – the free Virtual Worlds for Business Q2 2009 ebook.

It is still very focused on training and meeting scenarios, but since this seems very simple to understand if we talk bout the benefits of 3D our first RL usecase will be training focused as well. You will read some more news on the Rl-usecases in ~2 weeks. Later on this year we will focus on other, non training based usecases.

Back to the ebook, i did enjoy the overview. And yes, opensim did receive a pretty nice summary. Talking about meetings and trainings, opensim is a very usable platform. The main point we need improvement are:

  • embeded application view (application sharing)
  • voice (3D spatial sound from each participant).
  • improved NINJA-physics (per joint definition of possible axis) would help

Embedded applicationsaufzeichnen4

Being in a 3D environment, it does not make any sense to use it just as a chat tool and open your document to share (or the data do look at, like measurements or a presentation) in a separate window. While collaborating on document (”move my mouse” techniques) may be just step 2, viewer must be included, soon. Best way would be to implement a handful of widely used clients. From what the industry demand is, usage of RDP(remote desktop protocol) is essential. it offers remote access even to the desktop (windows xp, vista, 7) and collaboration natively. The next important would be the usage of NX, which is well supported on *nix platforms, as well as on windows. its available open source and with commercial support. its capable of handling slow links and carries stuff like the graphical linux desktop . While it does not sound like it makes sense, ssh would be my choice #3. it has proven to be the secure transport for other things, and maybe is a tool that even helps to spread opensim by making opensim serversupport on linux easier.

A good place to learn from is project wonderland, based on darkstar server. As an basic intro, the video is great. As well, all people into opensim development and projects should spend 1h on their homepage. Just to add some visions. Check also CTN article: Follow the rabbit: how to test drive Wonderland.

voicezz

While there are some commercial add-ons and realxtend-groupd is working on the next voice generation based on XMPP / telepathy, we still have no solution, yet.

Be aware, that we need voice that is not only spatial, but enterprise-ready. it must be able to pass firewalls like skype does. Any technique that needs dedicated ports for incoming connections does not make sense.

The Lack of voice is for RL usecases maybe as essential like the lack of groups for inworld activities.

NINJA

NINJA? uh? Ninja Physics have been introduced recently. They are not even covered in the ebook. If you are not aware, maybe watch the videos here or here. Think about simulations in technical or biological areas. The only thing, that is missing right now is to define “this is a bowl joint, the possible movement are x/y/z degrees – and you did create a shoulder. That way medical classroom or remote diagnostic meetings would come pretty close. NINJA will be an enabler for some RL usecases.

I will not dive into graphics, since i think the work of e.g. realXtend is outlined in the ebook, at other blog sections and coming to us (via modrex), soon.

Cheers,

Ralf

Article represents personal opinion – trademarks apply – www.ralf-haifisch.biz

Darkstar, OpenSim, realXtend , , , , , , , , , , ,

realXtend particles: It is snowing!

January 12th, 2009

realXtend viewer allows you to upload OGRE particle effects. Common uses for particle effects are e.g. fire and smoke. Some ready made particle effects come with the viewer. You can find them from the “example_assets” folder from the viewer installation.

It was about time to get some snow!

It was about time to get some snow!

Tuco from the realXtend team tipped me about two downloadable particle effect editors: Particle Accelerator and FXpression. I downloaded them both and got Particle Accelerator to work for my setup.

There were plenty of examples where from you can copy code and save them as a .particle file. Particle scripts are text files which makes it easy to tweak them. I found it really necessary to do that as the effect did not look exactly the same as in the editor. Especially the scale was a bit different than in the editor, at first I got 4-meter snowballs attacking me as you can see from the screenshot below!

4-meter snowflakes look good too

4-meter snowflakes look good too

To get snow (as in the first picture) download the snow.particle script – right click and save-as. Then follow the steps:

  1. create a box, make it big so it is easier to find later
  2. upload snow.particle using the viewer file menu
  3. open the rex tab while editing the newly created box
  4. from the particle effect drop down menu, select the just uploaded particle script
  5. Go to object tab, change the position of the box to 128,128,200 and the snow will fall about evenly
  6. If the snow is going sideways or upside down, you might need to turn the box

I found out that it is easy to spend hours playing with different scripts…

realXtend ,

Tutorial: Creating a overhead projector using an RTT camera in realXtend

December 31st, 2008
Comments Off

via No there there

The RTT (Render-to-Texture) camera feature used in the previous tutorial can be exploited in numerous ways to create interesting devices for the realXtend platform. The good news for OpenSim fans is that that the realXtend functionality will soon be merged into OpenSim as an optional regionmodule which can be activated on a per region basis.

Today’s tutorial involves the construction of a realistic working overhead projector. It’s realistic to a point, but it doesn’t project the slides onto your avatar if you step between the projector and the screen! Here’s a video to give you a sense of what it’s like.

I’m going to assume that you can build or find a suitable projector and screen using the techniques described in the tutorial on the streamlined tool chain. I chose this one by Jeff and colored it with my own textures after assigning the mesh to a cubic prim. The screen is just a pair of thin rectangular prims. For this exercise I didn’t bother with a tripod or other mounting hardware. Further, I’ll assume you can create a slide and place it on you projector, much like this:

projector-starting-point

Create a small cube to hold the RTT camera and position it above the slide near the mirror and lens. The projector I’ve chosen has an offset mirror & lens so I place the RTT camera directly above the slide where the mirror and lens should be. Dimensions of 0.05m cubed should be fine.

Drag a texture on the blank screen and record its UUID. Modify the samplertt.py script in the following ways and save it as overheadrtt.py. The key five lines in my script are:

pos = self.llGetPos()
lookAt = pos + Vector3(0, 0, -0.340)
cameraName = “overhead_cam”
textureId = “303a8c94-e879-4215-a3a9-43f0cf77caa7″ #slide_texture
textureWidth = 512
textureHeight = 512

The script is assigned to the cube by setting the class name to overheadrtt.RttCam (case-sensitive.) The first line gets the position of the cube. The second line tells the camera to look at a point .34m below. You should determine this value by calculating the difference between the center of the cube and the top surface of your slide. (It won’t matter if you use the Z-coordinate of your slide since the slide is very thin.)

After you save the script and restart the Python interpreter, you’ll see an inverted image which may be rotated if you rotated the slide object or the screen object while positioning them. Remove all rotations by setting the angles to zero and try to compensate by rotating and flipping textures. You can also decide whether you want conventional overhead projector behavior where the presenter faces the audience and the slide is oriented the correct way for the presenter, or whether you want the slide oriented towards the audience as it is in my example.

Before we finish, we have to deal with the plywood block. You can shrink it to .001m cubed, change the color and even make it almost transparent. Before you do any of this, link the projector to the cube and edit linked parts to select the cube. It can be very difficult to find a completely transparent cube! A better solution would be to implement a command in the script to toggle its transparency between 0 and 100%. You can combine this action with the existing logic that turns the RTT camera on and off.

If you have a collection of slides in a textures folder, you can drag the textures at will onto the top surface of the slide. You can amuse your audience by moving the slide around with your mouse. (You don’t have to edit the slide prim to do this.)

I leave it as an exercise for the reader to organize a slide flipper and a nice animation for the presenter to flip the slides.

realXtend , , ,