Instancing problem...?

For all the users of Twilight Render (V1 & V2), to ask questions and get started
tomsdesk
Posts: 196
Joined: Thu Aug 27, 2009 1:15 pm
Contact:

Instancing problem...?

Post by tomsdesk » Mon Dec 21, 2009 8:49 pm

So I had the bright idea to do some trees with full 3d trunks/branches, anchoring face-me leaf bunch png components where needed on the branches...allowing the tree to be rotated in place for different views of the same tree (getting real :`) while taking advantage of the byte savings of the leaf-bunch png trick. Worked great in SU...not so much in Twilight: It appears copies of the original tree component (or group) are rendered with the png orientation of the original, so when the tree is rotated, while looking great in SU, renders out on edge...? Exploding down to loose face-me leaf components (and also regrouping each tree individually) solves the problem. (Last image is how they should and do look in SU.)

Any fix besides exploding the trees and loosing the benefits of multiple components?
Attachments
!1rotatedcomponets.jpg
!1rotatedcomponets.jpg (167.85 KiB) Viewed 9613 times
!2rotatedgroups-outsidecompnentsexploded.jpg
!2rotatedgroups-outsidecompnentsexploded.jpg (184.95 KiB) Viewed 9588 times
!3all0utsideexploded-loosefacemes.jpg
!3all0utsideexploded-loosefacemes.jpg (201.6 KiB) Viewed 9585 times

Chris
Posts: 5346
Joined: Sun Mar 08, 2009 3:00 am
OS: Win10
SketchUp: 2016

Re: Instancing problem...?

Post by Chris » Mon Dec 21, 2009 10:35 pm

Hm... that is a problem. In Twilight, an "instance" is a literal copy, down to the last vertex. Obviously SU doesn't treat instances that way; it evaluates each one separately for 'face me' behavior. When Twilight prepares a scene for rendering, it only makes a single copy of components; this save A lot of processing time, and a lot of render time too.

There is one existing solution.
In the 'Advanced' tab, under Grouping Method, if you select "Per Material" instead of "Definitions / Instances", it should render each component independently. But I don't know for certain how SU will respond; Face-Me's are always a little touch and go.

Some possible future options:
A render option to treat all components with Face-Me's in them as groups instead of components.
A context-menu option for each instance (or component definition) to treat that specific instance or definition as a group. If it's stored "per definition" you could pre-configure the trees so that anyone using them would have them render correctly 'out-of-the-box'.

tomsdesk
Posts: 196
Joined: Thu Aug 27, 2009 1:15 pm
Contact:

Re: Instancing problem...?

Post by tomsdesk » Tue Dec 22, 2009 12:57 am

Hey Chris, thanks for your quick response...man, you guys are good!

First, I tried the "per material" suggestion...but it didn't make any difference.

Next, tried exploding the component, then grouped the trunk/branches component with the loose face-me png components, before copying...but, same results as with full tree components.

About then I noticed it wasn't the original, but the last copy, that set the render orientation of the face-me png components...very interesting?

Guess I'll have to warn folks about exploding if rotated until/unless you find some other trick, but thought give you this info to put in your pipe to smoke in the meantime :`)
Attachments
group containing loose face-me png components and the regular trunk/branch component
group containing loose face-me png components and the regular trunk/branch component
!0u2-1first.jpg (202.55 KiB) Viewed 9569 times
right tree copied from the first and rotated
right tree copied from the first and rotated
!0u2-2rightlast.jpg (190.71 KiB) Viewed 9561 times
left tree copied from the first
left tree copied from the first
!0u2-3leftlast.jpg (215.54 KiB) Viewed 9560 times

Gaieus
Posts: 426
Joined: Thu Aug 27, 2009 9:08 am
OS: Win XP + SP3
SketchUp: 6 7 8
Location: Pécs, Hungary
Contact:

Re: Instancing problem...?

Post by Gaieus » Tue Dec 22, 2009 9:57 am

Hi Tom,

