Blender2indigo 0.62beta1

Announcements, requests and support regarding the Blender Indigo export script
Jananton
Posts: 66
Joined: Sun Dec 31, 2006 12:56 pm
Location: Amsterdam, The Netherlands

Post by Jananton » Sun Jan 14, 2007 2:31 am

drBouvierLeduc wrote:Problem with UV textures :

My projects are located in "c:\program files\indigo\scenes\xxx\...", with .blend files and textures.
But the exporter looks for the textures in "c:\program files\indigo\...", so it can't find them.

Is there a way to make it look in the directory where the .blend file is ?
As far as I understand how indigo locates the needed textures, it looks for them in the same folder as where the loaded xml model file is located. In other words if you use the default.xml option it will look for them in the indigo root folder. If however you switch the def button off and export the xml file to for instance the testscenes folder or a subfolder you created yourself, the texture files must be in that folder as well.
If you have a folder with .blend files and their textures in that same folder you just have to export your xml file to that same folder and it should work...
At least it does over here using the testscenes subfolder... :wink:

Greetings from rainy Amsterdam,

Jan

User avatar
OnoSendai
Developer
Posts: 6244
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Sun Jan 14, 2007 2:35 am

Yes, that's correct Jan.
The working directory used for textures etc.. is where the xml file is located.

User avatar
afecelis
Posts: 749
Joined: Tue Aug 01, 2006 4:14 am
Location: Colombia
3D Software: Blender
Contact:

Post by afecelis » Sun Jan 14, 2007 2:42 am

yup, that's one of the things I like about Indigo; you can keep all of your stuff "per project" in a single folder (textures, 3d files, etc).

The error I got when exporting using the official blender (whic installs in C:\Program Files\Blender Foundation\Blender) was this one:
Image

In which the renderer doesn't get triggered because of the space present in "Program Files"; hence U3dreal's tip of using a blender installed at C:\

I used the latest 2.43rc1 for this regard :wink:
Last edited by afecelis on Sun Jan 14, 2007 2:57 am, edited 1 time in total.
AMD Ryzen 7 1800 @3.6ghz, 32GB ddr4 3200 mhz Ram, Nvidia RTX 3060 12GB, Win10, Blender/Sketchup/Modo/Cinema4d

Jananton
Posts: 66
Joined: Sun Dec 31, 2006 12:56 pm
Location: Amsterdam, The Netherlands

Post by Jananton » Sun Jan 14, 2007 2:46 am

afecelis wrote:U3dreal's exporter has a "none" option among the environment options to choose; yours uses the usual 3 (texture map, physical sky, background color). Is "none" interpreted as bkg color? Hence getting rid of it your version?
That 'none' option is removed in my version. It made indigo crash in a very fatal way resulting in wanting to send error messages to uncle Bill.. :D

As for using relative path's instead of absolute ones. That is ihmo just as much a can of worms as what we're using now.

Lets hope Phil will try what I've asked him to try and report back, because I'm inclined to think the option os.chdir(datadir) for launching the cmd file will work, but I want to know for sure...
Needles to say that it works on my system, but hey I've got no spaces in my folders. 8)

Greetings from rainy Amsterdam,

Jan

PS You can have a look at my post to Phil earlier today and see if updating the script with my suggestions there do help...

Phil
Posts: 154
Joined: Mon Nov 06, 2006 2:22 am
Location: St. Wendel, Germany

Post by Phil » Sun Jan 14, 2007 3:35 am

Hi all,

@Jananton
Just to be clear about al the versions I tested here:
The original version does not work with path containing spaces ( " " )
My modifications work (has to be adapted with thread and belownormal parameters)
(I suppose you read my post, did you?)
The version of Hans works also well for me (sometimes)
Your last version does not work with path including spaces.

Do not worry, I will have a look in the code and test zour propositions, but this will be tomorrow (or later)

@all developpers:
do not ask me to install blender or Indigo in an other directory!!!!!!!!!
Sorry, but developers should make the user´s life easyer
There exists solutions in all programming language to realise this!

@Jananton
Your decision to remove the none option is realy a good decision!
It is frustrating for an end user to crash without understanding why.

@all
There is a point that I do not understand in the exporter:
First we write a wrapper.cmd with all the variables
second we read this file and build an os.cmd(something)
This is a mystery for me because we know everything in the source code.
So why not just writing an os.cmd(something) directly?
This is more efficient, and more os independent

Thanks again to all people involving in this exporter :D

Regards, Phil

