Instancing Components

Announcements, requests and support regarding SkIndigo - the Sketchup / Indigo exporter.
User avatar
Frutiger
Posts: 122
Joined: Wed May 05, 2010 4:05 am
Location: Northern California

Re: Instancing Components

Post by Frutiger » Fri May 20, 2011 3:27 am

So, sounds like this feature may be launching with Indigo 3.0? I'm betting whaat's a very busy wizard right now.

ieatfish
Posts: 127
Joined: Sun Jan 31, 2010 5:29 pm

Re: Instancing Components

Post by ieatfish » Wed Jun 01, 2011 5:26 am

I HATE having to put plants in Sketchup files since Google still hasn't figured out how to make Sketchup handle large poly counts. This is awesome! Thanks Whaat, you do great work!
Intel Core-i7 @ 4.0 GHz | GTX 580 | 12 GB RAM

User avatar
Aflac
Posts: 14
Joined: Wed Feb 18, 2009 10:41 am
Location: Everett, WA
Contact:

Re: Instancing Components

Post by Aflac » Tue Jun 07, 2011 7:26 am

I tried this instancing method and I got the model to load into indigo with all the correct materials, but it doesn't seem to keep the tree object in the correct location or orientation. No matter how far I zoom out, when the image loads in indigo the tree is always appearing right in front of the camera. Any ideas on how to fix this?
Attachments
Tree - Indigo.png
Tree - SketchUp.png

User avatar
snorky
Indigo 100
Posts: 331
Joined: Fri Apr 17, 2009 8:54 pm
Location: Parma, Italy

Re: Instancing Components

Post by snorky » Tue Jun 07, 2011 11:01 am

simple.
external model have different SCALE ORIGIN and AXES
2 way...
1) modify source (external object); try this:
http://meshlab.sourceforge.net/

2) modify component:
exchange axes "Y" and "Z"
scale "up" component's objects
and scale "down" component
example
scene in meter, external object in inch
real tree 10meters, external object 393.70inches --> indigo render 393.70meters
edit component
scale all faces of component x39.37
close component
scale component x0.0254
result "fake" 10meters tree but scaled correctly.

User avatar
Frutiger
Posts: 122
Joined: Wed May 05, 2010 4:05 am
Location: Northern California

Re: Instancing Components

Post by Frutiger » Wed Jun 15, 2011 11:22 am

Any word on this working with Skindigo 3 on a mac, Whaat?

User avatar
Frutiger
Posts: 122
Joined: Wed May 05, 2010 4:05 am
Location: Northern California

Re: Instancing Components

Post by Frutiger » Wed Aug 10, 2011 9:33 am

snorky wrote:simple.
external model have different SCALE ORIGIN and AXES
2 way...
I'm just understanding this. Thanks Snorky!

User avatar
Whaat
Developer
Posts: 1827
Joined: Fri Dec 22, 2006 6:15 am
Location: Canada
Contact:

Re: Instancing Components

Post by Whaat » Wed Aug 10, 2011 9:54 am

Frutiger wrote:Any word on this working with Skindigo 3 on a mac, Whaat?
I intend for this to work on a Mac as well.

User avatar
Frutiger
Posts: 122
Joined: Wed May 05, 2010 4:05 am
Location: Northern California

Re: Instancing Components

Post by Frutiger » Thu Aug 11, 2011 5:04 am

Whaat wrote:I intend for this to work on a Mac as well.
Actually, it does work on mac! Sorry for the misleading information earlier. I was doing something wrong.
SS.jpg
From this.
Victory.jpg
To this!

User avatar
Frutiger
Posts: 122
Joined: Wed May 05, 2010 4:05 am
Location: Northern California

Re: Instancing Components

Post by Frutiger » Tue Aug 16, 2011 6:26 am

So here's the problem I'm running into.

I'm using some xFrog trees that I have that need to be scaled by a factor of .0254 (as revealed by the illustrious Snorky) in order to be rendered in the proper size when referenced as an external mesh. I've been using Meshlab to do the scaling and resaving, and it does a great job, especially for a free program!

Unfortunately here's where the problems arise. After exporting a file from Meshlab and linking it as an external mesh in skindigo, the textures appear to lose their naming and take on some sort of default name (eg material_0, material_1, etc). This isn't a problem when using only one external reference, but when using multiple external meshes the names quickly start to overlap, as they're all looking for "material_0". I end up with forests that look like this:
forest2.jpg
Different trees, same leaves!
Firs with birch bark and conifer leaves. Lovely.

It seems the issues is in Meshlab's renaming of the textures on export. It gives a prompt to rename the textures on export but when I try it use it it crashes pretty hard. Here's what the prompt looks like.
meshlabtexturenaming.jpg
Texture Prompt
So, any clues as to a workaround? Or is there another program that can edit .obj or .3ds files that also would allow me to rename textures so they don't overlap?

User avatar
Whaat
Developer
Posts: 1827
Joined: Fri Dec 22, 2006 6:15 am
Location: Canada
Contact:

Re: Instancing Components

Post by Whaat » Tue Aug 16, 2011 6:56 am

Frutiger wrote: So, any clues as to a workaround? Or is there another program that can edit .obj or .3ds files that also would allow me to rename textures so they don't overlap?
I know it's not the best solution but if you are running into naming overlaps, I recommend only using .obj files. With them, you can open up the file in Notepad++ and do a Find/Replace operation to create the required unique material names (look for a 'usemtl' command). I have done this with all my Xfrog models (since almost all of them have a material named 'bark' for example. I rename it to something like 'EA15_y_Bark' - EA15_y.obj is the name of the .obj file)

I am thinking of ways to handle such naming conflicts with SkIndigo but for now, it has to be done manually or with an external app such as MeshLab.

User avatar
Frutiger
Posts: 122
Joined: Wed May 05, 2010 4:05 am
Location: Northern California

Re: Instancing Components

Post by Frutiger » Tue Aug 16, 2011 7:55 am

Whaat wrote:I know it's not the best solution but if you are running into naming overlaps, I recommend only using .obj files. With them, you can open up the file in Notepad++ and do a Find/Replace operation to create the required unique material names (look for a 'usemtl' command). I have done this with all my Xfrog models (since almost all of them have a material named 'bark' for example. I rename it to something like 'EA15_y_Bark' - EA15_y.obj is the name of the .obj file)
Laborious, but totally worth it. This works like a charm.

StompinTom
Indigo 100
Posts: 1828
Joined: Mon Sep 04, 2006 3:33 pm

Re: Instancing Components

Post by StompinTom » Tue Aug 16, 2011 7:56 am

Use Blender to scale and convert your models!

User avatar
Frutiger
Posts: 122
Joined: Wed May 05, 2010 4:05 am
Location: Northern California

Re: Instancing Components

Post by Frutiger » Tue Aug 16, 2011 8:20 am

I tried! The most recent blender mac build crashes hard in OSX 10.7 for whatever reason.

This manual naming method is super effective. And as an added bonus, I look like a pro when I'm "searching through the code". My co-workers think I'm some kind of magician.

User avatar
Frutiger
Posts: 122
Joined: Wed May 05, 2010 4:05 am
Location: Northern California

Re: Instancing Components

Post by Frutiger » Wed Aug 17, 2011 5:13 am

If anyone else is having similar problems with Blender with OSX Lion, here's a link to an updated version that works. It doesn't seem to be on the main Blender site. lender site.

Post Reply
44 posts

Who is online

Users browsing this forum: No registered users and 21 guests