___ Posted June 29, 2015 Posted June 29, 2015 (edited) I'll look into this but it's not exacly how that work, objects only have one transform which is a mix of position and orientation. The matrices need to be multiplied to do what you want to do Can't you just create two declaration of "transform1" and "transform2" add 2nd cycle into matrice/transform block of your src code, something like: if(object.attributes) { if(object.attributes.name.indexOf("transform") == 0) { for (var i = 0; i < 2; i++) { if("transform"+(i+0)) { code block for matrice } if("transform"+(i+1)) { code block for transform } } } } EDIT I just looked once more into your code in SCParser.java, and there in "parseObjectBlock()" function on line 778 there is exactly this and I think it is the place where you just needs to change it (but I may be wrong, of course): if(peekNextToken("transform")) transform parseMatrix(); One of the possible ways how to do it would be updating that statement into something like this (see: you as actual JAVA coder needs to convert my code logic into proper JAVA syntax as I am not JAVA coder myself, my programming languages are different): if(peekNextToken("transform") || peekNextToken("transform1")) { transform parseMatrix(); } if(peekNextToken("transform2")) { transform parseMatrix(); } If there is similar block elsewhere in some other parts of other .java files it needs to be updated accordingly, of course. Edited June 29, 2015 by bublible Quote
___ Posted June 29, 2015 Posted June 29, 2015 + also function "parseMatrix()" on line 1346, just change it from this: private Matrix4 parseMatrix() throws IOException, ParserException { if (p.peekNextToken("row")) { return new Matrix4(parseFloatArray(16), true); } else if (p.peekNextToken("col")) { return new Matrix4(parseFloatArray(16), false); } else { Matrix4 m = Matrix4.IDENTITY; p.checkNextToken("{"); while (!p.peekNextToken("}")) { Matrix4 t = null; if (p.peekNextToken("translate")) { float x = p.getNextFloat(); float y = p.getNextFloat(); float z = p.getNextFloat(); t = Matrix4.translation(x, y, z); } else if (p.peekNextToken("scaleu")) { float s = p.getNextFloat(); ... ...into this: private Matrix4 parseMatrix() throws IOException, ParserException { if (p.peekNextToken("row")) { return new Matrix4(parseFloatArray(16), true); } else if (p.peekNextToken("col")) { return new Matrix4(parseFloatArray(16), false); } else { Matrix4 m = Matrix4.IDENTITY; p.checkNextToken("{"); while (!p.peekNextToken("}")) { Matrix4 t = null; if (p.peekNextToken("row")) { return new Matrix4(parseFloatArray(16), true); } else if (p.peekNextToken("col")) { return new Matrix4(parseFloatArray(16), false); } else if (p.peekNextToken("translate")) { float x = p.getNextFloat(); float y = p.getNextFloat(); float z = p.getNextFloat(); t = Matrix4.translation(x, y, z); } else if (p.peekNextToken("scaleu")) { float s = p.getNextFloat(); ... ...so it would still allow only one declaration of transform block BUT would accept matrix row and col attributes inside it as a new stuff, seems easy as that unless I am wrong again, right? Quote
___ Posted June 29, 2015 Posted June 29, 2015 (edited) UPDATE: From now on I can officially participate on this project as another developer (if @msx80 allows it and has nothing against it as I am basically editing just SunFlow part, of course ) as I was finally able to compile .jar from my edited BR src files @msx80 send me. So that being said: now we can decorate any brick even those previously undecorable, basically anything we want even several bricks as one decoration etc. ...tutorial is on its way, stay tuned for more! Edited June 29, 2015 by bublible Quote
iceleftd Posted June 30, 2015 Posted June 30, 2015 (edited) UPDATE: From now on I can officially participate on this project as another developer (if @msx80 allows it and has nothing against it as I am basically editing just SunFlow part, of course ) as I was finally able to compile .jar from my edited BR src files @msx80 send me. So that being said: now we can decorate any brick even those previously undecorable, basically anything we want even several bricks as one decoration etc. ...tutorial is on its way, stay tuned for more! Looking forward to this! Please add it to the wiki and then get to work on the transparent shadow problem! I am a professional Java programmer but know very little about image processing. I would be willing to help, however, if I could be of use. Edited June 30, 2015 by iceleftd Quote
msx80 Posted June 30, 2015 Author Posted June 30, 2015 + also function "parseMatrix()" on line 1346, just change it from this: private Matrix4 parseMatrix() throws IOException, ParserException { if (p.peekNextToken("row")) { return new Matrix4(parseFloatArray(16), true); } else if (p.peekNextToken("col")) { return new Matrix4(parseFloatArray(16), false); } else { Matrix4 m = Matrix4.IDENTITY; p.checkNextToken("{"); while (!p.peekNextToken("}")) { Matrix4 t = null; if (p.peekNextToken("translate")) { float x = p.getNextFloat(); float y = p.getNextFloat(); float z = p.getNextFloat(); t = Matrix4.translation(x, y, z); } else if (p.peekNextToken("scaleu")) { float s = p.getNextFloat(); ... ...into this: private Matrix4 parseMatrix() throws IOException, ParserException { if (p.peekNextToken("row")) { return new Matrix4(parseFloatArray(16), true); } else if (p.peekNextToken("col")) { return new Matrix4(parseFloatArray(16), false); } else { Matrix4 m = Matrix4.IDENTITY; p.checkNextToken("{"); while (!p.peekNextToken("}")) { Matrix4 t = null; if (p.peekNextToken("row")) { return new Matrix4(parseFloatArray(16), true); } else if (p.peekNextToken("col")) { return new Matrix4(parseFloatArray(16), false); } else if (p.peekNextToken("translate")) { float x = p.getNextFloat(); float y = p.getNextFloat(); float z = p.getNextFloat(); t = Matrix4.translation(x, y, z); } else if (p.peekNextToken("scaleu")) { float s = p.getNextFloat(); ... ...so it would still allow only one declaration of transform block BUT would accept matrix row and col attributes inside it as a new stuff, seems easy as that unless I am wrong again, right? This is the best way to approach the problem, probably. The code has some problems, but if you say it works now, i guess you've corrected them. Please let me see the code so i can check if it works before including it in the program. Quote
___ Posted June 30, 2015 Posted June 30, 2015 (edited) Looking forward to this! Please add it to the wiki and then get to work on the transparent shadow problem! I am a professional Java programmer but know very little about image processing. I would be willing to help, however, if I could be of use. That'd be great having at least 3 programmers participating on this as more heads more senses, right? BTW I found out that when the decor is ACTUALLY APPLIED directly upon the brick surface the SHADOWING DOES NOT MEAN ANYTHING, that is: it is OK! It occures only if you have for some reason just a pure decor "hanging somewhere in the air" for a purpose that has transparent background - than that shadow is annoying, but applied as I write above the shadow has no effect... BTW link to the WIKI? This is the best way to approach the problem, probably. The code has some problems, but if you say it works now, i guess you've corrected them. Please let me see the code so i can check if it works before including it in the program. Probably but with "small" change (as I already wrote you in PM): if (p.peekNextToken("row")) { t = Matrix4.mtrx(parseFloatArray(16), true); } else if (p.peekNextToken("col")) { t = Matrix4.mtrx(parseFloatArray(16), false); }... Edited June 30, 2015 by bublible Quote
iceleftd Posted June 30, 2015 Posted June 30, 2015 BTW link to the WIKI? I posted it before, but here it is again: http://blueimaging.wikia.com Quote
___ Posted June 30, 2015 Posted June 30, 2015 BlueRender's "Decor Anything" FINAL...hope you'll like it. I posted it before, but here it is again: http://blueimaging.wikia.com Thanx, gonna check it out... Quote
___ Posted July 1, 2015 Posted July 1, 2015 + OK, before I go to sleep now I want to let you know that just while ago I also PROBABLY SOLVED THAT "VERY DARK" GLASS PROBLEM...see you later tomorrow and stay tuned for more, guys! Quote
iceleftd Posted July 1, 2015 Posted July 1, 2015 + OK, before I go to sleep now I want to let you know that just while ago I also PROBABLY SOLVED THAT "VERY DARK" GLASS PROBLEM...see you later tomorrow and stay tuned for more, guys! Awesome!!! Waiting to see the resolution! Quote
lipanz Posted July 1, 2015 Posted July 1, 2015 Thanks :) It's great to hear people liking the program :) The colors are in RGB format, where each value goes from 0 to 1 (0 0 0 is black, 1 1 1 is white). You can change the background in that portion, while the plane can be changed in the "PlaneMaterial" shader, the "diff" variable which is actually { "sRGB nonlinear" 0.3 0.6 0.976 } hi, thanks for the reply..but i still didnt get how it works.. as i read earlier that u mentioned need to divide by 255 to get the sRGB nonlinear color codes, but i still didnt get the result that i want. ok for example, i wanted to use this color (let say papaya whip (255,239,213) ) so divided by 255, it would be 1 0.937 0.835 so i change in background and planematerial to that number. but the result's of rendering shows just plain white color.. can you help me with it? Quote
___ Posted July 1, 2015 Posted July 1, 2015 (edited) hi, thanks for the reply..but i still didnt get how it works.. as i read earlier that u mentioned need to divide by 255 to get the sRGB nonlinear color codes, but i still didnt get the result that i want. ok for example, i wanted to use this color (let say papaya whip (255,239,213) ) so divided by 255, it would be 1 0.937 0.835 so i change in background and planematerial to that number. but the result's of rendering shows just plain white color.. can you help me with it? It is because actual rendered color is affected by several things like background color used, types and numbers of light used, color of lights etc., so you basically need to play with all those to get it right - I know it is somewhat "guess-and-try" process, but... Awesome!!! Waiting to see the resolution! Seems like today evening/night or at least tomorrow cos today ONE BIG THING needs to be done first that @Calabar is waiting for so long...and he will get it today, finally...code name: PROTO Blacktron. Edited July 1, 2015 by bublible Quote
aeralure Posted July 2, 2015 Posted July 2, 2015 This is great news! Thanks so much to those helping. Perhaps now I there is hope that it will work on a Mac one day. Quote
Bob De Quatre Posted July 2, 2015 Posted July 2, 2015 An perhaps there's hope to have a simple parameters tab to control background color, resolution and other simple things, so we don't have to edit those scary files... Quote
___ Posted July 2, 2015 Posted July 2, 2015 An perhaps there's hope to have a simple parameters tab to control background color, resolution and other simple things, so we don't have to edit those scary files... We have briefly talked about it with @msx80 and he said partially it can be done so your chances are rather high... This is great news! Thanks so much to those helping. Perhaps now I there is hope that it will work on a Mac one day. Hm, this is a bit strange as JAVA should work on MAC... Quote
aeralure Posted July 2, 2015 Posted July 2, 2015 Hm, this is a bit strange as JAVA should work on MAC... Yeah, that's been my experience too. Most anything I encounter using Java also works on the Mac. This app though crashes at launch (I see a rectangle of the window for the app opening for just a sec). I reported this a couple pages back, but the app's owner said it doesn't work on a Mac for some reason and he doesn't have a Mac to test. It's probably some simple compiling thing or some line of code (not that I am a programmer) as Java in general works on a Mac and I have the most up to date version and the version needed for this app. Holding out hope it gets on the development update list maybe to see if the issue could be found. I'm at any rate thrilled there's more people able to work on Bluerender. Quote
___ Posted July 2, 2015 Posted July 2, 2015 (edited) Here are my new/latest achievements in BlueRender/SunFlow for you: * correct glass transparency (no more too dark glasses) * correction of glass edges (from the dark one into the lighter one, but this needs to be done with "if()" for specific colors, cos for example trans-dark-blue needs to have it dark...) * decor basically anything you want * black is now really black and not some dull grayish black anymore * more proper baseplate reflections (basically almost none at all) See for yourselves: Link to the sets above topic: http://www.eurobricks.com/forum/index.php?showtopic=111568 Edited July 2, 2015 by bublible Quote
msx80 Posted July 3, 2015 Author Posted July 3, 2015 hi, thanks for the reply..but i still didnt get how it works.. as i read earlier that u mentioned need to divide by 255 to get the sRGB nonlinear color codes, but i still didnt get the result that i want. As bublible said, colors are affected by many things. Try making a stronger color (more saturated). Yeah, that's been my experience too. Most anything I encounter using Java also works on the Mac. This app though crashes at launch (I see a rectangle of the window for the app opening for just a sec). I reported this a couple pages back, but the app's owner said it doesn't work on a Mac for some reason and he doesn't have a Mac to test. It's probably some simple compiling thing or some line of code (not that I am a programmer) as Java in general works on a Mac and I have the most up to date version and the version needed for this app. Holding out hope it gets on the development update list maybe to see if the issue could be found. I'm at any rate thrilled there's more people able to work on Bluerender. Indeed i don't know why i doesn't work, i guess the problem could be JavaFX, the recent brand new graphical toolkit of java. Still searching for a Mac :) Here are my new/latest achievements in BlueRender/SunFlow for you: * correct glass transparency (no more too dark glasses) * correction of glass edges (from the dark one into the lighter one, but this needs to be done with "if()" for specific colors, cos for example trans-dark-blue needs to have it dark...) * decor basically anything you want * black is now really black and not some dull grayish black anymore * more proper baseplate reflections (basically almost none at all) See for yourselves: Link to the sets above topic: http://www.eurobrick...howtopic=111568 Great screenshot! How did you achieved "correct glass transparency (no more too dark glasses)" ? You changed the code or found some magic parameters ? Quote
___ Posted July 3, 2015 Posted July 3, 2015 (edited) Great screenshot! How did you achieved "correct glass transparency (no more too dark glasses)" ? You changed the code or found some magic parameters ? Thanx, yea: I changed/updated code in LightServer.java, but still playing further more with it, later I will again PM/email you updated stuff as lately, OK? BTW I was actually inspired by your own solution to "black reflections on tiles"...or better said: when I was looking into the code I have realized what have you said how you did it... Right now I am doing newer render of the scene with more CS look (orange-yellowish rocky dunes instead of the original blackish glimmering rocks) + also I reverted back to "dark glass edges" as it still looks better/more realistic than the right ones (that is: the lighter ones), cos as @Calabar said elsewhere this way they are looking too much...ehm...like from building manual, not that much realistic, so you can compare those two. Edited July 3, 2015 by bublible Quote
___ Posted July 3, 2015 Posted July 3, 2015 (edited) Here is the 2nd "ClassicSpace" version - (from my poin-of-view) the better one, more realistic looking (now with darker glass edges): Edited July 3, 2015 by bublible Quote
Jody Meyer Posted July 3, 2015 Posted July 3, 2015 An perhaps there's hope to have a simple parameters tab to control background color, resolution and other simple things, so we don't have to edit those scary files... Yup I agree, that would make this program really stand out, those files are not at all fun, I have tried the background thing and Iall I get is either white or a nice long error. Quote
__________________________ Posted July 3, 2015 Posted July 3, 2015 Can someone do a side-by-side comparison between POVRay and Bluerender? I'm curious how different the results are: time-wise, Bluerender is way quicker. Quote
___ Posted July 3, 2015 Posted July 3, 2015 UPDATE: As of now I am finally able COMPLETELY BYPASS SHADOWS (tho at this early stage only ALL shadows for all objects), but that si very good sign that at least I know where to look and what to do...ehm, more or less. Quote
iceleftd Posted July 3, 2015 Posted July 3, 2015 (edited) Can someone do a side-by-side comparison between POVRay and Bluerender? I'm curious how different the results are: time-wise, Bluerender is way quicker. See post #162 (pg 7), and post #203 (pg 9) of this forum. Also Notable differences: Bluerender does not offer bevels (joints between bricks) or the LEGO logo on the studs, both of which are available on higher settings on POV-Ray. But Bluerender is MUCH faster and looks more natural (in my opinion). For example, in that Flickr image link I supplied, the white tables look gray in POV-Ray and the overall look is sort of hyper-real. Bluerender seems to look more like a well-lit photograph to me. Edited July 3, 2015 by iceleftd Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.