User avatar
afecelis
Posts: 749
Joined: Tue Aug 01, 2006 4:14 am
Location: Colombia
3D Software: Blender
Contact:

Post by afecelis » Sun Jan 14, 2007 3:44 am

do not ask me to install blender or Indigo in an other directory!!!!!!!!!
Sorry, but developers should make the user´s life easyer
There exists solutions in all programming language to realise this!
Amen! :wink: End users just like to install things no matter where they're located and expect things to work :D
AMD Ryzen 7 1800 @3.6ghz, 32GB ddr4 3200 mhz Ram, Nvidia RTX 3060 12GB, Win10, Blender/Sketchup/Modo/Cinema4d

Jananton
Posts: 66
Joined: Sun Dec 31, 2006 12:56 pm
Location: Amsterdam, The Netherlands

Post by Jananton » Sun Jan 14, 2007 4:39 am

Phil wrote:Hi all,

@Jananton
Just to be clear about al the versions I tested here:
The original version does not work with path containing spaces ( " " )
My modifications work (has to be adapted with thread and belownormal parameters)
(I suppose you read my post, did you?)
The version of Hans works also well for me (sometimes)
Your last version does not work with path including spaces.
Yes, I did read your post, that's why I'm almost sure doing a os.chdir(datadir) and then launch the cmd file, or should I say bat, file will work.

We need a cmd or bat file because the option /b belownormal just doesn't work from the commandline directly, only embedded in a batch file afaik.

No, I didn't ask you to install anything anywhere else, that would take all the fun out of this, and I wouldn't do that myself if someone asked me that... 8)

On a positive note I've added a makename function that was obviously missing, and that's used not only in the animation exporter, but also if one wants to seperate the materials from the model file. One thing to note though. All seperate exported geometric and material files now use allowed characters and symbols as described in the windows api, so no more minus signs, but underscores are used in those names.
Phil wrote: Do not worry, I will have a look in the code and test zour propositions, but this will be tomorrow (or later)
Well, I'll byte the bullit and upload a next version that I'll hope will do the trick. If this newer version again is problematic, then I will have to study python some more to see if there is an equivalent more suited than os.system() to do this. ( something like functions as ShellExecuteEx or CreateProcess in C(++) that give much more control on how things are run )

Greetings from cloudy Amsterdam,

Jan

zuegs
Posts: 380
Joined: Tue Jun 27, 2006 5:46 pm
Location: switzerland

Post by zuegs » Sun Jan 14, 2007 4:58 am

Hi u3dreal,

for new v0.7t1 exporter... the rotation matrix must be orthogonal, so the scale must be set by the scale-tag. I think following code should get the scale out of the blender object matrix:

Code: Select all

		scale = ((matrix[0][0]**2+matrix[1][0]**2+matrix[2][0]**2)**0.5 + \
		(matrix[0][1]**2+matrix[1][1]**2+matrix[2][1]**2)**0.5 + \
		(matrix[0][2]**2+matrix[1][2]**2+matrix[2][2]**2)**0.5) / 3
		str += "\t\t<scale>%g</scale>\n" %scale
		str += "\t\t<rotation>\n"
		str += "\t\t\t<matrix>\n"
		str += "\t\t\t\t"
		for v in range(3):
			for z in range(3):
				str += "%g " %(matrix[z][v]/scale)
		str += "\n"
		str += "\t\t\t</matrix>\n"
		str += "\t\t</rotation>\n"
greets zuegs

Jananton
Posts: 66
Joined: Sun Dec 31, 2006 12:56 pm
Location: Amsterdam, The Netherlands

Post by Jananton » Sun Jan 14, 2007 5:18 am

Hello All,

Well, keep fingers crossed and hope that this finally will negotiate that dreaded 'Program Files' space, not to mention the 'Blender Foundation' folder that inherently has the same problem. 8)

Export script voor indigo v.6 build 63beta2

Greetings from cloudy Amsterdam,

Jan

User avatar
drBouvierLeduc
Posts: 412
Joined: Wed Oct 11, 2006 2:32 am
Location: france

Post by drBouvierLeduc » Sun Jan 14, 2007 5:45 am

Tried last exporter (beta2) on windows xp : it works just fine. Many thanks Jananton
Last edited by drBouvierLeduc on Sun Jan 14, 2007 6:18 am, edited 1 time in total.

User avatar
afecelis
Posts: 749
Joined: Tue Aug 01, 2006 4:14 am
Location: Colombia
3D Software: Blender
Contact:

Post by afecelis » Sun Jan 14, 2007 5:47 am

