Q: Have bounding box scale relative to an instanced object

   8757   13   2
User Avatar
Member
257 posts
Joined: Nov. 2010
Offline
Good day,

my problem is as stated in the thread's title, right now have boxes copied onto points where cached geometries were instanced onto. Trying to light the scene but it's tedious when i cant visualize how big that particular instance is. I could live with it but… wondered if there's a method of viewing the wireframes of the actual geometry despite using delayed load instancing.

is this is a common problem where there is no way around it? Scanned the forums, haven't found helpful tips & thought may be i was looking at wrong places, can someone point me to a thread or even better provide a solution?

Anything is appreciated!

eitht.

Attachments:
instanceBB_sc.png (255.7 KB)

User Avatar
Member
8583 posts
Joined: July 2007
Offline
standard way of visualizing instances is with copy sop on maybe reduced number of points with broxy geometry or bbox
have you seen this for example?
http://www.sidefx.com/index.php?option=com_content&task=view&id=1050&Itemid=216 [sidefx.com]
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
257 posts
Joined: Nov. 2010
Offline
Thanks for the firefighter respond!

Ahhh no, i've had a glimpse at that while scrolling through that page some time ago. Will look at it now & come back if i have further questions.

eitht.
User Avatar
Member
257 posts
Joined: Nov. 2010
Offline
Read the page on instancing & tried doing it, wasn't able to make it work for me. Is there something i am not understanding? Using a $switch attribute to have 3 different cached geometries or it doesn't work for my case?

Again, i am trying to get the proxy boxes to have the same scale as the instance objects.

In the hip file, i simplified the scene as the files would be too large to upload.
Hope is it sufficient for anyone to understand what's happening.

Thanks in advance!

eitht.

Attachments:
cached_bgeo.zip (4.1 KB)
instancePreview_02_test.hip (1.6 MB)

User Avatar
Member
121 posts
Joined: July 2008
Offline
Hi eitht,
I've been looking at your file and I never saw that the delayed load was used like that.
The delayed load and the instancing are two different things and it seems your mixing them up.

Instead of using a delayed load in the material you can add another point SOP in your tree and use the instance parameter on the particle tab to define the object to be instanced like you would in your setup with the $SWITCH attribute. This you would than replicate in your copy setup for the proxies.

At the top of the instance object you have some spare parameters for the proxies.

Cheers,
Claudio



Available for new projects

Attachments:
instancepreview_06_DEF.hipnc (2.0 MB)

Available for new projects
User Avatar
Member
257 posts
Joined: Nov. 2010
Offline
You nailed it, it's exactly what i wanted! Really kind of you to work on the file and on top of that - you made some handy switches. Took some time for me to look at the modifications.

/obj/obj_`stamp(“../copy2”, “switchVar”, 0)`
My guess is it's meant for proxy boxes so they know the scale of the objects?

point(“../OUT_INSTANCE_1”, $PT, “switch”, 0)
Claudio, could you or anyone else out there can explain to me about this expression used?

I probably could use your method when lighting the scene and bring delayed load back into play upon render, would still be great if it could be part of this network to avoid the extra work.

Thanks again for lending me a hand, Claudio!

eitht.
User Avatar
Member
121 posts
Joined: July 2008
Offline
Hi eitht,
Glad I could help.

/obj/obj_`stamp(“../copy2”, “switchVar”, 0)`
My guess is it's meant for proxy boxes so they know the scale of the objects?
It does exactly that, you need the same iteration here as you use for your instancing. Otherwise your copy wont mach your instancing.

point(“../OUT_INSTANCE_1”, $PT, “switch”, 0)
What the point SOP does is, it fetches the switch point variable coming from the OUT_INS… node. Then this value is stamped to the object merge to import the same object that would be instanced.
Another solution would be to just use the $SWITCH variable here and remove the point expression.

Cheers
Available for new projects
User Avatar
Member
257 posts
Joined: Nov. 2010
Offline
Got that, couldn't fetch the cached geometries in using Object_Merge (your geo were all on object level). Felt a little silly until my lecturer pointed me to the “File SOP”, why didn't i think of that!

Dont have time to upload the sample file now but do drop a post if anybody wants to take a look.

See you around, cheers claudio! :wink:

eitht.

Attachments:
proxyPreview_scap_02.PNG (285.0 KB)

User Avatar
Member
330 posts
Joined: July 2007
Offline
Dont have time to upload the sample file now but do drop a post if anybody wants to take a look.

wd be great .

no pressure , no rush . whenever you may find some free time ..

thanks ! ( to you and claudio_101 , oc )
except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
257 posts
Joined: Nov. 2010
Offline
Sorry, here's the file. I am unable to upload the .bgeos i used used. You could save out a bunch of primitives (teapots, boxes etc) following this naming convention - rock_object*.bgeo to a folder named “mantraArchive_out”.

This way the path used below in “Material SOP” doesn't break.

$HIP/mantraArchive_out/rock_object`$switch`.bgeo

Hope i did not clean up the file too little or too much for people to understand.

eitht.

Attachments:
pointInst_dl_rocks.hip (347.7 KB)

User Avatar
Member
330 posts
Joined: July 2007
Offline
thanks again , eitht .

i appreciate this ..
except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
121 posts
Joined: July 2008
Offline
thx for sharing eitht. :wink:
Cheers
Available for new projects
User Avatar
Member
257 posts
Joined: Nov. 2010
Offline
It's the less i can do, the forums been very kind.

eitht.
User Avatar
Member
257 posts
Joined: Nov. 2010
Offline
My mistake, i deleted the rock02 shader which consist of delayed load.
This new file has it.

eitht.

Attachments:
pointinst_dl_rocks_210.hipnc (897.9 KB)

  • Quick Links