Night Time Zephyr Cove

Show us what you can do! Let us know how you did it!

Re: Night Time Zephyr Cove

Postby andylegate » Sat Jun 14, 2008 4:32 pm

Thing is Chacal, when I look at all the Uru Ages that I've imported in Blender, yes, all the visable objects have colliders instead of bounds of course, but the colliders I look at are just as complex geometry as the visable object itself! Almost like a copy of the object, moved to a different layer, untextured and simply made into a collider.

The problem of testing this is the size of Zephyr....with over 2,000 visable objects.......well, it'd take a time just to see what happens. Maybe doing half? Don't know.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Night Time Zephyr Cove

Postby Grogyan » Sat Jun 14, 2008 5:02 pm

This plan sounds like its only going to make things worse.

I think talking with Nad on vis regions would be a better way to go to have them implemented
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Night Time Zephyr Cove

Postby andylegate » Sat Jun 14, 2008 5:12 pm

The problem with that is:

I've worked with several people here on Visregions: Result is, they see that I'm doing everything they tell me, and they STILL don't work, so they don't know what is going on either. Right now, it looks like other parts of the PyPRP is being worked on right now, and Visregions was thought to be done, fanito, completed, over and out. So they'd have to back track. And I guess it's on a back burner for now. So my hands are tied until someone that knows the PyPRP script, and can also test their own Visregions finally does so, and then figures out what is going on, is the only thing that will work I guess. :shrugging:
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Night Time Zephyr Cove

Postby Trylon » Sun Jun 15, 2008 12:08 am

Note:
Only objects that have physical bounds are camera colliders too.
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Night Time Zephyr Cove

Postby D'Lanor » Sun Jun 15, 2008 7:19 pm

Thanks Trylon. That should make things easier.

I tried to make a wizard to do this automatically. It adds the "physical.campassthrough: true" AlcScript to all objects with physical bounds with the exception of regions. Unfortunately I have run into a strange bug.

I read the AlcScript with the PyPRP AlcScript parser, then I add the extra info to the dictionary where needed. But when the new AlcScript is written to the text datablock, somehow the order of the pythonfilemods comes out differently. And that is bad, because that order determines the index number which is hardcoded in the Uru Python scripts.

Apart from that single bug the script works as intended.

Here is my code. Does anyone know why this goes wrong? :?

Code: Select all
#!BPY

"""
Name: 'PyPRP Remove Camera Avoiders'
Blender: 245
Group: 'Wizards'
Tooltip: 'Set AlcScript <campassthrough: true> for colliders'
"""

from Blender import Object
from alc_AlcScript import *
from alc_Functions import *

objlist = Object.Get()
AlcScript.LoadFromBlender()

for obj in objlist:
    objscript = AlcScript.objects.FindOrCreate(obj.name)
    if obj.rbFlags & Object.RBFlags["BOUNDS"]:
        cam = FindInDict(objscript,"physical.campassthrough",None)
        type = getTextPropertyOrDefault(obj,"type","object")
        if cam is None and type != "region":
            StoreInDict(objscript,"physical.campassthrough","true")

if len(AlcScript.objects.content) > 0:
    blendtext = alcFindBlenderText(AlcScript.ObjectTextFileName)
    blendtext.clear()
    alctext = AlcScript.objects.Write()
    blendtext.write(alctext)
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Night Time Zephyr Cove

Postby Grogyan » Sun Jun 15, 2008 9:28 pm

The alc prefix needs to be changed to prp, seems to be ok but then i'm playing with the bleeding edge in SVN
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Night Time Zephyr Cove

Postby Trylon » Sun Jun 15, 2008 11:54 pm

I think the order problem may be in the Alcscript Write function. It looks like your code is ok.
(btw, better call the .FindOrCreate(...) function after determining if the object needs to have the campass property changed)
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Night Time Zephyr Cove

Postby D'Lanor » Mon Jun 16, 2008 12:09 pm

Yeah, it is the sorting in the Write function. I could copy that function and customize it.

Still I think in time we need to be able to set custom indices for pythonfilemods. The sequential increments are fine in most cases but there are global Cyan Python files which skip a few indices so we will not be able to call those (unless we define a few fake pythonfilemods in between).
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Remove Camera Avoiders

Postby D'Lanor » Tue Jun 17, 2008 7:49 am

Here is a Remove Camera Avoiders Wizard. It adds the following AlcScript to all objects with physical bounds (except regions).

Code: Select all
    physical:
        campassthrough: true

I decided to disable pythonfilemod sorting in the PyPRP alcscript module and provide this custom file along with the script. The same fix has been submitted to the SVN for inclusion in PyPRP 2.0, but for now you'll have to use the module in the zip file.

Important information:
This will rewrite your alcscript and totally rearrange it. So be sure to save to a new blend file before you try.
This is for PyPRP 1.4.0. It won't work with the bleeding edge version.

anticam.zip
(3.87 KiB) Downloaded 249 times

Just unzip both files to your Blender scripts folder and the script will show up under "Wizards".
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Night Time Zephyr Cove

Postby Grogyan » Fri Jul 18, 2008 5:25 pm

Hey Andy, did you want to try vis regions again, Christian has fixed a bug in his contrib folder that just may have been the cause to why it doesn't work for you.

Just an idea
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

PreviousNext

Return to Tips and Showcase

Who is online

Users browsing this forum: No registered users and 0 guests