Planetside Software Forums

General => Terragen Discussion => Topic started by: commorancy on November 28, 2010, 04:27:20 AM

Title: Bugs: Deleting shader networks, importing .OBJ files
Post by: commorancy on November 28, 2010, 04:27:20 AM
Deleting shader networks on objects:

When working with imported models, I find it easier to create one set of shaders that work with a specific model.  The shader set is already tweaked and fully working.  So, when I import the object again (say, in a different pose), I delete the imported shader network and copy/paste (or load) a the working shader system into the newly imported object, then link it up  The difficulty comes when I swap out the new shader node network for the old one.  Once I link the new, the old shader network is still sitting out there unlinked.  If I try to delete it, TG2 doesn't allow it.  I'm not sure this is technically a bug, but once the old shader network is no longer linked, I should be able to delete it.

Importing .OBJ files:

I find that when I create object files from Daz Studio and then import them into Terragen 2, the texture maps are not loaded correctly.  Apparently, Daz Studio exports the map pathnames as "C:\path\to\texture.jpg"  (with the quotes). These quotes get imported into Terragen 2.  Terragen 2 barfs on the quote marks and doesn't load the map.  If I remove the quote marks, the map loads fine.  Since quote marks are common in filenames (specifically file names or paths with spaces), it would be optimal for TG2 to support paths with and without quote marks.  Alternatively, stripping the quote marks off would also work.  Either way, I'd prefer not to have manually correct this issue each time I load a .OBJ with quote marks to texture maps.  Note, these two issues compound to create a problematic third.  

For example, I load an object with paths containing quote marks.  I unlink that shader, but I cannot delete it.  I link up the 'fixed' shader network and that works fine.  The unfixed shader network hangs out there that's uncorrected with quotes and the parsing system parses through it (even though it's unlinked) and can't find the quoted paths.

Please fix.

Thanks.

--Brian
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: Henry Blewer on November 28, 2010, 10:10:18 AM
Have you tried to load the obj files into PoseRay first? It may strip the quotes. It also will map the images onto the objects so Terragen 2 renders them correctly.

I hope this helps.  http://mysite.verizon.net/sfg0000/  (the Poseray download site)
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: commorancy on November 28, 2010, 10:41:52 AM
Quote from: njeneb on November 28, 2010, 10:10:18 AM
Have you tried to load the obj files into PoseRay first? It may strip the quotes. It also will map the images onto the objects so Terragen 2 renders them correctly.

I hope this helps.  http://mysite.verizon.net/sfg0000/  (the Poseray download site)

The last time I tried Poseray on my ATI Radeon based 64 bit Windows 7 system, it crashed as soon as I tried to do anything with the 3D viewport.  I contacted the author about a fix, but he said he didn't have an ATI card to test Poseray, so the bug would remain uncorrected.  I kind of gave up using Poseray after that.

Although, I do have Poser 8.  I could try exporting it using Poser 8 instead.  That might work.

I should mention that once I correct the texture map quote issue by hand, the maps load correctly onto the object within Terragen 2 (i.e., the UVs are correct).  The only things I need to do after that is load displacement and transparency maps (when necessary) and correct the specularity which doesn't get imported properly.  That's part of the reason I pull in an already corrected shader network and link it to a newly imported object.  Once I've corrected the shader network once, there's no reason to reinvent the wheel multiple times.

Thanks.

--Brian
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: cyphyr on November 28, 2010, 10:58:38 AM
I use Poseray all the time with no problems but I dont "do" anything with it. Literally I open up my model and then export it, thats all. Even if texturing has not mapped properly the model is now formatted in a manner that it can easily be added in Terragen.
Richard
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: commorancy on November 28, 2010, 11:06:06 AM
Quote from: cyphyr on November 28, 2010, 10:58:38 AM
I use Poseray all the time with no problems but I dont "do" anything with it. Literally I open up my model and then export it, thats all. Even if texturing has not mapped properly the model is now formatted in a manner that it can easily be added in Terragen.
Richard