Do I remember correctly that you are a SU Beta tester?
The case is that when SU 7.1 Beta came out, it had serious issues with face-me components either exported (say in Kerkythea) or rendering with any built in apps (Podium, Twilight, IDX etc...). Fortunately it was soon fixed but this seriously resembles that issue (just your components are more complex)
Gai...

tomsdesk
Posts: 196
Joined: Thu Aug 27, 2009 1:15 pm
Contact:

Re: Instancing problem...?

Post by tomsdesk » Tue Dec 22, 2009 1:11 pm

Gai, thanks for the headsup...and I sure wish it had worked: I was using SU7.1 dated 9.27.09 and updated to 12.22.09 this AM, to no avail :-(

Frederik
Posts: 1080
Joined: Sun Mar 08, 2009 8:16 am
OS: Win Vista Ultimate
SketchUp: SU 8.0

Re: Instancing problem...?

Post by Frederik » Tue Dec 22, 2009 3:03 pm

tomsdesk wrote:...and I sure wish it had worked: I was using SU7.1 dated 9.27.09 and updated to 12.22.09 this AM, to no avail :-(
Please remember what Chris wrote... ;)
Chris wrote:Some possible future options:
A render option to treat all components with Face-Me's in them as groups instead of components.
A context-menu option for each instance (or component definition) to treat that specific instance or definition as a group. If it's stored "per definition" you could pre-configure the trees so that anyone using them would have them render correctly 'out-of-the-box'.
Without promising anything (I can't since I'm not the person coding TWR), I'm certain that Chris will nail this, so that it works in TWR... ;)
Cheers
Kim Frederik
Twilight Render Support
“…Life is drawing without an eraser...”

tomsdesk
Posts: 196
Joined: Thu Aug 27, 2009 1:15 pm
Contact:

Re: Instancing problem...?

Post by tomsdesk » Tue Dec 22, 2009 4:18 pm

Thanks Frederik...this is not a problem, just an inconvenience: of which, there have been few with this wonderful software. I will restate, so Chris' investigation goes as simply as possible, there seems to be the same problem with groups as with components...?

Chris
Posts: 5346
Joined: Sun Mar 08, 2009 3:00 am
OS: Win10
SketchUp: 2016

Re: Instancing problem...?

Post by Chris » Tue Dec 22, 2009 4:41 pm

tomsdesk wrote:I will restate, so Chris' investigation goes as simply as possible, there seems to be the same problem with groups as with components...?
Actually that is an interesting point. Groups are definitely not supposed to act that way... So when you only have groups, no components at all, it still doesn't render correctly? That is definitely a problem. I'll have to do some testing and see what, if anything, can be done about it.

tomsdesk
Posts: 196
Joined: Thu Aug 27, 2009 1:15 pm
Contact:

Re: Instancing problem...?

Post by tomsdesk » Tue Dec 22, 2009 5:00 pm

In case I'm not on the same page: the tree here tested consists of a regular component (the trunk/branches) and several face-me components (the leaves) which have been grouped together as a tree, then copied. If I don't group the tree components (trunk and leaves) together before copying: they all render fine (I can also group each individual tree together separately after copying). This tree-group seems to be working the same as if I made the tree parts into a tree-component.

Chris
Posts: 5346
Joined: Sun Mar 08, 2009 3:00 am
OS: Win10
SketchUp: 2016

Re: Instancing problem...?

Post by Chris » Tue Dec 22, 2009 9:09 pm

Ah, I understand now. I was misunderstanding.

The one thing that comes to mind, something I think I saw on SketchUcation, that there is a 'bug' in SU where groups that are identical, ie. cut-and-paste, are actually treated as if they were instances of the same component. When a group is edited in some way, SU, internally, breaks that group from the others, making it unique. It seems quite possible that this is a problem with the data SU is delivering to Twilight, exact copies of the same geometry, instead of separate unique groups. If that is the problem, I'll have to give some thought about how Twilight can work around this problem (It would only be an issue with groups containing Face-Me components).

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 24 guests