You nailed it down! :D Works like a charm Jan! Superb work. How did you achieve it in the end?

Don't have enough words to thank all of you guys cracking your heads to get this thing to work so that all we "poor mortals" gotta do is click on "render", hehehehe :wink:

EDIT: I guess this might be considered the last "official" and evolved script for version 0.6 of Indigo, right?

The scripts dev page should be updated as well.
AMD Ryzen 7 1800 @3.6ghz, 32GB ddr4 3200 mhz Ram, Nvidia RTX 3060 12GB, Win10, Blender/Sketchup/Modo/Cinema4d

User avatar
u3dreal
Posts: 346
Joined: Sun Jul 02, 2006 10:36 am

Post by u3dreal » Sun Jan 14, 2007 6:27 am

zuegs wrote:Hi u3dreal,

I was looking for your last version of the script but when i download "here it is..." link in your first post i get an old version from 3.1.07 ????
I feel a bit stupid as it seems i missed a new link somewhere... could you please repost lastest script... Thx man ;)

by thw way? For new v0.7t1? As blenders node-materials are not yet accessible through python API it's difficult to add "blend" and "media" features. "normal_smoothing"-tag in meshs and "ior"-tag in phong materials could be a first start for v07. I think we need something like a internal constant in the script that defines indigo version to export for... so we could use same script for exporting v06 and v07 XMLs... what do you think about???

Thx to all
There is no link to 0.7beta1... as i have to write it first..
but most of the things are already in there ;) ...

cheers

u3dreal ;)

User avatar
drBouvierLeduc
Posts: 412
Joined: Wed Oct 11, 2006 2:32 am
Location: france

Post by drBouvierLeduc » Sun Jan 14, 2007 6:42 am

OK, I have a question :

Why can't we use a mesh emitter + a background color at the same time ?
I would be so much easier to setup scenes like this, and closer to reality.

Anyway, the last version of the exporter (beta2) is a great work, many thanks.

User avatar
u3dreal
Posts: 346
Joined: Sun Jul 02, 2006 10:36 am

Post by u3dreal » Sun Jan 14, 2007 6:45 am

wooo so many stuff....

Great this is really a community thing now...

I really felt a bit lost with the max exporter... as there was little but
no help from others...

I try to keep track of what's going on ..but it's getting harder the more
you change ...

I suggest that you mail me the sulotions you found so i can add all
this to 0.7test1 !! Not much to code and there should be a new version..

If noone has something against i will put all that we accomplish
together... ;)

So plz mail me the soolutions to u3dreal(at)yahoo(dot)de..
PLZ ONLY the solutions... questions should go to the forum !!!

why on earth does Indigo crash with environment set to none does this
get written into the xml ..?? So what to set if i want to use no background??? black environment ??

cheers

u3dreal ;)

User avatar
u3dreal
Posts: 346
Joined: Sun Jul 02, 2006 10:36 am

Post by u3dreal » Sun Jan 14, 2007 6:53 am

zuegs wrote:Hi u3dreal,

for new v0.7t1 exporter... the rotation matrix must be orthogonal, so the scale must be set by the scale-tag. I think following code should get the scale out of the blender object matrix:

Code: Select all

		scale = ((matrix[0][0]**2+matrix[1][0]**2+matrix[2][0]**2)**0.5 + \
		(matrix[0][1]**2+matrix[1][1]**2+matrix[2][1]**2)**0.5 + \
		(matrix[0][2]**2+matrix[1][2]**2+matrix[2][2]**2)**0.5) / 3
		str += "\t\t<scale>%g</scale>\n" %scale
		str += "\t\t<rotation>\n"
		str += "\t\t\t<matrix>\n"
		str += "\t\t\t\t"
		for v in range(3):
			for z in range(3):
				str += "%g " %(matrix[z][v]/scale)
		str += "\n"
		str += "\t\t\t</matrix>\n"
		str += "\t\t</rotation>\n"
greets zuegs
thanks zuegs thats something i'v already been thinking about

I my opinion we should reset the transform before exporting (same as
ctrl A ... not set the scale in the indigo tags... this is the place where
system scale should go .. thats also on my list..

this way with the scale reset we can also use scale independently for x,y,z ... and we can do transform with instances i did that with the
max exporter .. instances is defnetly a thing to look into...

So just resetting scale which should be possible from python
should also solve the problem,,

cheers

u3dreal ;)

Post Reply
113 posts

Who is online

Users browsing this forum: No registered users and 68 guests