Note that the bug I ran into was very specific to ATI Radeon cards on 64 bit Windows 7 systems.  If you're using Nvidia, not on Windows 7 or not on 64 bit Windows you probably won't have an issue. For me, I just can't trust Poseray to work properly for my needs if it has that kind of a crashing bug.  I just can't afford to work through a bunch of stuff in the app and then accidentally trigger it only to lose everything.  Been there, done that.  Not anxious to revisit.

Thanks.

--Brian
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: Henry Blewer on November 28, 2010, 11:35:22 AM
That's odd. I have a ATI Radeon 4350, Windows 7 64 bits. Perhaps changing the Open GL setting to normal buffering...
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: Kadri on November 28, 2010, 12:16:36 PM

I have a Ati 4870 and use Windows 7 64 bit . No problem here too with Poseray (v. 3.12.2.456) , Brian .
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: cyphyr on November 28, 2010, 02:21:54 PM
I also have an ATI (radion mobility 4500) and as I say, works perfectly.
Richard
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: commorancy on November 28, 2010, 02:25:16 PM
Quote from: Kadri on November 28, 2010, 12:16:36 PM

I have a Ati 4870 and use Windows 7 64 bit . No problem here too with Poseray (v. 3.12.2.456) , Brian .

This image below is what happens when I get this bug (and yes, it's still there):

Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: cyphyr on November 28, 2010, 02:48:07 PM
Ok well its obvious you cant use poseray, have you tried the same procedure (load and export) with any other 3d Object conversion apps? 3D Object converter (http://web.axelero.hu/karpo/) is one, shareware $50 and converts a ton of formats (including Terragens TGO format but thats a secret!!)
Richard
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: Klas on November 28, 2010, 05:22:08 PM
http://forums.planetside.co.uk/index.php?topic=7895.msg84433#msg84433 (thank you, jo)
http://www.terragen.org/index.php?topic=4953.msg40236;topicseen#new (object parts, not part shader, you need to login to download the program)
http://www.terragen.org/index.php?topic=4828.msg39010#msg39010
The problem with your ATI card: on a 32 Bit windows system you can use an old version of the atiolgxx.dll (attachment) - copy it to the poseray folder. But I don't know if this dll will work on your system. You can also try to update your ATI driver to the most recent version.
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: commorancy on November 28, 2010, 10:56:27 PM
Quote from: Klas on November 28, 2010, 05:22:08 PM
http://forums.planetside.co.uk/index.php?topic=7895.msg84433#msg84433 (thank you, jo)
http://www.terragen.org/index.php?topic=4953.msg40236;topicseen#new (object parts, not part shader, you need to login to download the program)
http://www.terragen.org/index.php?topic=4828.msg39010#msg39010
The problem with your ATI card: on a 32 Bit windows system you can use an old version of the atiolgxx.dll (attachment) - copy it to the poseray folder. But I don't know if this dll will work on your system. You can also try to update your ATI driver to the most recent version.


Thanks for the tips.  I am on the latest ATI driver 10.11.  In fact, after updating to this version, Carrara 64 bit version now crashes with a bug. Daz has confirmed the bug and is looking into the issue. As far as using an old version of atiolgxx.dll, I'll try that and see if it does anything.

Still, these are all workaround suggestions and I thank you for all the suggestions. However, it would be preferable for Planetside to simply support the quotes or strip them off if not necessary within TG2.  Daz already produces a workable .OBJ file (for the most part).  Additionally, it would be optimal for TG2 to convert the .OBJ specularity maps and bump maps into displacement and specularity within TG2.  I've had no difficulties in loading the .OBJ files in other apps with its associated maps.  So, this is an issue that's localized to TG2's .OBJ importer.

Until then, of course, the workarounds are necessary.

Thanks.

--Brian
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: Oshyan on November 28, 2010, 10:59:49 PM
We'll be doing some work in the future on supporting unicode file names and making the file name/path support more robust in general. I imagine this might go along with that. I'll make a note of it.

- Oshyan
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: commorancy on November 28, 2010, 11:04:25 PM
Quote from: cyphyr on November 28, 2010, 02:48:07 PM
Ok well its obvious you cant use poseray, have you tried the same procedure (load and export) with any other 3d Object conversion apps? 3D Object converter (http://web.axelero.hu/karpo/) is one, shareware $50 and converts a ton of formats (including Terragens TGO format but thats a secret!!)
Richard

Thanks for the tip.  This looks like an excellent tool.  Unfortunately, it doesn't support the quotes either:

Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: Oshyan on November 28, 2010, 11:15:47 PM
Which suggests it may not be a part of the "standard" (such as it is).

- Oshyan
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: commorancy on November 28, 2010, 11:47:27 PM
Quote from: Oshyan on November 28, 2010, 11:15:47 PM
Which suggests it may not be a part of the "standard" (such as it is).

- Oshyan

That may be true.

That said, Poseray (when I used it in the past) and Carrara both load exported Daz Studio .OBJ files and display the image maps.  Poser has the same issue of not being able to find the texture map, except it requests for them.  Note, I ran into this issue several months back and forgot to report it as I found a workaround.  I just thought it might be worth pointing out here.

I've looked around regarding the spec of the .MTL file and there's some question surrounding how to properly handle paths with spaces within the .MTL.  The issue is that on Windows, paths with spaces are very common.  Apparently though, with most .OBJ loaders, spaces in paths and/or filenames are not very well tolerated (if at all).   Since Alias/Wavefront wasn't built originally on Windows, Windows paths weren't considered when designing the .MTL format.  In Windows, it's actually quite typical to surround paths with quote marks when it contains spaces. I'm sure Daz considered all of these issues and compromised by using quotes to surround the path in case it contains spaces.

See this thread discussing spaces in file/paths in the MTL at http://forums.cgsociety.org/archive/index.php/t-564299.html

I will file a bug/enhancement report with Daz to have them allow an export option of adding or not adding quotes on texture maps within their export panel.  Note, Daz's product release cycles are extremely slow when it comes to Daz Studio, so I wouldn't expect to see a fix in Daz Studio for at least a year.

Thanks.
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: jo on November 29, 2010, 01:22:07 AM
Hi,

I will add a check for quoted paths in the OBJ loading code. I have changed it to tolerate spaces but I have to say I didn't think of quoted paths.

Regards,

Jo
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: jo on November 29, 2010, 01:25:25 AM
Regarding the Parts shader, not being able to delete those is by design. However we will have to reconsider that as setting up a common shader set for objects is something people obviously want to do.

And I'll have to figure out how to prevent that workaround Klas mentioned ;-).

Regards,

Jo
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: commorancy on November 29, 2010, 01:53:09 AM
Quote from: jo on November 29, 2010, 01:25:25 AM
I will add a check for quoted paths in the OBJ loading code. I have changed it to tolerate spaces but I have to say I didn't think of quoted paths.

Regarding the Parts shader, not being able to delete those is by design. However we will have to reconsider that as setting up a common shader set for objects is something people obviously want to do.

And I'll have to figure out how to prevent that workaround Klas mentioned ;-).

Regards,

Jo

Thanks Jo.  I look forward to the update (and all the new features, like DOF) ;D

--Brian
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: Dune on November 29, 2010, 03:31:29 AM
Sometimes it's possible to delete the 'old' part shaders in an object, but I wouldn't know (never pursued it) why. I sometimes only replace the default shaders, and delete the old one, that works.
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: dandelO on November 29, 2010, 09:59:57 AM
Quote from: jo on November 29, 2010, 01:25:25 AM

And I'll have to figure out how to prevent that workaround Klas mentioned ;-).

Regards,

Jo

Damnit! :D
Title: Re: Bugs: Deleting shader networks, importing .OBJ files
Post by: dduane on June 10, 2016, 01:11:50 PM
Quote from: Henry Blewer on November 28, 2010, 10:10:18 AM
Have you tried to load the obj files into PoseRay first? It may strip the quotes. It also will map the images onto the objects so Terragen 2 renders them correctly.

I hope this helps.  http://mysite.verizon.net/sfg0000/  (the Poseray download site)

Henry, I just wanted to thank you for this suggestion. I was having the same problem as some of the other posters in the thread, and this solved it.

Thanks again! -- Diane